@hhgtech/hhg-components 1.27.61 → 1.27.62

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.
Files changed (276) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components/atoms/index.d.ts +0 -1
  5. package/build/components.js +1 -1
  6. package/build/constants.js +1 -1
  7. package/build/{core-0c960d85.js → core-ed57d5b7.js} +1 -1
  8. package/build/{dataTransform-6089f6b7.js → dataTransform-3239bfec.js} +1 -1
  9. package/build/ecom.js +1 -1
  10. package/build/esm/babyGrowth.js +7 -7
  11. package/build/esm/cache.js +1 -1
  12. package/build/esm/care.js +1 -1
  13. package/build/esm/components/atoms/index.d.ts +0 -1
  14. package/build/esm/components.js +1 -1
  15. package/build/esm/constants.js +1 -1
  16. package/build/esm/{core-5180edea.js → core-68a9d98a.js} +1 -1
  17. package/build/esm/{dataTransform-063edca8.js → dataTransform-97e4d293.js} +1 -1
  18. package/build/esm/ecom.js +1 -1
  19. package/build/esm/fixedBottomAdBlock-f18e85d4.js +1 -0
  20. package/build/esm/footer.js +1 -1
  21. package/build/esm/gAssets.js +1 -1
  22. package/build/esm/getDynamicHealthTool-8974c573.js +1 -0
  23. package/build/esm/{getSocialList-70364ebf.js → getSocialList-c8298308.js} +1 -1
  24. package/build/esm/hooks.js +1 -1
  25. package/build/esm/i18n.js +1 -1
  26. package/build/esm/i18nV2.js +1 -1
  27. package/build/esm/{index-d0d8cff2.js → index-08f0cf74.js} +1 -1
  28. package/build/esm/{index-e94df8d8.js → index-2222b966.js} +14 -14
  29. package/build/esm/{index-4daa1d8d.js → index-22d6fc10.js} +1 -1
  30. package/build/esm/{index-fd754174.js → index-2ff653b5.js} +10 -10
  31. package/build/esm/{index-c4055697.js → index-30e03a57.js} +1 -1
  32. package/build/esm/{index-c53d8dfb.js → index-4d5ae1fa.js} +2 -2
  33. package/build/esm/index-5c0bcbff.js +1 -0
  34. package/build/esm/{index-33d0e9d1.js → index-5cfdaa22.js} +1 -1
  35. package/build/esm/{index-f5ddb9ac.js → index-684133d2.js} +1 -1
  36. package/build/esm/index-6d5d9daa.js +1 -0
  37. package/build/esm/{index-d6812980.js → index-72a93e65.js} +1 -1
  38. package/build/esm/{index-99278725.js → index-7d937042.js} +1 -1
  39. package/build/esm/{index-eaf2c5f5.js → index-809f539e.js} +1 -1
  40. package/build/esm/{index-7b84a799.js → index-8ff39caf.js} +1 -1
  41. package/build/esm/index-9428763e.js +1 -0
  42. package/build/esm/{index-a3e16684.js → index-9702a35f.js} +1 -1
  43. package/build/esm/index-b26629ef.js +1 -0
  44. package/build/esm/{index-fe084586.js → index-ba4bde77.js} +1 -1
  45. package/build/esm/index-c5489dc0.js +1 -0
  46. package/build/esm/index-cf0b326d.js +1 -0
  47. package/build/esm/{index-88d397e2.js → index-f93a4f7a.js} +1 -1
  48. package/build/esm/{index-3c5d351e.js → index-f9fb7108.js} +1 -1
  49. package/build/esm/index.js +1 -1
  50. package/build/esm/{index.styled-f7aff107.js → index.styled-351754ba.js} +1 -1
  51. package/build/esm/{index.styled-e3b8494a.js → index.styled-4cfbee8b.js} +9 -9
  52. package/build/esm/index.styled-bb0e8f22.js +50 -0
  53. package/build/esm/lead.js +1 -1
  54. package/build/esm/mantine.js +1 -1
  55. package/build/esm/misc.js +1 -1
  56. package/build/esm/navigation.js +1 -1
  57. package/build/esm/onboarding.js +1 -1
  58. package/build/esm/onboardingV2.js +18 -18
  59. package/build/esm/pwg.js +5 -5
  60. package/build/esm/{routing-8356ee03.js → routing-a5352b40.js} +1 -1
  61. package/build/esm/{screenSizeContext-945a7fb3.js → screenSizeContext-491c78ad.js} +3 -3
  62. package/build/esm/together.js +1 -1
  63. package/build/esm/{types-acec7f42.js → types-13eef9c1.js} +9 -9
  64. package/build/esm/{types-d4d5fba3.js → types-3618dc5f.js} +13 -13
  65. package/build/esm/types.js +1 -1
  66. package/build/esm/useHealthToolCache-f4e0e409.js +1 -0
  67. package/build/esm/{useRafState-8c019b43.js → useRafState-60354a42.js} +1 -1
  68. package/build/esm/{useTranslations-f1158e9d.js → useTranslations-fa0feb0e.js} +1 -1
  69. package/build/esm/{utils-b021396d.js → utils-3b0f0e5d.js} +1 -1
  70. package/build/esm/{utils-f67c3f9d.js → utils-a9bb3a5c.js} +45 -61
  71. package/build/esm/vaccination.js +5 -5
  72. package/build/{fixedBottomAdBlock-f52fe3ad.js → fixedBottomAdBlock-2466257c.js} +1 -1
  73. package/build/footer.js +1 -1
  74. package/build/gAssets.js +1 -1
  75. package/build/{getDynamicHealthTool-784addbe.js → getDynamicHealthTool-a5d0b199.js} +1 -1
  76. package/build/{getSocialList-9fc71ae9.js → getSocialList-11d11fc4.js} +1 -1
  77. package/build/hooks.js +1 -1
  78. package/build/i18n.js +1 -1
  79. package/build/i18nV2.js +1 -1
  80. package/build/{index-751bc01b.js → index-17912d82.js} +1 -1
  81. package/build/{index-b70a4353.js → index-21266c39.js} +1 -1
  82. package/build/{index-8ee333c6.js → index-3dce5c4d.js} +1 -1
  83. package/build/{index-ef798038.js → index-450e3bcc.js} +1 -1
  84. package/build/{index-046fbe1c.js → index-486e1255.js} +1 -1
  85. package/build/{index-91b45278.js → index-535692c1.js} +1 -1
  86. package/build/{index-4a2e9bec.js → index-67b07569.js} +1 -1
  87. package/build/{index-454321d3.js → index-70c4567f.js} +1 -1
  88. package/build/{index-c44b945b.js → index-7cae7cfb.js} +1 -1
  89. package/build/{index-47f569d0.js → index-88888ef8.js} +1 -1
  90. package/build/{index-433ba2fd.js → index-8e2cf832.js} +1 -1
  91. package/build/{index-0c3ef06c.js → index-91ea9353.js} +1 -1
  92. package/build/{index-ca4d4c2e.js → index-a122a222.js} +1 -1
  93. package/build/{index-93431d86.js → index-a42c1126.js} +1 -1
  94. package/build/{index-76fba88b.js → index-aade58db.js} +1 -1
  95. package/build/{index-4352e022.js → index-c2be3c89.js} +1 -1
  96. package/build/{index-8f073d8e.js → index-c33e5fa0.js} +1 -1
  97. package/build/{index-43d1ad1b.js → index-c53111fa.js} +2 -2
  98. package/build/{index-cb450bcf.js → index-e67aa8cc.js} +1 -1
  99. package/build/index-ed4f3133.js +1 -0
  100. package/build/{index-b04a8ca7.js → index-f45e018d.js} +1 -1
  101. package/build/{index-1bebe301.js → index-f819dbd6.js} +1 -1
  102. package/build/index.js +1 -1
  103. package/build/{index.styled-44a29ec1.js → index.styled-546da2a3.js} +3 -3
  104. package/build/{index.styled-6a0e6f6a.js → index.styled-87d5668d.js} +1 -1
  105. package/build/{index.styled-4f3d6b2c.js → index.styled-e21a03f7.js} +4 -4
  106. package/build/lead.js +1 -1
  107. package/build/mantine.js +1 -1
  108. package/build/misc.js +1 -1
  109. package/build/navigation.js +1 -1
  110. package/build/onboarding.js +1 -1
  111. package/build/onboardingV2.js +1 -1
  112. package/build/pwg.js +1 -1
  113. package/build/{routing-254f38d8.js → routing-e1293a44.js} +1 -1
  114. package/build/{screenSizeContext-e294b91c.js → screenSizeContext-b12b1126.js} +3 -3
  115. package/build/together.js +1 -1
  116. package/build/{types-3c3d7ce5.js → types-e739b7e5.js} +1 -1
  117. package/build/{types-14fd26e7.js → types-fcc3b33c.js} +1 -1
  118. package/build/types.js +1 -1
  119. package/build/{useHealthToolCache-43088ff4.js → useHealthToolCache-5df64ef0.js} +1 -1
  120. package/build/{useRafState-3619a882.js → useRafState-6c740aa4.js} +1 -1
  121. package/build/{useTranslations-32230eda.js → useTranslations-3a12f7f4.js} +1 -1
  122. package/build/{utils-51e55860.js → utils-03bb818c.js} +1 -1
  123. package/build/{utils-0e6269ce.js → utils-f24f30a2.js} +43 -59
  124. package/build/vaccination.js +1 -1
  125. package/package.json +1 -1
  126. package/build/components/atoms/shadow/index.d.ts +0 -9
  127. package/build/components/atoms/shadow/index.styled.d.ts +0 -1
  128. package/build/components/atoms/shadow/index.test.d.ts +0 -1
  129. package/build/esm/components/atoms/shadow/index.d.ts +0 -9
  130. package/build/esm/components/atoms/shadow/index.styled.d.ts +0 -1
  131. package/build/esm/components/atoms/shadow/index.test.d.ts +0 -1
  132. package/build/esm/fixedBottomAdBlock-51682ee6.js +0 -1
  133. package/build/esm/getDynamicHealthTool-ab33702d.js +0 -1
  134. package/build/esm/index-1505c7e9.js +0 -1
  135. package/build/esm/index-abdf05e9.js +0 -1
  136. package/build/esm/index-b81b589f.js +0 -1
  137. package/build/esm/index-c3203215.js +0 -1
  138. package/build/esm/index-c4c19aa0.js +0 -1
  139. package/build/esm/index-df14b8ce.js +0 -1
  140. package/build/esm/index.styled-80b1b39d.js +0 -50
  141. package/build/esm/useHealthToolCache-61d6988a.js +0 -1
  142. package/build/index-5311bc12.js +0 -1
  143. /package/build/{BMI_BOYS.percentile.monthly-c79da701.js → BMI_BOYS.percentile.monthly-68c42a4b.js} +0 -0
  144. /package/build/{BMI_BOYS.percentile.weekly-1d7d8f63.js → BMI_BOYS.percentile.weekly-f606d0bd.js} +0 -0
  145. /package/build/{BMI_BOYS.percentile.yearly-403705fd.js → BMI_BOYS.percentile.yearly-833b27ca.js} +0 -0
  146. /package/build/{BMI_BOYS.zscore.monthly-c425227e.js → BMI_BOYS.zscore.monthly-f8f30b8c.js} +0 -0
  147. /package/build/{BMI_BOYS.zscore.weekly-81e0ccfb.js → BMI_BOYS.zscore.weekly-ddd56d75.js} +0 -0
  148. /package/build/{BMI_BOYS.zscore.yearly-bf3afd66.js → BMI_BOYS.zscore.yearly-61c548df.js} +0 -0
  149. /package/build/{BMI_GIRLS.percentile.monthly-d096ebfc.js → BMI_GIRLS.percentile.monthly-6715ad32.js} +0 -0
  150. /package/build/{BMI_GIRLS.percentile.weekly-acec3aed.js → BMI_GIRLS.percentile.weekly-90cebd21.js} +0 -0
  151. /package/build/{BMI_GIRLS.percentile.yearly-c12739e9.js → BMI_GIRLS.percentile.yearly-ad487b48.js} +0 -0
  152. /package/build/{BMI_GIRLS.zscore.monthly-5f833a6c.js → BMI_GIRLS.zscore.monthly-31e92c9c.js} +0 -0
  153. /package/build/{BMI_GIRLS.zscore.weekly-8b456c7d.js → BMI_GIRLS.zscore.weekly-7a2e8766.js} +0 -0
  154. /package/build/{BMI_GIRLS.zscore.yearly-018a1d89.js → BMI_GIRLS.zscore.yearly-0e36f06e.js} +0 -0
  155. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-e8ca0bf9.js → HEAD CIRCUM_BOYS.percentile.monthly-bc5bcde9.js} +0 -0
  156. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-4a72cea8.js → HEAD CIRCUM_BOYS.percentile.weekly-8656f36b.js} +0 -0
  157. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-bbb8b750.js → HEAD CIRCUM_BOYS.percentile.yearly-d9b77124.js} +0 -0
  158. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-6fb88846.js → HEAD CIRCUM_BOYS.zscore.monthly-9ff50353.js} +0 -0
  159. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6009440c.js → HEAD CIRCUM_BOYS.zscore.weekly-a611f88c.js} +0 -0
  160. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-f556b0f0.js → HEAD CIRCUM_BOYS.zscore.yearly-2984e847.js} +0 -0
  161. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-939b6c50.js → HEAD CIRCUM_GIRLS.percentile.monthly-d4ee16ca.js} +0 -0
  162. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-2eefcab9.js → HEAD CIRCUM_GIRLS.percentile.weekly-66086383.js} +0 -0
  163. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-d08281c4.js → HEAD CIRCUM_GIRLS.percentile.yearly-ca066739.js} +0 -0
  164. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-a7515927.js → HEAD CIRCUM_GIRLS.zscore.monthly-56e9e4c6.js} +0 -0
  165. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-d61df917.js → HEAD CIRCUM_GIRLS.zscore.weekly-361272fe.js} +0 -0
  166. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-0b85a4cd.js → HEAD CIRCUM_GIRLS.zscore.yearly-e2af913b.js} +0 -0
  167. /package/build/{HEIGHT_BOYS.percentile.monthly-65e40788.js → HEIGHT_BOYS.percentile.monthly-d1b3481d.js} +0 -0
  168. /package/build/{HEIGHT_BOYS.percentile.weekly-6e17e4ff.js → HEIGHT_BOYS.percentile.weekly-9baa4346.js} +0 -0
  169. /package/build/{HEIGHT_BOYS.percentile.yearly-68af859e.js → HEIGHT_BOYS.percentile.yearly-83e29938.js} +0 -0
  170. /package/build/{HEIGHT_BOYS.zscore.monthly-e5b90547.js → HEIGHT_BOYS.zscore.monthly-41266898.js} +0 -0
  171. /package/build/{HEIGHT_BOYS.zscore.weekly-3bc311b9.js → HEIGHT_BOYS.zscore.weekly-bbea8902.js} +0 -0
  172. /package/build/{HEIGHT_BOYS.zscore.yearly-1d49cdd8.js → HEIGHT_BOYS.zscore.yearly-120013b0.js} +0 -0
  173. /package/build/{HEIGHT_GIRLS.percentile.monthly-e8a81ed9.js → HEIGHT_GIRLS.percentile.monthly-07fa7800.js} +0 -0
  174. /package/build/{HEIGHT_GIRLS.percentile.weekly-7b2d18e1.js → HEIGHT_GIRLS.percentile.weekly-e070c484.js} +0 -0
  175. /package/build/{HEIGHT_GIRLS.percentile.yearly-c423089d.js → HEIGHT_GIRLS.percentile.yearly-e67ad19e.js} +0 -0
  176. /package/build/{HEIGHT_GIRLS.zscore.monthly-5aa6773d.js → HEIGHT_GIRLS.zscore.monthly-f7802ad1.js} +0 -0
  177. /package/build/{HEIGHT_GIRLS.zscore.weekly-523301a1.js → HEIGHT_GIRLS.zscore.weekly-ce6f6d34.js} +0 -0
  178. /package/build/{HEIGHT_GIRLS.zscore.yearly-c86ea5af.js → HEIGHT_GIRLS.zscore.yearly-251d9d2b.js} +0 -0
  179. /package/build/{Onboarding-c744036c.js → Onboarding-20c7c4cf.js} +0 -0
  180. /package/build/{Visible-6d76872d.js → Visible-c1a5f7fc.js} +0 -0
  181. /package/build/{WEIGHT_BOYS.percentile.monthly-e3de7626.js → WEIGHT_BOYS.percentile.monthly-cda6d708.js} +0 -0
  182. /package/build/{WEIGHT_BOYS.percentile.weekly-a859a230.js → WEIGHT_BOYS.percentile.weekly-b7297501.js} +0 -0
  183. /package/build/{WEIGHT_BOYS.percentile.yearly-58073202.js → WEIGHT_BOYS.percentile.yearly-6b0d1320.js} +0 -0
  184. /package/build/{WEIGHT_BOYS.zscore.monthly-484145b5.js → WEIGHT_BOYS.zscore.monthly-5de18c77.js} +0 -0
  185. /package/build/{WEIGHT_BOYS.zscore.weekly-07e19a07.js → WEIGHT_BOYS.zscore.weekly-9e48f3c9.js} +0 -0
  186. /package/build/{WEIGHT_BOYS.zscore.yearly-a729cb7b.js → WEIGHT_BOYS.zscore.yearly-05899c32.js} +0 -0
  187. /package/build/{WEIGHT_GIRLS.percentile.monthly-d56b275b.js → WEIGHT_GIRLS.percentile.monthly-62e802cc.js} +0 -0
  188. /package/build/{WEIGHT_GIRLS.percentile.weekly-2d17b7f8.js → WEIGHT_GIRLS.percentile.weekly-a2e1ad51.js} +0 -0
  189. /package/build/{WEIGHT_GIRLS.percentile.yearly-fdd63cdf.js → WEIGHT_GIRLS.percentile.yearly-6ed8a188.js} +0 -0
  190. /package/build/{WEIGHT_GIRLS.zscore.monthly-37997e57.js → WEIGHT_GIRLS.zscore.monthly-6bb76633.js} +0 -0
  191. /package/build/{WEIGHT_GIRLS.zscore.weekly-69912c78.js → WEIGHT_GIRLS.zscore.weekly-decaf9be.js} +0 -0
  192. /package/build/{WEIGHT_GIRLS.zscore.yearly-12f9640b.js → WEIGHT_GIRLS.zscore.yearly-98507cd4.js} +0 -0
  193. /package/build/{constants-be218d89.js → constants-b2fec243.js} +0 -0
  194. /package/build/{cookieHelper-662781b9.js → cookieHelper-9b926906.js} +0 -0
  195. /package/build/{dataTransform-a54c29a9.js → dataTransform-8b68513b.js} +0 -0
  196. /package/build/esm/{BMI_BOYS.percentile.monthly-1398d2e3.js → BMI_BOYS.percentile.monthly-5940b71e.js} +0 -0
  197. /package/build/esm/{BMI_BOYS.percentile.weekly-d2c45ad7.js → BMI_BOYS.percentile.weekly-7392f46c.js} +0 -0
  198. /package/build/esm/{BMI_BOYS.percentile.yearly-d251d811.js → BMI_BOYS.percentile.yearly-f67aafc8.js} +0 -0
  199. /package/build/esm/{BMI_BOYS.zscore.monthly-53870191.js → BMI_BOYS.zscore.monthly-c91f8221.js} +0 -0
  200. /package/build/esm/{BMI_BOYS.zscore.weekly-e3ae49a6.js → BMI_BOYS.zscore.weekly-2cb07179.js} +0 -0
  201. /package/build/esm/{BMI_BOYS.zscore.yearly-ca4e445a.js → BMI_BOYS.zscore.yearly-574788b4.js} +0 -0
  202. /package/build/esm/{BMI_GIRLS.percentile.monthly-90f13558.js → BMI_GIRLS.percentile.monthly-6e88cf70.js} +0 -0
  203. /package/build/esm/{BMI_GIRLS.percentile.weekly-b45fbfa4.js → BMI_GIRLS.percentile.weekly-90718608.js} +0 -0
  204. /package/build/esm/{BMI_GIRLS.percentile.yearly-c27db0f1.js → BMI_GIRLS.percentile.yearly-82616228.js} +0 -0
  205. /package/build/esm/{BMI_GIRLS.zscore.monthly-5c6378bc.js → BMI_GIRLS.zscore.monthly-27ac5264.js} +0 -0
  206. /package/build/esm/{BMI_GIRLS.zscore.weekly-1515c5b9.js → BMI_GIRLS.zscore.weekly-d50044d3.js} +0 -0
  207. /package/build/esm/{BMI_GIRLS.zscore.yearly-05aef42a.js → BMI_GIRLS.zscore.yearly-f6ee504f.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-16a880d0.js → HEAD CIRCUM_BOYS.percentile.monthly-c0a6a6df.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-08181589.js → HEAD CIRCUM_BOYS.percentile.weekly-1f592b9c.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-8489246e.js → HEAD CIRCUM_BOYS.percentile.yearly-64b65e8d.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-893a354d.js → HEAD CIRCUM_BOYS.zscore.monthly-0994eda2.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-c25e7fda.js → HEAD CIRCUM_BOYS.zscore.weekly-3451b651.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-293f3aee.js → HEAD CIRCUM_BOYS.zscore.yearly-4f597730.js} +0 -0
  214. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-21545e01.js → HEAD CIRCUM_GIRLS.percentile.monthly-5709bb6d.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-84cc7924.js → HEAD CIRCUM_GIRLS.percentile.weekly-c2ec1731.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-c0c23add.js → HEAD CIRCUM_GIRLS.percentile.yearly-e6b300ea.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-a0b3f0dc.js → HEAD CIRCUM_GIRLS.zscore.monthly-2617f925.js} +0 -0
  218. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-23e89c98.js → HEAD CIRCUM_GIRLS.zscore.weekly-d5037792.js} +0 -0
  219. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e2c677a6.js → HEAD CIRCUM_GIRLS.zscore.yearly-5b1c6662.js} +0 -0
  220. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-1e3f67da.js → HEIGHT_BOYS.percentile.monthly-edc1f841.js} +0 -0
  221. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-d4a6b454.js → HEIGHT_BOYS.percentile.weekly-c94273cd.js} +0 -0
  222. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-9150b33d.js → HEIGHT_BOYS.percentile.yearly-b1a571c7.js} +0 -0
  223. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-7398d09c.js → HEIGHT_BOYS.zscore.monthly-9013fe1e.js} +0 -0
  224. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-0e16fb11.js → HEIGHT_BOYS.zscore.weekly-e7b0a905.js} +0 -0
  225. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-bc290ba3.js → HEIGHT_BOYS.zscore.yearly-a0a63aa7.js} +0 -0
  226. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-82162852.js → HEIGHT_GIRLS.percentile.monthly-e5263708.js} +0 -0
  227. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-74f2f9cf.js → HEIGHT_GIRLS.percentile.weekly-8937ef44.js} +0 -0
  228. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-d0f5fa3a.js → HEIGHT_GIRLS.percentile.yearly-1f95cba4.js} +0 -0
  229. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-b5a5bd31.js → HEIGHT_GIRLS.zscore.monthly-ea71c3b4.js} +0 -0
  230. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-8c239707.js → HEIGHT_GIRLS.zscore.weekly-90d075f8.js} +0 -0
  231. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-135f485d.js → HEIGHT_GIRLS.zscore.yearly-bcf4689d.js} +0 -0
  232. /package/build/esm/{Onboarding-c3fc4ab8.js → Onboarding-d141e0b5.js} +0 -0
  233. /package/build/esm/{Visible-928f1be4.js → Visible-186cf596.js} +0 -0
  234. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b77fa294.js → WEIGHT_BOYS.percentile.monthly-60b9e3a5.js} +0 -0
  235. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-d52232a5.js → WEIGHT_BOYS.percentile.weekly-1e3190c1.js} +0 -0
  236. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-e3b34047.js → WEIGHT_BOYS.percentile.yearly-b89d6f19.js} +0 -0
  237. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-e11787e2.js → WEIGHT_BOYS.zscore.monthly-b229b3ed.js} +0 -0
  238. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-645a3796.js → WEIGHT_BOYS.zscore.weekly-6cef3a05.js} +0 -0
  239. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-6e5af99b.js → WEIGHT_BOYS.zscore.yearly-b83a2c14.js} +0 -0
  240. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-5d88cf92.js → WEIGHT_GIRLS.percentile.monthly-f6459c34.js} +0 -0
  241. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c35e5a79.js → WEIGHT_GIRLS.percentile.weekly-9a44163b.js} +0 -0
  242. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-2c6de2e7.js → WEIGHT_GIRLS.percentile.yearly-22605780.js} +0 -0
  243. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-fee2bfdc.js → WEIGHT_GIRLS.zscore.monthly-31c34a1f.js} +0 -0
  244. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-6df8bd07.js → WEIGHT_GIRLS.zscore.weekly-acfd060a.js} +0 -0
  245. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-7cbc8d43.js → WEIGHT_GIRLS.zscore.yearly-05fde4ca.js} +0 -0
  246. /package/build/esm/{constants-22b7c734.js → constants-36caa50f.js} +0 -0
  247. /package/build/esm/{cookieHelper-92669e3a.js → cookieHelper-d2f45634.js} +0 -0
  248. /package/build/esm/{dataTransform-9844a534.js → dataTransform-53c70c90.js} +0 -0
  249. /package/build/esm/{index-ea2ce3f6.js → index-f50e4b07.js} +0 -0
  250. /package/build/esm/{isProduction-781d684d.js → isProduction-ac82d29d.js} +0 -0
  251. /package/build/esm/{localizeNumberFormat-9291be3f.js → localizeNumberFormat-3f4b0b91.js} +0 -0
  252. /package/build/esm/{normalizeLink-0711de3b.js → normalizeLink-27470307.js} +0 -0
  253. /package/build/esm/{paths-006a7640.js → paths-519731fc.js} +0 -0
  254. /package/build/esm/{theme-564d419e.js → theme-484b917f.js} +0 -0
  255. /package/build/esm/{translationsContext-5de9abe5.js → translationsContext-1959ec3c.js} +0 -0
  256. /package/build/esm/{tslib.es6-d08165e3.js → tslib.es6-ca4c7924.js} +0 -0
  257. /package/build/esm/{types-6ee81f89.js → types-8a77a66e.js} +0 -0
  258. /package/build/esm/{useIsInit-29073f80.js → useIsInit-1a3c0a8f.js} +0 -0
  259. /package/build/esm/{useOutsideClick-b21e6abb.js → useOutsideClick-47395bcc.js} +0 -0
  260. /package/build/esm/{useScrollbarSize-8f28e429.js → useScrollbarSize-893c05d4.js} +0 -0
  261. /package/build/esm/{useUniqueId-e26430a1.js → useUniqueId-7ea33e1d.js} +0 -0
  262. /package/build/esm/{utils-ef8978d1.js → utils-10c2f620.js} +0 -0
  263. /package/build/{index-bd919a14.js → index-b62e5d17.js} +0 -0
  264. /package/build/{isProduction-840f9393.js → isProduction-cd92fd15.js} +0 -0
  265. /package/build/{localizeNumberFormat-9e92f374.js → localizeNumberFormat-5838788e.js} +0 -0
  266. /package/build/{normalizeLink-e0a3ec79.js → normalizeLink-561b9daf.js} +0 -0
  267. /package/build/{paths-ea351a15.js → paths-7ca57787.js} +0 -0
  268. /package/build/{theme-0cefbd3c.js → theme-b788c923.js} +0 -0
  269. /package/build/{translationsContext-906cad7a.js → translationsContext-1d56460b.js} +0 -0
  270. /package/build/{tslib.es6-4dad8464.js → tslib.es6-8c3251be.js} +0 -0
  271. /package/build/{types-b93ec70d.js → types-f0731b29.js} +0 -0
  272. /package/build/{useIsInit-206019d5.js → useIsInit-7b651ad5.js} +0 -0
  273. /package/build/{useOutsideClick-100f7e98.js → useOutsideClick-c0223d3b.js} +0 -0
  274. /package/build/{useScrollbarSize-9d752152.js → useScrollbarSize-e98e05b5.js} +0 -0
  275. /package/build/{useUniqueId-9d80414f.js → useUniqueId-7327a422.js} +0 -0
  276. /package/build/{utils-9525b404.js → utils-1ac83567.js} +0 -0
