@hhgtech/hhg-components 1.29.563 → 1.29.565-beta-1
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/{InputDate-77ddbae6.js → InputDate-f03af8f7.js} +11 -11
- package/build/{LastPeriod-d0b5b0a6.js → LastPeriod-13ec72af.js} +1 -1
- package/build/{MobileBottomNavigationIcon-77838667.js → MobileBottomNavigationIcon-e9ea3601.js} +3 -3
- package/build/{SiteWideBanner-aabacbc3.js → SiteWideBanner-7e9a197b.js} +13 -13
- package/build/{Spinner-e1f714ff.js → Spinner-8e382bd8.js} +1 -1
- package/build/{WhatsApp-9ee3dc2c.js → WhatsApp-fc100ed5.js} +1 -1
- package/build/adapters.js +26 -21
- package/build/atoms.js +56 -53
- package/build/babyGrowth.js +94 -92
- package/build/cache.js +2 -2
- package/build/care.js +22 -23
- package/build/careBookingSearchBar.js +14 -15
- package/build/careBookingSearchBarV2.js +19 -20
- package/build/components/mantine/index.d.ts +1 -0
- package/build/components.js +112 -112
- package/build/{constants-bd4d317e.js → constants-01490e39.js} +6 -7
- package/build/{constants-37410a43.js → constants-48a22baf.js} +1 -1
- package/build/constants.js +5 -4
- package/build/constantsDomainLocales.js +10 -17
- package/build/constantsRiskScreener.js +3 -4
- package/build/constantsSite.js +25 -26
- package/build/{core-fb05def5.js → core-87a13e02.js} +1 -1
- package/build/{dataTransform-84d4cc48.js → dataTransform-12df9d0a.js} +1 -1
- package/build/ecom.js +4 -5
- package/build/{editor-07859de6.js → editor-f260cbc5.js} +11 -11
- package/build/embeddedHeathToolCards_babyGrowth.js +31 -27
- package/build/embeddedHeathToolCards_babyPoop.js +26 -22
- package/build/embeddedHeathToolCards_babyVaccine.js +28 -24
- package/build/embeddedHeathToolCards_bmi_bmi.js +32 -28
- package/build/embeddedHeathToolCards_bmrBmr.js +32 -28
- package/build/embeddedHeathToolCards_dueDate_dueDate.js +28 -24
- package/build/embeddedHeathToolCards_ovulation_ovulation.js +28 -24
- package/build/embeddedHeathToolCards_pwg_pwg.js +32 -28
- package/build/embeddedHeathToolCards_targetHeartRate.js +33 -29
- package/build/esm/{InputDate-cc99b6d0.js → InputDate-45d139fa.js} +5 -5
- package/build/esm/{LastPeriod-452dd485.js → LastPeriod-04b44b0e.js} +1 -1
- package/build/esm/{MobileBottomNavigationIcon-235577c7.js → MobileBottomNavigationIcon-c28a8c69.js} +3 -3
- package/build/esm/{SiteWideBanner-b4d27d2d.js → SiteWideBanner-b58ea1ff.js} +13 -13
- package/build/esm/{Spinner-ec17659b.js → Spinner-13a266a5.js} +1 -1
- package/build/esm/{WhatsApp-d8a5c823.js → WhatsApp-6247547b.js} +1 -1
- package/build/esm/adapters.js +26 -21
- package/build/esm/atoms.js +56 -53
- package/build/esm/babyGrowth.js +89 -87
- package/build/esm/cache.js +2 -2
- package/build/esm/care.js +22 -23
- package/build/esm/careBookingSearchBar.js +14 -15
- package/build/esm/careBookingSearchBarV2.js +19 -20
- package/build/esm/components/mantine/index.d.ts +1 -0
- package/build/esm/components.js +112 -112
- package/build/esm/{constants-df7ec944.js → constants-368de07a.js} +1 -1
- package/build/esm/{constants-e601aaa9.js → constants-b317714b.js} +1 -2
- package/build/esm/constants.js +3 -4
- package/build/esm/constantsDomainLocales.js +8 -17
- package/build/esm/constantsRiskScreener.js +1 -2
- package/build/esm/constantsSite.js +1 -2
- package/build/esm/{core-ce578814.js → core-0c9b19dc.js} +1 -1
- package/build/esm/{dataTransform-f481b559.js → dataTransform-534df374.js} +1 -1
- package/build/esm/ecom.js +4 -5
- package/build/esm/{editor-4d0e259d.js → editor-8d62e785.js} +11 -11
- package/build/esm/embeddedHeathToolCards_babyGrowth.js +31 -27
- package/build/esm/embeddedHeathToolCards_babyPoop.js +26 -22
- package/build/esm/embeddedHeathToolCards_babyVaccine.js +28 -24
- package/build/esm/embeddedHeathToolCards_bmi_bmi.js +32 -28
- package/build/esm/embeddedHeathToolCards_bmrBmr.js +32 -28
- package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +28 -24
- package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +28 -24
- package/build/esm/embeddedHeathToolCards_pwg_pwg.js +32 -28
- package/build/esm/embeddedHeathToolCards_targetHeartRate.js +33 -29
- package/build/esm/footer.js +29 -24
- package/build/esm/gAssets.js +1 -2
- package/build/esm/{healthTools-44740e8f.js → healthTools-069647df.js} +1 -1
- package/build/esm/healthToolsCardWrapper.js +24 -20
- package/build/esm/healthToolsForm.js +41 -37
- package/build/esm/hooks.js +14 -15
- package/build/esm/i18n/translationKeys.d.ts +1 -1
- package/build/esm/i18n-values/en-PH.js +4 -4
- package/build/esm/i18n-values/hi-IN.js +4 -4
- package/build/esm/i18n-values/id-ID.js +4 -4
- package/build/esm/i18n-values/km-KH.js +4 -4
- package/build/esm/i18n-values/ms-MY.js +4 -4
- package/build/esm/i18n-values/my-MM.js +4 -4
- package/build/esm/i18n-values/th-TH.js +4 -4
- package/build/esm/i18n-values/tl-PH.js +4 -4
- package/build/esm/i18n-values/vi-VN.js +4 -4
- package/build/esm/i18n-values/vi-VN_MB.js +7 -7
- package/build/esm/i18n-values/zh-SG.js +5 -5
- package/build/esm/i18n-values/zh-TW.js +4 -4
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/{index-fd14b5cc.js → index-00a3e54f.js} +2 -2
- package/build/esm/{index-77d6742b.js → index-049a2885.js} +2 -2
- package/build/esm/{index-38e02356.js → index-0783652c.js} +2 -2
- package/build/esm/{index-c6173d3c.js → index-0c2f93ec.js} +13 -13
- package/build/esm/{index-279facda.js → index-0ca163db.js} +2 -2
- package/build/esm/{index-4a8804a9.js → index-0ec56673.js} +2 -2
- package/build/esm/{index-db1f2626.js → index-0f49e7d0.js} +32 -33
- package/build/esm/{index-913d90e7.js → index-0fc199bc.js} +2 -2
- package/build/esm/{index-b395f712.js → index-12291a39.js} +11 -11
- package/build/esm/{index-9f9ec90c.js → index-12fb74c0.js} +3 -3
- package/build/esm/{index-ac735775.js → index-18de3033.js} +16 -16
- package/build/esm/{index-35893787.js → index-1c8b76ad.js} +1 -1
- package/build/esm/{index-76127289.js → index-1d2c6f95.js} +3 -3
- package/build/esm/{index-77ac9902.js → index-1fb38a32.js} +12 -12
- package/build/esm/{index-3be610be.js → index-23f18b53.js} +2 -2
- package/build/esm/{index-f719acd8.js → index-244ca3d6.js} +24 -25
- package/build/esm/{index-3def63eb.js → index-26760922.js} +2 -2
- package/build/esm/{index-9facca60.js → index-2a1368a3.js} +2 -2
- package/build/esm/{index-185949f8.js → index-2b7974eb.js} +25 -25
- package/build/esm/{index-a3c3050c.js → index-2dc9e48a.js} +1 -1
- package/build/esm/{index-20b7c7b0.js → index-3be07d01.js} +2 -2
- package/build/esm/{index-9f7c3682.js → index-3c2f59a2.js} +15 -15
- package/build/esm/{index-cd3228b0.js → index-4459ce00.js} +2 -2
- package/build/esm/{index-9e2af89d.js → index-50ac865c.js} +2 -2
- package/build/esm/{index-c7b86830.js → index-517bd5e3.js} +13 -13
- package/build/esm/{index-2e704c05.js → index-54ccf537.js} +46 -41
- package/build/esm/{index-67f67c19.js → index-5b1f44d4.js} +3 -3
- package/build/esm/{index-9f821fdb.js → index-63a742ab.js} +7 -7
- package/build/esm/{index-11d20309.js → index-6ff67fa8.js} +3 -3
- package/build/esm/{index-a3031ec7.js → index-706a48a4.js} +1 -1
- package/build/esm/{index-19477d0b.js → index-718b3d47.js} +2 -2
- package/build/esm/{index-4eb9495e.js → index-75530885.js} +3 -3
- package/build/esm/{index-00eff558.js → index-7c33a73c.js} +1 -1
- package/build/esm/{index-352c97d0.js → index-7efcb902.js} +3 -3
- package/build/esm/{index-b4f2a014.js → index-84581e16.js} +7 -7
- package/build/esm/{index-aa575cb5.js → index-86b665fd.js} +14 -14
- package/build/esm/{index-40b333d9.js → index-874f3153.js} +21 -21
- package/build/esm/{index-608c04dc.js → index-91127047.js} +5 -6
- package/build/esm/{index-d7939883.js → index-92dffebd.js} +2 -2
- package/build/esm/{index-0f421cd7.js → index-935393a0.js} +2 -2
- package/build/esm/{index-bb203d23.js → index-95744340.js} +14 -15
- package/build/esm/{index-86c8d8be.js → index-958917c8.js} +22 -22
- package/build/esm/{index-48f32334.js → index-9b2b473c.js} +16 -3
- package/build/esm/{index-bb2489b0.js → index-9e88a664.js} +14 -14
- package/build/esm/{index-6fa1fa97.js → index-9f6d93cc.js} +22 -22
- package/build/esm/{index-ef46a07d.js → index-a0e24d9d.js} +3 -3
- package/build/esm/{index-c7118bd1.js → index-a1c40246.js} +3 -3
- package/build/esm/{index-786be143.js → index-a874917c.js} +17 -17
- package/build/esm/{index-632b0b0a.js → index-acfb0e91.js} +6 -6
- package/build/esm/{index-c9fcb837.js → index-b0ee9b1b.js} +2 -2
- package/build/esm/{index-20bd8002.js → index-b347494a.js} +3 -3
- package/build/esm/{index-3fcf9c04.js → index-b5924be2.js} +4 -4
- package/build/esm/{index-e26d69cb.js → index-b7bbf8c2.js} +38 -4
- package/build/esm/{index-11283647.js → index-bb53fee9.js} +5 -5
- package/build/esm/{index-9ceaa5cc.js → index-be427bfe.js} +41 -18
- package/build/esm/{index-1e975185.js → index-c06ff433.js} +14 -14
- package/build/esm/{index-fbb19552.js → index-c544e1dc.js} +19 -20
- package/build/esm/{index-4a830c7b.js → index-c584a801.js} +16 -16
- package/build/esm/{index-8fb3d688.js → index-c9f084d1.js} +2 -2
- package/build/esm/{index-9f4620ea.js → index-cb8df8df.js} +9 -9
- package/build/esm/{index-519e0266.js → index-ce9ff90f.js} +31 -32
- package/build/esm/{index-171954ea.js → index-d008127c.js} +16 -16
- package/build/esm/{index-64eca863.js → index-d4c32a24.js} +5 -6
- package/build/esm/{index-a86d1b00.js → index-dbe92725.js} +6 -7
- package/build/esm/{index-d9d08978.js → index-ddd18a30.js} +7 -8
- package/build/esm/{index-698877f3.js → index-dfca910b.js} +1 -1
- package/build/esm/{index-002893a8.js → index-e12c0438.js} +18 -18
- package/build/esm/{index-aa8f8ae9.js → index-e47d879f.js} +16 -16
- package/build/esm/{index-f0626818.js → index-ebb67c93.js} +17 -17
- package/build/esm/{index-85981a14.js → index-effceda9.js} +1 -1
- package/build/esm/{index-d1ca6bb1.js → index-f919cca2.js} +3 -3
- package/build/esm/{index-4299f246.js → index-f9ac0005.js} +1430 -15
- package/build/esm/index.js +130 -130
- package/build/esm/interfaces/constants/domainLocales.d.ts +7 -14
- package/build/esm/interfaces/constants/index.d.ts +2 -1
- package/build/esm/interfaces/types/HelloWellness.d.ts +0 -4
- package/build/esm/{labelSorting-4ca82ee5.js → labelSorting-974547d1.js} +4 -4
- package/build/esm/lead.js +39 -38
- package/build/esm/{logoIcon-ed1e7932.js → logoIcon-8c57b4a9.js} +2 -2
- package/build/esm/mantine.js +33 -29
- package/build/esm/misc.js +18 -19
- package/build/esm/miscGetDynamicHealthTool.js +3 -4
- package/build/esm/miscGetSocialList.js +7 -8
- package/build/esm/miscScreenSizeContext.js +1 -1
- package/build/esm/mobileBottomNavigation.js +5 -5
- package/build/esm/mobileBottomNavigationIcon.js +5 -5
- package/build/esm/molecules.js +87 -87
- package/build/esm/moleculesArticleCard.js +5 -6
- package/build/esm/moleculesArticleCardV2.js +23 -18
- package/build/esm/navigation.js +56 -55
- package/build/esm/navigationLogoutPopup.js +10 -11
- package/build/esm/navigationProfileButton.js +32 -28
- package/build/esm/onboardingV2.js +34 -31
- package/build/esm/organisms.js +69 -69
- package/build/esm/{post-1420dcf1.js → post-9e9cd1a1.js} +2 -2
- package/build/esm/profileNavigation.js +25 -21
- package/build/esm/progressBar.js +1 -1
- package/build/esm/pwg.js +28 -24
- package/build/esm/{routing-b72bc2d4.js → routing-dc7f5c0b.js} +3 -3
- package/build/esm/ssoV2/api/index.d.ts +10 -2
- package/build/esm/ssoV2/index.d.ts +2 -1
- package/build/esm/ssoV2/ssoStateManager/index.d.ts +3 -1
- package/build/esm/ssoV2/theme.d.ts +24 -0
- package/build/esm/ssoV2.js +94 -1470
- package/build/esm/{store-db0ff924.js → store-910b3985.js} +4 -5
- package/build/esm/subot.js +45 -42
- package/build/esm/surveyOrPremiumBanner.js +38 -35
- package/build/esm/surveyQuestionCard.js +11 -11
- package/build/esm/{surveyThankyouCard-982a093e.js → surveyThankyouCard-8a6b245e.js} +5 -5
- package/build/esm/together.js +62 -60
- package/build/esm/togetherApiUtils.js +7 -8
- package/build/esm/togetherAtoms.js +37 -33
- package/build/esm/togetherComponentGlobalContext.js +7 -8
- package/build/esm/togetherMolecules.js +57 -55
- package/build/esm/togetherMoleculesCardAuthor.js +28 -29
- package/build/esm/togetherMoleculesPostImagePreview.js +14 -15
- package/build/esm/togetherMoleculesProfileDetail.js +45 -42
- package/build/esm/togetherOrganisms.js +54 -52
- package/build/esm/togetherRichTextEditor.js +21 -22
- package/build/esm/togetherShareBox.js +13 -14
- package/build/esm/{transform-37d0e408.js → transform-b9d3eb8b.js} +33 -34
- package/build/esm/{translationsProvider-14efad47.js → translationsProvider-7b96b87e.js} +1 -1
- package/build/esm/{treePopoverMenu-88124e54.js → treePopoverMenu-aeedadf6.js} +18 -19
- package/build/esm/{types-7a991880.js → types-9d92166a.js} +1 -1
- package/build/esm/types.js +1 -2
- package/build/esm/{useCartCareService-7569671d.js → useCartCareService-d6905755.js} +1 -1
- package/build/esm/{useHealthToolCache-b9dabe52.js → useHealthToolCache-909a0813.js} +1 -1
- package/build/esm/{usePhoneValidator-02ee9722.js → usePhoneValidator-41326400.js} +4 -5
- package/build/esm/{usePlacesAutocomplete-116568f0.js → usePlacesAutocomplete-99c37c9c.js} +1 -1
- package/build/esm/{useResolvedCaptureUrls-8ed014ab.js → useResolvedCaptureUrls-11463131.js} +1 -1
- package/build/esm/useTogetherAuthRequiredAction.js +9 -10
- package/build/esm/{utils-9de0bc40.js → utils-00dee890.js} +1 -2
- package/build/esm/{utils-5339d512.js → utils-0e90a1cd.js} +4 -5
- package/build/esm/{utils-de89d4c3.js → utils-b01b84f4.js} +2 -2
- package/build/esm/{utils-74945d34.js → utils-b8d49a0f.js} +5 -5
- package/build/esm/{utils-4d032e41.js → utils-d8a13a7d.js} +4 -4
- package/build/esm/vaccination.js +27 -23
- package/build/footer.js +29 -24
- package/build/gAssets.js +1 -2
- package/build/{healthTools-91b5c21a.js → healthTools-87c35448.js} +1 -1
- package/build/healthToolsCardWrapper.js +24 -20
- package/build/healthToolsForm.js +41 -37
- package/build/hooks.js +14 -15
- package/build/i18n/translationKeys.d.ts +1 -1
- package/build/i18n-values/en-PH.js +4 -4
- package/build/i18n-values/hi-IN.js +4 -4
- package/build/i18n-values/id-ID.js +4 -4
- package/build/i18n-values/km-KH.js +4 -4
- package/build/i18n-values/ms-MY.js +4 -4
- package/build/i18n-values/my-MM.js +4 -4
- package/build/i18n-values/th-TH.js +4 -4
- package/build/i18n-values/tl-PH.js +4 -4
- package/build/i18n-values/vi-VN.js +4 -4
- package/build/i18n-values/vi-VN_MB.js +7 -7
- package/build/i18n-values/zh-SG.js +5 -5
- package/build/i18n-values/zh-TW.js +4 -4
- package/build/i18n.js +2 -2
- package/build/i18nV2.js +1 -1
- package/build/{index-68bc1aae.js → index-0301ac72.js} +16 -3
- package/build/{index-d0f39fb0.js → index-05c28b4b.js} +2 -2
- package/build/{index-b7f76f54.js → index-0c6da17d.js} +4 -4
- package/build/{index-4910221c.js → index-106be27f.js} +21 -21
- package/build/{index-d2c6c119.js → index-1386aeae.js} +126 -121
- package/build/{index-7b35d099.js → index-157d2ddf.js} +34 -35
- package/build/{index-350fec62.js → index-15be670f.js} +3 -3
- package/build/{index-e41e9c24.js → index-170a4b21.js} +25 -25
- package/build/{index-fc00567e.js → index-187e988f.js} +2 -2
- package/build/{index-4038200e.js → index-1936bc7f.js} +76 -42
- package/build/{index-e7a8275a.js → index-1a5d3d33.js} +1 -1
- package/build/{index-12e00e52.js → index-1a9c0053.js} +2 -2
- package/build/{index-3f9ed058.js → index-1c157252.js} +2 -2
- package/build/{index-2f0bb0b6.js → index-1e29fd17.js} +7 -7
- package/build/{index-b3882fdf.js → index-243013ef.js} +2 -2
- package/build/{index-987dd70e.js → index-2533195e.js} +5 -5
- package/build/{index-2258774d.js → index-291fda8d.js} +14 -14
- package/build/{index-d561c5c7.js → index-2cb5fd07.js} +46 -22
- package/build/{index-798848e2.js → index-2d185cda.js} +16 -16
- package/build/{index-cfb8e6b3.js → index-2d6e63cc.js} +153 -153
- package/build/{index-78c3da19.js → index-2e30d1db.js} +24 -25
- package/build/{index-dae3ce27.js → index-2f4c6ce3.js} +21 -22
- package/build/{index-5f1cdf02.js → index-310d9aeb.js} +6 -6
- package/build/{index-8a55aea7.js → index-3cbefeeb.js} +8 -9
- package/build/{index-77d0cf1c.js → index-41f2044f.js} +12 -12
- package/build/{index-1d17a587.js → index-4405b771.js} +7 -7
- package/build/{index-153e9db8.js → index-4ab83aa6.js} +2 -2
- package/build/{index-31943c73.js → index-4d5d6156.js} +3 -3
- package/build/{index-e3e7ace1.js → index-4e0ed234.js} +2 -2
- package/build/{index-0eb2d432.js → index-5000a51d.js} +18 -18
- package/build/{index-b5cc03d7.js → index-54e57e4d.js} +16 -16
- package/build/{index-3487ef5f.js → index-57c9748b.js} +11 -11
- package/build/{index-a69609b8.js → index-5b2d27d9.js} +2 -2
- package/build/{index-b3804460.js → index-5d00c036.js} +3 -3
- package/build/{index-e1368d44.js → index-6004d3c9.js} +14 -14
- package/build/{index-0fa9fe70.js → index-640d24aa.js} +1 -1
- package/build/{index-039fa557.js → index-64292b9d.js} +3 -3
- package/build/{index-eea0e0a0.js → index-69ca5b59.js} +18 -18
- package/build/{index-13c89eff.js → index-6c0f5c5b.js} +3 -3
- package/build/{index-32132c15.js → index-7f41402d.js} +2 -2
- package/build/{index-e5258e6e.js → index-8142d92e.js} +2 -2
- package/build/{index-0ebe688b.js → index-855d8882.js} +2 -2
- package/build/{index-e0f6b9c9.js → index-8739624d.js} +1 -1
- package/build/{index-2583d62b.js → index-8a967993.js} +3 -3
- package/build/{index-a66ed517.js → index-8fa877e4.js} +1 -1
- package/build/{index-637e8e8f.js → index-96e62be3.js} +52 -53
- package/build/{index-21019dc2.js → index-9a3fb310.js} +14 -14
- package/build/{index-3716677e.js → index-a18140c0.js} +2 -2
- package/build/{index-2d957fe1.js → index-a645a8cd.js} +13 -13
- package/build/{index-346bfe8f.js → index-a7689613.js} +2 -2
- package/build/{index-4b1df696.js → index-ab9ed823.js} +3 -3
- package/build/{index-086e7188.js → index-b7784ae1.js} +2 -2
- package/build/{index-942fe4cb.js → index-bc981eb0.js} +17 -17
- package/build/{index-4ed1e2db.js → index-bd6c9819.js} +25 -26
- package/build/{index-69088e14.js → index-becd3c69.js} +17 -17
- package/build/{index-d2699906.js → index-bff4dc9f.js} +2 -2
- package/build/{index-556854c2.js → index-c2d4de0e.js} +3 -3
- package/build/{index-9aad5ba1.js → index-c59ff992.js} +22 -22
- package/build/{index-8ee9e736.js → index-cca27915.js} +15 -15
- package/build/{index-95ebb5dc.js → index-cdd4762f.js} +13 -14
- package/build/{index-89741346.js → index-d16b9c16.js} +13 -13
- package/build/{index-9842372d.js → index-d3b9d87f.js} +1 -1
- package/build/{index-38be9f5a.js → index-d89dc730.js} +41 -42
- package/build/{index-1bd94154.js → index-df980ca5.js} +21 -21
- package/build/{index-6b3f2338.js → index-e3b6709f.js} +2 -2
- package/build/{index-291b5969.js → index-e46361db.js} +3 -3
- package/build/{index-a8cb6b45.js → index-e6824e87.js} +3 -3
- package/build/{index-078ce897.js → index-eeb06b50.js} +1 -1
- package/build/{index-82aba5ee.js → index-f55e2c6b.js} +2 -2
- package/build/{index-3d75b7b6.js → index-f5c170bd.js} +1433 -15
- package/build/{index-b5fbe3de.js → index-f8a9c060.js} +27 -28
- package/build/{index-a8a55725.js → index-fe804ab7.js} +9 -9
- package/build/index.js +130 -130
- package/build/interfaces/constants/domainLocales.d.ts +7 -14
- package/build/interfaces/constants/index.d.ts +2 -1
- package/build/interfaces/types/HelloWellness.d.ts +0 -4
- package/build/{labelSorting-f2ae38ba.js → labelSorting-3439058c.js} +4 -4
- package/build/lead.js +99 -98
- package/build/{logoIcon-d26eb532.js → logoIcon-f427e1d2.js} +2 -2
- package/build/mantine.js +32 -27
- package/build/misc.js +18 -19
- package/build/miscGetDynamicHealthTool.js +3 -4
- package/build/miscGetSocialList.js +36 -37
- package/build/miscScreenSizeContext.js +1 -1
- package/build/mobileBottomNavigation.js +5 -5
- package/build/mobileBottomNavigationIcon.js +5 -5
- package/build/molecules.js +87 -87
- package/build/moleculesArticleCard.js +5 -6
- package/build/moleculesArticleCardV2.js +23 -18
- package/build/navigation.js +56 -55
- package/build/navigationLogoutPopup.js +10 -11
- package/build/navigationProfileButton.js +32 -28
- package/build/onboardingV2.js +33 -30
- package/build/organisms.js +69 -69
- package/build/{post-a563d1f6.js → post-234f7bbe.js} +2 -2
- package/build/profileNavigation.js +25 -21
- package/build/progressBar.js +1 -1
- package/build/pwg.js +28 -24
- package/build/{routing-531f10d5.js → routing-d5208434.js} +2 -2
- package/build/ssoV2/api/index.d.ts +10 -2
- package/build/ssoV2/index.d.ts +2 -1
- package/build/ssoV2/ssoStateManager/index.d.ts +3 -1
- package/build/ssoV2/theme.d.ts +24 -0
- package/build/ssoV2.js +284 -1664
- package/build/{store-4b148132.js → store-bc1849ff.js} +4 -5
- package/build/subot.js +64 -61
- package/build/surveyOrPremiumBanner.js +38 -35
- package/build/surveyQuestionCard.js +11 -11
- package/build/{surveyThankyouCard-77778d11.js → surveyThankyouCard-69e1841b.js} +5 -5
- package/build/together.js +62 -60
- package/build/togetherApiUtils.js +7 -8
- package/build/togetherAtoms.js +37 -33
- package/build/togetherComponentGlobalContext.js +7 -8
- package/build/togetherMolecules.js +57 -55
- package/build/togetherMoleculesCardAuthor.js +28 -29
- package/build/togetherMoleculesPostImagePreview.js +14 -15
- package/build/togetherMoleculesProfileDetail.js +45 -42
- package/build/togetherOrganisms.js +54 -52
- package/build/togetherRichTextEditor.js +21 -22
- package/build/togetherShareBox.js +13 -14
- package/build/{transform-5d754095.js → transform-935904c2.js} +44 -45
- package/build/{translationsProvider-fb1f1151.js → translationsProvider-3abc845a.js} +1 -1
- package/build/{treePopoverMenu-768a20f1.js → treePopoverMenu-439798a3.js} +22 -23
- package/build/{types-3b3527a8.js → types-c17280ef.js} +1 -1
- package/build/types.js +5 -6
- package/build/{useCartCareService-69a6c6c4.js → useCartCareService-672b138c.js} +1 -1
- package/build/{useHealthToolCache-6fa7d44e.js → useHealthToolCache-99ff3138.js} +1 -1
- package/build/{usePhoneValidator-b6bb5005.js → usePhoneValidator-6ddf6259.js} +16 -17
- package/build/{usePlacesAutocomplete-15d55fe2.js → usePlacesAutocomplete-eb0f0349.js} +1 -1
- package/build/{useResolvedCaptureUrls-cf73eafc.js → useResolvedCaptureUrls-35c6f056.js} +1 -1
- package/build/useTogetherAuthRequiredAction.js +9 -10
- package/build/{utils-47501d93.js → utils-15220639.js} +11 -12
- package/build/{utils-4a49b965.js → utils-4fc2463f.js} +4 -4
- package/build/{utils-e2cc3dc6.js → utils-8e9042e2.js} +5 -5
- package/build/{utils-796f14c3.js → utils-d3208ad7.js} +10 -11
- package/build/{utils-a74285f0.js → utils-fc5cf653.js} +2 -2
- package/build/vaccination.js +27 -23
- package/package.json +2 -6
- package/build/Locale-8774674f.js +0 -16
- package/build/esm/Locale-b8290f0e.js +0 -16
- /package/build/{BMI_BOYS.percentile.monthly-9c114166.js → BMI_BOYS.percentile.monthly-7f1dfce1.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-ca07a51e.js → BMI_BOYS.percentile.weekly-4d0122b8.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-b98ecacf.js → BMI_BOYS.percentile.yearly-8fa97a92.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-ab35a8f9.js → BMI_BOYS.zscore.monthly-945dd5e1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-ca79fd5d.js → BMI_BOYS.zscore.weekly-f10a2548.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-db5cdead.js → BMI_BOYS.zscore.yearly-bbb7fcd7.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-d7625ec8.js → BMI_GIRLS.percentile.monthly-a119fb01.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-fa618990.js → BMI_GIRLS.percentile.weekly-d1e95eb1.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-930af27f.js → BMI_GIRLS.percentile.yearly-0cd035e1.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-c9add071.js → BMI_GIRLS.zscore.monthly-b78925cd.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-66d7717f.js → BMI_GIRLS.zscore.weekly-fb041a70.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-15356c92.js → BMI_GIRLS.zscore.yearly-8fc63788.js} +0 -0
- /package/build/{ChevronDown-f847064f.js → ChevronDown-654701b4.js} +0 -0
- /package/build/{Google-3914a432.js → Google-63ef7680.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-e571f7b4.js → HEAD CIRCUM_BOYS.percentile.monthly-21d59b9d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-64eb14fc.js → HEAD CIRCUM_BOYS.percentile.weekly-ccada44b.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-0cf00a3c.js → HEAD CIRCUM_BOYS.percentile.yearly-7fdcf79d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-f8ea76aa.js → HEAD CIRCUM_BOYS.zscore.monthly-fb4a0028.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-3d34153a.js → HEAD CIRCUM_BOYS.zscore.weekly-7eef7358.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-a056564d.js → HEAD CIRCUM_BOYS.zscore.yearly-651be3b0.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-c9ace0f2.js → HEAD CIRCUM_GIRLS.percentile.monthly-890be6c4.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-7f72aa4d.js → HEAD CIRCUM_GIRLS.percentile.weekly-ea32edfb.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-d0eae2c0.js → HEAD CIRCUM_GIRLS.percentile.yearly-b5ff793e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-b15c16a5.js → HEAD CIRCUM_GIRLS.zscore.monthly-0a9b2c7c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-93c11a20.js → HEAD CIRCUM_GIRLS.zscore.weekly-6c5b21c3.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-8e3e6066.js → HEAD CIRCUM_GIRLS.zscore.yearly-42bf1751.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-4233f865.js → HEIGHT_BOYS.percentile.monthly-84b41198.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-871fbed6.js → HEIGHT_BOYS.percentile.weekly-9170025d.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-76dfe6c4.js → HEIGHT_BOYS.percentile.yearly-9454dfd7.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-62866c0a.js → HEIGHT_BOYS.zscore.monthly-358fae47.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-72d02647.js → HEIGHT_BOYS.zscore.weekly-9705469b.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-89179a44.js → HEIGHT_BOYS.zscore.yearly-c037f3c6.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-7a81ce76.js → HEIGHT_GIRLS.percentile.monthly-fe8f3268.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-8bb7e147.js → HEIGHT_GIRLS.percentile.weekly-3f5a0bc7.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-124c8f3a.js → HEIGHT_GIRLS.percentile.yearly-2e81fb57.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-04fe0a22.js → HEIGHT_GIRLS.zscore.monthly-11295207.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-b6f41111.js → HEIGHT_GIRLS.zscore.weekly-034b1309.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-8e5f5797.js → HEIGHT_GIRLS.zscore.yearly-bfcfc635.js} +0 -0
- /package/build/{Visible-68055718.js → Visible-9a109c2f.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-3351768a.js → WEIGHT_BOYS.percentile.monthly-77b1257b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-771f46bf.js → WEIGHT_BOYS.percentile.weekly-a00b16d5.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c95d1302.js → WEIGHT_BOYS.percentile.yearly-452567b0.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-e50f7f1b.js → WEIGHT_BOYS.zscore.monthly-e54cc072.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-89f66a9f.js → WEIGHT_BOYS.zscore.weekly-b6456f5e.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-da4548cc.js → WEIGHT_BOYS.zscore.yearly-b049e696.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-09f271ec.js → WEIGHT_GIRLS.percentile.monthly-ab4500ac.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-0d8106f4.js → WEIGHT_GIRLS.percentile.weekly-ed49ef3a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-cf079330.js → WEIGHT_GIRLS.percentile.yearly-1d0d3cc7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-81182995.js → WEIGHT_GIRLS.zscore.monthly-5bd320fe.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-3f56f1b6.js → WEIGHT_GIRLS.zscore.weekly-0ecfc6f6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-cd8ad694.js → WEIGHT_GIRLS.zscore.yearly-ca5356f2.js} +0 -0
- /package/build/{ageGenerate-99d1b522.js → ageGenerate-ff2df1c3.js} +0 -0
- /package/build/{animation-6a636dc1.js → animation-bf518996.js} +0 -0
- /package/build/{constants-d98bc58f.js → constants-0e328c97.js} +0 -0
- /package/build/{constants-8d5ea1a6.js → constants-328bb101.js} +0 -0
- /package/build/{constants-ffca7176.js → constants-46ab92c8.js} +0 -0
- /package/build/{context-47493df3.js → context-60a59da1.js} +0 -0
- /package/build/{dataTransform-1def8a29.js → dataTransform-eebce6ab.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-10d08bf8.js → BMI_BOYS.percentile.monthly-88f79693.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-c4cf7661.js → BMI_BOYS.percentile.weekly-c5fad374.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-cd1dba35.js → BMI_BOYS.percentile.yearly-6be18deb.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-7cec47bc.js → BMI_BOYS.zscore.monthly-b7a221db.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-3993f438.js → BMI_BOYS.zscore.weekly-09156193.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-458c14e6.js → BMI_BOYS.zscore.yearly-926e9ae3.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-1fa78aef.js → BMI_GIRLS.percentile.monthly-c76e1f22.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-fd92710e.js → BMI_GIRLS.percentile.weekly-606590de.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-6c49e72c.js → BMI_GIRLS.percentile.yearly-f8cbebc1.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-037af0a6.js → BMI_GIRLS.zscore.monthly-112ece02.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-6d23c09d.js → BMI_GIRLS.zscore.weekly-2d15230f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-8da1c1ce.js → BMI_GIRLS.zscore.yearly-93b6650f.js} +0 -0
- /package/build/esm/{ChevronDown-39b7f653.js → ChevronDown-6772aa7d.js} +0 -0
- /package/build/esm/{Google-e2725343.js → Google-7736c91d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-a05b8909.js → HEAD CIRCUM_BOYS.percentile.monthly-e4b6c3d6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-553568b8.js → HEAD CIRCUM_BOYS.percentile.weekly-fc9cbbcd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-95c32e3f.js → HEAD CIRCUM_BOYS.percentile.yearly-77a2bd1d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-d5930bf1.js → HEAD CIRCUM_BOYS.zscore.monthly-ef6d27b4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-f0afc076.js → HEAD CIRCUM_BOYS.zscore.weekly-c2a9f960.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-595686aa.js → HEAD CIRCUM_BOYS.zscore.yearly-4c5ed5bc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-024df425.js → HEAD CIRCUM_GIRLS.percentile.monthly-e3d86928.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-545d1374.js → HEAD CIRCUM_GIRLS.percentile.weekly-36b8e76b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-5f762ea7.js → HEAD CIRCUM_GIRLS.percentile.yearly-35727965.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-2c52cfdb.js → HEAD CIRCUM_GIRLS.zscore.monthly-7c806c57.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-108ad860.js → HEAD CIRCUM_GIRLS.zscore.weekly-674c878e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-3cffa48f.js → HEAD CIRCUM_GIRLS.zscore.yearly-932666e6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-04d7f90f.js → HEIGHT_BOYS.percentile.monthly-e3e4cbbb.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-d113e3e1.js → HEIGHT_BOYS.percentile.weekly-a14fca9a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-1c335393.js → HEIGHT_BOYS.percentile.yearly-fdc26cde.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-353c9a89.js → HEIGHT_BOYS.zscore.monthly-53d3c726.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-c82d1c47.js → HEIGHT_BOYS.zscore.weekly-1fc45ef4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-d2b3cbb8.js → HEIGHT_BOYS.zscore.yearly-3bb609d8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5f32df0b.js → HEIGHT_GIRLS.percentile.monthly-b54d1cd8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a1a0964f.js → HEIGHT_GIRLS.percentile.weekly-91c12063.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-93d35755.js → HEIGHT_GIRLS.percentile.yearly-afe5175b.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-bc3d5769.js → HEIGHT_GIRLS.zscore.monthly-26a33c9e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-b43fb78e.js → HEIGHT_GIRLS.zscore.weekly-3b765925.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-7c51bc39.js → HEIGHT_GIRLS.zscore.yearly-e225b851.js} +0 -0
- /package/build/esm/{Visible-e3b8a7ff.js → Visible-c3848369.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-c88904b0.js → WEIGHT_BOYS.percentile.monthly-95828d93.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-be3881e5.js → WEIGHT_BOYS.percentile.weekly-c0ac9192.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-49780a08.js → WEIGHT_BOYS.percentile.yearly-df0ff6b3.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-d5fb0766.js → WEIGHT_BOYS.zscore.monthly-beb48663.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-611a2a3c.js → WEIGHT_BOYS.zscore.weekly-2db63fb8.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-e94ed561.js → WEIGHT_BOYS.zscore.yearly-fb0f5aeb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-9e296213.js → WEIGHT_GIRLS.percentile.monthly-4eb7efbc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c9564437.js → WEIGHT_GIRLS.percentile.weekly-aa996902.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-e304a20f.js → WEIGHT_GIRLS.percentile.yearly-383f360a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-eef7a16d.js → WEIGHT_GIRLS.zscore.monthly-61d00aa9.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-bcb92c92.js → WEIGHT_GIRLS.zscore.weekly-350d5827.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-73cebbc3.js → WEIGHT_GIRLS.zscore.yearly-31f81a14.js} +0 -0
- /package/build/esm/{ageGenerate-fd4ef6a3.js → ageGenerate-b8b9e1ad.js} +0 -0
- /package/build/esm/{animation-b2f98b63.js → animation-14f44f7f.js} +0 -0
- /package/build/esm/{constants-61a4fe74.js → constants-3a1063f7.js} +0 -0
- /package/build/esm/{constants-677eeeb0.js → constants-8d1b8d61.js} +0 -0
- /package/build/esm/{constants-78a5d1b5.js → constants-dbb1155e.js} +0 -0
- /package/build/esm/{context-ad88a910.js → context-845d2fca.js} +0 -0
- /package/build/esm/{dataTransform-8f2559b7.js → dataTransform-a096d513.js} +0 -0
- /package/build/esm/{index-cb6876a2.js → index-20d2a9ef.js} +0 -0
- /package/build/esm/{index-f472a952.js → index-5a9b4fa5.js} +0 -0
- /package/build/esm/{index-250c64f6.js → index-685a36f0.js} +0 -0
- /package/build/esm/{index-6718009d.js → index-7365f40b.js} +0 -0
- /package/build/esm/{index-d0138daa.js → index-9faf54be.js} +0 -0
- /package/build/esm/{index-1ee615e0.js → index-b9dd487d.js} +0 -0
- /package/build/esm/{index-40051b8b.js → index-bd99b8d0.js} +0 -0
- /package/build/esm/{index-570bffd3.js → index-c3a9fca2.js} +0 -0
- /package/build/esm/{index.styles-8c6c3cec.js → index.styles-b6206396.js} +0 -0
- /package/build/esm/{localizeNumberFormat-1a649b64.js → localizeNumberFormat-4c428d1f.js} +0 -0
- /package/build/esm/{number-9efe7e8b.js → number-3485eed8.js} +0 -0
- /package/build/esm/{paths-afce6010.js → paths-4e054a6e.js} +0 -0
- /package/build/esm/{shared-05c9ea59.js → shared-4cbea5c5.js} +0 -0
- /package/build/esm/{translationsContext-d5ed68a1.js → translationsContext-736ba172.js} +0 -0
- /package/build/esm/{tslib.es6-4609ced5.js → tslib.es6-3d93288f.js} +0 -0
- /package/build/esm/{types-f4166eca.js → types-bef0b9b2.js} +0 -0
- /package/build/esm/{useImageAspectRatio-baa81629.js → useImageAspectRatio-8250f851.js} +0 -0
- /package/build/esm/{useOutsideClick-32c9f11a.js → useOutsideClick-061b79f0.js} +0 -0
- /package/build/esm/{useScrollbarSize-8ef9fd5f.js → useScrollbarSize-ee5c3084.js} +0 -0
- /package/build/esm/{useUniqueId-71551a70.js → useUniqueId-08b97116.js} +0 -0
- /package/build/esm/{utils-58c57978.js → utils-77d2c0af.js} +0 -0
- /package/build/esm/{utils-2b4b3948.js → utils-a4b4d2f4.js} +0 -0
- /package/build/{index-a0ccdf67.js → index-174c9586.js} +0 -0
- /package/build/{index-94920544.js → index-266db3cf.js} +0 -0
- /package/build/{index-2fb3387a.js → index-3f68c882.js} +0 -0
- /package/build/{index-df72443d.js → index-42da2df4.js} +0 -0
- /package/build/{index-f2a83551.js → index-74accb87.js} +0 -0
- /package/build/{index-fba1c78a.js → index-795e692e.js} +0 -0
- /package/build/{index-2534c65a.js → index-8c700e9b.js} +0 -0
- /package/build/{index-591a0e44.js → index-9b53384c.js} +0 -0
- /package/build/{index.styles-7ae19bd8.js → index.styles-9ef5eab4.js} +0 -0
- /package/build/{localizeNumberFormat-59e51fae.js → localizeNumberFormat-93b0ba47.js} +0 -0
- /package/build/{number-f0945354.js → number-7e47398a.js} +0 -0
- /package/build/{paths-bf0e68de.js → paths-fb067831.js} +0 -0
- /package/build/{shared-9c15401d.js → shared-9c1fbedd.js} +0 -0
- /package/build/{translationsContext-526cc81c.js → translationsContext-07ec7126.js} +0 -0
- /package/build/{tslib.es6-5bd68c12.js → tslib.es6-f848ddc4.js} +0 -0
- /package/build/{types-c36c6a7e.js → types-a6e50850.js} +0 -0
- /package/build/{useImageAspectRatio-5ae0aaa2.js → useImageAspectRatio-023a1020.js} +0 -0
- /package/build/{useOutsideClick-151270dc.js → useOutsideClick-8638ea79.js} +0 -0
- /package/build/{useScrollbarSize-e4466526.js → useScrollbarSize-385b55cf.js} +0 -0
- /package/build/{useUniqueId-1691e5a0.js → useUniqueId-7dfe902c.js} +0 -0
- /package/build/{utils-38fe6104.js → utils-2f68ff5b.js} +0 -0
- /package/build/{utils-ee11a1ae.js → utils-4ac50b24.js} +0 -0
package/build/ssoV2.js
CHANGED
|
@@ -2,65 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-f848ddc4.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var miscCookieHelper = require('./miscCookieHelper.js');
|
|
8
|
-
var index$
|
|
9
|
-
var index$
|
|
8
|
+
var index$9 = require('./index-f5c170bd.js');
|
|
9
|
+
var index$8 = require('./index-2cb5fd07.js');
|
|
10
10
|
var constantsIsProduction = require('./constantsIsProduction.js');
|
|
11
11
|
var arrow = require('@hhgtech/icons/arrow');
|
|
12
12
|
var core$1 = require('@hhgtech/icons/core');
|
|
13
|
-
var index$
|
|
14
|
-
var logoIcon = require('./logoIcon-
|
|
15
|
-
var index$
|
|
16
|
-
var index$
|
|
13
|
+
var index$1 = require('./index-1936bc7f.js');
|
|
14
|
+
var logoIcon = require('./logoIcon-f427e1d2.js');
|
|
15
|
+
var index$5 = require('./index-64292b9d.js');
|
|
16
|
+
var index$3 = require('./index-4e0ed234.js');
|
|
17
17
|
var core = require('@mantine/core');
|
|
18
18
|
require('@mantine/dates');
|
|
19
|
-
require('./index-
|
|
20
|
-
var index$
|
|
21
|
-
var index$
|
|
22
|
-
var index$
|
|
23
|
-
require('./index-
|
|
24
|
-
var index = require('./index-
|
|
19
|
+
var index = require('./index-0301ac72.js');
|
|
20
|
+
var index$7 = require('./index-174c9586.js');
|
|
21
|
+
var index$b = require('./index-d89dc730.js');
|
|
22
|
+
var index$4 = require('./index-a7689613.js');
|
|
23
|
+
require('./index-8c700e9b.js');
|
|
24
|
+
var index$2 = require('./index-8fa877e4.js');
|
|
25
25
|
require('@mantine/hooks');
|
|
26
|
-
require('./utils-
|
|
27
|
-
require('./index-
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var index$5 = require('./index-3f9ed058.js');
|
|
26
|
+
require('./utils-2f68ff5b.js');
|
|
27
|
+
require('./index-e46361db.js');
|
|
28
|
+
var store = require('./store-bc1849ff.js');
|
|
29
|
+
var index$6 = require('./index-1c157252.js');
|
|
31
30
|
var ReCAPTCHA = require('react-google-recaptcha');
|
|
32
|
-
var Google = require('./Google-
|
|
33
|
-
var utils = require('./utils-
|
|
34
|
-
var index$9 = require('./index-2583d62b.js');
|
|
31
|
+
var Google = require('./Google-63ef7680.js');
|
|
32
|
+
var utils = require('./utils-15220639.js');
|
|
35
33
|
var constantsDomainLocales = require('./constantsDomainLocales.js');
|
|
34
|
+
var index$a = require('./index-8a967993.js');
|
|
36
35
|
var miscTheme = require('./miscTheme.js');
|
|
37
36
|
var styled = require('@emotion/styled');
|
|
38
|
-
var
|
|
39
|
-
var other = require('@hhgtech/icons/other');
|
|
40
|
-
var debounce = require('lodash/debounce');
|
|
41
|
-
var throttle = require('lodash/throttle');
|
|
42
|
-
var PhoneInputBase = require('react-phone-number-input');
|
|
43
|
-
var Flags = require('react-phone-number-input/flags');
|
|
44
|
-
var vaul = require('vaul');
|
|
45
|
-
var utils$1 = require('./utils-796f14c3.js');
|
|
37
|
+
var utils$1 = require('./utils-d3208ad7.js');
|
|
46
38
|
var form = require('@mantine/form');
|
|
47
39
|
var yup = require('yup');
|
|
48
40
|
var dayjs = require('dayjs');
|
|
49
|
-
var index$
|
|
41
|
+
var index$c = require('./index-3cbefeeb.js');
|
|
42
|
+
require('@hhgtech/icons/other');
|
|
50
43
|
require('@mantine/carousel');
|
|
51
|
-
require('
|
|
44
|
+
require('classnames');
|
|
52
45
|
require('uuid');
|
|
53
|
-
require('./useUniqueId-
|
|
46
|
+
require('./useUniqueId-7dfe902c.js');
|
|
54
47
|
require('./constantsSite.js');
|
|
48
|
+
require('lodash/debounce');
|
|
49
|
+
require('lodash/throttle');
|
|
50
|
+
require('react-phone-number-input');
|
|
51
|
+
require('react-phone-number-input/flags');
|
|
52
|
+
require('vaul');
|
|
53
|
+
require('./shared-9c1fbedd.js');
|
|
55
54
|
require('@emotion/react');
|
|
56
|
-
require('./routing-
|
|
55
|
+
require('./routing-d5208434.js');
|
|
57
56
|
require('date-fns/locale');
|
|
58
57
|
require('./constantsRiskScreener.js');
|
|
59
|
-
require('./index.styles-
|
|
58
|
+
require('./index.styles-9ef5eab4.js');
|
|
60
59
|
require('@mantine/notifications');
|
|
61
|
-
require('./translationsContext-
|
|
60
|
+
require('./translationsContext-07ec7126.js');
|
|
62
61
|
require('zustand');
|
|
63
|
-
require('./healthTools-
|
|
62
|
+
require('./healthTools-87c35448.js');
|
|
64
63
|
|
|
65
64
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
66
65
|
|
|
@@ -85,10 +84,6 @@ function _interopNamespace(e) {
|
|
|
85
84
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
86
85
|
var ReCAPTCHA__default = /*#__PURE__*/_interopDefault(ReCAPTCHA);
|
|
87
86
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
88
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
89
|
-
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
90
|
-
var throttle__default = /*#__PURE__*/_interopDefault(throttle);
|
|
91
|
-
var Flags__default = /*#__PURE__*/_interopDefault(Flags);
|
|
92
87
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
93
88
|
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
94
89
|
|
|
@@ -110,15 +105,17 @@ const fetchFeatureFlag = (site) => tslib_es6.__awaiter(void 0, void 0, void 0, f
|
|
|
110
105
|
});
|
|
111
106
|
|
|
112
107
|
const SSOStateContext = React.createContext({
|
|
113
|
-
locale:
|
|
108
|
+
locale: index.LOCALE.Vietnam,
|
|
109
|
+
isMarryBaby: false,
|
|
114
110
|
onClose: () => false,
|
|
115
111
|
setTracking: () => false,
|
|
116
112
|
});
|
|
117
|
-
const SSOStateProvider = ({ children, locale =
|
|
113
|
+
const SSOStateProvider = ({ children, locale = index.LOCALE.Vietnam, isMarryBaby = false, onClose, }) => {
|
|
118
114
|
const [openCollectInfoPopup, setOpenCollectInfoPopup] = React__default["default"].useState(false);
|
|
119
115
|
const [tracking, setTracking] = React__default["default"].useState();
|
|
120
116
|
return (React__default["default"].createElement(SSOStateContext.Provider, { value: {
|
|
121
117
|
locale,
|
|
118
|
+
isMarryBaby,
|
|
122
119
|
onClose,
|
|
123
120
|
openCollectInfoPopup,
|
|
124
121
|
setOpenCollectInfoPopup,
|
|
@@ -130,14 +127,36 @@ const useSSOState = () => {
|
|
|
130
127
|
return React__default["default"].useContext(SSOStateContext);
|
|
131
128
|
};
|
|
132
129
|
|
|
130
|
+
/** SSOV2 modal background gradients by brand theme. */
|
|
131
|
+
const SSOV2_GRADIENT = {
|
|
132
|
+
default: {
|
|
133
|
+
body: 'linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 150px)',
|
|
134
|
+
bodyWhatsAppPhoneVerify: 'linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 70px)',
|
|
135
|
+
confirmClose: 'linear-gradient(180deg, #91CAFF 0%, #CFE8FF 100px, #FFFFFF 200px)',
|
|
136
|
+
},
|
|
137
|
+
marryBaby: {
|
|
138
|
+
body: 'linear-gradient(180deg, #FFD0DC 0%, #FFFFFF 150px)',
|
|
139
|
+
bodyWhatsAppPhoneVerify: 'linear-gradient(180deg, #FFD0DC 0%, #FFFFFF 70px)',
|
|
140
|
+
confirmClose: 'linear-gradient(180deg, #FFB8C9 0%, #FFE0E8 100px, #FFFFFF 200px)',
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
const getSSOV2Gradient = (isMarryBaby) => isMarryBaby ? SSOV2_GRADIENT.marryBaby : SSOV2_GRADIENT.default;
|
|
144
|
+
const getSSOV2LogoType = (locale, isMarryBaby) => {
|
|
145
|
+
var _a;
|
|
146
|
+
if (isMarryBaby)
|
|
147
|
+
return 'marryBaby';
|
|
148
|
+
return (_a = index$1.LOCALE_SPECS[locale || index.LOCALE.Vietnam]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
|
|
149
|
+
};
|
|
150
|
+
|
|
133
151
|
const ConfirmClosePopup = ({ opened, onCancel, onClose, }) => {
|
|
134
|
-
const { t } = index.useTranslations();
|
|
135
|
-
const { tracking } = useSSOState();
|
|
136
|
-
|
|
152
|
+
const { t } = index$2.useTranslations();
|
|
153
|
+
const { tracking, isMarryBaby } = useSSOState();
|
|
154
|
+
const gradient = getSSOV2Gradient(isMarryBaby);
|
|
155
|
+
return (React__default["default"].createElement(index$3.Modal, { opened: opened, onClose: () => onCancel(), withCloseButton: false, zIndex: index$1.ZINDEX_SSO + 2, styles: (theme) => ({
|
|
137
156
|
body: {
|
|
138
157
|
padding: '32px 24px',
|
|
139
158
|
position: 'relative',
|
|
140
|
-
background:
|
|
159
|
+
background: gradient.confirmClose,
|
|
141
160
|
[theme.fn.smallerThan('sm')]: {
|
|
142
161
|
height: '100%',
|
|
143
162
|
},
|
|
@@ -178,13 +197,13 @@ const ConfirmClosePopup = ({ opened, onCancel, onClose, }) => {
|
|
|
178
197
|
zIndex: 1,
|
|
179
198
|
textAlign: 'center',
|
|
180
199
|
} },
|
|
181
|
-
React__default["default"].createElement(index$
|
|
182
|
-
React__default["default"].createElement(index$
|
|
200
|
+
React__default["default"].createElement(index$4.Text, { size: "h4" }, t('ssov2.popup.close.title')),
|
|
201
|
+
React__default["default"].createElement(index$4.Text, { size: "p3" }, t('ssov2.popup.close.description'))),
|
|
183
202
|
React__default["default"].createElement(core.Stack, { mt: 32, spacing: 8, align: "center" },
|
|
184
|
-
React__default["default"].createElement(index$
|
|
185
|
-
React__default["default"].createElement(index$
|
|
186
|
-
React__default["default"].createElement(index$
|
|
187
|
-
React__default["default"].createElement(index$
|
|
203
|
+
React__default["default"].createElement(index$5.Button, { variant: "primary", size: "lg", onClick: onCancel, w: "50%", radius: 40, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Cancel Exit" },
|
|
204
|
+
React__default["default"].createElement(index$4.Text, { size: "s2", weight: "regular", color: "inherit" }, t('ssov2.button.cancel'))),
|
|
205
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", size: "lg", onClick: onClose, fullWidth: true, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Want to exit" },
|
|
206
|
+
React__default["default"].createElement(index$4.Text, { size: "p2", weight: "regular", color: "gray.6" }, t('ssov2.button.exitNow'))))));
|
|
188
207
|
};
|
|
189
208
|
const BackgroundHeader = () => (React__default["default"].createElement("svg", { width: "292", height: "255", viewBox: "0 0 292 255", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
190
209
|
position: 'absolute',
|
|
@@ -449,10 +468,9 @@ const ProgressBar = () => {
|
|
|
449
468
|
};
|
|
450
469
|
|
|
451
470
|
const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
452
|
-
var _a;
|
|
453
471
|
const { steps, goBack, currentStepIndex } = store.useSSOSteps();
|
|
454
472
|
const { flowData } = store.useSSOV2Store();
|
|
455
|
-
const { locale, tracking } = useSSOState();
|
|
473
|
+
const { locale, isMarryBaby, tracking } = useSSOState();
|
|
456
474
|
const currentStep = steps[currentStepIndex];
|
|
457
475
|
const showProgressBar = isDisplayProgressBarFn(flowData, currentStep);
|
|
458
476
|
const showBack = (steps.length > 1 && !showProgressBar) ||
|
|
@@ -462,7 +480,8 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
462
480
|
(currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.EMAIL;
|
|
463
481
|
const showClose = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === store.SSOStepTypeType.FIRST;
|
|
464
482
|
const showLogo = (steps.length === 1 || showProgressBar) && !showBack;
|
|
465
|
-
const logoType = (
|
|
483
|
+
const logoType = getSSOV2LogoType(locale, isMarryBaby);
|
|
484
|
+
const gradient = getSSOV2Gradient(isMarryBaby);
|
|
466
485
|
const [closeConfirmOpen, setCloseConfirmOpen] = React__default["default"].useState(false);
|
|
467
486
|
const onCloseClick = () => {
|
|
468
487
|
setCloseConfirmOpen(true);
|
|
@@ -476,7 +495,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
476
495
|
onCloseClick();
|
|
477
496
|
};
|
|
478
497
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
479
|
-
React__default["default"].createElement(index$
|
|
498
|
+
React__default["default"].createElement(index$3.Modal, { opened: opened, onClose: onModalRequestClose, closeOnClickOutside: !isWhatsAppLoginFlow, closeOnEscape: !isWhatsAppLoginFlow, styles: (theme) => ({
|
|
480
499
|
body: {
|
|
481
500
|
display: 'flex',
|
|
482
501
|
flexDirection: 'column',
|
|
@@ -484,8 +503,8 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
484
503
|
padding: '32px 24px',
|
|
485
504
|
position: 'relative',
|
|
486
505
|
background: isWhatsAppPhoneVerify
|
|
487
|
-
?
|
|
488
|
-
:
|
|
506
|
+
? gradient.bodyWhatsAppPhoneVerify
|
|
507
|
+
: gradient.body,
|
|
489
508
|
overflow: 'auto',
|
|
490
509
|
[theme.fn.smallerThan('sm')]: {
|
|
491
510
|
height: '100%',
|
|
@@ -514,7 +533,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
514
533
|
display: 'block',
|
|
515
534
|
},
|
|
516
535
|
},
|
|
517
|
-
}), withCloseButton: false, zIndex: index$
|
|
536
|
+
}), withCloseButton: false, zIndex: index$1.ZINDEX_SSO, overlayProps: {
|
|
518
537
|
'data-event-label': 'Focus out',
|
|
519
538
|
'data-event-category': tracking === null || tracking === void 0 ? void 0 : tracking.category,
|
|
520
539
|
'data-event-action': tracking === null || tracking === void 0 ? void 0 : tracking.action,
|
|
@@ -525,7 +544,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
525
544
|
alignItems: 'center',
|
|
526
545
|
justifyContent: 'space-between',
|
|
527
546
|
} },
|
|
528
|
-
showBack && (React__default["default"].createElement(index$
|
|
547
|
+
showBack && (React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
529
548
|
width: 40,
|
|
530
549
|
height: 40,
|
|
531
550
|
padding: 8,
|
|
@@ -535,11 +554,11 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
|
|
|
535
554
|
React__default["default"].createElement(arrow.ChevronLeft, null))),
|
|
536
555
|
showLogo && (React__default["default"].createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
|
537
556
|
React__default["default"].createElement(logoIcon.LogoIcon, { type: logoType, height: 32, width: 'unset' }),
|
|
538
|
-
locale ===
|
|
557
|
+
locale === index.LOCALE.Indonesia && (React__default["default"].createElement(index$6.ImageWrap, { alt: "", src: index$7.CommonGAssets.getAssetPath('sehat-badge.png'), style: {
|
|
539
558
|
width: 56,
|
|
540
559
|
height: 23,
|
|
541
560
|
} })))),
|
|
542
|
-
showClose && (React__default["default"].createElement(index$
|
|
561
|
+
showClose && (React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
543
562
|
width: 40,
|
|
544
563
|
height: 40,
|
|
545
564
|
padding: 8,
|
|
@@ -561,7 +580,7 @@ const loginByEmailPassword = (email, password) => tslib_es6.__awaiter(void 0, vo
|
|
|
561
580
|
const formData = new FormData();
|
|
562
581
|
formData.append('email', email);
|
|
563
582
|
formData.append('password', password);
|
|
564
|
-
return index$
|
|
583
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.EMAIL.LOGIN_BY_PASSWORD, {
|
|
565
584
|
method: 'POST',
|
|
566
585
|
body: formData,
|
|
567
586
|
});
|
|
@@ -569,8 +588,8 @@ const loginByEmailPassword = (email, password) => tslib_es6.__awaiter(void 0, vo
|
|
|
569
588
|
const registerBySendEmailOTP = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
570
589
|
const formData = new FormData();
|
|
571
590
|
formData.append('email', email);
|
|
572
|
-
formData.append('website_id', index$
|
|
573
|
-
return index$
|
|
591
|
+
formData.append('website_id', index$8.getWebsiteId());
|
|
592
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.EMAIL.REGISTER_BY_SEND_OTP, {
|
|
574
593
|
method: 'POST',
|
|
575
594
|
body: formData,
|
|
576
595
|
});
|
|
@@ -578,7 +597,7 @@ const registerBySendEmailOTP = (email) => tslib_es6.__awaiter(void 0, void 0, vo
|
|
|
578
597
|
const resendEmailOTP = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
579
598
|
const formData = new FormData();
|
|
580
599
|
formData.append('email', email);
|
|
581
|
-
return index$
|
|
600
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.EMAIL.SEND_OTP, {
|
|
582
601
|
method: 'POST',
|
|
583
602
|
body: formData,
|
|
584
603
|
});
|
|
@@ -587,7 +606,7 @@ const verifyByEmailOTP = (email, otpCode) => tslib_es6.__awaiter(void 0, void 0,
|
|
|
587
606
|
const formData = new FormData();
|
|
588
607
|
formData.append('email', email);
|
|
589
608
|
formData.append('code', otpCode);
|
|
590
|
-
return index$
|
|
609
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.EMAIL.VERIFY_BY_OTP, {
|
|
591
610
|
method: 'POST',
|
|
592
611
|
body: formData,
|
|
593
612
|
});
|
|
@@ -685,7 +704,7 @@ const getErrorTextFromCode = (t, code) => {
|
|
|
685
704
|
};
|
|
686
705
|
|
|
687
706
|
const SSOEmailScreen = ({ hidden, }) => {
|
|
688
|
-
const { t } = index.useTranslations();
|
|
707
|
+
const { t } = index$2.useTranslations();
|
|
689
708
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
690
709
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
691
710
|
const { flowData, abTestFlow } = store.useSSOV2Store();
|
|
@@ -712,7 +731,7 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
712
731
|
setLoading(true);
|
|
713
732
|
try {
|
|
714
733
|
const email = e.currentTarget.email.value;
|
|
715
|
-
const existRes = yield index$
|
|
734
|
+
const existRes = yield index$8.checkUserExist({ email });
|
|
716
735
|
if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
|
|
717
736
|
if ((_a = existRes._data) === null || _a === void 0 ? void 0 : _a.is_pass) {
|
|
718
737
|
store.useSSOV2Store.setState({
|
|
@@ -773,10 +792,10 @@ const SSOEmailScreen = ({ hidden, }) => {
|
|
|
773
792
|
setLoading(false);
|
|
774
793
|
}) },
|
|
775
794
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
776
|
-
React__default["default"].createElement(index$
|
|
777
|
-
React__default["default"].createElement(index$
|
|
778
|
-
React__default["default"].createElement(index$
|
|
779
|
-
React__default["default"].createElement(index$
|
|
795
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.email.title')),
|
|
796
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.email.description'))),
|
|
797
|
+
React__default["default"].createElement(index$9.Input, { name: "email", placeholder: t('onboarding.formEmail.yourEmail'), error: errMsg || undefined, type: "email", required: true, mt: 24, disabled: loading, onChange: () => setErrMsg(''), "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Email" }),
|
|
798
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Verify Your Email" }, t('ssov2.email.button'))));
|
|
780
799
|
};
|
|
781
800
|
|
|
782
801
|
const GOOGLE_RECAPTCHA_KEY = process.env.NEXT_PUBLIC_GOOGLE_RECAPTCHA_KEY;
|
|
@@ -808,7 +827,7 @@ const GRecaptchaHandler = (props) => {
|
|
|
808
827
|
};
|
|
809
828
|
if (!GOOGLE_RECAPTCHA_KEY)
|
|
810
829
|
return null;
|
|
811
|
-
return (React__default["default"].createElement(index$
|
|
830
|
+
return (React__default["default"].createElement(index$9.ErrorBoundary, null,
|
|
812
831
|
React__default["default"].createElement(ReCAPTCHA__default["default"], { ref: recaptchaRef, size: "invisible", sitekey: GOOGLE_RECAPTCHA_KEY, onErrored: handleCaptchaError })));
|
|
813
832
|
};
|
|
814
833
|
|
|
@@ -839,7 +858,7 @@ const loginByPhonePassword = (phone, password) => tslib_es6.__awaiter(void 0, vo
|
|
|
839
858
|
: phoneNumber;
|
|
840
859
|
formData.append('phone_number', phoneNumber);
|
|
841
860
|
formData.append('password', password);
|
|
842
|
-
return index$
|
|
861
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.PHONE.LOGIN_BY_PASSWORD, {
|
|
843
862
|
method: 'POST',
|
|
844
863
|
body: formData,
|
|
845
864
|
}, true);
|
|
@@ -850,8 +869,8 @@ const registerBySendPhoneOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0,
|
|
|
850
869
|
const formData = new FormData();
|
|
851
870
|
formData.append('phone_number', phone);
|
|
852
871
|
formData.append('area_code', areaCode);
|
|
853
|
-
formData.append('website_id', index$
|
|
854
|
-
return index$
|
|
872
|
+
formData.append('website_id', index$8.getWebsiteId());
|
|
873
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.PHONE.REGISTER_BY_SEND_OTP, {
|
|
855
874
|
method: 'POST',
|
|
856
875
|
body: formData,
|
|
857
876
|
});
|
|
@@ -863,7 +882,7 @@ const resendPhoneOTP = (phone, areaCode, gRecaptchaResponse) => tslib_es6.__awai
|
|
|
863
882
|
formData.append('phone_number', phone);
|
|
864
883
|
formData.append('area_code', areaCode);
|
|
865
884
|
formData.append('g-recaptcha-response', gRecaptchaResponse);
|
|
866
|
-
return index$
|
|
885
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.PHONE.SEND_OTP, {
|
|
867
886
|
method: 'POST',
|
|
868
887
|
body: formData,
|
|
869
888
|
});
|
|
@@ -876,7 +895,7 @@ const verifyByPhoneOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void
|
|
|
876
895
|
formData.append('phone_number', phone);
|
|
877
896
|
formData.append('area_code', areaCode);
|
|
878
897
|
formData.append('otp_code', otpCode);
|
|
879
|
-
return index$
|
|
898
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.PHONE.VERIFY_BY_OTP, {
|
|
880
899
|
method: 'POST',
|
|
881
900
|
body: formData,
|
|
882
901
|
});
|
|
@@ -885,7 +904,7 @@ const resendUpdatePhoneOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, vo
|
|
|
885
904
|
const formData = new FormData();
|
|
886
905
|
formData.append('phone_number', phone);
|
|
887
906
|
formData.append('area_code', areaCode);
|
|
888
|
-
return index$
|
|
907
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.PHONE.UPDATE_PHONE_SEND_OTP, {
|
|
889
908
|
method: 'POST',
|
|
890
909
|
body: formData,
|
|
891
910
|
});
|
|
@@ -894,7 +913,7 @@ const verifyUpdatePhoneOTP = (areaCode, otpCode) => tslib_es6.__awaiter(void 0,
|
|
|
894
913
|
const formData = new FormData();
|
|
895
914
|
formData.append('otp_code', otpCode);
|
|
896
915
|
formData.append('area_code', areaCode);
|
|
897
|
-
return index$
|
|
916
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.PHONE.UPDATE_PHONE_VERIFY_OTP, {
|
|
898
917
|
method: 'POST',
|
|
899
918
|
body: formData,
|
|
900
919
|
});
|
|
@@ -904,8 +923,8 @@ const loginBySocial = (token, social) => tslib_es6.__awaiter(void 0, void 0, voi
|
|
|
904
923
|
const formData = new FormData();
|
|
905
924
|
formData.append('token', token);
|
|
906
925
|
formData.append('provider', social);
|
|
907
|
-
formData.append('website_id', index$
|
|
908
|
-
return index$
|
|
926
|
+
formData.append('website_id', index$8.getWebsiteId());
|
|
927
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.LOGIN_BY_SOCIAL, {
|
|
909
928
|
method: 'POST',
|
|
910
929
|
body: formData,
|
|
911
930
|
});
|
|
@@ -913,17 +932,17 @@ const loginBySocial = (token, social) => tslib_es6.__awaiter(void 0, void 0, voi
|
|
|
913
932
|
|
|
914
933
|
/** Guest: send or resend OTP (same endpoint). Optional referrer e.g. payment page URL. */
|
|
915
934
|
const sendLoginOtpWhatsapp = (phoneNumber, areaCode, referrer) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
916
|
-
return index$
|
|
935
|
+
return index$8.fetchSSOV2ApiJson(index$8.SSO_V2_PATHS.WHATSAPP.LOGIN_OTP_WHATSAPP, {
|
|
917
936
|
phone_number: phoneNumber,
|
|
918
937
|
area_code: areaCode,
|
|
919
|
-
website_id: Number(index$
|
|
938
|
+
website_id: Number(index$8.getWebsiteId()),
|
|
920
939
|
ga_client_id: miscCookieHelper.getCookie('_ga') || '',
|
|
921
940
|
referrer: referrer || (typeof window !== 'undefined' ? window.location.href : ''),
|
|
922
941
|
}, true);
|
|
923
942
|
});
|
|
924
943
|
/** Guest: verify OTP after WhatsApp login send; `login_type` required by API. */
|
|
925
944
|
const verifyWhatsappOtpGuest = (phoneNumber, areaCode, otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
926
|
-
return index$
|
|
945
|
+
return index$8.fetchSSOV2ApiJson(index$8.SSO_V2_PATHS.WHATSAPP.VERIFY_BY_OTP, {
|
|
927
946
|
otp_code: otpCode,
|
|
928
947
|
phone_number: phoneNumber,
|
|
929
948
|
area_code: areaCode,
|
|
@@ -936,7 +955,7 @@ const registerBySendWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(void
|
|
|
936
955
|
const formData = new FormData();
|
|
937
956
|
formData.append('phone_number', phone);
|
|
938
957
|
formData.append('area_code', areaCode);
|
|
939
|
-
formData.append('website_id', index$
|
|
958
|
+
formData.append('website_id', index$8.getWebsiteId());
|
|
940
959
|
if (utils.isFeaturePolicyUpdateEnabled) {
|
|
941
960
|
formData.append('consent_type', JSON.stringify({
|
|
942
961
|
TC_acceptance: store.useSSOV2Store.getState().isHaveReadAndAgreePolicy,
|
|
@@ -944,7 +963,7 @@ const registerBySendWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(void
|
|
|
944
963
|
source_screen: 'signup_page',
|
|
945
964
|
}));
|
|
946
965
|
}
|
|
947
|
-
return index$
|
|
966
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.WHATSAPP.REGISTER_BY_SEND_OTP, {
|
|
948
967
|
method: 'POST',
|
|
949
968
|
body: formData,
|
|
950
969
|
});
|
|
@@ -955,7 +974,7 @@ const resendWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void
|
|
|
955
974
|
const formData = new FormData();
|
|
956
975
|
formData.append('phone_number', phone);
|
|
957
976
|
formData.append('area_code', areaCode);
|
|
958
|
-
return index$
|
|
977
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.WHATSAPP.SEND_OTP, {
|
|
959
978
|
method: 'POST',
|
|
960
979
|
body: formData,
|
|
961
980
|
});
|
|
@@ -964,7 +983,7 @@ const resendUpdatePhoneWhatsAppOTP = (phone, areaCode) => tslib_es6.__awaiter(vo
|
|
|
964
983
|
const formData = new FormData();
|
|
965
984
|
formData.append('phone_number', phone);
|
|
966
985
|
formData.append('area_code', areaCode);
|
|
967
|
-
return index$
|
|
986
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_SEND_OTP, {
|
|
968
987
|
method: 'POST',
|
|
969
988
|
body: formData,
|
|
970
989
|
});
|
|
@@ -974,7 +993,7 @@ const verifyUpdatePhoneWhatsAppOTP = (phone, areaCode, otpCode) => tslib_es6.__a
|
|
|
974
993
|
formData.append('phone_number', phone);
|
|
975
994
|
formData.append('otp_code', otpCode);
|
|
976
995
|
formData.append('area_code', areaCode);
|
|
977
|
-
return index$
|
|
996
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.WHATSAPP.UPDATE_PHONE_VERIFY_OTP, {
|
|
978
997
|
method: 'POST',
|
|
979
998
|
body: formData,
|
|
980
999
|
});
|
|
@@ -984,7 +1003,7 @@ const verifyByWhatsAppOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(vo
|
|
|
984
1003
|
formData.append('otp_code', otpCode);
|
|
985
1004
|
formData.append('phone_number', phone);
|
|
986
1005
|
formData.append('area_code', areaCode);
|
|
987
|
-
return index$
|
|
1006
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.WHATSAPP.VERIFY_BY_OTP, {
|
|
988
1007
|
method: 'POST',
|
|
989
1008
|
body: formData,
|
|
990
1009
|
});
|
|
@@ -996,8 +1015,8 @@ const registerBySendZaloOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, v
|
|
|
996
1015
|
const formData = new FormData();
|
|
997
1016
|
formData.append('phone_number', phone);
|
|
998
1017
|
formData.append('area_code', areaCode);
|
|
999
|
-
formData.append('website_id', index$
|
|
1000
|
-
return index$
|
|
1018
|
+
formData.append('website_id', index$8.getWebsiteId());
|
|
1019
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ZALO.REGISTER_BY_SEND_OTP, {
|
|
1001
1020
|
method: 'POST',
|
|
1002
1021
|
body: formData,
|
|
1003
1022
|
});
|
|
@@ -1008,7 +1027,7 @@ const resendZaloOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0, void 0, v
|
|
|
1008
1027
|
const formData = new FormData();
|
|
1009
1028
|
formData.append('phone_number', phone);
|
|
1010
1029
|
formData.append('area_code', areaCode);
|
|
1011
|
-
return index$
|
|
1030
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ZALO.SEND_OTP, {
|
|
1012
1031
|
method: 'POST',
|
|
1013
1032
|
body: formData,
|
|
1014
1033
|
});
|
|
@@ -1021,7 +1040,7 @@ const verifyByZaloOTP = (phone, areaCode, otpCode) => tslib_es6.__awaiter(void 0
|
|
|
1021
1040
|
formData.append('otp_code', otpCode);
|
|
1022
1041
|
formData.append('phone_number', phone);
|
|
1023
1042
|
formData.append('area_code', areaCode);
|
|
1024
|
-
return index$
|
|
1043
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ZALO.VERIFY_BY_OTP, {
|
|
1025
1044
|
method: 'POST',
|
|
1026
1045
|
body: formData,
|
|
1027
1046
|
});
|
|
@@ -1030,7 +1049,7 @@ const resendUpdatePhoneZaloOTP = (phone, areaCode) => tslib_es6.__awaiter(void 0
|
|
|
1030
1049
|
const formData = new FormData();
|
|
1031
1050
|
formData.append('phone_number', phone);
|
|
1032
1051
|
formData.append('area_code', areaCode);
|
|
1033
|
-
return index$
|
|
1052
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ZALO.UPDATE_PHONE_SEND_OTP, {
|
|
1034
1053
|
method: 'POST',
|
|
1035
1054
|
body: formData,
|
|
1036
1055
|
});
|
|
@@ -1040,7 +1059,7 @@ const verifyUpdatePhoneZaloOTP = (phone, areaCode, otpCode) => tslib_es6.__await
|
|
|
1040
1059
|
formData.append('phone_number', phone);
|
|
1041
1060
|
formData.append('otp_code', otpCode);
|
|
1042
1061
|
formData.append('area_code', areaCode);
|
|
1043
|
-
return index$
|
|
1062
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ZALO.UPDATE_PHONE_VERIFY_OTP, {
|
|
1044
1063
|
method: 'POST',
|
|
1045
1064
|
body: formData,
|
|
1046
1065
|
});
|
|
@@ -1074,14 +1093,16 @@ const checkboxStyles = (isError) => ({
|
|
|
1074
1093
|
});
|
|
1075
1094
|
const PolicyContent = ({ legalTextType, trackingCategory, trackingAction, activeTab, errMsgPolicy, }) => {
|
|
1076
1095
|
var _a, _b;
|
|
1077
|
-
const { t } = index.useTranslations();
|
|
1078
|
-
const { locale } = useSSOState();
|
|
1096
|
+
const { t } = index$2.useTranslations();
|
|
1097
|
+
const { locale, isMarryBaby } = useSSOState();
|
|
1079
1098
|
const { isHaveReadAndAgreePolicy, setIsHaveReadAndAgreePolicy, isGetUpdateFromHHG, setIsGetUpdateFromHHG, } = store.useSSOV2Store();
|
|
1080
1099
|
const isDisplayPolicyContent = !activeTab || activeTab !== 'signup';
|
|
1081
1100
|
const isDisplayTwoCheckbox = utils.isFeaturePolicyUpdateEnabled && activeTab === 'signup';
|
|
1082
|
-
const
|
|
1083
|
-
const
|
|
1084
|
-
const
|
|
1101
|
+
const siteDomain = constantsDomainLocales.getDomainByLocale(locale, isMarryBaby);
|
|
1102
|
+
const staticLocale = constantsDomainLocales.getDomainLocaleKey(locale, isMarryBaby);
|
|
1103
|
+
const urlPrivacy = `https://${siteDomain}/static/${((_a = index$1.STATIC_PAGES[staticLocale]) === null || _a === void 0 ? void 0 : _a.PRIVACY_POLICY) || ''}`;
|
|
1104
|
+
const urlTerms = `https://${siteDomain}/static/${((_b = index$1.STATIC_PAGES[staticLocale]) === null || _b === void 0 ? void 0 : _b.TERM_OF_USE) || ''}`;
|
|
1105
|
+
const policyRendered = (React__default["default"].createElement(index$4.Text, { size: "p5", color: "gray.6" }, t(utils.isFeaturePolicyUpdateEnabled
|
|
1085
1106
|
? 'ssov2.policyText.version2'
|
|
1086
1107
|
: legalTextType === 'community'
|
|
1087
1108
|
? 'ssov2.policyText.community'
|
|
@@ -1103,7 +1124,7 @@ const PolicyContent = ({ legalTextType, trackingCategory, trackingAction, active
|
|
|
1103
1124
|
},
|
|
1104
1125
|
}), className: errMsgPolicy ? 'sso-has-error' : undefined, "data-testid": "policy-content" },
|
|
1105
1126
|
isDisplayTwoCheckbox && (React__default["default"].createElement(core.Stack, { spacing: 16 },
|
|
1106
|
-
React__default["default"].createElement(index$
|
|
1127
|
+
React__default["default"].createElement(index$9.Checkbox, { label: React__default["default"].createElement(index$4.Text, { size: "p5", color: "gray.5" },
|
|
1107
1128
|
t('ssov2.policyText.readAndAgree', {
|
|
1108
1129
|
privacy: (React__default["default"].createElement("a", { href: urlPrivacy, target: "_blank", style: {
|
|
1109
1130
|
color: 'inherit',
|
|
@@ -1117,25 +1138,25 @@ const PolicyContent = ({ legalTextType, trackingCategory, trackingAction, active
|
|
|
1117
1138
|
React__default["default"].createElement("span", { style: { color: miscTheme.theme.colors.red600 } }, "*")), checked: isHaveReadAndAgreePolicy, onChange: (event) => {
|
|
1118
1139
|
setIsHaveReadAndAgreePolicy(event.target.checked);
|
|
1119
1140
|
}, styles: checkboxStyles(!!errMsgPolicy) }),
|
|
1120
|
-
React__default["default"].createElement(index$
|
|
1141
|
+
React__default["default"].createElement(index$9.Checkbox, { label: React__default["default"].createElement(index$4.Text, { size: "p5", color: "gray.5" }, t('ssov2.policyText.receiveUpdates')), checked: isGetUpdateFromHHG, onChange: (event) => {
|
|
1121
1142
|
setIsGetUpdateFromHHG(event.target.checked);
|
|
1122
1143
|
}, styles: checkboxStyles() }))),
|
|
1123
1144
|
isDisplayPolicyContent &&
|
|
1124
|
-
(utils.isFeaturePolicyUpdateEnabled ? (policyRendered) : (React__default["default"].createElement(index$
|
|
1145
|
+
(utils.isFeaturePolicyUpdateEnabled ? (policyRendered) : (React__default["default"].createElement(index$a.Spoiler, { maxHeight: 74, showLabel: React__default["default"].createElement(index$4.Text, { size: "p5", color: "gray.6", underline: true, align: "left" }, t('home.seeMore')), hideLabel: React__default["default"].createElement(index$4.Text, { size: "p5", color: "gray.6", underline: true, align: "left" }, t('articlePage.showLess')) }, policyRendered)))));
|
|
1125
1146
|
};
|
|
1126
1147
|
|
|
1127
1148
|
const FirstBFlow = ({ hidden, activeTab, legalTextType, trackingAction, trackingCategory, onTriggerGoogleLogin, onTriggerFacebookLogin, onClickEmail, }) => {
|
|
1128
|
-
const { t } = index.useTranslations();
|
|
1149
|
+
const { t } = index$2.useTranslations();
|
|
1129
1150
|
return (React__default["default"].createElement("div", { style: {
|
|
1130
1151
|
display: hidden ? 'none' : 'flex',
|
|
1131
1152
|
flexDirection: 'column',
|
|
1132
1153
|
height: '100%',
|
|
1133
1154
|
} },
|
|
1134
1155
|
React__default["default"].createElement(core.Stack, { mt: 8, spacing: 8 },
|
|
1135
|
-
React__default["default"].createElement(index$
|
|
1136
|
-
React__default["default"].createElement(index$
|
|
1156
|
+
React__default["default"].createElement(index$4.Text, { size: "h4", weight: "semiBold" }, t('home.navigator.menu.category.noDatas.title')),
|
|
1157
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.abTestingFlowB.description'))),
|
|
1137
1158
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 24 },
|
|
1138
|
-
React__default["default"].createElement(index$
|
|
1159
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
1139
1160
|
flex: 1,
|
|
1140
1161
|
height: 48,
|
|
1141
1162
|
padding: 12,
|
|
@@ -1149,13 +1170,13 @@ const FirstBFlow = ({ hidden, activeTab, legalTextType, trackingAction, tracking
|
|
|
1149
1170
|
borderRadius: '100%',
|
|
1150
1171
|
} }),
|
|
1151
1172
|
' ',
|
|
1152
|
-
React__default["default"].createElement(index$
|
|
1173
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "black", weight: "semiBold" }, t('ssov2.button.continueGoogle'))),
|
|
1153
1174
|
React__default["default"].createElement(core.Stack, { spacing: 24, align: "center" },
|
|
1154
|
-
React__default["default"].createElement(index$
|
|
1175
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
1155
1176
|
React__default["default"].createElement(core.Group, { spacing: 8, style: {
|
|
1156
1177
|
width: '100%',
|
|
1157
1178
|
} },
|
|
1158
|
-
React__default["default"].createElement(index$
|
|
1179
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
1159
1180
|
flex: 1,
|
|
1160
1181
|
height: 48,
|
|
1161
1182
|
padding: 12,
|
|
@@ -1169,8 +1190,8 @@ const FirstBFlow = ({ hidden, activeTab, legalTextType, trackingAction, tracking
|
|
|
1169
1190
|
borderRadius: '100%',
|
|
1170
1191
|
} }),
|
|
1171
1192
|
' ',
|
|
1172
|
-
React__default["default"].createElement(index$
|
|
1173
|
-
React__default["default"].createElement(index$
|
|
1193
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "black", weight: "regular" }, "Facebook")),
|
|
1194
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
1174
1195
|
flex: 1,
|
|
1175
1196
|
height: 48,
|
|
1176
1197
|
padding: 12,
|
|
@@ -1181,1419 +1202,11 @@ const FirstBFlow = ({ hidden, activeTab, legalTextType, trackingAction, tracking
|
|
|
1181
1202
|
marginRight: 4,
|
|
1182
1203
|
} }),
|
|
1183
1204
|
' ',
|
|
1184
|
-
React__default["default"].createElement(index$
|
|
1205
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
1185
1206
|
React__default["default"].createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory, activeTab: activeTab })));
|
|
1186
1207
|
};
|
|
1187
1208
|
|
|
1188
|
-
|
|
1189
|
-
var module = { exports: {} };
|
|
1190
|
-
return fn(module, module.exports), module.exports;
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
/** @license React v16.13.1
|
|
1194
|
-
* react-is.production.min.js
|
|
1195
|
-
*
|
|
1196
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1197
|
-
*
|
|
1198
|
-
* This source code is licensed under the MIT license found in the
|
|
1199
|
-
* LICENSE file in the root directory of this source tree.
|
|
1200
|
-
*/
|
|
1201
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
1202
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
1203
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
1204
|
-
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
1205
|
-
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
1206
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
1207
|
-
|
|
1208
|
-
var reactIs_production_min = {
|
|
1209
|
-
AsyncMode: AsyncMode,
|
|
1210
|
-
ConcurrentMode: ConcurrentMode,
|
|
1211
|
-
ContextConsumer: ContextConsumer,
|
|
1212
|
-
ContextProvider: ContextProvider,
|
|
1213
|
-
Element: Element,
|
|
1214
|
-
ForwardRef: ForwardRef,
|
|
1215
|
-
Fragment: Fragment,
|
|
1216
|
-
Lazy: Lazy,
|
|
1217
|
-
Memo: Memo,
|
|
1218
|
-
Portal: Portal,
|
|
1219
|
-
Profiler: Profiler,
|
|
1220
|
-
StrictMode: StrictMode,
|
|
1221
|
-
Suspense: Suspense,
|
|
1222
|
-
isAsyncMode: isAsyncMode,
|
|
1223
|
-
isConcurrentMode: isConcurrentMode,
|
|
1224
|
-
isContextConsumer: isContextConsumer,
|
|
1225
|
-
isContextProvider: isContextProvider,
|
|
1226
|
-
isElement: isElement,
|
|
1227
|
-
isForwardRef: isForwardRef,
|
|
1228
|
-
isFragment: isFragment,
|
|
1229
|
-
isLazy: isLazy,
|
|
1230
|
-
isMemo: isMemo,
|
|
1231
|
-
isPortal: isPortal,
|
|
1232
|
-
isProfiler: isProfiler,
|
|
1233
|
-
isStrictMode: isStrictMode,
|
|
1234
|
-
isSuspense: isSuspense,
|
|
1235
|
-
isValidElementType: isValidElementType,
|
|
1236
|
-
typeOf: typeOf
|
|
1237
|
-
};
|
|
1238
|
-
|
|
1239
|
-
/** @license React v16.13.1
|
|
1240
|
-
* react-is.development.js
|
|
1241
|
-
*
|
|
1242
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1243
|
-
*
|
|
1244
|
-
* This source code is licensed under the MIT license found in the
|
|
1245
|
-
* LICENSE file in the root directory of this source tree.
|
|
1246
|
-
*/
|
|
1247
|
-
|
|
1248
|
-
var reactIs_development = createCommonjsModule(function (module, exports) {
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1253
|
-
(function() {
|
|
1254
|
-
|
|
1255
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
1256
|
-
// nor polyfill, then a plain number is used for performance.
|
|
1257
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
1258
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
1259
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1260
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1261
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1262
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1263
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1264
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1265
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1266
|
-
|
|
1267
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1268
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1269
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1270
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1271
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1272
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1273
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1274
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1275
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1276
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1277
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1278
|
-
|
|
1279
|
-
function isValidElementType(type) {
|
|
1280
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1281
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
function typeOf(object) {
|
|
1285
|
-
if (typeof object === 'object' && object !== null) {
|
|
1286
|
-
var $$typeof = object.$$typeof;
|
|
1287
|
-
|
|
1288
|
-
switch ($$typeof) {
|
|
1289
|
-
case REACT_ELEMENT_TYPE:
|
|
1290
|
-
var type = object.type;
|
|
1291
|
-
|
|
1292
|
-
switch (type) {
|
|
1293
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1294
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1295
|
-
case REACT_FRAGMENT_TYPE:
|
|
1296
|
-
case REACT_PROFILER_TYPE:
|
|
1297
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1298
|
-
case REACT_SUSPENSE_TYPE:
|
|
1299
|
-
return type;
|
|
1300
|
-
|
|
1301
|
-
default:
|
|
1302
|
-
var $$typeofType = type && type.$$typeof;
|
|
1303
|
-
|
|
1304
|
-
switch ($$typeofType) {
|
|
1305
|
-
case REACT_CONTEXT_TYPE:
|
|
1306
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1307
|
-
case REACT_LAZY_TYPE:
|
|
1308
|
-
case REACT_MEMO_TYPE:
|
|
1309
|
-
case REACT_PROVIDER_TYPE:
|
|
1310
|
-
return $$typeofType;
|
|
1311
|
-
|
|
1312
|
-
default:
|
|
1313
|
-
return $$typeof;
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
case REACT_PORTAL_TYPE:
|
|
1319
|
-
return $$typeof;
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
return undefined;
|
|
1324
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
1325
|
-
|
|
1326
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1327
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1328
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1329
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1330
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1331
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1332
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1333
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1334
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1335
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1336
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1337
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1338
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1339
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1340
|
-
|
|
1341
|
-
function isAsyncMode(object) {
|
|
1342
|
-
{
|
|
1343
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1344
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1345
|
-
|
|
1346
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1351
|
-
}
|
|
1352
|
-
function isConcurrentMode(object) {
|
|
1353
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1354
|
-
}
|
|
1355
|
-
function isContextConsumer(object) {
|
|
1356
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1357
|
-
}
|
|
1358
|
-
function isContextProvider(object) {
|
|
1359
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1360
|
-
}
|
|
1361
|
-
function isElement(object) {
|
|
1362
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1363
|
-
}
|
|
1364
|
-
function isForwardRef(object) {
|
|
1365
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1366
|
-
}
|
|
1367
|
-
function isFragment(object) {
|
|
1368
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1369
|
-
}
|
|
1370
|
-
function isLazy(object) {
|
|
1371
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1372
|
-
}
|
|
1373
|
-
function isMemo(object) {
|
|
1374
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1375
|
-
}
|
|
1376
|
-
function isPortal(object) {
|
|
1377
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1378
|
-
}
|
|
1379
|
-
function isProfiler(object) {
|
|
1380
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1381
|
-
}
|
|
1382
|
-
function isStrictMode(object) {
|
|
1383
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1384
|
-
}
|
|
1385
|
-
function isSuspense(object) {
|
|
1386
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
exports.AsyncMode = AsyncMode;
|
|
1390
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
1391
|
-
exports.ContextConsumer = ContextConsumer;
|
|
1392
|
-
exports.ContextProvider = ContextProvider;
|
|
1393
|
-
exports.Element = Element;
|
|
1394
|
-
exports.ForwardRef = ForwardRef;
|
|
1395
|
-
exports.Fragment = Fragment;
|
|
1396
|
-
exports.Lazy = Lazy;
|
|
1397
|
-
exports.Memo = Memo;
|
|
1398
|
-
exports.Portal = Portal;
|
|
1399
|
-
exports.Profiler = Profiler;
|
|
1400
|
-
exports.StrictMode = StrictMode;
|
|
1401
|
-
exports.Suspense = Suspense;
|
|
1402
|
-
exports.isAsyncMode = isAsyncMode;
|
|
1403
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
1404
|
-
exports.isContextConsumer = isContextConsumer;
|
|
1405
|
-
exports.isContextProvider = isContextProvider;
|
|
1406
|
-
exports.isElement = isElement;
|
|
1407
|
-
exports.isForwardRef = isForwardRef;
|
|
1408
|
-
exports.isFragment = isFragment;
|
|
1409
|
-
exports.isLazy = isLazy;
|
|
1410
|
-
exports.isMemo = isMemo;
|
|
1411
|
-
exports.isPortal = isPortal;
|
|
1412
|
-
exports.isProfiler = isProfiler;
|
|
1413
|
-
exports.isStrictMode = isStrictMode;
|
|
1414
|
-
exports.isSuspense = isSuspense;
|
|
1415
|
-
exports.isValidElementType = isValidElementType;
|
|
1416
|
-
exports.typeOf = typeOf;
|
|
1417
|
-
})();
|
|
1418
|
-
}
|
|
1419
|
-
});
|
|
1420
|
-
|
|
1421
|
-
var reactIs = createCommonjsModule(function (module) {
|
|
1422
|
-
|
|
1423
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1424
|
-
module.exports = reactIs_production_min;
|
|
1425
|
-
} else {
|
|
1426
|
-
module.exports = reactIs_development;
|
|
1427
|
-
}
|
|
1428
|
-
});
|
|
1429
|
-
|
|
1430
|
-
/*
|
|
1431
|
-
object-assign
|
|
1432
|
-
(c) Sindre Sorhus
|
|
1433
|
-
@license MIT
|
|
1434
|
-
*/
|
|
1435
|
-
/* eslint-disable no-unused-vars */
|
|
1436
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
1437
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1438
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1439
|
-
|
|
1440
|
-
function toObject(val) {
|
|
1441
|
-
if (val === null || val === undefined) {
|
|
1442
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
return Object(val);
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
function shouldUseNative() {
|
|
1449
|
-
try {
|
|
1450
|
-
if (!Object.assign) {
|
|
1451
|
-
return false;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
1455
|
-
|
|
1456
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
1457
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
1458
|
-
test1[5] = 'de';
|
|
1459
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
1460
|
-
return false;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1464
|
-
var test2 = {};
|
|
1465
|
-
for (var i = 0; i < 10; i++) {
|
|
1466
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
1467
|
-
}
|
|
1468
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
1469
|
-
return test2[n];
|
|
1470
|
-
});
|
|
1471
|
-
if (order2.join('') !== '0123456789') {
|
|
1472
|
-
return false;
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1476
|
-
var test3 = {};
|
|
1477
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
1478
|
-
test3[letter] = letter;
|
|
1479
|
-
});
|
|
1480
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
1481
|
-
'abcdefghijklmnopqrst') {
|
|
1482
|
-
return false;
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
return true;
|
|
1486
|
-
} catch (err) {
|
|
1487
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
1488
|
-
return false;
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
1493
|
-
var from;
|
|
1494
|
-
var to = toObject(target);
|
|
1495
|
-
var symbols;
|
|
1496
|
-
|
|
1497
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
1498
|
-
from = Object(arguments[s]);
|
|
1499
|
-
|
|
1500
|
-
for (var key in from) {
|
|
1501
|
-
if (hasOwnProperty.call(from, key)) {
|
|
1502
|
-
to[key] = from[key];
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
if (getOwnPropertySymbols) {
|
|
1507
|
-
symbols = getOwnPropertySymbols(from);
|
|
1508
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
1509
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
1510
|
-
to[symbols[i]] = from[symbols[i]];
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
return to;
|
|
1517
|
-
};
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1521
|
-
*
|
|
1522
|
-
* This source code is licensed under the MIT license found in the
|
|
1523
|
-
* LICENSE file in the root directory of this source tree.
|
|
1524
|
-
*/
|
|
1525
|
-
|
|
1526
|
-
var ReactPropTypesSecret$2 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1527
|
-
|
|
1528
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$2;
|
|
1529
|
-
|
|
1530
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1531
|
-
|
|
1532
|
-
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
1533
|
-
|
|
1534
|
-
var has$1 = has$2;
|
|
1535
|
-
|
|
1536
|
-
/**
|
|
1537
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1538
|
-
*
|
|
1539
|
-
* This source code is licensed under the MIT license found in the
|
|
1540
|
-
* LICENSE file in the root directory of this source tree.
|
|
1541
|
-
*/
|
|
1542
|
-
|
|
1543
|
-
var printWarning$1 = function() {};
|
|
1544
|
-
|
|
1545
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1546
|
-
var ReactPropTypesSecret = ReactPropTypesSecret$1;
|
|
1547
|
-
var loggedTypeFailures = {};
|
|
1548
|
-
var has = has$1;
|
|
1549
|
-
|
|
1550
|
-
printWarning$1 = function(text) {
|
|
1551
|
-
var message = 'Warning: ' + text;
|
|
1552
|
-
if (typeof console !== 'undefined') {
|
|
1553
|
-
console.error(message);
|
|
1554
|
-
}
|
|
1555
|
-
try {
|
|
1556
|
-
// --- Welcome to debugging React ---
|
|
1557
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
1558
|
-
// to find the callsite that caused this warning to fire.
|
|
1559
|
-
throw new Error(message);
|
|
1560
|
-
} catch (x) { /**/ }
|
|
1561
|
-
};
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
/**
|
|
1565
|
-
* Assert that the values match with the type specs.
|
|
1566
|
-
* Error messages are memorized and will only be shown once.
|
|
1567
|
-
*
|
|
1568
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1569
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
1570
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
1571
|
-
* @param {string} componentName Name of the component for error messages.
|
|
1572
|
-
* @param {?Function} getStack Returns the component stack.
|
|
1573
|
-
* @private
|
|
1574
|
-
*/
|
|
1575
|
-
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
1576
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1577
|
-
for (var typeSpecName in typeSpecs) {
|
|
1578
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
1579
|
-
var error;
|
|
1580
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
1581
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
1582
|
-
// After these have been cleaned up, we'll let them throw.
|
|
1583
|
-
try {
|
|
1584
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
1585
|
-
// behavior as without this statement except with a better message.
|
|
1586
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1587
|
-
var err = Error(
|
|
1588
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1589
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
1590
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
1591
|
-
);
|
|
1592
|
-
err.name = 'Invariant Violation';
|
|
1593
|
-
throw err;
|
|
1594
|
-
}
|
|
1595
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
1596
|
-
} catch (ex) {
|
|
1597
|
-
error = ex;
|
|
1598
|
-
}
|
|
1599
|
-
if (error && !(error instanceof Error)) {
|
|
1600
|
-
printWarning$1(
|
|
1601
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
1602
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1603
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1604
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
1605
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1606
|
-
'shape all require an argument).'
|
|
1607
|
-
);
|
|
1608
|
-
}
|
|
1609
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1610
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
1611
|
-
// same error.
|
|
1612
|
-
loggedTypeFailures[error.message] = true;
|
|
1613
|
-
|
|
1614
|
-
var stack = getStack ? getStack() : '';
|
|
1615
|
-
|
|
1616
|
-
printWarning$1(
|
|
1617
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1618
|
-
);
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
/**
|
|
1626
|
-
* Resets warning cache when testing.
|
|
1627
|
-
*
|
|
1628
|
-
* @private
|
|
1629
|
-
*/
|
|
1630
|
-
checkPropTypes$1.resetWarningCache = function() {
|
|
1631
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1632
|
-
loggedTypeFailures = {};
|
|
1633
|
-
}
|
|
1634
|
-
};
|
|
1635
|
-
|
|
1636
|
-
var checkPropTypes_1 = checkPropTypes$1;
|
|
1637
|
-
|
|
1638
|
-
var checkPropTypes = checkPropTypes_1;
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1642
|
-
*
|
|
1643
|
-
* This source code is licensed under the MIT license found in the
|
|
1644
|
-
* LICENSE file in the root directory of this source tree.
|
|
1645
|
-
*/
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
var printWarning = function() {};
|
|
1655
|
-
|
|
1656
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1657
|
-
printWarning = function(text) {
|
|
1658
|
-
var message = 'Warning: ' + text;
|
|
1659
|
-
if (typeof console !== 'undefined') {
|
|
1660
|
-
console.error(message);
|
|
1661
|
-
}
|
|
1662
|
-
try {
|
|
1663
|
-
// --- Welcome to debugging React ---
|
|
1664
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
1665
|
-
// to find the callsite that caused this warning to fire.
|
|
1666
|
-
throw new Error(message);
|
|
1667
|
-
} catch (x) {}
|
|
1668
|
-
};
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
function emptyFunctionThatReturnsNull() {
|
|
1672
|
-
return null;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1676
|
-
/* global Symbol */
|
|
1677
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
1678
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
1679
|
-
|
|
1680
|
-
/**
|
|
1681
|
-
* Returns the iterator method function contained on the iterable object.
|
|
1682
|
-
*
|
|
1683
|
-
* Be sure to invoke the function with the iterable as context:
|
|
1684
|
-
*
|
|
1685
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
1686
|
-
* if (iteratorFn) {
|
|
1687
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
1688
|
-
* ...
|
|
1689
|
-
* }
|
|
1690
|
-
*
|
|
1691
|
-
* @param {?object} maybeIterable
|
|
1692
|
-
* @return {?function}
|
|
1693
|
-
*/
|
|
1694
|
-
function getIteratorFn(maybeIterable) {
|
|
1695
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
1696
|
-
if (typeof iteratorFn === 'function') {
|
|
1697
|
-
return iteratorFn;
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
/**
|
|
1702
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
1703
|
-
* supplied to React components. Example usage:
|
|
1704
|
-
*
|
|
1705
|
-
* var Props = require('ReactPropTypes');
|
|
1706
|
-
* var MyArticle = React.createClass({
|
|
1707
|
-
* propTypes: {
|
|
1708
|
-
* // An optional string prop named "description".
|
|
1709
|
-
* description: Props.string,
|
|
1710
|
-
*
|
|
1711
|
-
* // A required enum prop named "category".
|
|
1712
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
1713
|
-
*
|
|
1714
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
1715
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
1716
|
-
* },
|
|
1717
|
-
* render: function() { ... }
|
|
1718
|
-
* });
|
|
1719
|
-
*
|
|
1720
|
-
* A more formal specification of how these methods are used:
|
|
1721
|
-
*
|
|
1722
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
1723
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
1724
|
-
*
|
|
1725
|
-
* Each and every declaration produces a function with the same signature. This
|
|
1726
|
-
* allows the creation of custom validation functions. For example:
|
|
1727
|
-
*
|
|
1728
|
-
* var MyLink = React.createClass({
|
|
1729
|
-
* propTypes: {
|
|
1730
|
-
* // An optional string or URI prop named "href".
|
|
1731
|
-
* href: function(props, propName, componentName) {
|
|
1732
|
-
* var propValue = props[propName];
|
|
1733
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
1734
|
-
* !(propValue instanceof URI)) {
|
|
1735
|
-
* return new Error(
|
|
1736
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
1737
|
-
* componentName
|
|
1738
|
-
* );
|
|
1739
|
-
* }
|
|
1740
|
-
* }
|
|
1741
|
-
* },
|
|
1742
|
-
* render: function() {...}
|
|
1743
|
-
* });
|
|
1744
|
-
*
|
|
1745
|
-
* @internal
|
|
1746
|
-
*/
|
|
1747
|
-
|
|
1748
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
1749
|
-
|
|
1750
|
-
// Important!
|
|
1751
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
1752
|
-
var ReactPropTypes = {
|
|
1753
|
-
array: createPrimitiveTypeChecker('array'),
|
|
1754
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
1755
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
1756
|
-
func: createPrimitiveTypeChecker('function'),
|
|
1757
|
-
number: createPrimitiveTypeChecker('number'),
|
|
1758
|
-
object: createPrimitiveTypeChecker('object'),
|
|
1759
|
-
string: createPrimitiveTypeChecker('string'),
|
|
1760
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
1761
|
-
|
|
1762
|
-
any: createAnyTypeChecker(),
|
|
1763
|
-
arrayOf: createArrayOfTypeChecker,
|
|
1764
|
-
element: createElementTypeChecker(),
|
|
1765
|
-
elementType: createElementTypeTypeChecker(),
|
|
1766
|
-
instanceOf: createInstanceTypeChecker,
|
|
1767
|
-
node: createNodeChecker(),
|
|
1768
|
-
objectOf: createObjectOfTypeChecker,
|
|
1769
|
-
oneOf: createEnumTypeChecker,
|
|
1770
|
-
oneOfType: createUnionTypeChecker,
|
|
1771
|
-
shape: createShapeTypeChecker,
|
|
1772
|
-
exact: createStrictShapeTypeChecker,
|
|
1773
|
-
};
|
|
1774
|
-
|
|
1775
|
-
/**
|
|
1776
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
1777
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
1778
|
-
*/
|
|
1779
|
-
/*eslint-disable no-self-compare*/
|
|
1780
|
-
function is(x, y) {
|
|
1781
|
-
// SameValue algorithm
|
|
1782
|
-
if (x === y) {
|
|
1783
|
-
// Steps 1-5, 7-10
|
|
1784
|
-
// Steps 6.b-6.e: +0 != -0
|
|
1785
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
1786
|
-
} else {
|
|
1787
|
-
// Step 6.a: NaN == NaN
|
|
1788
|
-
return x !== x && y !== y;
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
/*eslint-enable no-self-compare*/
|
|
1792
|
-
|
|
1793
|
-
/**
|
|
1794
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
1795
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
1796
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
1797
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
1798
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
1799
|
-
*/
|
|
1800
|
-
function PropTypeError(message, data) {
|
|
1801
|
-
this.message = message;
|
|
1802
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
1803
|
-
this.stack = '';
|
|
1804
|
-
}
|
|
1805
|
-
// Make `instanceof Error` still work for returned errors.
|
|
1806
|
-
PropTypeError.prototype = Error.prototype;
|
|
1807
|
-
|
|
1808
|
-
function createChainableTypeChecker(validate) {
|
|
1809
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1810
|
-
var manualPropTypeCallCache = {};
|
|
1811
|
-
var manualPropTypeWarningCount = 0;
|
|
1812
|
-
}
|
|
1813
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
1814
|
-
componentName = componentName || ANONYMOUS;
|
|
1815
|
-
propFullName = propFullName || propName;
|
|
1816
|
-
|
|
1817
|
-
if (secret !== ReactPropTypesSecret$1) {
|
|
1818
|
-
if (throwOnDirectAccess) {
|
|
1819
|
-
// New behavior only for users of `prop-types` package
|
|
1820
|
-
var err = new Error(
|
|
1821
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1822
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
1823
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1824
|
-
);
|
|
1825
|
-
err.name = 'Invariant Violation';
|
|
1826
|
-
throw err;
|
|
1827
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
1828
|
-
// Old behavior for people using React.PropTypes
|
|
1829
|
-
var cacheKey = componentName + ':' + propName;
|
|
1830
|
-
if (
|
|
1831
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
1832
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
1833
|
-
manualPropTypeWarningCount < 3
|
|
1834
|
-
) {
|
|
1835
|
-
printWarning(
|
|
1836
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
1837
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
1838
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
1839
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
1840
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
1841
|
-
);
|
|
1842
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
1843
|
-
manualPropTypeWarningCount++;
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
if (props[propName] == null) {
|
|
1848
|
-
if (isRequired) {
|
|
1849
|
-
if (props[propName] === null) {
|
|
1850
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
1851
|
-
}
|
|
1852
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
1853
|
-
}
|
|
1854
|
-
return null;
|
|
1855
|
-
} else {
|
|
1856
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
1861
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1862
|
-
|
|
1863
|
-
return chainedCheckType;
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
1867
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1868
|
-
var propValue = props[propName];
|
|
1869
|
-
var propType = getPropType(propValue);
|
|
1870
|
-
if (propType !== expectedType) {
|
|
1871
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
1872
|
-
// check, but we can offer a more precise error message here rather than
|
|
1873
|
-
// 'of type `object`'.
|
|
1874
|
-
var preciseType = getPreciseType(propValue);
|
|
1875
|
-
|
|
1876
|
-
return new PropTypeError(
|
|
1877
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
1878
|
-
{expectedType: expectedType}
|
|
1879
|
-
);
|
|
1880
|
-
}
|
|
1881
|
-
return null;
|
|
1882
|
-
}
|
|
1883
|
-
return createChainableTypeChecker(validate);
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
function createAnyTypeChecker() {
|
|
1887
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
1891
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1892
|
-
if (typeof typeChecker !== 'function') {
|
|
1893
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
1894
|
-
}
|
|
1895
|
-
var propValue = props[propName];
|
|
1896
|
-
if (!Array.isArray(propValue)) {
|
|
1897
|
-
var propType = getPropType(propValue);
|
|
1898
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
1899
|
-
}
|
|
1900
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
1901
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
|
|
1902
|
-
if (error instanceof Error) {
|
|
1903
|
-
return error;
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
return null;
|
|
1907
|
-
}
|
|
1908
|
-
return createChainableTypeChecker(validate);
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
function createElementTypeChecker() {
|
|
1912
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1913
|
-
var propValue = props[propName];
|
|
1914
|
-
if (!isValidElement(propValue)) {
|
|
1915
|
-
var propType = getPropType(propValue);
|
|
1916
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1917
|
-
}
|
|
1918
|
-
return null;
|
|
1919
|
-
}
|
|
1920
|
-
return createChainableTypeChecker(validate);
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
function createElementTypeTypeChecker() {
|
|
1924
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1925
|
-
var propValue = props[propName];
|
|
1926
|
-
if (!reactIs.isValidElementType(propValue)) {
|
|
1927
|
-
var propType = getPropType(propValue);
|
|
1928
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1929
|
-
}
|
|
1930
|
-
return null;
|
|
1931
|
-
}
|
|
1932
|
-
return createChainableTypeChecker(validate);
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
1936
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1937
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
1938
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1939
|
-
var actualClassName = getClassName(props[propName]);
|
|
1940
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1941
|
-
}
|
|
1942
|
-
return null;
|
|
1943
|
-
}
|
|
1944
|
-
return createChainableTypeChecker(validate);
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
function createEnumTypeChecker(expectedValues) {
|
|
1948
|
-
if (!Array.isArray(expectedValues)) {
|
|
1949
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1950
|
-
if (arguments.length > 1) {
|
|
1951
|
-
printWarning(
|
|
1952
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1953
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1954
|
-
);
|
|
1955
|
-
} else {
|
|
1956
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
return emptyFunctionThatReturnsNull;
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1963
|
-
var propValue = props[propName];
|
|
1964
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
1965
|
-
if (is(propValue, expectedValues[i])) {
|
|
1966
|
-
return null;
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1971
|
-
var type = getPreciseType(value);
|
|
1972
|
-
if (type === 'symbol') {
|
|
1973
|
-
return String(value);
|
|
1974
|
-
}
|
|
1975
|
-
return value;
|
|
1976
|
-
});
|
|
1977
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1978
|
-
}
|
|
1979
|
-
return createChainableTypeChecker(validate);
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
1983
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1984
|
-
if (typeof typeChecker !== 'function') {
|
|
1985
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1986
|
-
}
|
|
1987
|
-
var propValue = props[propName];
|
|
1988
|
-
var propType = getPropType(propValue);
|
|
1989
|
-
if (propType !== 'object') {
|
|
1990
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1991
|
-
}
|
|
1992
|
-
for (var key in propValue) {
|
|
1993
|
-
if (has$1(propValue, key)) {
|
|
1994
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1995
|
-
if (error instanceof Error) {
|
|
1996
|
-
return error;
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
return null;
|
|
2001
|
-
}
|
|
2002
|
-
return createChainableTypeChecker(validate);
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
2006
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
2007
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
2008
|
-
return emptyFunctionThatReturnsNull;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
2012
|
-
var checker = arrayOfTypeCheckers[i];
|
|
2013
|
-
if (typeof checker !== 'function') {
|
|
2014
|
-
printWarning(
|
|
2015
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
2016
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
2017
|
-
);
|
|
2018
|
-
return emptyFunctionThatReturnsNull;
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2023
|
-
var expectedTypes = [];
|
|
2024
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
2025
|
-
var checker = arrayOfTypeCheckers[i];
|
|
2026
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
|
|
2027
|
-
if (checkerResult == null) {
|
|
2028
|
-
return null;
|
|
2029
|
-
}
|
|
2030
|
-
if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) {
|
|
2031
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
2035
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
2036
|
-
}
|
|
2037
|
-
return createChainableTypeChecker(validate);
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
function createNodeChecker() {
|
|
2041
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2042
|
-
if (!isNode(props[propName])) {
|
|
2043
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
2044
|
-
}
|
|
2045
|
-
return null;
|
|
2046
|
-
}
|
|
2047
|
-
return createChainableTypeChecker(validate);
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
2051
|
-
return new PropTypeError(
|
|
2052
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
2053
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
2054
|
-
);
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
2058
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2059
|
-
var propValue = props[propName];
|
|
2060
|
-
var propType = getPropType(propValue);
|
|
2061
|
-
if (propType !== 'object') {
|
|
2062
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
2063
|
-
}
|
|
2064
|
-
for (var key in shapeTypes) {
|
|
2065
|
-
var checker = shapeTypes[key];
|
|
2066
|
-
if (typeof checker !== 'function') {
|
|
2067
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
2068
|
-
}
|
|
2069
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
2070
|
-
if (error) {
|
|
2071
|
-
return error;
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
return null;
|
|
2075
|
-
}
|
|
2076
|
-
return createChainableTypeChecker(validate);
|
|
2077
|
-
}
|
|
2078
|
-
|
|
2079
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
2080
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
2081
|
-
var propValue = props[propName];
|
|
2082
|
-
var propType = getPropType(propValue);
|
|
2083
|
-
if (propType !== 'object') {
|
|
2084
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
2085
|
-
}
|
|
2086
|
-
// We need to check all keys in case some are required but missing from props.
|
|
2087
|
-
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
2088
|
-
for (var key in allKeys) {
|
|
2089
|
-
var checker = shapeTypes[key];
|
|
2090
|
-
if (has$1(shapeTypes, key) && typeof checker !== 'function') {
|
|
2091
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
2092
|
-
}
|
|
2093
|
-
if (!checker) {
|
|
2094
|
-
return new PropTypeError(
|
|
2095
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
2096
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
2097
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
2098
|
-
);
|
|
2099
|
-
}
|
|
2100
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
2101
|
-
if (error) {
|
|
2102
|
-
return error;
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
return null;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
return createChainableTypeChecker(validate);
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
function isNode(propValue) {
|
|
2112
|
-
switch (typeof propValue) {
|
|
2113
|
-
case 'number':
|
|
2114
|
-
case 'string':
|
|
2115
|
-
case 'undefined':
|
|
2116
|
-
return true;
|
|
2117
|
-
case 'boolean':
|
|
2118
|
-
return !propValue;
|
|
2119
|
-
case 'object':
|
|
2120
|
-
if (Array.isArray(propValue)) {
|
|
2121
|
-
return propValue.every(isNode);
|
|
2122
|
-
}
|
|
2123
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
2124
|
-
return true;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
2128
|
-
if (iteratorFn) {
|
|
2129
|
-
var iterator = iteratorFn.call(propValue);
|
|
2130
|
-
var step;
|
|
2131
|
-
if (iteratorFn !== propValue.entries) {
|
|
2132
|
-
while (!(step = iterator.next()).done) {
|
|
2133
|
-
if (!isNode(step.value)) {
|
|
2134
|
-
return false;
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
|
-
} else {
|
|
2138
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
2139
|
-
while (!(step = iterator.next()).done) {
|
|
2140
|
-
var entry = step.value;
|
|
2141
|
-
if (entry) {
|
|
2142
|
-
if (!isNode(entry[1])) {
|
|
2143
|
-
return false;
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
} else {
|
|
2149
|
-
return false;
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
return true;
|
|
2153
|
-
default:
|
|
2154
|
-
return false;
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
function isSymbol(propType, propValue) {
|
|
2159
|
-
// Native Symbol.
|
|
2160
|
-
if (propType === 'symbol') {
|
|
2161
|
-
return true;
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
// falsy value can't be a Symbol
|
|
2165
|
-
if (!propValue) {
|
|
2166
|
-
return false;
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
2170
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
2171
|
-
return true;
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
2175
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
2176
|
-
return true;
|
|
2177
|
-
}
|
|
2178
|
-
|
|
2179
|
-
return false;
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
2183
|
-
function getPropType(propValue) {
|
|
2184
|
-
var propType = typeof propValue;
|
|
2185
|
-
if (Array.isArray(propValue)) {
|
|
2186
|
-
return 'array';
|
|
2187
|
-
}
|
|
2188
|
-
if (propValue instanceof RegExp) {
|
|
2189
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
2190
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
2191
|
-
// passes PropTypes.object.
|
|
2192
|
-
return 'object';
|
|
2193
|
-
}
|
|
2194
|
-
if (isSymbol(propType, propValue)) {
|
|
2195
|
-
return 'symbol';
|
|
2196
|
-
}
|
|
2197
|
-
return propType;
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
2201
|
-
// See `createPrimitiveTypeChecker`.
|
|
2202
|
-
function getPreciseType(propValue) {
|
|
2203
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
2204
|
-
return '' + propValue;
|
|
2205
|
-
}
|
|
2206
|
-
var propType = getPropType(propValue);
|
|
2207
|
-
if (propType === 'object') {
|
|
2208
|
-
if (propValue instanceof Date) {
|
|
2209
|
-
return 'date';
|
|
2210
|
-
} else if (propValue instanceof RegExp) {
|
|
2211
|
-
return 'regexp';
|
|
2212
|
-
}
|
|
2213
|
-
}
|
|
2214
|
-
return propType;
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
2218
|
-
// For example, "undefined" or "of type array"
|
|
2219
|
-
function getPostfixForTypeWarning(value) {
|
|
2220
|
-
var type = getPreciseType(value);
|
|
2221
|
-
switch (type) {
|
|
2222
|
-
case 'array':
|
|
2223
|
-
case 'object':
|
|
2224
|
-
return 'an ' + type;
|
|
2225
|
-
case 'boolean':
|
|
2226
|
-
case 'date':
|
|
2227
|
-
case 'regexp':
|
|
2228
|
-
return 'a ' + type;
|
|
2229
|
-
default:
|
|
2230
|
-
return type;
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
// Returns class name of the object, if any.
|
|
2235
|
-
function getClassName(propValue) {
|
|
2236
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
2237
|
-
return ANONYMOUS;
|
|
2238
|
-
}
|
|
2239
|
-
return propValue.constructor.name;
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
2243
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
2244
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2245
|
-
|
|
2246
|
-
return ReactPropTypes;
|
|
2247
|
-
};
|
|
2248
|
-
|
|
2249
|
-
/**
|
|
2250
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2251
|
-
*
|
|
2252
|
-
* This source code is licensed under the MIT license found in the
|
|
2253
|
-
* LICENSE file in the root directory of this source tree.
|
|
2254
|
-
*/
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
function emptyFunction() {}
|
|
2259
|
-
function emptyFunctionWithReset() {}
|
|
2260
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
2261
|
-
|
|
2262
|
-
var factoryWithThrowingShims = function() {
|
|
2263
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
2264
|
-
if (secret === ReactPropTypesSecret$1) {
|
|
2265
|
-
// It is still safe when called from React.
|
|
2266
|
-
return;
|
|
2267
|
-
}
|
|
2268
|
-
var err = new Error(
|
|
2269
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
2270
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
2271
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
2272
|
-
);
|
|
2273
|
-
err.name = 'Invariant Violation';
|
|
2274
|
-
throw err;
|
|
2275
|
-
} shim.isRequired = shim;
|
|
2276
|
-
function getShim() {
|
|
2277
|
-
return shim;
|
|
2278
|
-
} // Important!
|
|
2279
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
2280
|
-
var ReactPropTypes = {
|
|
2281
|
-
array: shim,
|
|
2282
|
-
bigint: shim,
|
|
2283
|
-
bool: shim,
|
|
2284
|
-
func: shim,
|
|
2285
|
-
number: shim,
|
|
2286
|
-
object: shim,
|
|
2287
|
-
string: shim,
|
|
2288
|
-
symbol: shim,
|
|
2289
|
-
|
|
2290
|
-
any: shim,
|
|
2291
|
-
arrayOf: getShim,
|
|
2292
|
-
element: shim,
|
|
2293
|
-
elementType: shim,
|
|
2294
|
-
instanceOf: getShim,
|
|
2295
|
-
node: shim,
|
|
2296
|
-
objectOf: getShim,
|
|
2297
|
-
oneOf: getShim,
|
|
2298
|
-
oneOfType: getShim,
|
|
2299
|
-
shape: getShim,
|
|
2300
|
-
exact: getShim,
|
|
2301
|
-
|
|
2302
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
2303
|
-
resetWarningCache: emptyFunction
|
|
2304
|
-
};
|
|
2305
|
-
|
|
2306
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2307
|
-
|
|
2308
|
-
return ReactPropTypes;
|
|
2309
|
-
};
|
|
2310
|
-
|
|
2311
|
-
var require$$1 = factoryWithTypeCheckers;
|
|
2312
|
-
|
|
2313
|
-
var require$$2 = factoryWithThrowingShims;
|
|
2314
|
-
|
|
2315
|
-
/**
|
|
2316
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2317
|
-
*
|
|
2318
|
-
* This source code is licensed under the MIT license found in the
|
|
2319
|
-
* LICENSE file in the root directory of this source tree.
|
|
2320
|
-
*/
|
|
2321
|
-
|
|
2322
|
-
var propTypes = createCommonjsModule(function (module) {
|
|
2323
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2324
|
-
var ReactIs = reactIs;
|
|
2325
|
-
|
|
2326
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
2327
|
-
// http://fb.me/prop-types-in-prod
|
|
2328
|
-
var throwOnDirectAccess = true;
|
|
2329
|
-
module.exports = require$$1(ReactIs.isElement, throwOnDirectAccess);
|
|
2330
|
-
} else {
|
|
2331
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
2332
|
-
// http://fb.me/prop-types-in-prod
|
|
2333
|
-
module.exports = require$$2();
|
|
2334
|
-
}
|
|
2335
|
-
});
|
|
2336
|
-
|
|
2337
|
-
var PropTypes = propTypes;
|
|
2338
|
-
|
|
2339
|
-
function CountrySelectWithIcon(_a) {
|
|
2340
|
-
var { value, options, className,
|
|
2341
|
-
// iconComponent: Icon,
|
|
2342
|
-
// getIconAspectRatio,
|
|
2343
|
-
arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly, trackingFn } = _a, rest = tslib_es6.__rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly", "trackingFn"]);
|
|
2344
|
-
const { t } = index.useTranslations();
|
|
2345
|
-
const [open, setOpen] = React.useState(false);
|
|
2346
|
-
const [modalStyle, setModalStyle] = React.useState({});
|
|
2347
|
-
const { isMobile } = index$5.useScreenSize();
|
|
2348
|
-
const [search, setSearch] = React.useState('');
|
|
2349
|
-
const selectedOption = React.useMemo(() => {
|
|
2350
|
-
return getSelectedOption(options, value);
|
|
2351
|
-
}, [options, value]);
|
|
2352
|
-
const selectedCallingCode = React.useMemo(() => {
|
|
2353
|
-
if (!selectedOption.value)
|
|
2354
|
-
return '';
|
|
2355
|
-
const code = PhoneInputBase.getCountryCallingCode(selectedOption.value);
|
|
2356
|
-
if (code) {
|
|
2357
|
-
return `+${code}`;
|
|
2358
|
-
}
|
|
2359
|
-
return '';
|
|
2360
|
-
}, [selectedOption]);
|
|
2361
|
-
const onChange_ = React.useCallback((value) => {
|
|
2362
|
-
onChange(value === 'ZZ' ? undefined : value);
|
|
2363
|
-
}, [onChange]);
|
|
2364
|
-
const countryDivRef = React__default["default"].useRef(null);
|
|
2365
|
-
const [filteredOptions, setFilteredOptions] = React.useState(() => options.filter((o) => o.value));
|
|
2366
|
-
const debounceSearch = React.useMemo(() => debounce__default["default"]((search, options) => {
|
|
2367
|
-
if (!search)
|
|
2368
|
-
return setFilteredOptions(options.filter((o) => o.value));
|
|
2369
|
-
const searchKeys = search
|
|
2370
|
-
.split(/[\s,;:]+/gi)
|
|
2371
|
-
.filter((s) => !!s.trim())
|
|
2372
|
-
.map((s) => s.trim().replace(/\+/gi, '').toLowerCase());
|
|
2373
|
-
if (!searchKeys.length)
|
|
2374
|
-
return setFilteredOptions(options.filter((o) => o.value));
|
|
2375
|
-
const matched = (value) => {
|
|
2376
|
-
if (!value)
|
|
2377
|
-
return false;
|
|
2378
|
-
return searchKeys.some((key) => {
|
|
2379
|
-
return value.toLowerCase().includes(key);
|
|
2380
|
-
});
|
|
2381
|
-
};
|
|
2382
|
-
const filtered = options.filter((option) => {
|
|
2383
|
-
const code = option.value ? PhoneInputBase.getCountryCallingCode(option.value) : '';
|
|
2384
|
-
return matched(option.value) || matched(option.label) || matched(code);
|
|
2385
|
-
});
|
|
2386
|
-
setFilteredOptions(filtered.filter((o) => o.value));
|
|
2387
|
-
}, 200), []);
|
|
2388
|
-
React.useEffect(() => {
|
|
2389
|
-
debounceSearch(search, options);
|
|
2390
|
-
}, [options, search]);
|
|
2391
|
-
React.useEffect(() => {
|
|
2392
|
-
setSearch('');
|
|
2393
|
-
if (open) {
|
|
2394
|
-
function positionCountrySelect() {
|
|
2395
|
-
const rect = countryDivRef.current.getBoundingClientRect();
|
|
2396
|
-
setModalStyle({
|
|
2397
|
-
top: rect.top + rect.height,
|
|
2398
|
-
left: rect.left,
|
|
2399
|
-
width: countryDivRef.current.parentElement.clientWidth,
|
|
2400
|
-
maxHeight: window.innerHeight - rect.top - rect.height,
|
|
2401
|
-
});
|
|
2402
|
-
}
|
|
2403
|
-
const throttled = throttle__default["default"](positionCountrySelect, 200);
|
|
2404
|
-
window.addEventListener('resize', throttled, {
|
|
2405
|
-
passive: true,
|
|
2406
|
-
});
|
|
2407
|
-
positionCountrySelect();
|
|
2408
|
-
return () => {
|
|
2409
|
-
window.removeEventListener('resize', throttled);
|
|
2410
|
-
};
|
|
2411
|
-
}
|
|
2412
|
-
}, [open]);
|
|
2413
|
-
React.useEffect(() => {
|
|
2414
|
-
if (disabled || readOnly) {
|
|
2415
|
-
setOpen(false);
|
|
2416
|
-
}
|
|
2417
|
-
}, [disabled, readOnly]);
|
|
2418
|
-
const SelectCountryContent = (React__default["default"].createElement(core.Stack, { spacing: 24 },
|
|
2419
|
-
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
2420
|
-
React__default["default"].createElement(index$3.Text, { size: "s4" }, t('ssov2.first.country.code')),
|
|
2421
|
-
React__default["default"].createElement(index$8.Input, { size: "lg", placeholder: t('ssov2.first.search.country.placeholder'), icon: React__default["default"].createElement(core$1.Search, null), value: search, onChange: (value) => setSearch(value) })),
|
|
2422
|
-
!!(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) && (React__default["default"].createElement(core.Stack, { spacing: 0 },
|
|
2423
|
-
React__default["default"].createElement(index$3.Text, { size: "s4" }, t('ssov2.first.search.country.selected')),
|
|
2424
|
-
React__default["default"].createElement(SelectCountryItem, { option: selectedOption, onSelect: (option) => {
|
|
2425
|
-
onChange_(option.value);
|
|
2426
|
-
setOpen(false);
|
|
2427
|
-
}, trackingFn: trackingFn }))),
|
|
2428
|
-
React__default["default"].createElement(core.Stack, { spacing: 0 },
|
|
2429
|
-
React__default["default"].createElement(index$3.Text, { size: "s4" }, t('ssov2.first.search.country.all')),
|
|
2430
|
-
filteredOptions.map((option) => (React__default["default"].createElement(SelectCountryItem, { option: option, key: option.value, onSelect: (option) => {
|
|
2431
|
-
onChange_(option.value);
|
|
2432
|
-
setOpen(false);
|
|
2433
|
-
}, selected: selectedOption.value === option.value, trackingFn: trackingFn }))))));
|
|
2434
|
-
const FlagSelected = Flags__default["default"][selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value];
|
|
2435
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2436
|
-
React__default["default"].createElement("div", { className: "PhoneInputCountry", ref: countryDivRef },
|
|
2437
|
-
React__default["default"].createElement("div", Object.assign({}, rest, { className: classNames__default["default"]('PhoneInputCountrySelect', className), onClick: () => {
|
|
2438
|
-
if (!disabled && !readOnly) {
|
|
2439
|
-
setOpen(!open);
|
|
2440
|
-
}
|
|
2441
|
-
} })),
|
|
2442
|
-
React__default["default"].createElement(core.Group, { spacing: 6, align: "center" },
|
|
2443
|
-
selectedOption && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2444
|
-
FlagSelected && (React__default["default"].createElement(FlagSelected, { "aria-hidden": true, label: selectedOption.label, style: {
|
|
2445
|
-
width: 24,
|
|
2446
|
-
height: 16,
|
|
2447
|
-
borderRadius: 2,
|
|
2448
|
-
} })),
|
|
2449
|
-
React__default["default"].createElement(index$3.Text, { size: "p2", variant: "primary" }, selectedCallingCode))),
|
|
2450
|
-
React__default["default"].createElement(Arrow, null))),
|
|
2451
|
-
open &&
|
|
2452
|
-
(isMobile ? (React__default["default"].createElement(vaul.Drawer.Root, { open: open, onOpenChange: (o) => setOpen(o) },
|
|
2453
|
-
React__default["default"].createElement(vaul.Drawer.Portal, null,
|
|
2454
|
-
React__default["default"].createElement(vaul.Drawer.Overlay, { "data-testid": "overlay", style: {
|
|
2455
|
-
zIndex: index$2.ZINDEX_SSO + 9,
|
|
2456
|
-
position: 'fixed',
|
|
2457
|
-
background: 'rgba(0, 0, 0, 0.4)',
|
|
2458
|
-
inset: 0,
|
|
2459
|
-
} }),
|
|
2460
|
-
React__default["default"].createElement(vaul.Drawer.Content, { "data-testid": "fully-controlled-content", style: {
|
|
2461
|
-
zIndex: index$2.ZINDEX_SSO + 9,
|
|
2462
|
-
position: 'fixed',
|
|
2463
|
-
bottom: 0,
|
|
2464
|
-
left: 0,
|
|
2465
|
-
right: 0,
|
|
2466
|
-
backgroundColor: 'white',
|
|
2467
|
-
height: 'calc(100% - 120px)',
|
|
2468
|
-
display: 'flex',
|
|
2469
|
-
padding: '32px 0 0',
|
|
2470
|
-
flexDirection: 'column',
|
|
2471
|
-
borderTopLeftRadius: 10,
|
|
2472
|
-
borderTopRightRadius: 10,
|
|
2473
|
-
} },
|
|
2474
|
-
React__default["default"].createElement(vaul.Drawer.Handle, { style: {
|
|
2475
|
-
flexShrink: 0,
|
|
2476
|
-
cursor: 'pointer',
|
|
2477
|
-
backgroundColor: '#ADB3BC',
|
|
2478
|
-
width: 44,
|
|
2479
|
-
height: 2,
|
|
2480
|
-
transform: 'translateY(-22px)',
|
|
2481
|
-
} }),
|
|
2482
|
-
React__default["default"].createElement(core.Box, { sx: {
|
|
2483
|
-
flex: 1,
|
|
2484
|
-
padding: '0 24px 32px',
|
|
2485
|
-
overflow: 'auto',
|
|
2486
|
-
} }, SelectCountryContent))))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2487
|
-
React__default["default"].createElement("div", { style: {
|
|
2488
|
-
position: 'fixed',
|
|
2489
|
-
top: 0,
|
|
2490
|
-
left: 0,
|
|
2491
|
-
width: '100%',
|
|
2492
|
-
height: '100%',
|
|
2493
|
-
zIndex: index$2.ZINDEX_SSO + 9,
|
|
2494
|
-
}, onClick: () => setOpen(false) }),
|
|
2495
|
-
React__default["default"].createElement("div", { style: Object.assign({ position: 'fixed', height: 540, top: '100%', left: 0, width: '100%', backgroundColor: 'white', padding: '8px 24px', zIndex: index$2.ZINDEX_SSO + 9, borderRadius: 12, boxShadow: '0px 0px 1px 0px #0000000A, 0px 4px 8px 0px #0000000A, 0px 16px 24px 0px #0000000A, 0px 24px 32px 0px #0000000A', overflow: 'auto' }, modalStyle) }, SelectCountryContent))))));
|
|
2496
|
-
}
|
|
2497
|
-
const SelectCountryItem = ({ option, onSelect, selected, trackingFn, }) => {
|
|
2498
|
-
const selectedCallingCode = React.useMemo(() => {
|
|
2499
|
-
if (!option.value)
|
|
2500
|
-
return '';
|
|
2501
|
-
const code = PhoneInputBase.getCountryCallingCode(option.value);
|
|
2502
|
-
if (code) {
|
|
2503
|
-
return `+${code}`;
|
|
2504
|
-
}
|
|
2505
|
-
return '';
|
|
2506
|
-
}, [option.value]);
|
|
2507
|
-
const Flag = Flags__default["default"][option.value];
|
|
2508
|
-
const tracking = (trackingFn === null || trackingFn === void 0 ? void 0 : trackingFn(option)) || {};
|
|
2509
|
-
return (React__default["default"].createElement(core.Stack, Object.assign({ sx: {
|
|
2510
|
-
padding: '0 24px',
|
|
2511
|
-
backgroundColor: selected ? '#e3f2ff' : 'transparent',
|
|
2512
|
-
':hover': { backgroundColor: '#F7F9FA' },
|
|
2513
|
-
cursor: 'pointer',
|
|
2514
|
-
marginLeft: -24,
|
|
2515
|
-
marginRight: -24,
|
|
2516
|
-
}, justify: "center", onClick: () => onSelect(option) }, tracking),
|
|
2517
|
-
React__default["default"].createElement(core.Group, { position: "apart", sx: {
|
|
2518
|
-
height: 50,
|
|
2519
|
-
borderBottom: '1px solid #E4E8EC',
|
|
2520
|
-
}, align: "center" },
|
|
2521
|
-
React__default["default"].createElement(core.Group, { spacing: 12 },
|
|
2522
|
-
React__default["default"].createElement(Flag, { "aria-hidden": true, label: option.label, style: {
|
|
2523
|
-
width: 24,
|
|
2524
|
-
height: 16,
|
|
2525
|
-
borderRadius: 2,
|
|
2526
|
-
} }),
|
|
2527
|
-
React__default["default"].createElement(index$3.Text, { size: "p4" }, option.label)),
|
|
2528
|
-
React__default["default"].createElement(index$3.Text, { size: "p4" }, selectedCallingCode))));
|
|
2529
|
-
};
|
|
2530
|
-
CountrySelectWithIcon.propTypes = {
|
|
2531
|
-
// Country flag component.
|
|
2532
|
-
iconComponent: PropTypes.elementType,
|
|
2533
|
-
// Select arrow component.
|
|
2534
|
-
arrowComponent: PropTypes.elementType,
|
|
2535
|
-
// Set to `true` to render Unicode flag icons instead of SVG images.
|
|
2536
|
-
unicodeFlags: PropTypes.bool,
|
|
2537
|
-
};
|
|
2538
|
-
function DefaultArrowComponent() {
|
|
2539
|
-
return (React__default["default"].createElement("div", { style: {
|
|
2540
|
-
display: 'flex',
|
|
2541
|
-
alignItems: 'center',
|
|
2542
|
-
justifyContent: 'center',
|
|
2543
|
-
width: 16,
|
|
2544
|
-
height: 16,
|
|
2545
|
-
} },
|
|
2546
|
-
React__default["default"].createElement(other.CaretDown, { size: 7, color: "#8C8C8C" })));
|
|
2547
|
-
}
|
|
2548
|
-
function getSelectedOption(options, value) {
|
|
2549
|
-
for (const option of options) {
|
|
2550
|
-
if (!option.divider) {
|
|
2551
|
-
if (isSameOptionValue(option.value, value)) {
|
|
2552
|
-
return option;
|
|
2553
|
-
}
|
|
2554
|
-
}
|
|
2555
|
-
}
|
|
2556
|
-
}
|
|
2557
|
-
function isSameOptionValue(value1, value2) {
|
|
2558
|
-
// `undefined` is identical to `null`: both mean "no country selected".
|
|
2559
|
-
if (value1 === undefined || value1 === null) {
|
|
2560
|
-
return value2 === undefined || value2 === null;
|
|
2561
|
-
}
|
|
2562
|
-
return value1 === value2;
|
|
2563
|
-
}
|
|
2564
|
-
|
|
2565
|
-
const PhoneForwardRef = (props, ref) => {
|
|
2566
|
-
const { isError, defaultCountry,
|
|
2567
|
-
// countries = countriesDefault,
|
|
2568
|
-
countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className, trackingFn } = props, inputProps = tslib_es6.__rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className", "trackingFn"]);
|
|
2569
|
-
const [value, setValue] = React.useState(defaultValue || valueProps);
|
|
2570
|
-
const [PhoneInputUtils, setPhoneInputUtils] = React.useState(null);
|
|
2571
|
-
const onChange = (val) => {
|
|
2572
|
-
setValue(val);
|
|
2573
|
-
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(val);
|
|
2574
|
-
};
|
|
2575
|
-
React.useEffect(() => {
|
|
2576
|
-
setValue(valueProps);
|
|
2577
|
-
}, [valueProps]);
|
|
2578
|
-
React.useEffect(() => {
|
|
2579
|
-
(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2580
|
-
const PhoneInput = yield Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-phone-number-input')); });
|
|
2581
|
-
setPhoneInputUtils(PhoneInput);
|
|
2582
|
-
}))();
|
|
2583
|
-
}, []);
|
|
2584
|
-
if (!PhoneInputUtils)
|
|
2585
|
-
return null;
|
|
2586
|
-
return (React__default["default"].createElement(PhoneInputUtils.default
|
|
2587
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2588
|
-
, Object.assign({
|
|
2589
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2590
|
-
ref: ref, value: value, onChange: onChange,
|
|
2591
|
-
// countries={countries}
|
|
2592
|
-
defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: classNames__default["default"](index$8.styles.phoneInput, { isError, [index$8.styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon, countrySelectProps: { trackingFn } }, inputProps)));
|
|
2593
|
-
};
|
|
2594
|
-
const PhoneWithCustomCountrySelect = React.forwardRef(PhoneForwardRef);
|
|
2595
|
-
|
|
2596
|
-
const StyledPhone = styled__default["default"](PhoneWithCustomCountrySelect) `
|
|
1209
|
+
const StyledPhone = styled__default["default"](index$9.PhoneWithCustomCountrySelect) `
|
|
2597
1210
|
position: relative;
|
|
2598
1211
|
.PhoneInputCountry {
|
|
2599
1212
|
background: unset;
|
|
@@ -2648,7 +1261,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2648
1261
|
const { setUserInfo, abTestFlow, isHaveReadAndAgreePolicy, setIsHaveReadAndAgreePolicy, setIsGetUpdateFromHHG, } = store.useSSOV2Store();
|
|
2649
1262
|
const [activeTab, setActiveTab] = React__default["default"].useState('login');
|
|
2650
1263
|
const { legalTextType } = config || {};
|
|
2651
|
-
const { t } = index.useTranslations();
|
|
1264
|
+
const { t } = index$2.useTranslations();
|
|
2652
1265
|
const { getGRecaptchaToken, renderRecaptchaHandler } = useGRecaptchaHandler();
|
|
2653
1266
|
const trackingAction = abTestFlow === 'B' ? `Sign Up` : `Sign In or Sign Up`;
|
|
2654
1267
|
const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}_Phone_Adoption_Test_${abTestFlow}`;
|
|
@@ -2666,8 +1279,8 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2666
1279
|
const handleLoginBySocial = (credential, provider) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
2667
1280
|
const res = yield loginBySocial(credential, provider);
|
|
2668
1281
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
2669
|
-
index$
|
|
2670
|
-
const userInfo = yield index$
|
|
1282
|
+
index$8.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
1283
|
+
const userInfo = yield index$8.getUserInfo();
|
|
2671
1284
|
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
2672
1285
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1 && userInfo._data) {
|
|
2673
1286
|
store.useSSOV2Store.setState({
|
|
@@ -2756,7 +1369,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2756
1369
|
}
|
|
2757
1370
|
window.fbAsyncInit = function () {
|
|
2758
1371
|
window.FB.init({
|
|
2759
|
-
appId: index$
|
|
1372
|
+
appId: index$8.FacebookAppId,
|
|
2760
1373
|
cookie: true,
|
|
2761
1374
|
xfbml: true,
|
|
2762
1375
|
version: 'v20.0', // Use this Graph API version for this call.
|
|
@@ -2781,7 +1394,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2781
1394
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
2782
1395
|
return setLoading(false);
|
|
2783
1396
|
}
|
|
2784
|
-
const userExist = yield index$
|
|
1397
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
2785
1398
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2786
1399
|
const provider = (_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider;
|
|
2787
1400
|
if ((_b = userExist._data) === null || _b === void 0 ? void 0 : _b.is_pass) {
|
|
@@ -2847,7 +1460,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2847
1460
|
scrollToError();
|
|
2848
1461
|
return setLoading(false);
|
|
2849
1462
|
}
|
|
2850
|
-
const userExist = yield index$
|
|
1463
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
2851
1464
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2852
1465
|
const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
|
|
2853
1466
|
if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
|
|
@@ -2912,7 +1525,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2912
1525
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
2913
1526
|
return setLoading(false);
|
|
2914
1527
|
}
|
|
2915
|
-
const userExist = yield index$
|
|
1528
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
2916
1529
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2917
1530
|
const provider = (_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider;
|
|
2918
1531
|
if ((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) {
|
|
@@ -2976,10 +1589,10 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
2976
1589
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
2977
1590
|
return setLoading(false);
|
|
2978
1591
|
}
|
|
2979
|
-
const userExist = yield index$
|
|
1592
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
2980
1593
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
2981
1594
|
if (!userExist._data || !((_g = userExist._data) === null || _g === void 0 ? void 0 : _g.is_pass)) {
|
|
2982
|
-
index$
|
|
1595
|
+
index$b.showNotification({
|
|
2983
1596
|
message: t('ssov2.first.noAccountOrPass'),
|
|
2984
1597
|
type: 'danger',
|
|
2985
1598
|
});
|
|
@@ -3023,7 +1636,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
3023
1636
|
};
|
|
3024
1637
|
const onTriggerGoogleLogin = () => {
|
|
3025
1638
|
const client = window.google.accounts.oauth2.initTokenClient({
|
|
3026
|
-
client_id: index$
|
|
1639
|
+
client_id: index$8.GoogleAuthClientId,
|
|
3027
1640
|
scope: 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile openid',
|
|
3028
1641
|
ux_mode: 'popup',
|
|
3029
1642
|
callback: (response) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -3067,22 +1680,22 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
3067
1680
|
} },
|
|
3068
1681
|
React__default["default"].createElement(core.Stack, { spacing: 12 },
|
|
3069
1682
|
React__default["default"].createElement(core.Group, { spacing: 24 },
|
|
3070
|
-
React__default["default"].createElement(index$
|
|
1683
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold", color: activeTab === 'login' ? 'gray.8' : 'gray.4', onClick: () => setActiveTab('login'), style: {
|
|
3071
1684
|
borderBottom: activeTab === 'login' ? '2px solid #000' : undefined,
|
|
3072
1685
|
cursor: 'pointer',
|
|
3073
1686
|
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Log In" }, t('ssov2.first.title.login')),
|
|
3074
|
-
React__default["default"].createElement(index$
|
|
1687
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold", color: activeTab === 'signup' ? 'gray.8' : 'gray.4', onClick: () => setActiveTab('signup'), style: {
|
|
3075
1688
|
borderBottom: activeTab === 'signup' ? '2px solid #000' : undefined,
|
|
3076
1689
|
cursor: 'pointer',
|
|
3077
1690
|
}, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Sign Up" }, t('ssov2.first.title.signup'))),
|
|
3078
|
-
React__default["default"].createElement(index$
|
|
1691
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.first.description'))),
|
|
3079
1692
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 24 },
|
|
3080
1693
|
React__default["default"].createElement(core.Stack, { spacing: 16 },
|
|
3081
1694
|
React__default["default"].createElement("form", { onSubmit: (e) => {
|
|
3082
1695
|
e.preventDefault();
|
|
3083
1696
|
onClickContinueZalo();
|
|
3084
1697
|
}, "data-testid": "screen-first-form" },
|
|
3085
|
-
React__default["default"].createElement(index$
|
|
1698
|
+
React__default["default"].createElement(index$9.Input.Wrapper, { error: errMsg },
|
|
3086
1699
|
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils$1.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone", trackingFn: React.useCallback((option) => {
|
|
3087
1700
|
if (!(option === null || option === void 0 ? void 0 : option.label))
|
|
3088
1701
|
return;
|
|
@@ -3094,19 +1707,19 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
3094
1707
|
: 'SSO - Sign In',
|
|
3095
1708
|
};
|
|
3096
1709
|
}, [activeTab]) }))),
|
|
3097
|
-
React__default["default"].createElement(index$
|
|
3098
|
-
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$
|
|
3099
|
-
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$
|
|
1710
|
+
React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickLoginWithPhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue Login", display: activeTab === 'login' ? 'block' : 'none' }, t('ssov2.button.continue')),
|
|
1711
|
+
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickContinueWhatsApp, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with WhatsApp", display: activeTab === 'signup' ? 'block' : 'none', leftIcon: React__default["default"].createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.otp.whatsapp'))),
|
|
1712
|
+
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", display: activeTab === 'signup' ? 'block' : 'none', leftIcon: React__default["default"].createElement(Zalo, null) }, t('ssov2.button.otp.zalo'))),
|
|
3100
1713
|
utils.isFeatureSMSEnabled && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
3101
|
-
React__default["default"].createElement(index$
|
|
1714
|
+
React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", onClick: onClickContinuePhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", display: activeTab === 'signup' ? 'block' : 'none', style: { fontWeight: 400 }, color: "#595959", leftIcon: React__default["default"].createElement(core$1.ReplySquare, { size: 18 }) }, t('ssov2.button.otp.sms')),
|
|
3102
1715
|
renderRecaptchaHandler()))),
|
|
3103
1716
|
React__default["default"].createElement(core.Divider, { color: "#E4E8EC", display: activeTab === 'signup' ? 'block' : 'none' }),
|
|
3104
1717
|
React__default["default"].createElement(core.Stack, { spacing: 16, align: "center" },
|
|
3105
|
-
React__default["default"].createElement(index$
|
|
1718
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "gray.4" }, t('ssov2.orContinueWith')),
|
|
3106
1719
|
React__default["default"].createElement(core.Group, { spacing: 8, style: {
|
|
3107
1720
|
width: '100%',
|
|
3108
1721
|
} },
|
|
3109
|
-
React__default["default"].createElement(index$
|
|
1722
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
3110
1723
|
flex: 1,
|
|
3111
1724
|
height: 48,
|
|
3112
1725
|
padding: 12,
|
|
@@ -3120,8 +1733,8 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
3120
1733
|
borderRadius: '100%',
|
|
3121
1734
|
} }),
|
|
3122
1735
|
' ',
|
|
3123
|
-
React__default["default"].createElement(index$
|
|
3124
|
-
React__default["default"].createElement(index$
|
|
1736
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "black", weight: "regular" }, "Google")),
|
|
1737
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
3125
1738
|
flex: 1,
|
|
3126
1739
|
height: 48,
|
|
3127
1740
|
padding: 12,
|
|
@@ -3135,8 +1748,8 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
3135
1748
|
borderRadius: '100%',
|
|
3136
1749
|
} }),
|
|
3137
1750
|
' ',
|
|
3138
|
-
React__default["default"].createElement(index$
|
|
3139
|
-
React__default["default"].createElement(index$
|
|
1751
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "black", weight: "regular" }, "Facebook")),
|
|
1752
|
+
React__default["default"].createElement(index$5.Button, { variant: "white", style: {
|
|
3140
1753
|
flex: 1,
|
|
3141
1754
|
height: 48,
|
|
3142
1755
|
padding: 12,
|
|
@@ -3147,34 +1760,34 @@ const SSOFirstScreen = ({ hidden, config, }) => {
|
|
|
3147
1760
|
marginRight: 4,
|
|
3148
1761
|
} }),
|
|
3149
1762
|
' ',
|
|
3150
|
-
React__default["default"].createElement(index$
|
|
1763
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", color: "black", weight: "regular" }, "Email"))))),
|
|
3151
1764
|
React__default["default"].createElement(PolicyContent, { legalTextType: legalTextType, trackingAction: trackingAction, trackingCategory: trackingCategory, activeTab: activeTab, errMsgPolicy: errMsgPolicy })));
|
|
3152
1765
|
};
|
|
3153
1766
|
|
|
3154
1767
|
const initSendUpdateEmailOtp = (email) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3155
1768
|
const formData = new FormData();
|
|
3156
1769
|
formData.append('email', email);
|
|
3157
|
-
return index$
|
|
1770
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ECOM_CARE.SEND_OTP, {
|
|
3158
1771
|
method: 'POST',
|
|
3159
1772
|
body: formData,
|
|
3160
1773
|
});
|
|
3161
1774
|
});
|
|
3162
1775
|
const resendUpdateEmailOTP = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3163
|
-
return index$
|
|
1776
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ECOM_CARE.RESEND_OTP, {
|
|
3164
1777
|
method: 'GET',
|
|
3165
1778
|
});
|
|
3166
1779
|
});
|
|
3167
1780
|
const verifyUpdateEmailOTP = (otpCode) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3168
1781
|
const formData = new FormData();
|
|
3169
1782
|
formData.append('code', otpCode);
|
|
3170
|
-
return index$
|
|
1783
|
+
return index$8.fetchSSOV2Api(index$8.SSO_V2_PATHS.ECOM_CARE.VERIFY_OTP, {
|
|
3171
1784
|
method: 'POST',
|
|
3172
1785
|
body: formData,
|
|
3173
1786
|
});
|
|
3174
1787
|
});
|
|
3175
1788
|
|
|
3176
|
-
const SSOOTPScreen = ({ hidden, index
|
|
3177
|
-
const { t } = index.useTranslations();
|
|
1789
|
+
const SSOOTPScreen = ({ hidden, index, config, }) => {
|
|
1790
|
+
const { t } = index$2.useTranslations();
|
|
3178
1791
|
const { onClose, setTracking } = useSSOState();
|
|
3179
1792
|
const { setSteps, steps } = store.useSSOSteps();
|
|
3180
1793
|
const { flowData, userInfo, abTestFlow } = store.useSSOV2Store();
|
|
@@ -3213,8 +1826,8 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3213
1826
|
store.useSSOSteps.setState((old) => {
|
|
3214
1827
|
const oldSteps = old.steps;
|
|
3215
1828
|
return {
|
|
3216
|
-
steps: oldSteps.slice(0, index
|
|
3217
|
-
currentStepIndex: index
|
|
1829
|
+
steps: oldSteps.slice(0, index).concat(step),
|
|
1830
|
+
currentStepIndex: index,
|
|
3218
1831
|
};
|
|
3219
1832
|
});
|
|
3220
1833
|
};
|
|
@@ -3291,7 +1904,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3291
1904
|
}
|
|
3292
1905
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3293
1906
|
if (afterAction === 'setup') {
|
|
3294
|
-
const userInfo = yield index$
|
|
1907
|
+
const userInfo = yield index$8.getUserInfo();
|
|
3295
1908
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) !== 1) {
|
|
3296
1909
|
// log error
|
|
3297
1910
|
setError(getErrorTextFromCode(t, userInfo === null || userInfo === void 0 ? void 0 : userInfo.code));
|
|
@@ -3341,9 +1954,9 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3341
1954
|
});
|
|
3342
1955
|
}
|
|
3343
1956
|
else if (afterAction === 'submitSetup') {
|
|
3344
|
-
const res = yield index$
|
|
1957
|
+
const res = yield index$8.updateUserInfo(Object.assign(Object.assign({}, setupData), { validate: '' }));
|
|
3345
1958
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
3346
|
-
index$
|
|
1959
|
+
index$8.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3347
1960
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
3348
1961
|
}
|
|
3349
1962
|
else {
|
|
@@ -3389,7 +2002,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3389
2002
|
setError(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3390
2003
|
return setLoading(false);
|
|
3391
2004
|
}
|
|
3392
|
-
index$
|
|
2005
|
+
index$8.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
3393
2006
|
// if (otpType === 'update-email') {
|
|
3394
2007
|
// onClose?.(true)
|
|
3395
2008
|
// return
|
|
@@ -3411,7 +2024,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3411
2024
|
});
|
|
3412
2025
|
}
|
|
3413
2026
|
else if (afterAction === 'setup') {
|
|
3414
|
-
const userInfo = yield index$
|
|
2027
|
+
const userInfo = yield index$8.getUserInfo();
|
|
3415
2028
|
if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) !== 1) {
|
|
3416
2029
|
// log error
|
|
3417
2030
|
setError(getErrorTextFromCode(t, userInfo === null || userInfo === void 0 ? void 0 : userInfo.code));
|
|
@@ -3512,7 +2125,7 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3512
2125
|
setError(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
|
|
3513
2126
|
return setLoading(false);
|
|
3514
2127
|
}
|
|
3515
|
-
setSteps((s) => s.map((step, i) => i === index
|
|
2128
|
+
setSteps((s) => s.map((step, i) => i === index
|
|
3516
2129
|
? Object.assign(Object.assign({}, step), { config: Object.assign(Object.assign({}, step.config), { otpType: newType }) }) : step));
|
|
3517
2130
|
}
|
|
3518
2131
|
catch (e) {
|
|
@@ -3548,8 +2161,8 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3548
2161
|
} },
|
|
3549
2162
|
renderRecaptchaHandler(),
|
|
3550
2163
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
3551
|
-
React__default["default"].createElement(index$
|
|
3552
|
-
React__default["default"].createElement(index$
|
|
2164
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, isEmail ? t('ssov2.otp.email.title') : t('ssov2.otp.phone.title')),
|
|
2165
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", sx: {
|
|
3553
2166
|
b: {
|
|
3554
2167
|
fontWeight: 'bold',
|
|
3555
2168
|
},
|
|
@@ -3570,8 +2183,8 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3570
2183
|
}),
|
|
3571
2184
|
} }))),
|
|
3572
2185
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
|
|
3573
|
-
React__default["default"].createElement(index$
|
|
3574
|
-
React__default["default"].createElement(index$
|
|
2186
|
+
React__default["default"].createElement(index$9.Input.Wrapper, { error: error },
|
|
2187
|
+
React__default["default"].createElement(index$9.OTP, { ref: otpRef, value: otp, onChange: (otp) => {
|
|
3575
2188
|
setOtp(String(otp));
|
|
3576
2189
|
if (String(otp).length === 6) {
|
|
3577
2190
|
setTimeout(() => {
|
|
@@ -3588,28 +2201,28 @@ const SSOOTPScreen = ({ hidden, index: index$1, config, }) => {
|
|
|
3588
2201
|
React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
|
|
3589
2202
|
height: 40,
|
|
3590
2203
|
} },
|
|
3591
|
-
React__default["default"].createElement(index$
|
|
3592
|
-
React__default["default"].createElement(index$
|
|
2204
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.otp.resendQuestion')),
|
|
2205
|
+
React__default["default"].createElement(index$4.Text, { style: {
|
|
3593
2206
|
pointerEvents: resendTime > 0 ? 'none' : 'auto',
|
|
3594
2207
|
cursor: resendTime > 0 ? 'not-allowed' : 'pointer',
|
|
3595
2208
|
}, size: "s4", color: "blue.6", onClick: () => sendOTPCode(true), "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Resend OTP" }, t('ssov2.otp.resendText', {
|
|
3596
2209
|
count: resendTime,
|
|
3597
2210
|
})))),
|
|
3598
|
-
React__default["default"].createElement(index$
|
|
2211
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue", ref: submitButtonRef }, t('ssov2.button.continue')),
|
|
3599
2212
|
!isEmail && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
3600
|
-
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$
|
|
2213
|
+
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", mt: 12, fullWidth: true, onClick: () => swapAnotherMethod('phone-whatsapp'), loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Send OTP Code via WhatsApp", display: !isWhatsApp ? 'block' : 'none', leftIcon: React__default["default"].createElement(WhatsApp, null), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3601
2214
|
method: 'WhatsApp',
|
|
3602
2215
|
}))),
|
|
3603
|
-
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$
|
|
2216
|
+
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", mt: 12, fullWidth: true, onClick: () => swapAnotherMethod('phone-zalo'), loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Send OTP Code via Zalo", display: !isZalo ? 'block' : 'none', leftIcon: React__default["default"].createElement(Zalo, null), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3604
2217
|
method: 'Zalo',
|
|
3605
2218
|
}))),
|
|
3606
|
-
utils.isFeatureSMSEnabled && (React__default["default"].createElement(index$
|
|
2219
|
+
utils.isFeatureSMSEnabled && (React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", mt: 12, fullWidth: true, onClick: () => swapAnotherMethod('phone-sms'), loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Send OTP Code via SMS", display: !isSMS ? 'block' : 'none', leftIcon: React__default["default"].createElement(core$1.ReplySquare, { size: 18 }), style: { fontWeight: 400 }, color: "#595959" }, t('ssov2.otp.sendVia', {
|
|
3607
2220
|
method: 'SMS',
|
|
3608
2221
|
})))))));
|
|
3609
2222
|
};
|
|
3610
2223
|
|
|
3611
2224
|
const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
3612
|
-
const { t } = index.useTranslations();
|
|
2225
|
+
const { t } = index$2.useTranslations();
|
|
3613
2226
|
const { onClose, setTracking } = useSSOState();
|
|
3614
2227
|
const { setUserInfo, flowData, abTestFlow } = store.useSSOV2Store();
|
|
3615
2228
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
@@ -3642,7 +2255,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3642
2255
|
});
|
|
3643
2256
|
}
|
|
3644
2257
|
else {
|
|
3645
|
-
const existRes = yield index$
|
|
2258
|
+
const existRes = yield index$8.checkUserExist({ email });
|
|
3646
2259
|
if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
|
|
3647
2260
|
let res;
|
|
3648
2261
|
if (!((_a = existRes._data) === null || _a === void 0 ? void 0 : _a.provider)) {
|
|
@@ -3681,8 +2294,8 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3681
2294
|
setLoading(false);
|
|
3682
2295
|
});
|
|
3683
2296
|
const onAuthSuccess = (data) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
|
|
3684
|
-
index$
|
|
3685
|
-
const userInfo = yield index$
|
|
2297
|
+
index$8.handleAuthSuccess(data);
|
|
2298
|
+
const userInfo = yield index$8.getUserInfo();
|
|
3686
2299
|
const isPhoneFlow = isPhoneFlowFn(flowData);
|
|
3687
2300
|
const isEmailFlow = isEmailFlowFn(flowData);
|
|
3688
2301
|
setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
|
|
@@ -3753,21 +2366,21 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3753
2366
|
setLoading(false);
|
|
3754
2367
|
}) },
|
|
3755
2368
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
3756
|
-
React__default["default"].createElement(index$
|
|
2369
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" },
|
|
3757
2370
|
t('ssov2.password.title1'),
|
|
3758
2371
|
React__default["default"].createElement("br", null),
|
|
3759
2372
|
t('ssov2.password.title2')),
|
|
3760
|
-
React__default["default"].createElement(index$
|
|
2373
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.password.description'))),
|
|
3761
2374
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
|
|
3762
|
-
React__default["default"].createElement(index$
|
|
2375
|
+
React__default["default"].createElement(index$9.PasswordInput, { name: "password", placeholder: t('ssov2.passwordForgotSetup.field.password.placeholder'), error: errMsg || undefined, onChange: () => setErrMsg(''), disabled: loading, required: true, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Password" }),
|
|
3763
2376
|
React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
|
|
3764
2377
|
height: 40,
|
|
3765
2378
|
} },
|
|
3766
|
-
React__default["default"].createElement(index$
|
|
3767
|
-
React__default["default"].createElement(index$
|
|
2379
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.password.forgotPassword')),
|
|
2380
|
+
React__default["default"].createElement(index$4.Text, { size: "s4", color: "blue.6", style: {
|
|
3768
2381
|
cursor: 'pointer',
|
|
3769
2382
|
}, onClick: resetPassword, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Reset Password" }, t('ssov2.password.reset')))),
|
|
3770
|
-
React__default["default"].createElement(index$
|
|
2383
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Sign In" }, t('ssov2.password.signIn'))));
|
|
3771
2384
|
if (utils.isFeaturePolicyUpdateEnabled) {
|
|
3772
2385
|
return (React__default["default"].createElement("div", { style: {
|
|
3773
2386
|
display: hidden ? 'none' : 'flex',
|
|
@@ -3781,7 +2394,7 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
|
|
|
3781
2394
|
};
|
|
3782
2395
|
|
|
3783
2396
|
const SetupLater = ({ style = {} }) => {
|
|
3784
|
-
const { t } = index.useTranslations();
|
|
2397
|
+
const { t } = index$2.useTranslations();
|
|
3785
2398
|
const { onClose, tracking } = useSSOState();
|
|
3786
2399
|
const [loading, setLoading] = React.useState(false);
|
|
3787
2400
|
const { userInfo, flowData } = store.useSSOV2Store();
|
|
@@ -3823,12 +2436,12 @@ const SetupLater = ({ style = {} }) => {
|
|
|
3823
2436
|
}
|
|
3824
2437
|
setLoading(false);
|
|
3825
2438
|
});
|
|
3826
|
-
return (React__default["default"].createElement(index$
|
|
2439
|
+
return (React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", color: "#737373", style: Object.assign({ fontWeight: 400 }, style), onClick: onClickSetupLater, disabled: loading, dataEventCategory: tracking === null || tracking === void 0 ? void 0 : tracking.category, dataEventAction: tracking === null || tracking === void 0 ? void 0 : tracking.action, dataEventLabel: "Setup Later" }, t('ssov2.button.setupLater')));
|
|
3827
2440
|
};
|
|
3828
2441
|
|
|
3829
2442
|
const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
3830
2443
|
const phone = config === null || config === void 0 ? void 0 : config.phone;
|
|
3831
|
-
const { t } = index.useTranslations();
|
|
2444
|
+
const { t } = index$2.useTranslations();
|
|
3832
2445
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
3833
2446
|
const { setTracking, locale } = useSSOState();
|
|
3834
2447
|
const { flowData, abTestFlow } = store.useSSOV2Store();
|
|
@@ -3856,7 +2469,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3856
2469
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
3857
2470
|
return setLoading(false);
|
|
3858
2471
|
}
|
|
3859
|
-
const userExist = yield index$
|
|
2472
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
3860
2473
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3861
2474
|
let res;
|
|
3862
2475
|
if (!((_a = userExist._data) === null || _a === void 0 ? void 0 : _a.provider)) {
|
|
@@ -3899,7 +2512,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3899
2512
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
3900
2513
|
return setLoading(false);
|
|
3901
2514
|
}
|
|
3902
|
-
const userExist = yield index$
|
|
2515
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
3903
2516
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3904
2517
|
let res;
|
|
3905
2518
|
if (!((_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider)) {
|
|
@@ -3942,7 +2555,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3942
2555
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
3943
2556
|
return setLoading(false);
|
|
3944
2557
|
}
|
|
3945
|
-
const userExist = yield index$
|
|
2558
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
3946
2559
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
3947
2560
|
let res;
|
|
3948
2561
|
if (!((_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider)) {
|
|
@@ -3981,8 +2594,8 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3981
2594
|
display: hidden ? 'none' : 'block',
|
|
3982
2595
|
} },
|
|
3983
2596
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
3984
|
-
React__default["default"].createElement(index$
|
|
3985
|
-
React__default["default"].createElement(index$
|
|
2597
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.resetPassword.title')),
|
|
2598
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.resetPassword.description'))),
|
|
3986
2599
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 16 },
|
|
3987
2600
|
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils$1.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone,
|
|
3988
2601
|
// onChange={(value) => setPhone(value)}
|
|
@@ -3995,11 +2608,11 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
|
|
|
3995
2608
|
'data-event-category': trackingCategory,
|
|
3996
2609
|
};
|
|
3997
2610
|
}, []) }),
|
|
3998
|
-
errMsg && (React__default["default"].createElement(index$
|
|
3999
|
-
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$
|
|
4000
|
-
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$
|
|
2611
|
+
errMsg && (React__default["default"].createElement(index$4.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
2612
|
+
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickContinueWhatsApp, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with WhatsApp", leftIcon: React__default["default"].createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.continueWhatsApp'))),
|
|
2613
|
+
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", leftIcon: React__default["default"].createElement(Zalo, null) }, t('ssov2.button.continueZalo'))),
|
|
4001
2614
|
utils.isFeatureSMSEnabled && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4002
|
-
React__default["default"].createElement(index$
|
|
2615
|
+
React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", style: { fontWeight: 400 }, color: "#595959", leftIcon: React__default["default"].createElement(core$1.ReplySquare, { size: 18 }) }, t('ssov2.button.continueSMS')),
|
|
4003
2616
|
renderRecaptchaHandler())),
|
|
4004
2617
|
React__default["default"].createElement(SetupLater, null))));
|
|
4005
2618
|
};
|
|
@@ -4013,7 +2626,7 @@ const CheckRedIcon = () => (React__default["default"].createElement("svg", { wid
|
|
|
4013
2626
|
|
|
4014
2627
|
const SSOPasswordWithConfirm = (_a) => {
|
|
4015
2628
|
var { form, loading, tracking } = _a, props = tslib_es6.__rest(_a, ["form", "loading", "tracking"]);
|
|
4016
|
-
const { t } = index.useTranslations();
|
|
2629
|
+
const { t } = index$2.useTranslations();
|
|
4017
2630
|
const [atLeast8Chars, setAtLeast8Chars] = React__default["default"].useState(undefined);
|
|
4018
2631
|
const [atLeastOneUpper, setAtLeastOneUpper] = React__default["default"].useState(undefined);
|
|
4019
2632
|
const password = form.values.password;
|
|
@@ -4024,22 +2637,22 @@ const SSOPasswordWithConfirm = (_a) => {
|
|
|
4024
2637
|
setAtLeastOneUpper(!!password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/));
|
|
4025
2638
|
}, [password]);
|
|
4026
2639
|
return (React__default["default"].createElement(core.Stack, Object.assign({ spacing: 12 }, props),
|
|
4027
|
-
React__default["default"].createElement(index$
|
|
2640
|
+
React__default["default"].createElement(index$9.PasswordInput, Object.assign({ name: "password", placeholder: t('ssov2.passwordForgotSetup.field.password.placeholder'), label: t('ssov2.passwordForgotSetup.field.password.label'), required: true, withAsterisk: true }, form.getInputProps('password'), { onBlur: (e) => {
|
|
4028
2641
|
form.getInputProps('password').onBlur(e);
|
|
4029
2642
|
form.values.confirmPassword && form.validateField('confirmPassword');
|
|
4030
2643
|
}, disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Password" })),
|
|
4031
2644
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4032
2645
|
React__default["default"].createElement(core.Group, { spacing: 4, align: "flex-start" },
|
|
4033
2646
|
atLeast8Chars ? (React__default["default"].createElement(CheckGreenIcon, null)) : typeof atLeast8Chars === 'undefined' ? (React__default["default"].createElement(CheckGrayIcon, null)) : (React__default["default"].createElement(CheckRedIcon, null)),
|
|
4034
|
-
React__default["default"].createElement(index$
|
|
2647
|
+
React__default["default"].createElement(index$4.Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeast8Chars'))),
|
|
4035
2648
|
React__default["default"].createElement(core.Group, { spacing: 4, align: "flex-start" },
|
|
4036
2649
|
atLeastOneUpper ? (React__default["default"].createElement(CheckGreenIcon, null)) : typeof atLeastOneUpper === 'undefined' ? (React__default["default"].createElement(CheckGrayIcon, null)) : (React__default["default"].createElement(CheckRedIcon, null)),
|
|
4037
|
-
React__default["default"].createElement(index$
|
|
4038
|
-
React__default["default"].createElement(index$
|
|
2650
|
+
React__default["default"].createElement(index$4.Text, { size: "n1", style: { flex: 1 } }, t('ssov2.passwordForgotSetup.field.password.atLeastOneUpper')))),
|
|
2651
|
+
React__default["default"].createElement(index$9.PasswordInput, Object.assign({ name: "confirm-password", placeholder: t('ssov2.passwordForgotSetup.field.passwordConfirm.placeholder'), label: t('ssov2.passwordForgotSetup.field.passwordConfirm.label'), required: true, withAsterisk: true, disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Confirm Password" }, form.getInputProps('confirmPassword')))));
|
|
4039
2652
|
};
|
|
4040
2653
|
|
|
4041
2654
|
const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
4042
|
-
const { t } = index.useTranslations();
|
|
2655
|
+
const { t } = index$2.useTranslations();
|
|
4043
2656
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
4044
2657
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
4045
2658
|
const { setTracking, onClose } = useSSOState();
|
|
@@ -4087,12 +2700,12 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
4087
2700
|
password === confirmPassword) {
|
|
4088
2701
|
const isPhoneOrEmailFlow = isPhoneFlowFn(flowData) || isEmailFlowFn(flowData);
|
|
4089
2702
|
const res = isPhoneOrEmailFlow
|
|
4090
|
-
? yield index$
|
|
2703
|
+
? yield index$8.updateUserInfo({
|
|
4091
2704
|
password,
|
|
4092
2705
|
confirm_password: confirmPassword,
|
|
4093
2706
|
validate: '',
|
|
4094
2707
|
})
|
|
4095
|
-
: yield index$
|
|
2708
|
+
: yield index$8.resetPassword(password, confirmPassword);
|
|
4096
2709
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
4097
2710
|
if (isPhoneOrEmailFlow) {
|
|
4098
2711
|
// Login again to fetch token
|
|
@@ -4101,8 +2714,8 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
4101
2714
|
const newTokenRes = isEmailFlowFn(flowData) && isResetPasswordFlowFn(steps)
|
|
4102
2715
|
? yield loginByEmailPassword(email, password)
|
|
4103
2716
|
: null;
|
|
4104
|
-
index$
|
|
4105
|
-
const userInfo = yield index$
|
|
2717
|
+
index$8.handleAuthSuccess((newTokenRes === null || newTokenRes === void 0 ? void 0 : newTokenRes._data) || (res === null || res === void 0 ? void 0 : res._data));
|
|
2718
|
+
const userInfo = yield index$8.getUserInfo();
|
|
4106
2719
|
// Phone
|
|
4107
2720
|
if (isPhoneFlowFn(flowData)) {
|
|
4108
2721
|
if (userInfo && !store.isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
|
|
@@ -4149,7 +2762,7 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
4149
2762
|
}
|
|
4150
2763
|
}
|
|
4151
2764
|
else {
|
|
4152
|
-
index$
|
|
2765
|
+
index$b.showNotification({
|
|
4153
2766
|
type: 'success',
|
|
4154
2767
|
message: 'Password has been reset successfully',
|
|
4155
2768
|
});
|
|
@@ -4184,20 +2797,20 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
|
|
|
4184
2797
|
}, onSubmit: form$1.onSubmit(onSubmit) },
|
|
4185
2798
|
React__default["default"].createElement(core.Stack, { spacing: 24 },
|
|
4186
2799
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4187
|
-
React__default["default"].createElement(index$
|
|
4188
|
-
React__default["default"].createElement(index$
|
|
2800
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.passwordForgotSetup.title')),
|
|
2801
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.passwordForgotSetup.description'))),
|
|
4189
2802
|
React__default["default"].createElement(SSOPasswordWithConfirm, { form: form$1, loading: loading, tracking: {
|
|
4190
2803
|
category: trackingCategory,
|
|
4191
2804
|
action: trackingAction,
|
|
4192
2805
|
} }),
|
|
4193
|
-
errMsg && (React__default["default"].createElement(index$
|
|
4194
|
-
React__default["default"].createElement(index$
|
|
2806
|
+
errMsg && (React__default["default"].createElement(index$4.Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
|
|
2807
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup' ? 'Create New Account' : 'Save' }, (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup'
|
|
4195
2808
|
? t('ssov2.setup.button.createAccount')
|
|
4196
2809
|
: t('ssov2.button.save')))));
|
|
4197
2810
|
};
|
|
4198
2811
|
|
|
4199
2812
|
const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
4200
|
-
const { t } = index.useTranslations();
|
|
2813
|
+
const { t } = index$2.useTranslations();
|
|
4201
2814
|
const [phone, setPhone] = React__default["default"].useState('');
|
|
4202
2815
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
4203
2816
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
@@ -4231,7 +2844,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
4231
2844
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
4232
2845
|
return setLoading(false);
|
|
4233
2846
|
}
|
|
4234
|
-
const userExist = yield index$
|
|
2847
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
4235
2848
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
4236
2849
|
if (!userExist._data) {
|
|
4237
2850
|
const res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
|
|
@@ -4274,7 +2887,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
4274
2887
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
4275
2888
|
return setLoading(false);
|
|
4276
2889
|
}
|
|
4277
|
-
const userExist = yield index$
|
|
2890
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
4278
2891
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
4279
2892
|
if (!userExist._data) {
|
|
4280
2893
|
const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
|
|
@@ -4317,7 +2930,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
4317
2930
|
setErrMsg(t('ssov2.validate.phone.required'));
|
|
4318
2931
|
return setLoading(false);
|
|
4319
2932
|
}
|
|
4320
|
-
const userExist = yield index$
|
|
2933
|
+
const userExist = yield index$8.checkUserExist({ phone: phoneNumber });
|
|
4321
2934
|
if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
|
|
4322
2935
|
if (!userExist._data) {
|
|
4323
2936
|
const res = yield resendUpdatePhoneWhatsAppOTP(phoneNumber, areaCode);
|
|
@@ -4357,10 +2970,10 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
4357
2970
|
} },
|
|
4358
2971
|
React__default["default"].createElement(core.Stack, { spacing: 24 },
|
|
4359
2972
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4360
|
-
React__default["default"].createElement(index$
|
|
4361
|
-
React__default["default"].createElement(index$
|
|
2973
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.phoneVerify.title')),
|
|
2974
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.phoneVerify.description'))),
|
|
4362
2975
|
React__default["default"].createElement(core.Stack, { spacing: 16 },
|
|
4363
|
-
React__default["default"].createElement(index$
|
|
2976
|
+
React__default["default"].createElement(index$9.Input.Wrapper, { error: errMsg },
|
|
4364
2977
|
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils$1.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => {
|
|
4365
2978
|
setPhone(value);
|
|
4366
2979
|
setErrMsg('');
|
|
@@ -4373,9 +2986,9 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
|
|
|
4373
2986
|
'data-event-category': trackingCategory,
|
|
4374
2987
|
};
|
|
4375
2988
|
}, []) })),
|
|
4376
|
-
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$
|
|
4377
|
-
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$
|
|
4378
|
-
utils.isFeatureSMSEnabled && (React__default["default"].createElement(index$
|
|
2989
|
+
utils.isFeatureWhatsAppEnabled && (React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickContinueWhatsApp, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with WhatsApp", leftIcon: React__default["default"].createElement(WhatsApp, null), color: "#00B16A" }, t('ssov2.button.continueWhatsApp'))),
|
|
2990
|
+
utils.isFeatureZaloEnabled && (React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", leftIcon: React__default["default"].createElement(Zalo, null) }, t('ssov2.button.continueZalo'))),
|
|
2991
|
+
utils.isFeatureSMSEnabled && (React__default["default"].createElement(index$5.Button, { size: "sm", variant: "white", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", style: { fontWeight: 400 }, color: "#595959", leftIcon: React__default["default"].createElement(core$1.ReplySquare, { size: 18 }) }, t('ssov2.button.continueSMS'))),
|
|
4379
2992
|
source !== 'care_onboarding' && source !== 'ecom' && React__default["default"].createElement(SetupLater, null)))));
|
|
4380
2993
|
};
|
|
4381
2994
|
|
|
@@ -4416,15 +3029,15 @@ const OtherSetup = ({ form,
|
|
|
4416
3029
|
needEmail, isEmailDisable,
|
|
4417
3030
|
// isPhoneDisabled,
|
|
4418
3031
|
loading, tracking, }) => {
|
|
4419
|
-
const { t } = index.useTranslations();
|
|
3032
|
+
const { t } = index$2.useTranslations();
|
|
4420
3033
|
// const { locale = 'vi-VN' } = useSSOState()
|
|
4421
3034
|
const { setupSource } = store.useSSOV2Store();
|
|
4422
3035
|
const [dobChanged, setDobChanged] = React__default["default"].useState(false);
|
|
4423
3036
|
return (React__default["default"].createElement(core.Stack, { spacing: 12 },
|
|
4424
|
-
React__default["default"].createElement(index$
|
|
4425
|
-
React__default["default"].createElement(index$
|
|
3037
|
+
React__default["default"].createElement(index$9.Input, Object.assign({ name: "name", label: t('ssov2.setup.field.name.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.name.placeholder'), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Name" }, form.getInputProps('name'))),
|
|
3038
|
+
React__default["default"].createElement(index$9.Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.gender.label'), withAsterisk: true }, form.getInputProps('gender')),
|
|
4426
3039
|
React__default["default"].createElement(core.Group, null,
|
|
4427
|
-
React__default["default"].createElement(index$
|
|
3040
|
+
React__default["default"].createElement(index$5.Button, { type: "button", styles: {
|
|
4428
3041
|
root: {
|
|
4429
3042
|
flex: 1,
|
|
4430
3043
|
},
|
|
@@ -4436,7 +3049,7 @@ loading, tracking, }) => {
|
|
|
4436
3049
|
: 'tertiary', onClick: () => {
|
|
4437
3050
|
form.setFieldValue('gender', 'female');
|
|
4438
3051
|
}, leftIcon: React__default["default"].createElement(FemaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.female')),
|
|
4439
|
-
React__default["default"].createElement(index$
|
|
3052
|
+
React__default["default"].createElement(index$5.Button, { type: "button", styles: {
|
|
4440
3053
|
root: {
|
|
4441
3054
|
flex: 1,
|
|
4442
3055
|
},
|
|
@@ -4448,7 +3061,7 @@ loading, tracking, }) => {
|
|
|
4448
3061
|
: 'tertiary', onClick: () => {
|
|
4449
3062
|
form.setFieldValue('gender', 'male');
|
|
4450
3063
|
}, leftIcon: React__default["default"].createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.male')))),
|
|
4451
|
-
React__default["default"].createElement(index$
|
|
3064
|
+
React__default["default"].createElement(index$c.DatePicker, Object.assign({ name: "dob", label: t('ssov2.setup.field.dob.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.dob.placeholder'), maxDate: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate()), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Birthday" }, form.getInputProps('dob'), { onChange: (e) => {
|
|
4452
3065
|
form.getInputProps('dob').onChange(e);
|
|
4453
3066
|
setDobChanged(true);
|
|
4454
3067
|
}, onBlur: (e) => {
|
|
@@ -4456,7 +3069,7 @@ loading, tracking, }) => {
|
|
|
4456
3069
|
return;
|
|
4457
3070
|
form.getInputProps('dob').onBlur(e);
|
|
4458
3071
|
} })),
|
|
4459
|
-
needEmail && (React__default["default"].createElement(index$
|
|
3072
|
+
needEmail && (React__default["default"].createElement(index$9.Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required: ['care', 'ecom', 'community'].includes(setupSource), withAsterisk: ['care', 'ecom', 'community'].includes(setupSource), "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Email", style: {
|
|
4460
3073
|
display: isEmailDisable ? 'none' : 'block',
|
|
4461
3074
|
} }, form.getInputProps('email'))))));
|
|
4462
3075
|
};
|
|
@@ -4470,15 +3083,15 @@ const MAP_GENDER_VALUE = {
|
|
|
4470
3083
|
const getDefaultData = (data) => {
|
|
4471
3084
|
try {
|
|
4472
3085
|
const searchParams = new URLSearchParams(window.location.search);
|
|
4473
|
-
const genderShort = searchParams.get(index$
|
|
4474
|
-
const birthday = dayjs__default["default"](searchParams.get(index$
|
|
3086
|
+
const genderShort = searchParams.get(index$1.QUERY_HEALTH_TOOL.gender);
|
|
3087
|
+
const birthday = dayjs__default["default"](searchParams.get(index$1.QUERY_HEALTH_TOOL.birthday), 'MM/DD/YYYY');
|
|
4475
3088
|
if (genderShort === 'f' || genderShort === 'm' || birthday.isValid()) {
|
|
4476
3089
|
const returnedValue = Object.assign({}, (data || {}));
|
|
4477
3090
|
if (genderShort === 'f' || genderShort === 'm') {
|
|
4478
3091
|
returnedValue.gender = MAP_GENDER_VALUE[genderShort];
|
|
4479
3092
|
}
|
|
4480
3093
|
if (birthday.isValid()) {
|
|
4481
|
-
returnedValue.birthday = searchParams.get(index$
|
|
3094
|
+
returnedValue.birthday = searchParams.get(index$1.QUERY_HEALTH_TOOL.birthday);
|
|
4482
3095
|
}
|
|
4483
3096
|
return returnedValue;
|
|
4484
3097
|
}
|
|
@@ -4490,7 +3103,7 @@ const getDefaultData = (data) => {
|
|
|
4490
3103
|
const SSOSetupScreen = ({ hidden, config, }) => {
|
|
4491
3104
|
var _a, _b, _c;
|
|
4492
3105
|
const { onClose, setTracking } = useSSOState();
|
|
4493
|
-
const { t } = index.useTranslations();
|
|
3106
|
+
const { t } = index$2.useTranslations();
|
|
4494
3107
|
const { setupSource, flowData, abTestFlow } = store.useSSOV2Store();
|
|
4495
3108
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
4496
3109
|
const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
|
|
@@ -4577,7 +3190,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
4577
3190
|
const { phone, gender, name, dob } = values;
|
|
4578
3191
|
const { phoneNumber, areaCode } = store.splitPhone(phone || configPhone || '');
|
|
4579
3192
|
// validate only, delay set data to after otp
|
|
4580
|
-
const res = yield index$
|
|
3193
|
+
const res = yield index$8.updateUserInfo({
|
|
4581
3194
|
name,
|
|
4582
3195
|
birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
|
|
4583
3196
|
email: values.email || undefined,
|
|
@@ -4588,7 +3201,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
4588
3201
|
validate: 'true',
|
|
4589
3202
|
});
|
|
4590
3203
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
4591
|
-
const res = yield index$
|
|
3204
|
+
const res = yield index$8.updateUserInfo({
|
|
4592
3205
|
name,
|
|
4593
3206
|
birthday: dayjs__default["default"](dob).format('YYYY-MM-DD'),
|
|
4594
3207
|
email: values.email || undefined,
|
|
@@ -4599,7 +3212,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
4599
3212
|
validate: '',
|
|
4600
3213
|
});
|
|
4601
3214
|
if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
|
|
4602
|
-
index$
|
|
3215
|
+
index$8.handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
|
|
4603
3216
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
4604
3217
|
}
|
|
4605
3218
|
else {
|
|
@@ -4623,20 +3236,20 @@ const SSOSetupScreen = ({ hidden, config, }) => {
|
|
|
4623
3236
|
}, onSubmit: form$1.onSubmit(onSubmit) },
|
|
4624
3237
|
React__default["default"].createElement(core.Stack, { spacing: 24 },
|
|
4625
3238
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4626
|
-
React__default["default"].createElement(index$
|
|
4627
|
-
React__default["default"].createElement(index$
|
|
3239
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.setup.title')),
|
|
3240
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.setup.description'))),
|
|
4628
3241
|
React__default["default"].createElement(OtherSetup, { needPhone: needPhone, skipPhone: skipPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, isPhoneDisabled: isPhoneDisabled, form: form$1, loading: loading, tracking: {
|
|
4629
3242
|
category: trackingCategory,
|
|
4630
3243
|
action: trackingAction,
|
|
4631
3244
|
} }),
|
|
4632
|
-
errMsg && (React__default["default"].createElement(index$
|
|
4633
|
-
React__default["default"].createElement(index$
|
|
3245
|
+
errMsg && (React__default["default"].createElement(index$4.Text, { color: "red.6", size: "p4" }, errMsg)),
|
|
3246
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", variant: "primary", fullWidth: true, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Save" }, t('ssov2.button.save')),
|
|
4634
3247
|
React__default["default"].createElement(SetupLater, { style: { marginTop: -8 } }))));
|
|
4635
3248
|
};
|
|
4636
3249
|
|
|
4637
3250
|
const SSOUpdateEmailScreen = ({ hidden, config, }) => {
|
|
4638
3251
|
var _a;
|
|
4639
|
-
const { t } = index.useTranslations();
|
|
3252
|
+
const { t } = index$2.useTranslations();
|
|
4640
3253
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
4641
3254
|
const { setTracking } = useSSOState();
|
|
4642
3255
|
const { flowData, abTestFlow } = store.useSSOV2Store();
|
|
@@ -4662,9 +3275,9 @@ const SSOUpdateEmailScreen = ({ hidden, config, }) => {
|
|
|
4662
3275
|
setLoading(true);
|
|
4663
3276
|
try {
|
|
4664
3277
|
const email = (inputEmail || '').trim();
|
|
4665
|
-
const existRes = yield index$
|
|
3278
|
+
const existRes = yield index$8.checkUserExist({ email });
|
|
4666
3279
|
if ((existRes === null || existRes === void 0 ? void 0 : existRes._status) === 1) {
|
|
4667
|
-
const userInfo = yield index$
|
|
3280
|
+
const userInfo = yield index$8.getUserInfo();
|
|
4668
3281
|
if (!existRes._data || email === ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _b === void 0 ? void 0 : _b.email)) {
|
|
4669
3282
|
const res = yield initSendUpdateEmailOtp(email);
|
|
4670
3283
|
if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
|
|
@@ -4709,14 +3322,14 @@ const SSOUpdateEmailScreen = ({ hidden, config, }) => {
|
|
|
4709
3322
|
yield submitEmail(e.currentTarget.email.value);
|
|
4710
3323
|
}) },
|
|
4711
3324
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4712
|
-
React__default["default"].createElement(index$
|
|
4713
|
-
React__default["default"].createElement(index$
|
|
4714
|
-
React__default["default"].createElement(index$
|
|
4715
|
-
React__default["default"].createElement(index$
|
|
3325
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.updateEmail.title')),
|
|
3326
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.updateEmail.description'))),
|
|
3327
|
+
React__default["default"].createElement(index$9.Input, { name: "email", placeholder: t('onboarding.formEmail.yourEmail'), error: errMsg || undefined, type: "email", required: true, mt: 24, onChange: () => setErrMsg(''), disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Email" }),
|
|
3328
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, mt: 16, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Verify Your Email" }, t('ssov2.updateEmail.button'))));
|
|
4716
3329
|
};
|
|
4717
3330
|
|
|
4718
3331
|
const SSOWhatsAppOTPScreen = ({ hidden, config, }) => {
|
|
4719
|
-
const { t } = index.useTranslations();
|
|
3332
|
+
const { t } = index$2.useTranslations();
|
|
4720
3333
|
const { onClose, setTracking } = useSSOState();
|
|
4721
3334
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
4722
3335
|
const [otp, setOtp] = React__default["default"].useState('');
|
|
@@ -4801,7 +3414,7 @@ const SSOWhatsAppOTPScreen = ({ hidden, config, }) => {
|
|
|
4801
3414
|
return setLoading(false);
|
|
4802
3415
|
}
|
|
4803
3416
|
if (!useAuthenticatedWhatsAppApis && (res === null || res === void 0 ? void 0 : res._data)) {
|
|
4804
|
-
index$
|
|
3417
|
+
index$8.handleAuthSuccess(res._data);
|
|
4805
3418
|
}
|
|
4806
3419
|
onClose === null || onClose === void 0 ? void 0 : onClose(true);
|
|
4807
3420
|
}
|
|
@@ -4832,8 +3445,8 @@ const SSOWhatsAppOTPScreen = ({ hidden, config, }) => {
|
|
|
4832
3445
|
submitOtp(String(otp));
|
|
4833
3446
|
} },
|
|
4834
3447
|
React__default["default"].createElement(core.Stack, { spacing: 8 },
|
|
4835
|
-
React__default["default"].createElement(index$
|
|
4836
|
-
React__default["default"].createElement(index$
|
|
3448
|
+
React__default["default"].createElement(index$4.Text, { size: "s1", weight: "semiBold" }, t('ssov2.otp.phone.title')),
|
|
3449
|
+
React__default["default"].createElement(index$4.Text, { size: "p4", sx: {
|
|
4837
3450
|
b: {
|
|
4838
3451
|
fontWeight: 'bold',
|
|
4839
3452
|
},
|
|
@@ -4845,8 +3458,8 @@ const SSOWhatsAppOTPScreen = ({ hidden, config, }) => {
|
|
|
4845
3458
|
}),
|
|
4846
3459
|
} }))),
|
|
4847
3460
|
React__default["default"].createElement(core.Stack, { mt: 24, spacing: 8 },
|
|
4848
|
-
React__default["default"].createElement(index$
|
|
4849
|
-
React__default["default"].createElement(index$
|
|
3461
|
+
React__default["default"].createElement(index$9.Input.Wrapper, { error: error },
|
|
3462
|
+
React__default["default"].createElement(index$9.OTP, { ref: otpRef, value: otp, onChange: (value) => {
|
|
4850
3463
|
setOtp(String(value));
|
|
4851
3464
|
if (String(value).length === 6) {
|
|
4852
3465
|
setTimeout(() => {
|
|
@@ -4863,14 +3476,14 @@ const SSOWhatsAppOTPScreen = ({ hidden, config, }) => {
|
|
|
4863
3476
|
React__default["default"].createElement(core.Group, { spacing: 8, align: "center", style: {
|
|
4864
3477
|
height: 40,
|
|
4865
3478
|
} },
|
|
4866
|
-
React__default["default"].createElement(index$
|
|
4867
|
-
React__default["default"].createElement(index$
|
|
3479
|
+
React__default["default"].createElement(index$4.Text, { size: "p4" }, t('ssov2.otp.resendQuestion')),
|
|
3480
|
+
React__default["default"].createElement(index$4.Text, { style: {
|
|
4868
3481
|
pointerEvents: resendTime > 0 ? 'none' : 'auto',
|
|
4869
3482
|
cursor: resendTime > 0 ? 'not-allowed' : 'pointer',
|
|
4870
3483
|
}, size: "s4", color: "blue.6", onClick: () => sendOTPCode(true), "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Resend OTP" }, t('ssov2.otp.resendText', {
|
|
4871
3484
|
count: resendTime,
|
|
4872
3485
|
})))),
|
|
4873
|
-
React__default["default"].createElement(index$
|
|
3486
|
+
React__default["default"].createElement(index$5.Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Verify", ref: submitButtonRef }, t('ssov2.whatsappLogin.verifySubmit'))));
|
|
4874
3487
|
};
|
|
4875
3488
|
|
|
4876
3489
|
const InfoIcon = () => {
|
|
@@ -4878,7 +3491,7 @@ const InfoIcon = () => {
|
|
|
4878
3491
|
React__default["default"].createElement("path", { d: "M8.00004 11.166C8.14177 11.166 8.2605 11.1181 8.35622 11.0222C8.45194 10.9264 8.4998 10.8077 8.4998 10.666V7.83265C8.4998 7.69099 8.45187 7.57225 8.356 7.47642C8.26013 7.38058 8.14133 7.33267 7.9996 7.33267C7.85787 7.33267 7.73914 7.38058 7.64342 7.47642C7.5477 7.57225 7.49984 7.69099 7.49984 7.83265V10.666C7.49984 10.8077 7.54777 10.9264 7.64364 11.0222C7.73951 11.1181 7.85831 11.166 8.00004 11.166ZM7.99982 6.19165C8.15239 6.19165 8.28027 6.14005 8.38347 6.03685C8.48667 5.93365 8.53827 5.80577 8.53827 5.6532C8.53827 5.50064 8.48667 5.37276 8.38347 5.26955C8.28027 5.16635 8.15239 5.11475 7.99982 5.11475C7.84725 5.11475 7.71937 5.16635 7.61617 5.26955C7.51297 5.37276 7.46137 5.50064 7.46137 5.6532C7.46137 5.80577 7.51297 5.93365 7.61617 6.03685C7.71937 6.14005 7.84725 6.19165 7.99982 6.19165ZM8.00094 14.3327C7.12498 14.3327 6.30163 14.1664 5.53087 13.834C4.7601 13.5015 4.08965 13.0504 3.5195 12.4805C2.94935 11.9106 2.49798 11.2404 2.16539 10.47C1.8328 9.69959 1.6665 8.8764 1.6665 8.00045C1.6665 7.12449 1.83273 6.30114 2.16517 5.53038C2.49762 4.75962 2.94878 4.08916 3.51867 3.51902C4.08857 2.94886 4.75873 2.49749 5.52915 2.1649C6.29956 1.83231 7.12275 1.66602 7.9987 1.66602C8.87466 1.66602 9.69802 1.83224 10.4688 2.16468C11.2395 2.49713 11.91 2.94829 12.4801 3.51818C13.0503 4.08808 13.5017 4.75824 13.8343 5.52867C14.1668 6.29908 14.3331 7.12226 14.3331 7.99822C14.3331 8.87417 14.1669 9.69753 13.8345 10.4683C13.502 11.239 13.0509 11.9095 12.481 12.4796C11.9111 13.0498 11.2409 13.5012 10.4705 13.8338C9.70008 14.1664 8.87689 14.3327 8.00094 14.3327ZM7.99982 13.3327C9.48871 13.3327 10.7498 12.816 11.7832 11.7827C12.8165 10.7493 13.3332 9.48822 13.3332 7.99933C13.3332 6.51044 12.8165 5.24933 11.7832 4.216C10.7498 3.18267 9.48871 2.666 7.99982 2.666C6.51093 2.666 5.24982 3.18267 4.21649 4.216C3.18315 5.24933 2.66649 6.51044 2.66649 7.99933C2.66649 9.48822 3.18315 10.7493 4.21649 11.7827C5.24982 12.816 6.51093 13.3327 7.99982 13.3327Z", fill: "#2D87F3" })));
|
|
4879
3492
|
};
|
|
4880
3493
|
const SSOWhatsAppPhoneVerifyScreen = ({ hidden, config, }) => {
|
|
4881
|
-
const { t } = index.useTranslations();
|
|
3494
|
+
const { t } = index$2.useTranslations();
|
|
4882
3495
|
const [phone, setPhone] = React__default["default"].useState('');
|
|
4883
3496
|
const [loading, setLoading] = React__default["default"].useState(false);
|
|
4884
3497
|
const [errMsg, setErrMsg] = React__default["default"].useState('');
|
|
@@ -4939,13 +3552,13 @@ const SSOWhatsAppPhoneVerifyScreen = ({ hidden, config, }) => {
|
|
|
4939
3552
|
gap: '8px',
|
|
4940
3553
|
} },
|
|
4941
3554
|
React__default["default"].createElement(InfoIcon, null),
|
|
4942
|
-
React__default["default"].createElement(index$
|
|
3555
|
+
React__default["default"].createElement(index$4.Text, { styles: {
|
|
4943
3556
|
root: {
|
|
4944
3557
|
fontSize: '13px',
|
|
4945
3558
|
},
|
|
4946
3559
|
}, color: "gray700" }, t('ssov2.whatsappLogin.phoneNotice'))),
|
|
4947
3560
|
React__default["default"].createElement(core.Stack, { spacing: 16 },
|
|
4948
|
-
React__default["default"].createElement(index$
|
|
3561
|
+
React__default["default"].createElement(index$9.Input.Wrapper, { error: errMsg },
|
|
4949
3562
|
React__default["default"].createElement(StyledPhone, { defaultCountry: (locale ? utils$1.MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => {
|
|
4950
3563
|
setPhone(value);
|
|
4951
3564
|
setErrMsg('');
|
|
@@ -4958,7 +3571,7 @@ const SSOWhatsAppPhoneVerifyScreen = ({ hidden, config, }) => {
|
|
|
4958
3571
|
'data-event-category': trackingCategory,
|
|
4959
3572
|
};
|
|
4960
3573
|
}, []) })),
|
|
4961
|
-
React__default["default"].createElement(index$
|
|
3574
|
+
React__default["default"].createElement(index$5.Button, { size: "lg", variant: "primary", onClick: onContinue, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue" }, t('ssov2.button.continue'))))));
|
|
4962
3575
|
};
|
|
4963
3576
|
|
|
4964
3577
|
const SSOScreenRenderer = () => {
|
|
@@ -5010,7 +3623,7 @@ if (!String.prototype.capitalize) {
|
|
|
5010
3623
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
5011
3624
|
};
|
|
5012
3625
|
}
|
|
5013
|
-
const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
3626
|
+
const SSOV2 = ({ onClose: onCloseProps, locale, isMarryBaby = false, }) => {
|
|
5014
3627
|
const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, setABTestFlow, } = store.useSSOV2Store();
|
|
5015
3628
|
React.useEffect(() => {
|
|
5016
3629
|
setMounted(true);
|
|
@@ -5018,6 +3631,11 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
5018
3631
|
setMounted(false);
|
|
5019
3632
|
};
|
|
5020
3633
|
}, []);
|
|
3634
|
+
React.useEffect(() => {
|
|
3635
|
+
if (locale)
|
|
3636
|
+
index$8.setSSOCurrentLocale(locale);
|
|
3637
|
+
index$8.setSSOIsMarryBaby(isMarryBaby);
|
|
3638
|
+
}, [locale, isMarryBaby]);
|
|
5021
3639
|
React.useEffect(() => {
|
|
5022
3640
|
if (isOpen) {
|
|
5023
3641
|
document.body.classList.add('sso-v2-opening');
|
|
@@ -5030,7 +3648,9 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
5030
3648
|
setOnCloseProp(onCloseProps);
|
|
5031
3649
|
}, [onCloseProps]);
|
|
5032
3650
|
React.useEffect(() => {
|
|
5033
|
-
const site = constantsDomainLocales.
|
|
3651
|
+
const site = constantsDomainLocales.getDomainByLocale(locale, isMarryBaby);
|
|
3652
|
+
if (!site)
|
|
3653
|
+
return;
|
|
5034
3654
|
const previousABTestingFlow = miscCookieHelper.getCookie('abTestingFlow');
|
|
5035
3655
|
fetchFeatureFlag(site).then((data) => {
|
|
5036
3656
|
if ((data === null || data === void 0 ? void 0 : data.is_enabled) && utils.isSupportProduct(data === null || data === void 0 ? void 0 : data.products)) {
|
|
@@ -5058,7 +3678,7 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
5058
3678
|
miscCookieHelper.deleteCookie('abTestingFlow');
|
|
5059
3679
|
}
|
|
5060
3680
|
});
|
|
5061
|
-
}, [locale]);
|
|
3681
|
+
}, [locale, isMarryBaby]);
|
|
5062
3682
|
if (!isOpen) {
|
|
5063
3683
|
return null;
|
|
5064
3684
|
}
|
|
@@ -5074,7 +3694,7 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
5074
3694
|
hasRedirectHref = store.redirect(returnUrl, source, forceReloadOnClose);
|
|
5075
3695
|
}
|
|
5076
3696
|
else {
|
|
5077
|
-
const userInfo = yield index$
|
|
3697
|
+
const userInfo = yield index$8.getUserInfo();
|
|
5078
3698
|
if (!((_a = userInfo === null || userInfo === void 0 ? void 0 : userInfo._data) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
5079
3699
|
if (forceReloadOnClose) {
|
|
5080
3700
|
window.location.reload();
|
|
@@ -5089,8 +3709,8 @@ const SSOV2 = ({ onClose: onCloseProps, locale }) => {
|
|
|
5089
3709
|
onCloseProps === null || onCloseProps === void 0 ? void 0 : onCloseProps();
|
|
5090
3710
|
}
|
|
5091
3711
|
});
|
|
5092
|
-
return (React__default["default"].createElement(index$
|
|
5093
|
-
React__default["default"].createElement(SSOStateProvider, { onClose: onClose, locale: locale },
|
|
3712
|
+
return (React__default["default"].createElement(index$9.ErrorBoundary, null,
|
|
3713
|
+
React__default["default"].createElement(SSOStateProvider, { onClose: onClose, locale: locale, isMarryBaby: isMarryBaby },
|
|
5094
3714
|
React__default["default"].createElement(SSOPopupWrapper, { opened: true, onClose: onClose },
|
|
5095
3715
|
React__default["default"].createElement(SSOScreenRenderer, null)))));
|
|
5096
3716
|
};
|