@@ -1 +1 @@
1
- export{S as Select}from"./index-4daa1d8d.js";export{D as DatePicker}from"./index-fe084586.js";import{aY as e,aZ as t,a_ as a}from"./utils-f67c3f9d.js";export{b0 as Accordion,O as Anchor,U as AspectRatio,R as Avatar,a$ as Breadcrumbs,X as Button,b1 as Carousel,aX as Checkbox,Z as Input,aT as MAPPED_LOCALE,b4 as OTHER_THEME_CONFIG,aW as OTP,aU as Phone,b5 as Popover,aV as Radio,aH as Tabs,Q as Text,b2 as emotionCache,b3 as getHeadingStyles,a_ as getMantineThemeOverride,aS as themeColors,aZ as useMantineLocale}from"./utils-f67c3f9d.js";export{I as Indicator}from"./index-b81b589f.js";import s,{useMemo as o}from"react";export{M as Modal}from"./index-abdf05e9.js";import{_ as r}from"./tslib.es6-d08165e3.js";import{Badge as i,Spoiler as n,LoadingOverlay as l,MantineProvider as c,clsx as m,Title as d,Text as p,Button as u}from"@mantine/core";import{t as f}from"./theme-564d419e.js";import{T as j}from"./index-c4055697.js";import{u as x}from"./useTranslations-f1158e9d.js";export{b as CentralCarousel}from"./index-33d0e9d1.js";export{S as Slider}from"./index-eaf2c5f5.js";export{S as Switch}from"./index-ea2ce3f6.js";import"@mantine/hooks";import"./gAssets.js";import"./index-d6812980.js";import"date-fns/locale";import"./Onboarding-c3fc4ab8.js";import"./isProduction-781d684d.js";import"@mantine/dates";import"styled-components";import"./utils-ef8978d1.js";import"./index-d0d8cff2.js";import"dayjs";import"./screenSizeContext-945a7fb3.js";import"lodash/throttle";import"./useUniqueId-e26430a1.js";import"./translationsContext-5de9abe5.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"lodash/debounce";import"./cookieHelper-92669e3a.js";import"slugify";import"./index-3c5d351e.js";const g=t=>s.createElement(e,Object.assign({minRows:2,maxRows:4},t)),h=e=>{var{color:t=f.colors.primaryBase,styles:a}=e,o=r(e,["color","styles"]);return s.createElement(i,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},o))},v=e=>{var{children:t,line:a,lineHeight:i,trackingAttributes:l,maxHeight:c,customExpandFn:m}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=x(),u=o((()=>c||(a&&i?a*i:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=o((()=>l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}),[l]);return s.createElement(n,Object.assign({showLabel:s.createElement(j,Object.assign({size:"p3",color:f.colors.primaryBase},b,{onClick:m}),p("articlePage.readMore")),hideLabel:s.createElement(j,Object.assign({size:"p3",color:f.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)};const E=e=>(function(e=!1){s.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),s.createElement(l,Object.assign({loaderProps:{color:f.colors.primaryBase}},e))),y=e=>{var{children:o,locale:i,template:n="hb"}=e,l=r(e,["children","locale","template"]);return t(i),s.createElement(c,Object.assign({theme:a(i,n)},l),o)};var C="MON6sfi",H="pS-tJD7",P="s3tJ9-5",T="fNsZr1b",w="uuxV74v",N="YohjTDU";function A(e){const{icon:t,title:a,description:o,button:i,buttonProps:n,style:l,className:c}=e,f=n||{},{size:b="lg",variant:j="outline"}=f,x=r(f,["size","variant"]),g=t;return s.createElement("div",{className:m("result",C,c),style:l},g&&s.createElement("div",{className:m("resultIconContainer",H)},s.createElement(g,{className:m("resultIcon",P)})),s.createElement(d,{order:3,size:"h3",className:m("resultTitle",T)},a),s.createElement(p,{className:m("resultDescription",w)},o),i&&s.createElement(u,Object.assign({},x,{size:b,variant:j,className:m("resultButton",N,x.className)}),i))}export{h as Badge,E as LoadingOverlay,y as MantineProvider,A as Result,v as Spoiler,g as TextArea};
1
+ export{S as Select}from"./index-22d6fc10.js";export{D as DatePicker}from"./index-ba4bde77.js";import{aX as e,aY as t,aZ as a}from"./utils-a9bb3a5c.js";export{a$ as Accordion,N as Anchor,R as AspectRatio,Q as Avatar,a_ as Breadcrumbs,W as Button,b0 as Carousel,aW as Checkbox,Y as Input,aS as MAPPED_LOCALE,b3 as OTHER_THEME_CONFIG,aV as OTP,aT as Phone,b4 as Popover,aU as Radio,aG as Tabs,O as Text,b1 as emotionCache,b2 as getHeadingStyles,aZ as getMantineThemeOverride,aR as themeColors,aY as useMantineLocale}from"./utils-a9bb3a5c.js";export{I as Indicator}from"./index-9428763e.js";import s,{useMemo as o}from"react";export{M as Modal}from"./index-c5489dc0.js";import{_ as r}from"./tslib.es6-ca4c7924.js";import{Badge as i,Spoiler as n,LoadingOverlay as l,MantineProvider as c,clsx as m,Title as d,Text as p,Button as u}from"@mantine/core";import{t as f}from"./theme-484b917f.js";import{T as j}from"./index-30e03a57.js";import{u as x}from"./useTranslations-fa0feb0e.js";export{b as CentralCarousel}from"./index-5cfdaa22.js";export{S as Slider}from"./index-809f539e.js";export{S as Switch}from"./index-f50e4b07.js";import"@mantine/hooks";import"./gAssets.js";import"./index-72a93e65.js";import"date-fns/locale";import"./Onboarding-d141e0b5.js";import"./isProduction-ac82d29d.js";import"@mantine/dates";import"styled-components";import"./utils-10c2f620.js";import"./index-08f0cf74.js";import"dayjs";import"./screenSizeContext-491c78ad.js";import"lodash/throttle";import"./useUniqueId-7ea33e1d.js";import"./translationsContext-1959ec3c.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"lodash/debounce";import"./cookieHelper-d2f45634.js";import"slugify";import"./index-f9fb7108.js";const g=t=>s.createElement(e,Object.assign({minRows:2,maxRows:4},t)),h=e=>{var{color:t=f.colors.primaryBase,styles:a}=e,o=r(e,["color","styles"]);return s.createElement(i,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},o))},v=e=>{var{children:t,line:a,lineHeight:i,trackingAttributes:l,maxHeight:c,customExpandFn:m}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=x(),b=o((()=>c||(a&&i?a*i:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const u=o((()=>l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}),[l]);return s.createElement(n,Object.assign({showLabel:s.createElement(j,Object.assign({size:"p3",color:f.colors.primaryBase},u,{onClick:m}),p("articlePage.readMore")),hideLabel:s.createElement(j,Object.assign({size:"p3",color:f.colors.primaryBase},u),p("articlePage.showLess"))},d,{maxHeight:b}),t)};const E=e=>(function(e=!1){s.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),s.createElement(l,Object.assign({loaderProps:{color:f.colors.primaryBase}},e))),y=e=>{var{children:o,locale:i,template:n="hb"}=e,l=r(e,["children","locale","template"]);return t(i),s.createElement(c,Object.assign({theme:a(i,n)},l),o)};var C="MON6sfi",H="pS-tJD7",P="s3tJ9-5",T="fNsZr1b",w="uuxV74v",A="YohjTDU";function k(e){const{icon:t,title:a,description:o,button:i,buttonProps:n,style:l,className:c}=e,b=n||{},{size:f="lg",variant:j="outline"}=b,x=r(b,["size","variant"]),g=t;return s.createElement("div",{className:m("result",C,c),style:l},g&&s.createElement("div",{className:m("resultIconContainer",H)},s.createElement(g,{className:m("resultIcon",P)})),s.createElement(d,{order:3,size:"h3",className:m("resultTitle",T)},a),s.createElement(p,{className:m("resultDescription",w)},o),i&&s.createElement(u,Object.assign({},x,{size:f,variant:j,className:m("resultButton",A,x.className)}),i))}export{h as Badge,E as LoadingOverlay,y as MantineProvider,k as Result,v as Spoiler,g as TextArea};
package/build/esm/misc.js CHANGED
@@ -1 +1 @@
1
- export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-9291be3f.js";export{S as ScreenSizeContext,j as ScreenSizeContextProvider,h as fadeIn,i as getWindowSizeGroups,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./screenSizeContext-945a7fb3.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-92669e3a.js";import"react";import"styled-components";export{M as MBTheme,t as theme}from"./theme-564d419e.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-9844a534.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-8356ee03.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,b as getWrapperDomWithSelector,m as makeParams,c as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-ef8978d1.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-ab33702d.js";export{g as getSocialList}from"./getSocialList-70364ebf.js";import"dayjs";import"lodash/throttle";import"./index-d6812980.js";import"date-fns/locale";import"./Onboarding-c3fc4ab8.js";import"./isProduction-781d684d.js";import"./tslib.es6-d08165e3.js";import"./core-5180edea.js";import"./normalizeLink-0711de3b.js";import"./gAssets.js";
1
+ export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-3f4b0b91.js";export{S as ScreenSizeContext,j as ScreenSizeContextProvider,h as fadeIn,i as getWindowSizeGroups,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./screenSizeContext-491c78ad.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-d2f45634.js";import"react";import"styled-components";export{M as MBTheme,t as theme}from"./theme-484b917f.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-53c70c90.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-a5352b40.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,b as getWrapperDomWithSelector,m as makeParams,c as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-10c2f620.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-8974c573.js";export{g as getSocialList}from"./getSocialList-c8298308.js";import"dayjs";import"lodash/throttle";import"./index-72a93e65.js";import"date-fns/locale";import"./Onboarding-d141e0b5.js";import"./isProduction-ac82d29d.js";import"./tslib.es6-ca4c7924.js";import"./core-68a9d98a.js";import"./normalizeLink-27470307.js";import"./gAssets.js";
@@ -1 +1 @@
1
- import"./tslib.es6-d08165e3.js";import"react";import"./core-5180edea.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-c3203215.js";import"./index-d6812980.js";import"./normalizeLink-0711de3b.js";import"./routing-8356ee03.js";import"./dataTransform-063edca8.js";import"./index.styled-e3b8494a.js";import"./isProduction-781d684d.js";import"./gAssets.js";import"date-fns/locale";import"./Onboarding-c3fc4ab8.js";import"./index-33d0e9d1.js";import"styled-components";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";import"./useUniqueId-e26430a1.js";import"./index-c4055697.js";import"./index-99278725.js";import"./utils-f67c3f9d.js";import"./theme-564d419e.js";import"./utils-ef8978d1.js";import"./index-d0d8cff2.js";import"dayjs";import"./screenSizeContext-945a7fb3.js";import"lodash/throttle";import"./translationsContext-5de9abe5.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/dates";import"lodash/debounce";import"./cookieHelper-92669e3a.js";import"slugify";import"./useTranslations-f1158e9d.js";import"./index-3c5d351e.js";import"./constants-22b7c734.js";import"./index-b81b589f.js";import"./useIsInit-29073f80.js";import"dayjs/plugin/relativeTime";
1
+ import"./tslib.es6-ca4c7924.js";import"react";import"./core-68a9d98a.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-6d5d9daa.js";import"./index-72a93e65.js";import"./normalizeLink-27470307.js";import"./routing-a5352b40.js";import"./dataTransform-97e4d293.js";import"./index.styled-4cfbee8b.js";import"./isProduction-ac82d29d.js";import"./gAssets.js";import"date-fns/locale";import"./Onboarding-d141e0b5.js";import"./index-5cfdaa22.js";import"styled-components";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";import"./useUniqueId-7ea33e1d.js";import"./index-30e03a57.js";import"./index-7d937042.js";import"./utils-a9bb3a5c.js";import"./theme-484b917f.js";import"./utils-10c2f620.js";import"./index-08f0cf74.js";import"dayjs";import"./screenSizeContext-491c78ad.js";import"lodash/throttle";import"./translationsContext-1959ec3c.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/dates";import"lodash/debounce";import"./cookieHelper-d2f45634.js";import"slugify";import"./useTranslations-fa0feb0e.js";import"./index-f9fb7108.js";import"./constants-36caa50f.js";import"./index-9428763e.js";import"./useIsInit-1a3c0a8f.js";import"dayjs/plugin/relativeTime";
@@ -1 +1 @@
1
- import{a as e,_ as o}from"./tslib.es6-d08165e3.js";import t,{useContext as n,useState as r,useRef as a,useEffect as i,useMemo as s,useCallback as l}from"react";import{Input as d,Grid as m,Title as c}from"@mantine/core";import{useInterval as p,useCounter as u}from"@mantine/hooks";import{B as g}from"./index-3c5d351e.js";import{Q as b,aU as h,Z as f,aV as E,aW as v,aX as y,N as w,X as S}from"./utils-f67c3f9d.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-c53d8dfb.js";import{u as B}from"./useTranslations-f1158e9d.js";import"lodash/debounce";import"./isProduction-781d684d.js";import{L as z}from"./index-d6812980.js";import{O as T}from"./Onboarding-c3fc4ab8.js";export{O as OnboardingStep}from"./Onboarding-c3fc4ab8.js";import"dayjs";import"./screenSizeContext-945a7fb3.js";import"styled-components";import{t as N}from"./theme-564d419e.js";import{M as F}from"./utils-ef8978d1.js";import"./gAssets.js";import{S as I,a as L,b as q,c as A,d as V,e as D,f as _,g as U,h as R,i as W}from"./index.styled-f7aff107.js";import{yupResolver as H}from"@mantine/form";import"./index-33d0e9d1.js";import"./index-d0d8cff2.js";import"@mantine/dates";import{D as Y}from"./index-fe084586.js";import{A as Z}from"./index-7b84a799.js";import{V as $}from"./Visible-928f1be4.js";import{M as G,h as X}from"./utils-b021396d.js";export{M as MAPPED_LOCALE}from"./utils-b021396d.js";import*as K from"yup";import Q from"lodash/throttle";import{T as J}from"./index-c4055697.js";import{format as ee}from"date-fns";import"./useUniqueId-e26430a1.js";import"./translationsContext-5de9abe5.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./cookieHelper-92669e3a.js";import"slugify";import"date-fns/locale";import"./index-4daa1d8d.js";const oe=({inputOrder:e=["phone"],withSimilac:o=!1,customTerms:n=""})=>{const{t:r}=B(),a=P(),i=t.createElement(d.Wrapper,Object.assign({className:o?"input-control":"phone-input",withAsterisk:!0},o?{label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.phone"))}:{}),t.createElement(h,Object.assign({defaultCountry:G[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(f,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(f,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourEmail")),withAsterisk:!0},a.getInputProps("email"))),m=t.createElement(Y,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},a.getInputProps("dob"))),c=t.createElement(E.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(E,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(E,{value:"1",label:r("onboarding.formEmail.genderFemale")})),p=t.createElement("div",{className:"otp-input"},t.createElement(v,Object.assign({enterKeyHint:void 0,nonce:void 0},a.getInputProps("otp"))),t.createElement(d.Error,null,a.errors.otp)),u=t.createElement(f.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:t.createElement($,null)},a.getInputProps("password"))),g=t.createElement(f.Wrapper,Object.assign({},a.getInputProps("term",{type:"checkbox"}),{error:null,mb:16}),t.createElement(y,{label:n?t.createElement(b,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n):t.createElement(b,{size:"p4",as:"span"},"Tôi đã đọc và đồng ý với các điều khoản và chương trình của"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Hello Bacsi"))," ","và"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Abbott Similac"))," ","và được hướng dẫn cách ngưng chương trình"),onChange:e=>{a.setFieldValue("term",e.currentTarget.checked)}}),t.createElement(d.Error,{size:"md"},a.getInputProps("term",{type:"checkbox"}).error)),w=t.createElement(Z,Object.assign({className:"input-control",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.address"))},a.getInputProps("address"))),S=t.createElement(f.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:t.createElement($,null)},a.getInputProps("confirmPassword"))),j=e.map((e=>({phone:i,full_name:s,email:l,dob:m,gender:c,otp:p,password:u,confirm_password:S,term:g,address:w}[e]||null)));return t.createElement(I,null,j)},te=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default("")}),ne=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName")),email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:K.mixed().required(e("onboarding.similac.address.error")),term:K.bool().oneOf([!0],e("onboarding.similac.term.error"))}),re=e=>K.object().shape({otp:K.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),ae=e=>K.object().shape({email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName"))}),ie=e=>K.object().shape({password:K.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:K.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([K.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se=({onClose:o,onSubmit:n,canSkip:r=!0,customFormTexts:a})=>{const{t:i}=B(),s=j({initialValues:{phone:""},validate:H(te(i))});return t.createElement(L,{heading:(null==a?void 0:a.heading)||i("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||i("onboarding.updatePhone.description")},t.createElement(k,{form:s},t.createElement("form",{onSubmit:s.onSubmit((o=>e(void 0,void 0,void 0,(function*(){n(o.phone)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["phone"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},i("onboarding.button.continue")),r&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},i("onboarding.button.skip")))))},le=n=>{var{onClose:r,onSubmit:a,canSkip:i=!0,customFormTexts:s,customTerms:l,defaultValues:d}=n,m=o(n,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues"]);const{t:c}=B(),{isMobile:p}=w(),u=j({initialValues:Object.assign({phone:"",term:!1},d),validate:H(ne(c))});return t.createElement(L,Object.assign({heading:(null==s?void 0:s.heading)||c("onboarding.updatePhone.heading"),description:(null==s?void 0:s.description)||c("onboarding.updatePhone.description"),hiddenLogo:p},m),t.createElement(k,{form:u},t.createElement("form",{onSubmit:u.onSubmit((o=>e(void 0,void 0,void 0,(function*(){a(o)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["full_name","email","phone","address","term"],withSimilac:!0,customTerms:l}),t.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),i&&t.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},c("onboarding.button.skip")))))},de=e=>{var{withSimilac:n=!1}=e,r=o(e,["withSimilac"]);return n?t.createElement(le,Object.assign({},r)):t.createElement(se,Object.assign({},r))},me=({onSubmit:o,phone:l,email:d,onResendCode:m,otpError:c,onClose:b,loading:h,onBack:f,canSkip:E,outOfEdit:v})=>{const{siteType:y,isMarryBaby:w}=n(C),[S,P]=r(30),O=p((()=>P((e=>e-1))),1e3),[M,x]=u(0,{min:0,max:3}),z=a(!0),{t:T}=B();i((()=>(O.start(),O.stop)),[]),i((()=>{0===S&&(O.stop(),z.current=!1)}),[S]);const F=j({initialValues:{otp:""},validate:H(re(T))});i((()=>{c&&F.setFieldError("otp",c)}),[c]);const I=s((()=>Q((()=>{z.current||(x.increment(),P(30),null==m||m(l||d),O.start(),z.current=!0)}),1e3,{trailing:!1})),[l,d,m,O]);return t.createElement(q,{heading:T("onboarding.otpForm.heading"),description:t.createElement(t.Fragment,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:l?T("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${l.slice(0,-3).replace(/./g,"x").concat(l.slice(-3))}</b>`}):T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${X(d)}</b>`})}}),!v&&t.createElement("svg",{onClick:()=>{null==f||f()},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},t.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},t.createElement(k,{form:F},t.createElement("form",{onSubmit:F.onSubmit((t=>e(void 0,void 0,void 0,(function*(){x.increment(),o(t.otp)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["otp"]}),t.createElement("div",{className:"resend"},t.createElement(J,{size:"p4",color:N.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),t.createElement(J,{as:"a",size:"p4",color:w?N.mbColors.pink:N.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:S}))),t.createElement(g,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:h,disabled:h,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),E&&M>=3&&t.createElement(g,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:b,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none",type:"button"},T("onboarding.button.skip")))))},ce=({onClose:e,onSubmit:o,canSkip:r,loading:a,errorMessage:s,initialData:l})=>{const{t:d,locale:m}=B(),{siteType:c,isMarryBaby:p}=n(C),u=j({validate:H(ae(d))});return i((()=>{u.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),i((()=>{s&&u.setFieldError("email",s)}),[s]),t.createElement(x,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":z[m].SITE_NAME_FORMATTED})},t.createElement(k,{form:u},t.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>{o(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")}))}),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},d("onboarding.button.continue")),r&&t.createElement(g,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e},d("onboarding.button.skip")))))},pe=({onClose:e,onSubmit:o,canSkip:n,errorMessage:r,loading:a})=>{const{t:i}=B(),s=j({initialValues:{password:"",confirmPassword:""},validate:H(ie(i))});return t.createElement(x,{heading:i("onboarding.updatePassword.heading"),description:i("onboarding.updatePassword.description")},t.createElement(k,{form:s},t.createElement("form",{className:"form",onSubmit:s.onSubmit((e=>o((null==e?void 0:e.password)||"")),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["password","confirm_password"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:a,disabled:a},i("onboarding.button.continue")),n&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:e},i("onboarding.button.skip")),r&&t.createElement(d.Error,{className:"form-error"},r))))},ue=n=>{var{banner:a,canSkip:i,createPassError:s,createPassLoading:d,customFormTexts:p,emailLoading:h,flow:f=[T.Phone,T.OTP],initialData:E,onClose:v,onCreatePassByEmail:y,onOtpSubmit:S,onPersonalInfoSubmit:P,onPhoneSubmit:j,onResendCode:k,otpError:O,otpLoading:M,personalInfoError:z,resultScreenProps:I,siteType:L,step:q,withSimilac:H=!1,similacFormProps:Y}=n,Z=o(n,["banner","canSkip","createPassError","createPassLoading","customFormTexts","emailLoading","flow","initialData","onClose","onCreatePassByEmail","onOtpSubmit","onPersonalInfoSubmit","onPhoneSubmit","onResendCode","otpError","otpLoading","personalInfoError","resultScreenProps","siteType","step","withSimilac","similacFormProps"]);const{t:$}=B(),[G,X]=r(q||f[0]),[K,Q]=r(""),[J,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=f.indexOf(G)+1;e<=f.length-1&&X(f[e])}),[G]),ae=l((()=>{const e=f.indexOf(G)-1;e>=0&&X(f[e])}),[G]),ie=o=>e(void 0,void 0,void 0,(function*(){try{!(yield S(o))&&re()}catch(e){console.error(e)}})),se=()=>{oe>=2||(te.increment(),ae())},ue="marryBaby"===L;return t.createElement(C.Provider,{value:{siteType:L,isMarryBaby:ue}},t.createElement(A,Object.assign({},Z),f.length>0?t.createElement(V,null,t.createElement(m,{sx:{[F.mbDown]:{margin:0},".mantine-Grid-col":{[F.mbDown]:{padding:0}}}},t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2,sx:{zIndex:H?99:void 0}},t.createElement(D,{"data-similac":H,"data-has-banner":"object"==typeof a},G===T.Phone&&(H?t.createElement(le,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){var e;try{const t=null==o?void 0:o.phone;t&&(Q(t),yield Promise.all([null===(e=null==Y?void 0:Y.onFormSubmit)||void 0===e?void 0:e.call(Y,o),null==j?void 0:j(t)])),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding,defaultValues:null==Y?void 0:Y.defaultValues,customTerms:null==Y?void 0:Y.customTerms}):t.createElement(de,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{Q(o),yield null==j?void 0:j(o),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding})),G===T.OTP&&t.createElement(me,{onClose:v,onSubmit:ie,phone:K,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2}),G===T.OTPEmail&&t.createElement(me,{onClose:v,onSubmit:ie,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2,email:J}),G===T.PersonalInfo&&t.createElement(ce,{initialData:null==E?void 0:E[T.PersonalInfo],onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{ee((null==o?void 0:o.email)||"");!(yield null==P?void 0:P(o))&&re()}catch(e){console.error(e)}})),errorMessage:z,loading:h}),G===T.UpdatePassword&&t.createElement(pe,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{yield null==y?void 0:y(o),!s&&re()}catch(e){console.error(e)}})),errorMessage:s,loading:d}),G===T.Result&&t.createElement(x,Object.assign({},I),t.createElement(g,{theme:L,size:"lg",onClick:v,className:"form-button"},$("onboarding.button.continue"))))),"object"==typeof a&&!H&&t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2},t.createElement(_,null,t.createElement(U,{"data-is-marry-baby":ue},t.createElement(R,null,(null==a?void 0:a.heading)&&t.createElement(c,{order:1,mb:24},null==a?void 0:a.heading),(null==a?void 0:a.description)&&t.createElement(b,{size:"p1",color:N.colors.gray800},$("onboarding.welcomeScreen.content"))),(null==a?void 0:a.imgSrc)&&t.createElement("div",null,t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy"}))))),"object"==typeof a&&H&&(null==a?void 0:a.imgSrc)&&t.createElement(m.Col,{span:"auto",order:H?1:2,orderMd:H?2:1},t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy",className:"similac"})))):"Incorrect flow"))};export{de as OnboardingForm,ue as OnboardingModal,me as OtpForm};
1
+ import{a as e,_ as o}from"./tslib.es6-ca4c7924.js";import t,{useContext as n,useState as r,useRef as a,useEffect as i,useMemo as s,useCallback as l}from"react";import{Input as d,Grid as m,Title as c}from"@mantine/core";import{useInterval as p,useCounter as u}from"@mantine/hooks";import{B as g}from"./index-f9fb7108.js";import{O as b,aT as f,Y as h,aU as E,aV as v,aW as y,K as w,W as S}from"./utils-a9bb3a5c.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-4d5ae1fa.js";import{u as B}from"./useTranslations-fa0feb0e.js";import"lodash/debounce";import"./isProduction-ac82d29d.js";import{L as z}from"./index-72a93e65.js";import{O as T}from"./Onboarding-d141e0b5.js";export{O as OnboardingStep}from"./Onboarding-d141e0b5.js";import"dayjs";import"./screenSizeContext-491c78ad.js";import"styled-components";import{t as N}from"./theme-484b917f.js";import{M as F}from"./utils-10c2f620.js";import"./gAssets.js";import{S as I,a as L,b as q,c as A,d as V,e as D,f as _,g as U,h as R,i as W}from"./index.styled-351754ba.js";import{yupResolver as Y}from"@mantine/form";import"./index-5cfdaa22.js";import"./index-08f0cf74.js";import"@mantine/dates";import{D as H}from"./index-ba4bde77.js";import{A as $}from"./index-8ff39caf.js";import{V as G}from"./Visible-186cf596.js";import{M as Z,h as K}from"./utils-3b0f0e5d.js";export{M as MAPPED_LOCALE}from"./utils-3b0f0e5d.js";import*as J from"yup";import Q from"lodash/throttle";import{T as X}from"./index-30e03a57.js";import{format as ee}from"date-fns";import"./useUniqueId-7ea33e1d.js";import"./translationsContext-1959ec3c.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./cookieHelper-d2f45634.js";import"slugify";import"date-fns/locale";import"./index-22d6fc10.js";const oe=({inputOrder:e=["phone"],withSimilac:o=!1,customTerms:n=""})=>{const{t:r}=B(),a=P(),i=t.createElement(d.Wrapper,Object.assign({className:o?"input-control":"phone-input",withAsterisk:!0},o?{label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.phone"))}:{}),t.createElement(f,Object.assign({defaultCountry:Z[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourEmail")),withAsterisk:!0},a.getInputProps("email"))),m=t.createElement(H,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},a.getInputProps("dob"))),c=t.createElement(E.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(E,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(E,{value:"1",label:r("onboarding.formEmail.genderFemale")})),p=t.createElement("div",{className:"otp-input"},t.createElement(v,Object.assign({enterKeyHint:void 0,nonce:void 0},a.getInputProps("otp"))),t.createElement(d.Error,null,a.errors.otp)),u=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("password"))),g=t.createElement(h.Wrapper,Object.assign({},a.getInputProps("term",{type:"checkbox"}),{error:null,mb:16}),t.createElement(y,{label:n?t.createElement(b,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n):t.createElement(b,{size:"p4",as:"span"},"Tôi đã đọc và đồng ý với các điều khoản và chương trình của"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Hello Bacsi"))," ","và"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Abbott Similac"))," ","và được hướng dẫn cách ngưng chương trình"),onChange:e=>{a.setFieldValue("term",e.currentTarget.checked)}}),t.createElement(d.Error,{size:"md"},a.getInputProps("term",{type:"checkbox"}).error)),w=t.createElement($,Object.assign({className:"input-control",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.address"))},a.getInputProps("address"))),S=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("confirmPassword"))),j=e.map((e=>({phone:i,full_name:s,email:l,dob:m,gender:c,otp:p,password:u,confirm_password:S,term:g,address:w}[e]||null)));return t.createElement(I,null,j)},te=e=>J.object().shape({phone:J.string().required(e("onboarding.updatePhone.error")).default("")}),ne=e=>J.object().shape({phone:J.string().required(e("onboarding.updatePhone.error")).default(""),name:J.string().required(e("onboarding.errorMessage.requiredName")),email:J.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:J.mixed().required(e("onboarding.similac.address.error")),term:J.bool().oneOf([!0],e("onboarding.similac.term.error"))}),re=e=>J.object().shape({otp:J.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),ae=e=>J.object().shape({email:J.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:J.string().required(e("onboarding.errorMessage.requiredName"))}),ie=e=>J.object().shape({password:J.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:J.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([J.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se=({onClose:o,onSubmit:n,canSkip:r=!0,customFormTexts:a})=>{const{t:i}=B(),s=j({initialValues:{phone:""},validate:Y(te(i))});return t.createElement(L,{heading:(null==a?void 0:a.heading)||i("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||i("onboarding.updatePhone.description")},t.createElement(k,{form:s},t.createElement("form",{onSubmit:s.onSubmit((o=>e(void 0,void 0,void 0,(function*(){n(o.phone)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["phone"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},i("onboarding.button.continue")),r&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},i("onboarding.button.skip")))))},le=n=>{var{onClose:r,onSubmit:a,canSkip:i=!0,customFormTexts:s,customTerms:l,defaultValues:d}=n,m=o(n,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues"]);const{t:c}=B(),{isMobile:p}=w(),u=j({initialValues:Object.assign({phone:"",term:!1},d),validate:Y(ne(c))});return t.createElement(L,Object.assign({heading:(null==s?void 0:s.heading)||c("onboarding.updatePhone.heading"),description:(null==s?void 0:s.description)||c("onboarding.updatePhone.description"),hiddenLogo:p},m),t.createElement(k,{form:u},t.createElement("form",{onSubmit:u.onSubmit((o=>e(void 0,void 0,void 0,(function*(){a(o)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["full_name","email","phone","address","term"],withSimilac:!0,customTerms:l}),t.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),i&&t.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},c("onboarding.button.skip")))))},de=e=>{var{withSimilac:n=!1}=e,r=o(e,["withSimilac"]);return n?t.createElement(le,Object.assign({},r)):t.createElement(se,Object.assign({},r))},me=({onSubmit:o,phone:l,email:d,onResendCode:m,otpError:c,onClose:b,loading:f,onBack:h,canSkip:E,outOfEdit:v})=>{const{siteType:y,isMarryBaby:w}=n(C),[S,P]=r(30),O=p((()=>P((e=>e-1))),1e3),[M,x]=u(0,{min:0,max:3}),z=a(!0),{t:T}=B();i((()=>(O.start(),O.stop)),[]),i((()=>{0===S&&(O.stop(),z.current=!1)}),[S]);const F=j({initialValues:{otp:""},validate:Y(re(T))});i((()=>{c&&F.setFieldError("otp",c)}),[c]);const I=s((()=>Q((()=>{z.current||(x.increment(),P(30),null==m||m(l||d),O.start(),z.current=!0)}),1e3,{trailing:!1})),[l,d,m,O]);return t.createElement(q,{heading:T("onboarding.otpForm.heading"),description:t.createElement(t.Fragment,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:l?T("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${l.slice(0,-3).replace(/./g,"x").concat(l.slice(-3))}</b>`}):T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${K(d)}</b>`})}}),!v&&t.createElement("svg",{onClick:()=>{null==h||h()},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},t.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},t.createElement(k,{form:F},t.createElement("form",{onSubmit:F.onSubmit((t=>e(void 0,void 0,void 0,(function*(){x.increment(),o(t.otp)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["otp"]}),t.createElement("div",{className:"resend"},t.createElement(X,{size:"p4",color:N.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),t.createElement(X,{as:"a",size:"p4",color:w?N.mbColors.pink:N.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:S}))),t.createElement(g,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:f,disabled:f,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),E&&M>=3&&t.createElement(g,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:b,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none",type:"button"},T("onboarding.button.skip")))))},ce=({onClose:e,onSubmit:o,canSkip:r,loading:a,errorMessage:s,initialData:l})=>{const{t:d,locale:m}=B(),{siteType:c,isMarryBaby:p}=n(C),u=j({validate:Y(ae(d))});return i((()=>{u.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),i((()=>{s&&u.setFieldError("email",s)}),[s]),t.createElement(x,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":z[m].SITE_NAME_FORMATTED})},t.createElement(k,{form:u},t.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>{o(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")}))}),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},d("onboarding.button.continue")),r&&t.createElement(g,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e},d("onboarding.button.skip")))))},pe=({onClose:e,onSubmit:o,canSkip:n,errorMessage:r,loading:a})=>{const{t:i}=B(),s=j({initialValues:{password:"",confirmPassword:""},validate:Y(ie(i))});return t.createElement(x,{heading:i("onboarding.updatePassword.heading"),description:i("onboarding.updatePassword.description")},t.createElement(k,{form:s},t.createElement("form",{className:"form",onSubmit:s.onSubmit((e=>o((null==e?void 0:e.password)||"")),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["password","confirm_password"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:a,disabled:a},i("onboarding.button.continue")),n&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:e},i("onboarding.button.skip")),r&&t.createElement(d.Error,{className:"form-error"},r))))},ue=n=>{var{banner:a,canSkip:i,createPassError:s,createPassLoading:d,customFormTexts:p,emailLoading:f,flow:h=[T.Phone,T.OTP],initialData:E,onClose:v,onCreatePassByEmail:y,onOtpSubmit:S,onPersonalInfoSubmit:P,onPhoneSubmit:j,onResendCode:k,otpError:O,otpLoading:M,personalInfoError:z,resultScreenProps:I,siteType:L,step:q,withSimilac:Y=!1,similacFormProps:H}=n,$=o(n,["banner","canSkip","createPassError","createPassLoading","customFormTexts","emailLoading","flow","initialData","onClose","onCreatePassByEmail","onOtpSubmit","onPersonalInfoSubmit","onPhoneSubmit","onResendCode","otpError","otpLoading","personalInfoError","resultScreenProps","siteType","step","withSimilac","similacFormProps"]);const{t:G}=B(),[Z,K]=r(q||h[0]),[J,Q]=r(""),[X,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=h.indexOf(Z)+1;e<=h.length-1&&K(h[e])}),[Z]),ae=l((()=>{const e=h.indexOf(Z)-1;e>=0&&K(h[e])}),[Z]),ie=o=>e(void 0,void 0,void 0,(function*(){try{!(yield S(o))&&re()}catch(e){console.error(e)}})),se=()=>{oe>=2||(te.increment(),ae())},ue="marryBaby"===L;return t.createElement(C.Provider,{value:{siteType:L,isMarryBaby:ue}},t.createElement(A,Object.assign({},$),h.length>0?t.createElement(V,null,t.createElement(m,{sx:{[F.mbDown]:{margin:0},".mantine-Grid-col":{[F.mbDown]:{padding:0}}}},t.createElement(m.Col,{span:"object"!=typeof a&&!Y||ne?12:6,order:Y?2:1,orderMd:Y?1:2,sx:{zIndex:Y?99:void 0}},t.createElement(D,{"data-similac":Y,"data-has-banner":"object"==typeof a},Z===T.Phone&&(Y?t.createElement(le,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){var e;try{const t=null==o?void 0:o.phone;t&&(Q(t),yield Promise.all([null===(e=null==H?void 0:H.onFormSubmit)||void 0===e?void 0:e.call(H,o),null==j?void 0:j(t)])),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding,defaultValues:null==H?void 0:H.defaultValues,customTerms:null==H?void 0:H.customTerms}):t.createElement(de,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{Q(o),yield null==j?void 0:j(o),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding})),Z===T.OTP&&t.createElement(me,{onClose:v,onSubmit:ie,phone:J,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2}),Z===T.OTPEmail&&t.createElement(me,{onClose:v,onSubmit:ie,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2,email:X}),Z===T.PersonalInfo&&t.createElement(ce,{initialData:null==E?void 0:E[T.PersonalInfo],onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{ee((null==o?void 0:o.email)||"");!(yield null==P?void 0:P(o))&&re()}catch(e){console.error(e)}})),errorMessage:z,loading:f}),Z===T.UpdatePassword&&t.createElement(pe,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{yield null==y?void 0:y(o),!s&&re()}catch(e){console.error(e)}})),errorMessage:s,loading:d}),Z===T.Result&&t.createElement(x,Object.assign({},I),t.createElement(g,{theme:L,size:"lg",onClick:v,className:"form-button"},G("onboarding.button.continue"))))),"object"==typeof a&&!Y&&t.createElement(m.Col,{span:"object"!=typeof a&&!Y||ne?12:6,order:Y?2:1,orderMd:Y?1:2},t.createElement(_,null,t.createElement(U,{"data-is-marry-baby":ue},t.createElement(R,null,(null==a?void 0:a.heading)&&t.createElement(c,{order:1,mb:24},null==a?void 0:a.heading),(null==a?void 0:a.description)&&t.createElement(b,{size:"p1",color:N.colors.gray800},G("onboarding.welcomeScreen.content"))),(null==a?void 0:a.imgSrc)&&t.createElement("div",null,t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy"}))))),"object"==typeof a&&Y&&(null==a?void 0:a.imgSrc)&&t.createElement(m.Col,{span:"auto",order:Y?1:2,orderMd:Y?2:1},t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy",className:"similac"})))):"Incorrect flow"))};export{de as OnboardingForm,ue as OnboardingModal,me as OtpForm};
@@ -1,8 +1,8 @@
1
- import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-d08165e3.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Stack as E,AspectRatio as f}from"@mantine/core";import{useInterval as L,useCounter as v}from"@mantine/hooks";import"./gAssets.js";import{D as C}from"./index-fe084586.js";import{Q as y,aU as x,Z as w,aV as S,aW as M,aX as j,H as P,N as k,L as O,X as F}from"./utils-f67c3f9d.js";import"dayjs";import"./screenSizeContext-945a7fb3.js";import B from"styled-components";import{t as N}from"./theme-564d419e.js";import{L as z}from"./index-d6812980.js";import{M as I,a as T}from"./utils-ef8978d1.js";import"./isProduction-781d684d.js";import{L as D}from"./Onboarding-c3fc4ab8.js";import{u as Z}from"./useTranslations-f1158e9d.js";import"./index-33d0e9d1.js";import{A}from"./index-7b84a799.js";import"lodash/debounce";import{V}from"./Visible-928f1be4.js";import{createFormContext as _,yupResolver as H}from"@mantine/form";import"./index-d0d8cff2.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-3c5d351e.js";import{b as Y}from"./index-c53d8dfb.js";import W from"lodash/throttle";import{T as R}from"./index-c4055697.js";import{format as G}from"date-fns";import"./translationsContext-5de9abe5.js";import"string-format";import K from"react-keyed-flatten-children";import"date-fns/locale";import"./useUniqueId-e26430a1.js";import"@mantine/carousel";import"./cookieHelper-92669e3a.js";import"slugify";import"./index-4daa1d8d.js";import"./utils-b021396d.js";const X=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[Q,J,ee]=_(),te=B(p)`
1
+ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-ca4c7924.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Stack as E,AspectRatio as f}from"@mantine/core";import{useInterval as L,useCounter as v}from"@mantine/hooks";import"./gAssets.js";import{D as C}from"./index-ba4bde77.js";import{O as y,aT as x,Y as w,aU as S,aV as M,aW as j,H as P,K as k,L as O,W as F}from"./utils-a9bb3a5c.js";import"dayjs";import"./screenSizeContext-491c78ad.js";import B from"styled-components";import{t as z}from"./theme-484b917f.js";import{L as N}from"./index-72a93e65.js";import{M as T,a as I}from"./utils-10c2f620.js";import"./isProduction-ac82d29d.js";import{L as D}from"./Onboarding-d141e0b5.js";import{u as Z}from"./useTranslations-fa0feb0e.js";import"./index-5cfdaa22.js";import{A}from"./index-8ff39caf.js";import"lodash/debounce";import{V}from"./Visible-186cf596.js";import{createFormContext as _,yupResolver as H}from"@mantine/form";import"./index-08f0cf74.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-f9fb7108.js";import{b as Y}from"./index-4d5ae1fa.js";import W from"lodash/throttle";import{T as R}from"./index-30e03a57.js";import{format as G}from"date-fns";import"./translationsContext-1959ec3c.js";import"string-format";import K from"react-keyed-flatten-children";import"date-fns/locale";import"./useUniqueId-7ea33e1d.js";import"@mantine/carousel";import"./cookieHelper-d2f45634.js";import"slugify";import"./index-22d6fc10.js";import"./utils-3b0f0e5d.js";const J=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[Q,X,ee]=_(),te=B(p)`
2
2
  .phone-input {
3
3
  width: 100%;
4
4
  margin-bottom: 32px;
5
- ${I.mbDown} {
5
+ ${T.mbDown} {
6
6
  margin-bottom: 16px;
7
7
  }
8
8
  .PhoneInput {
@@ -15,7 +15,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
15
15
  border-radius: 0 4px 4px 0;
16
16
  }
17
17
  }
18
- `,ne={[D.Vietnam]:"VN",[D.Cambodia]:"KH",[D.Indonesia]:"ID",[D.Malaysia]:"MY",[D.PhilippinesEnglish]:"PH",[D.PhilippinesTagalog]:"PH",[D.Taiwan]:"TW",[D.Thailand]:"TH",[D.Myanmar]:"MM"},re=(e="")=>{const t=e.indexOf("@"),n=e.substring(0,t),r=n.length>3?3:n.length;return e.replace(e.substring(r,t),e.slice(r,t).replace(/./g,"x"))},oe=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=d(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=Z(),s=a||J(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=d(t,["label","name"]);return e.createElement(u.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(x,Object.assign({defaultCountry:ne[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(u.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=d(t,["label","name"]);return e.createElement(w,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=d(t,["label","name"]);return e.createElement(w,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=d(t,["label","name"]);return e.createElement(C,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=d(t,["label","name"]);return e.createElement(S.Group,Object.assign({className:"radio-group",label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("bmi.selectGender"))},s.getInputProps(r),o),e.createElement(S,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(S,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(M,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(u.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(w.Password,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(V,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(w.Password,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(V,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(j,Object.assign({label:e.createElement(y,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(u.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=d(t,["label","className","name"]);return e.createElement(A,Object.assign({className:`${r} input-control`,label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},c=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(te,Object.assign({},i),c)},ae=e=>q.object().shape({phone:q.string().required(e("onboarding.updatePhone.error")).default(""),name:q.string().required(e("onboarding.errorMessage.requiredName")),email:q.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:q.mixed().required(e("onboarding.similac.address.error")),term:q.bool().oneOf([!0],e("onboarding.similac.term.error"))});var ie=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:u,customFormTexts:g}=t,b=d(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:h,setSharedData:E,sharedData:f}=r(X),{t:L}=Z(),v=ee({initialValues:{term:!1,phone:(null==f?void 0:f.phone)||(null==s?void 0:s.phone)||"",email:(null==f?void 0:f.email)||(null==s?void 0:s.email)||"",name:(null==f?void 0:f.name)||(null==s?void 0:s.name)||""},validate:l||H(ae(L))}),C=e=>c(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),E((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),h()}catch(e){console.error(e)}})),x=e=>{console.log(e)},w=()=>{var e;return null===(e=v.onSubmit(C,x))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:w}))),e.createElement(p,Object.assign({"data-active":m},b),e.createElement(p,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(p,{sx:{textAlign:"center"}},e.createElement(P,{tag:"h4",as:"h2"},null==g?void 0:g.heading),e.createElement(y,{size:"p3"},null==g?void 0:g.description)),e.createElement(Q,{form:v},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:v.onSubmit(C,x)},e.createElement(p,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(oe,{inputOrder:a,customTerms:u,className:"friso-form"}))))))}));const le=B.div`
18
+ `,ne={[D.Vietnam]:"VN",[D.Cambodia]:"KH",[D.Indonesia]:"ID",[D.Malaysia]:"MY",[D.PhilippinesEnglish]:"PH",[D.PhilippinesTagalog]:"PH",[D.Taiwan]:"TW",[D.Thailand]:"TH",[D.Myanmar]:"MM"},re=(e="")=>{const t=e.indexOf("@"),n=e.substring(0,t),r=n.length>3?3:n.length;return e.replace(e.substring(r,t),e.slice(r,t).replace(/./g,"x"))},oe=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=d(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=Z(),s=a||X(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=d(t,["label","name"]);return e.createElement(u.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(x,Object.assign({defaultCountry:ne[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(u.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=d(t,["label","name"]);return e.createElement(w,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=d(t,["label","name"]);return e.createElement(w,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=d(t,["label","name"]);return e.createElement(C,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=d(t,["label","name"]);return e.createElement(S.Group,Object.assign({className:"radio-group",label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("bmi.selectGender"))},s.getInputProps(r),o),e.createElement(S,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(S,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(M,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(u.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(w.Password,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(V,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(w.Password,Object.assign({label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(V,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(j,Object.assign({label:e.createElement(y,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(u.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=d(t,["label","className","name"]);return e.createElement(A,Object.assign({className:`${r} input-control`,label:e.createElement(y,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},c=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(te,Object.assign({},i),c)},ae=e=>q.object().shape({phone:q.string().required(e("onboarding.updatePhone.error")).default(""),name:q.string().required(e("onboarding.errorMessage.requiredName")),email:q.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:q.mixed().required(e("onboarding.similac.address.error")),term:q.bool().oneOf([!0],e("onboarding.similac.term.error"))});var ie=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:u,customFormTexts:g}=t,b=d(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:h,setSharedData:E,sharedData:f}=r(J),{t:L}=Z(),v=ee({initialValues:{term:!1,phone:(null==f?void 0:f.phone)||(null==s?void 0:s.phone)||"",email:(null==f?void 0:f.email)||(null==s?void 0:s.email)||"",name:(null==f?void 0:f.name)||(null==s?void 0:s.name)||""},validate:l||H(ae(L))}),C=e=>c(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),E((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),h()}catch(e){console.error(e)}})),x=e=>{console.log(e)},w=()=>{var e;return null===(e=v.onSubmit(C,x))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:w}))),e.createElement(p,Object.assign({"data-active":m},b),e.createElement(p,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(p,{sx:{textAlign:"center"}},e.createElement(P,{tag:"h4",as:"h2"},null==g?void 0:g.heading),e.createElement(y,{size:"p3"},null==g?void 0:g.description)),e.createElement(Q,{form:v},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:v.onSubmit(C,x)},e.createElement(p,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(oe,{inputOrder:a,customTerms:u,className:"friso-form"}))))))}));const le=B.div`
19
19
  position: fixed;
20
20
  inset: 0;
21
21
  z-index: 1000;
@@ -23,18 +23,18 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
23
23
  overflow-y: auto;
24
24
  `,se=B.div`
25
25
  height: 100%;
26
- ${I.lgPcUp} {
26
+ ${T.lgPcUp} {
27
27
  display: table;
28
28
  width: 100%;
29
29
  height: calc(100% - 25px);
30
30
  }
31
31
  `,me=B.div`
32
32
  padding: 16px;
33
- ${I.mbUp} {
33
+ ${T.mbUp} {
34
34
  padding: 48px 24px 24px;
35
35
  }
36
36
  &[data-similac='true'][data-has-banner='true'] {
37
- ${I.mbDown} {
37
+ ${T.mbDown} {
38
38
  background: white;
39
39
  border-top-left-radius: 1rem;
40
40
  border-top-right-radius: 1rem;
@@ -46,12 +46,12 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
46
46
  padding: 16px 16px 0 16px;
47
47
  display: none;
48
48
 
49
- ${I.mbUp} {
49
+ ${T.mbUp} {
50
50
  width: 640px;
51
51
  display: table-cell;
52
52
  }
53
53
  `,ce=B.div`
54
- background-color: ${N.colors.primary50};
54
+ background-color: ${z.colors.primary50};
55
55
  border-radius: 12px;
56
56
  height: 100%;
57
57
  display: flex;
@@ -59,7 +59,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
59
59
  justify-content: space-between;
60
60
 
61
61
  &[data-is-marry-baby='true'] {
62
- background-color: ${N.mbColors.tonePink};
62
+ background-color: ${z.mbColors.tonePink};
63
63
  }
64
64
  `,pe=B.div`
65
65
  margin-top: 40px;
@@ -79,7 +79,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
79
79
  object-fit: contain;
80
80
  }
81
81
 
82
- ${I.mbUp} {
82
+ ${T.mbUp} {
83
83
  position: sticky;
84
84
  top: 0;
85
85
  height: 100vh;
@@ -89,7 +89,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
89
89
  .phone-input {
90
90
  width: 100%;
91
91
  margin-bottom: 32px;
92
- ${I.mbDown} {
92
+ ${T.mbDown} {
93
93
  margin-bottom: 16px;
94
94
  }
95
95
  .PhoneInput {
@@ -108,7 +108,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
108
108
  `,be=e=>q.object().shape({phone:q.string().required(e("onboarding.updatePhone.error")).default("")}),he=B(Y)`
109
109
  .otp-input {
110
110
  margin-bottom: 36px;
111
- ${I.mbDown} {
111
+ ${T.mbDown} {
112
112
  margin-bottom: 20px;
113
113
  }
114
114
  .otpContainer {
@@ -119,7 +119,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
119
119
  display: flex;
120
120
  gap: 6px;
121
121
  margin-bottom: 32px;
122
- ${I.mbDown} {
122
+ ${T.mbDown} {
123
123
  margin-bottom: 16px;
124
124
  }
125
125
  a {
@@ -159,7 +159,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
159
159
  .header {
160
160
  margin-bottom: 32px;
161
161
  text-align: center;
162
- ${I.mbDown} {
162
+ ${T.mbDown} {
163
163
  margin-bottom: 16px;
164
164
  }
165
165
  }
@@ -190,11 +190,11 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
190
190
  }
191
191
  `,Ce=B.img`
192
192
  margin-bottom: 38px;
193
- `,ye=t=>{var n,{heading:o,description:a,children:i,className:l,imgSrc:s,hiddenLogo:m=!1}=t,c=d(t,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:p,siteType:u}=r(X);return e.createElement(ve,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(O,{type:p?u:(null===(n=z[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(Le,{className:m?"similac":""},s&&e.createElement(Ce,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(b,{order:3},o),e.createElement(y,{size:"p3",mt:8,color:N.colors.gray600},a)),i))},xe=B(Y)`
193
+ `,ye=t=>{var n,{heading:o,description:a,children:i,className:l,imgSrc:s,hiddenLogo:m=!1}=t,c=d(t,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:p,siteType:u}=r(J);return e.createElement(ve,Object.assign({},c,{className:`hhg-comp-onboarding-container ${l}`,size:"sm"}),!m&&e.createElement(O,{type:p?u:(null===(n=N[process.env.UNIFY_LOCALE])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"}),e.createElement(Le,{className:m?"similac":""},s&&e.createElement(Ce,{src:s,loading:"lazy"}),e.createElement("div",{className:"header"},e.createElement(b,{order:3},o),e.createElement(y,{size:"p3",mt:8,color:z.colors.gray600},a)),i))},xe=B(Y)`
194
194
  .phone-input {
195
195
  width: 100%;
196
196
  margin-bottom: 32px;
197
- ${I.mbDown} {
197
+ ${T.mbDown} {
198
198
  margin-bottom: 16px;
199
199
  }
200
200
  .PhoneInput {
@@ -214,7 +214,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
214
214
  .phone-input {
215
215
  width: 100%;
216
216
  margin-bottom: 32px;
217
- ${I.mbDown} {
217
+ ${T.mbDown} {
218
218
  margin-bottom: 16px;
219
219
  }
220
220
  .PhoneInput {
@@ -230,4 +230,4 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
230
230
  &:not([data-active='true']) {
231
231
  display: none !important;
232
232
  }
233
- `,Me=e=>q.object().shape({password:q.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:q.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([q.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),je={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(X.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=d(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=k(),{isMarryBaby:m}=r(X),{t:c}=Z();if(i&&"undefined"==typeof window)return null;const p=e.createElement(le,Object.assign({},l),e.createElement(se,null,e.createElement(g,{sx:{[I.mbDown]:{margin:0},".mantine-Grid-col":{[I.mbDown]:{padding:0}}}},e.createElement(g.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(me,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(g.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(de,null,e.createElement(ce,{"data-is-marry-baby":m},e.createElement(pe,null,a.heading&&e.createElement(b,{order:1,mb:24},a.heading),a.description&&e.createElement(y,{size:"p1",color:N.colors.gray800},c("onboarding.welcomeScreen.content"))),e.createElement(ue,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(g.Col,{span:"auto",order:1,orderMd:2},e.createElement(ue,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?$(p,T()):p},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i})=>{const{t:l}=Z(),{sharedData:s,setSharedData:m,nextStep:d}=r(X),p=ee({initialValues:{phone:(null==s?void 0:s.phone)||""},validate:H(be(l))});return e.createElement(ge,{heading:(null==a?void 0:a.heading)||l("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||l("onboarding.updatePhone.description"),"data-active":i},e.createElement(Q,{form:p},e.createElement("form",{onSubmit:p.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{m((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),d()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["phone"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},l("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{email:g,retryEmailCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:C,nextStep:y}=r(X),x=n||g||"",[w,S]=a(30),M=L((()=>S((e=>e-1))),1e3),[j,P]=v(0,{min:0,max:3}),k=i(!0),{t:O}=Z();l((()=>(M.start(),M.stop)),[]),l((()=>{0===w&&(M.stop(),k.current=!1)}),[w]);const F=ee({initialValues:{otp:""},validate:H(Ee(O))});l((()=>{m&&F.setFieldError("otp",m)}),[m]);const B=s((()=>W((()=>{k.current||(P.increment(),S(30),null==o||o(x),M.start(),k.current=!0)}),1e3,{trailing:!1})),[x,o,M]),z=b>=2;return e.createElement(he,{heading:O("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:O("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${re(x)}</b>`})}}),!z&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:F},e.createElement("form",{onSubmit:F.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{P.increment();!(yield null==t?void 0:t(e.otp))&&y()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(R,{size:"p4",color:N.colors.gray400},O("onboarding.otpForm.notReceiveOTP")),e.createElement(R,{as:"a",size:"p4",color:C?N.mbColors.pink:N.colors.primaryBase,onClick:B},O("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},O("onboarding.button.continue")),u&&j>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},O("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{phone:g,retryPhoneCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:C,nextStep:y}=r(X),x=n||g||"",[w,S]=a(30),M=L((()=>S((e=>e-1))),1e3),[j,P]=v(0,{min:0,max:3}),k=i(!0),{t:O}=Z();l((()=>(M.start(),M.stop)),[]),l((()=>{0===w&&(M.stop(),k.current=!1)}),[w]);const F=ee({initialValues:{otp:""},validate:H(Ee(O))});l((()=>{m&&F.setFieldError("otp",m)}),[m]);const B=s((()=>W((()=>{k.current||(P.increment(),S(30),null==o||o(x),M.start(),k.current=!0)}),1e3,{trailing:!1})),[x,o,M]),z=b>=2;return e.createElement(he,{heading:O("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:O("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}</b>`})}}),!z&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:F},e.createElement("form",{onSubmit:F.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{P.increment();!(yield null==t?void 0:t(e.otp))&&y()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(R,{size:"p4",color:N.colors.gray400},O("onboarding.otpForm.notReceiveOTP")),e.createElement(R,{as:"a",size:"p4",color:C?N.mbColors.pink:N.colors.primaryBase,onClick:B},O("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},O("onboarding.button.continue")),u&&j>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},O("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=Z(),{siteType:p,isMarryBaby:u,setSharedData:g,nextStep:b}=r(X),h=ee({validate:H(fe(m))});return l((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&h.setFieldError("email",i)}),[i]),e.createElement(ye,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:u?"Marry Baby":z[d].SITE_NAME_FORMATTED})},e.createElement(Q,{form:h},e.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>c(void 0,void 0,void 0,(function*(){g((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&G(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:p,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(U,{theme:p,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=d(t,["onClose"]);const{t:a}=Z(),{siteType:i}=r(X);return e.createElement(ye,Object.assign({},o),e.createElement(U,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,p=d(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:u}=Z(),{nextStep:g,setSharedData:b,sharedData:h}=r(X),{isMobile:E}=k(),f=ee({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==s?void 0:s.phone)||"",email:(null==h?void 0:h.email)||(null==s?void 0:s.email)||"",name:(null==h?void 0:h.name)||(null==s?void 0:s.name)||""},validate:H(we(u,!l))}),L=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(xe,Object.assign({heading:(null==i?void 0:i.heading)||u("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||u("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":m},p),e.createElement(Q,{form:f},e.createElement("form",{style:{width:"100%"},onSubmit:f.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:L,withSimilac:!0,customTerms:l}),e.createElement(F,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},u("onboarding.button.continue")),a&&e.createElement(F,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},u("onboarding.button.skip")))))},FrisoForm:ie,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=Z(),{nextStep:s}=r(X),m=ee({initialValues:{password:"",confirmPassword:""},validate:H(Me(l))});return e.createElement(ye,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(Q,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>c(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["password","confirm_password"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(u.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(X),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,K(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=d(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=Z(),{isMobile:l}=k();return e.createElement(Se,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(h,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(P,{tag:"h3"},null==r?void 0:r.title),e.createElement(y,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(F,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{oe as DynamicForm,ne as MAPPED_LOCALE,je as Onboarding,X as OnboardingContext};
233
+ `,Me=e=>q.object().shape({password:q.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:q.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([q.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),je={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(J.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=d(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=k(),{isMarryBaby:m}=r(J),{t:c}=Z();if(i&&"undefined"==typeof window)return null;const p=e.createElement(le,Object.assign({},l),e.createElement(se,null,e.createElement(g,{sx:{[T.mbDown]:{margin:0},".mantine-Grid-col":{[T.mbDown]:{padding:0}}}},e.createElement(g.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(me,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(g.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(de,null,e.createElement(ce,{"data-is-marry-baby":m},e.createElement(pe,null,a.heading&&e.createElement(b,{order:1,mb:24},a.heading),a.description&&e.createElement(y,{size:"p1",color:z.colors.gray800},c("onboarding.welcomeScreen.content"))),e.createElement(ue,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(g.Col,{span:"auto",order:1,orderMd:2},e.createElement(ue,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?$(p,I()):p},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i})=>{const{t:l}=Z(),{sharedData:s,setSharedData:m,nextStep:d}=r(J),p=ee({initialValues:{phone:(null==s?void 0:s.phone)||""},validate:H(be(l))});return e.createElement(ge,{heading:(null==a?void 0:a.heading)||l("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||l("onboarding.updatePhone.description"),"data-active":i},e.createElement(Q,{form:p},e.createElement("form",{onSubmit:p.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{m((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),d()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["phone"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},l("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{email:g,retryEmailCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:C,nextStep:y}=r(J),x=n||g||"",[w,S]=a(30),M=L((()=>S((e=>e-1))),1e3),[j,P]=v(0,{min:0,max:3}),k=i(!0),{t:O}=Z();l((()=>(M.start(),M.stop)),[]),l((()=>{0===w&&(M.stop(),k.current=!1)}),[w]);const F=ee({initialValues:{otp:""},validate:H(Ee(O))});l((()=>{m&&F.setFieldError("otp",m)}),[m]);const B=s((()=>W((()=>{k.current||(P.increment(),S(30),null==o||o(x),M.start(),k.current=!0)}),1e3,{trailing:!1})),[x,o,M]),N=b>=2;return e.createElement(he,{heading:O("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:O("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${z.colors.gray800}">${re(x)}</b>`})}}),!N&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:F},e.createElement("form",{onSubmit:F.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{P.increment();!(yield null==t?void 0:t(e.otp))&&y()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(R,{size:"p4",color:z.colors.gray400},O("onboarding.otpForm.notReceiveOTP")),e.createElement(R,{as:"a",size:"p4",color:C?z.mbColors.pink:z.colors.primaryBase,onClick:B},O("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},O("onboarding.button.continue")),u&&j>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},O("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:p,canSkip:u})=>{const{sharedData:{phone:g,retryPhoneCount:b},setSharedData:h,prevStep:E,siteType:f,isMarryBaby:C,nextStep:y}=r(J),x=n||g||"",[w,S]=a(30),M=L((()=>S((e=>e-1))),1e3),[j,P]=v(0,{min:0,max:3}),k=i(!0),{t:O}=Z();l((()=>(M.start(),M.stop)),[]),l((()=>{0===w&&(M.stop(),k.current=!1)}),[w]);const F=ee({initialValues:{otp:""},validate:H(Ee(O))});l((()=>{m&&F.setFieldError("otp",m)}),[m]);const B=s((()=>W((()=>{k.current||(P.increment(),S(30),null==o||o(x),M.start(),k.current=!0)}),1e3,{trailing:!1})),[x,o,M]),N=b>=2;return e.createElement(he,{heading:O("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:O("onboarding.otpForm.description",{phone:`<b style="color:${z.colors.gray800}">${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}</b>`})}}),!N&&e.createElement("svg",{onClick:()=>{b>=2||(h((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),E())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(Q,{form:F},e.createElement("form",{onSubmit:F.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{P.increment();!(yield null==t?void 0:t(e.otp))&&y()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(R,{size:"p4",color:z.colors.gray400},O("onboarding.otpForm.notReceiveOTP")),e.createElement(R,{as:"a",size:"p4",color:C?z.mbColors.pink:z.colors.primaryBase,onClick:B},O("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(U,{theme:f,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},O("onboarding.button.continue")),u&&j>=3&&e.createElement(U,{theme:f,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},O("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=Z(),{siteType:p,isMarryBaby:u,setSharedData:g,nextStep:b}=r(J),h=ee({validate:H(fe(m))});return l((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&h.setFieldError("email",i)}),[i]),e.createElement(ye,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:u?"Marry Baby":N[d].SITE_NAME_FORMATTED})},e.createElement(Q,{form:h},e.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>c(void 0,void 0,void 0,(function*(){g((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&G(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:p,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(U,{theme:p,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=d(t,["onClose"]);const{t:a}=Z(),{siteType:i}=r(J);return e.createElement(ye,Object.assign({},o),e.createElement(U,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,p=d(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:u}=Z(),{nextStep:g,setSharedData:b,sharedData:h}=r(J),{isMobile:E}=k(),f=ee({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==s?void 0:s.phone)||"",email:(null==h?void 0:h.email)||(null==s?void 0:s.email)||"",name:(null==h?void 0:h.name)||(null==s?void 0:s.name)||""},validate:H(we(u,!l))}),L=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(xe,Object.assign({heading:(null==i?void 0:i.heading)||u("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||u("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":m},p),e.createElement(Q,{form:f},e.createElement("form",{style:{width:"100%"},onSubmit:f.onSubmit((e=>c(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(oe,{inputOrder:L,withSimilac:!0,customTerms:l}),e.createElement(F,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},u("onboarding.button.continue")),a&&e.createElement(F,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},u("onboarding.button.skip")))))},FrisoForm:ie,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=Z(),{nextStep:s}=r(J),m=ee({initialValues:{password:"",confirmPassword:""},validate:H(Me(l))});return e.createElement(ye,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(Q,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>c(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(oe,{inputOrder:["password","confirm_password"]}),e.createElement(U,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(U,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(u.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(J),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,K(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=d(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=Z(),{isMobile:l}=k();return e.createElement(Se,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(h,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(P,{tag:"h3"},null==r?void 0:r.title),e.createElement(y,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(F,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{oe as DynamicForm,ne as MAPPED_LOCALE,je as Onboarding,J as OnboardingContext};
package/build/esm/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as o}from"./index-c4c19aa0.js";import{T as n}from"./index-c4055697.js";import{P as i}from"./index-a3e16684.js";import{u as s}from"./useTranslations-f1158e9d.js";import{t as c}from"./theme-564d419e.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as x}from"./index-33d0e9d1.js";import{a as f}from"./useOutsideClick-b21e6abb.js";import E from"styled-components";import{_ as k}from"./tslib.es6-d08165e3.js";import"./Onboarding-c3fc4ab8.js";import"./index.styled-80b1b39d.js";import"./gAssets.js";import"./index-d6812980.js";import"date-fns/locale";import"./isProduction-781d684d.js";import"./translationsContext-5de9abe5.js";import"string-format";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";const w=t=>{const{x:r,y:l,payload:a,activeWeek:o}=t;return o===a.value?e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},v=E.div`
1
+ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-b26629ef.js";import{T as n}from"./index-30e03a57.js";import{P as i}from"./index-9702a35f.js";import{u as c}from"./useTranslations-fa0feb0e.js";import{t as s}from"./theme-484b917f.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as f}from"./index-5cfdaa22.js";import{a as x}from"./useOutsideClick-47395bcc.js";import E from"styled-components";import{_ as k}from"./tslib.es6-ca4c7924.js";import"./Onboarding-d141e0b5.js";import"./index.styled-bb0e8f22.js";import"./gAssets.js";import"./index-72a93e65.js";import"date-fns/locale";import"./isProduction-ac82d29d.js";import"./translationsContext-1959ec3c.js";import"string-format";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -18,7 +18,7 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
18
18
  display: flex;
19
19
  align-items: center;
20
20
  padding: 4px 8px;
21
- background: ${c.colors.yellow600};
21
+ background: ${s.colors.yellow600};
22
22
  border-radius: 3px;
23
23
  } */
24
24
  & > * {
@@ -55,14 +55,14 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
55
55
  align-items: center;
56
56
  gap: 4px;
57
57
  }
58
- `,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var l,a,o,i,s;const{payload:m,active:d}=r,p=null===(l=null==m?void 0:m[0])||void 0===l?void 0:l.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(a=p.toolTipLabel)||void 0===a?void 0:a[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,type:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:l,activeWeek:a,t:o})=>{const n=o(`bmi.result.${l}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:l}:{})))},z=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:z})=>{const{t:L}=s(),S="marryBaby"===z,O=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:L})),[i,o,v,C,E]),[F,I]=r(!1),M=l(null);return f(M,(()=>I(!1))),e.createElement(j,null,S?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark}," ",L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")),Array.isArray(O)&&O.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:O,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:z})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>I(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(x,{ref:M,r:4}),fill:S?c.mbColors.pink:c.colors.primaryBase,stroke:S?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},L("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},L("pregnancy.week")))))},L=t=>{var{color:r}=t,l=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:l}=s(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:c.mbColors.lightPink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},l("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(L,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},l("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:c.mbColors.pink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},l("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(L,null),e.createElement(n,{size:"n1",color:c.colors.gray600},l("pwg.placeholder.weight")))))},O=E.div`
58
+ `,T=[{name:"overweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"underweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"healthy",backgroundColor:s.colors.green50,color:s.colors.green900}],B=r=>{var a,l,o,i,c;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:s.colors.gray800,type:"semiBold"},null===(c=p.toolTipLabel)||void 0===c?void 0:c[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},z=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:z})=>{const{t:L}=c(),S="marryBaby"===z,O=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:L})),[i,o,v,C,E]),[F,I]=r(!1),M=a(null);return x(M,(()=>I(!1))),e.createElement(j,null,S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark}," ",L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")),Array.isArray(O)&&O.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:O,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:s.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:z})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:s.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?s.mbColors.tonePink:s.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>I(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:M,r:4}),fill:S?s.mbColors.pink:s.colors.primaryBase,stroke:S?s.mbColors.pink:s.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},L("pregnancy.week")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("pregnancy.week")))))},L=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||s.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:a}=c(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(L,{color:s.colors.primary100}),e.createElement(n,{size:"n1",color:s.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(L,null),e.createElement(n,{size:"n1",color:s.colors.gray600},a("pwg.placeholder.weight")))))},O=E.div`
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  align-items: center;
62
62
  padding: 24px 16px;
63
63
  width: 100%;
64
64
  gap: 24px;
65
- border: 1px solid ${c.colors.neutral100};
65
+ border: 1px solid ${s.colors.neutral100};
66
66
  border-radius: 8px;
67
67
  .chart-header {
68
68
  text-align: center;
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
70
70
  > div {
71
71
  width: 100%;
72
72
  }
73
- `,F=({chartProps:t,pillCarouselProps:r,idealWeight:l,description:a,siteType:m})=>{const{t:d}=s(),p="marryBaby"===m;return e.createElement(O,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:c.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:c.colors.gray800},d("pregnancyTool.weightSuggested")),a&&a),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:l,siteType:m}),e.createElement(z,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
73
+ `,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=c(),p="marryBaby"===m;return e.createElement(O,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:s.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:s.colors.gray800},d("pregnancyTool.weightSuggested")),l&&l),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:a,siteType:m}),e.createElement(z,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
@@ -1 +1 @@
1
- import{d as e}from"./index-d6812980.js";import{i as s}from"./isProduction-781d684d.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
1
+ import{d as e}from"./index-72a93e65.js";import{i as s}from"./isProduction-ac82d29d.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
@@ -1,4 +1,4 @@
1
- import{keyframes as t}from"styled-components";import r,{createContext as i,useState as s,useEffect as a,useMemo as n}from"react";import e from"lodash/throttle";import{B as o}from"./utils-ef8978d1.js";const d=t`
1
+ import{keyframes as t}from"styled-components";import r,{createContext as i,useState as s,useEffect as a,useMemo as n}from"react";import e from"lodash/throttle";import{B as o}from"./utils-10c2f620.js";const d=t`
2
2
  from {
3
3
  transform: translate3d(0, 100%, 0);
4
4
  visibility: visible;
@@ -70,7 +70,7 @@ to {
70
70
  visibility: hidden;
71
71
  transform: translate3d(0, -100%, 0);
72
72
  }
73
- `,h=t`
73
+ `,c=t`
74
74
  from {
75
75
  opacity: 0;
76
76
  }
@@ -78,4 +78,4 @@ to {
78
78
  to {
79
79
  opacity: 1;
80
80
  }
81
- `,c=i({isInit:!0}),w=t=>{const r=(t=>"number"==typeof t?t:"undefined"!=typeof window&&window.innerWidth||0)(t);return{smallMobile:r<o.BREAK_POINT_SMALL_MOBILE,mobile:r>=o.BREAK_POINT_SMALL_MOBILE&&r<o.BREAK_POINT_MOBILE,tablet:r>=o.BREAK_POINT_MOBILE&&r<o.BREAK_POINT_TABLET,pc:r>=o.BREAK_POINT_TABLET&&r<o.BREAK_POINT_PC,xl:r>=o.BREAK_POINT_PC}},B=({children:t})=>{const[i,o]=s((()=>({isInit:!0})));a((()=>{const t=e((()=>{o({width:window.innerWidth,height:window.innerHeight,isInit:!1})}),200);return window.addEventListener("resize",t,{passive:!0}),()=>{window.removeEventListener("resize",t)}}),[]);const d=n((()=>w(i.width)),[i.width]);return r.createElement(c.Provider,{value:Object.assign(Object.assign({},i),{sizeGroups:d})},t)};export{c as S,l as a,m as b,f as c,E as d,b as e,v as f,_ as g,h,w as i,B as j,d as s};
81
+ `,h=i({isInit:!0}),w=t=>{const r=(t=>"number"==typeof t?t:"undefined"!=typeof window&&window.innerWidth||0)(t);return{smallMobile:r<o.BREAK_POINT_SMALL_MOBILE,mobile:r>=o.BREAK_POINT_SMALL_MOBILE&&r<o.BREAK_POINT_MOBILE,tablet:r>=o.BREAK_POINT_MOBILE&&r<o.BREAK_POINT_TABLET,pc:r>=o.BREAK_POINT_TABLET&&r<o.BREAK_POINT_PC,xl:r>=o.BREAK_POINT_PC}},B=({children:t})=>{const[i,o]=s((()=>({isInit:!0})));a((()=>{const t=e((()=>{o({width:window.innerWidth,height:window.innerHeight,isInit:!1})}),200);return window.addEventListener("resize",t,{passive:!0}),()=>{window.removeEventListener("resize",t)}}),[]);const d=n((()=>w(i.width)),[i.width]);return r.createElement(h.Provider,{value:Object.assign(Object.assign({},i),{sizeGroups:d})},t)};export{h as S,l as a,m as b,f as c,E as d,b as e,v as f,_ as g,c as h,w as i,B as j,d as s};
@@ -1 +1 @@
1
- export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-d4d5fba3.js";export{U as UserAvatar}from"./index.styled-e3b8494a.js";export{d as TogetherDataTransforms}from"./dataTransform-063edca8.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-f67c3f9d.js";import"./tslib.es6-d08165e3.js";import"react";import"@mantine/core";import"./index-fd754174.js";import"styled-components";import"./utils-ef8978d1.js";import"./index-99278725.js";import"./gAssets.js";import"./index-d6812980.js";import"date-fns/locale";import"./Onboarding-c3fc4ab8.js";import"./isProduction-781d684d.js";import"./index-33d0e9d1.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-c4055697.js";import"./index-3c5d351e.js";import"./index-88d397e2.js";import"./index-d0d8cff2.js";import"dayjs";import"./screenSizeContext-945a7fb3.js";import"lodash/throttle";import"./theme-564d419e.js";import"@mantine/dates";import"./translationsContext-5de9abe5.js";import"string-format";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-e94df8d8.js";import"./useTranslations-f1158e9d.js";import"./index-c4c19aa0.js";import"date-fns";import"./index-eaf2c5f5.js";import"lodash/debounce";import"./types-6ee81f89.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-1505c7e9.js";import"./paths-006a7640.js";import"./constants-22b7c734.js";import"react-contenteditable";import"./cookieHelper-92669e3a.js";import"react-dom";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-80b1b39d.js";import"uuid";import"./utils-b021396d.js";import"dayjs/plugin/relativeTime";import"./index-abdf05e9.js";import"./useUniqueId-e26430a1.js";import"./routing-8356ee03.js";import"react-keyed-flatten-children";import"slugify";
1
+ export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-3618dc5f.js";export{U as UserAvatar}from"./index.styled-4cfbee8b.js";export{d as TogetherDataTransforms}from"./dataTransform-97e4d293.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-a9bb3a5c.js";import"./tslib.es6-ca4c7924.js";import"react";import"@mantine/core";import"./index-2ff653b5.js";import"styled-components";import"./utils-10c2f620.js";import"./index-7d937042.js";import"./gAssets.js";import"./index-72a93e65.js";import"date-fns/locale";import"./Onboarding-d141e0b5.js";import"./isProduction-ac82d29d.js";import"./index-5cfdaa22.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-30e03a57.js";import"./index-f9fb7108.js";import"./index-f93a4f7a.js";import"./index-08f0cf74.js";import"dayjs";import"./screenSizeContext-491c78ad.js";import"lodash/throttle";import"./theme-484b917f.js";import"@mantine/dates";import"./translationsContext-1959ec3c.js";import"string-format";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-2222b966.js";import"./useTranslations-fa0feb0e.js";import"./index-b26629ef.js";import"date-fns";import"./index-809f539e.js";import"lodash/debounce";import"./types-8a77a66e.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-5c0bcbff.js";import"./paths-519731fc.js";import"./constants-36caa50f.js";import"react-contenteditable";import"./cookieHelper-d2f45634.js";import"react-dom";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-bb0e8f22.js";import"uuid";import"./utils-3b0f0e5d.js";import"dayjs/plugin/relativeTime";import"./index-c5489dc0.js";import"./useUniqueId-7ea33e1d.js";import"./routing-a5352b40.js";import"react-keyed-flatten-children";import"slugify";