@hhgtech/hhg-components 1.28.46 → 1.28.47

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 (273) hide show
  1. package/README.md +0 -5
  2. package/build/babyGrowth.js +2 -2
  3. package/build/cache.js +1 -1
  4. package/build/care.js +1 -1
  5. package/build/components.js +1 -1
  6. package/build/{constants-28db3174.js → constants-0b9aa2f4.js} +1 -1
  7. package/build/{constants-627c575a.js → constants-ded45618.js} +1 -1
  8. package/build/constants.js +1 -1
  9. package/build/{core-19b328be.js → core-d774c80a.js} +1 -1
  10. package/build/{dataTransform-308ec1d0.js → dataTransform-770a8af7.js} +1 -1
  11. package/build/ecom.js +1 -1
  12. package/build/esm/babyGrowth.js +2 -2
  13. package/build/esm/cache.js +1 -1
  14. package/build/esm/care.js +1 -1
  15. package/build/esm/components.js +1 -1
  16. package/build/esm/{constants-e35c5696.js → constants-7f54318a.js} +1 -1
  17. package/build/esm/{constants-414e0341.js → constants-d7c4fed6.js} +1 -1
  18. package/build/esm/constants.js +1 -1
  19. package/build/esm/{core-091d7f79.js → core-539e7939.js} +1 -1
  20. package/build/esm/{dataTransform-6f1823e1.js → dataTransform-82022f0b.js} +1 -1
  21. package/build/esm/ecom.js +1 -1
  22. package/build/esm/footer.js +1 -1
  23. package/build/esm/gAssets.js +1 -1
  24. package/build/esm/{getDynamicHealthTool-37333454.js → getDynamicHealthTool-4d3d11ac.js} +1 -1
  25. package/build/esm/{getSocialList-a6c965a8.js → getSocialList-1766c602.js} +1 -1
  26. package/build/esm/hooks.js +1 -1
  27. package/build/esm/i18n.js +1 -1
  28. package/build/esm/i18nV2.js +1 -1
  29. package/build/esm/{index-d18cfff8.js → index-0fd0a8fb.js} +1 -1
  30. package/build/esm/{index-1bf1317e.js → index-156081e2.js} +1 -1
  31. package/build/esm/{index-92506b05.js → index-1d068cf5.js} +1 -1
  32. package/build/esm/{index-49c2a65e.js → index-1fce73b8.js} +1 -1
  33. package/build/esm/{index-865973f4.js → index-2f6fbc5e.js} +1 -1
  34. package/build/esm/{index-7b8714ba.js → index-30ecb1e3.js} +1 -1
  35. package/build/esm/{index-3e89f917.js → index-5581ff57.js} +1 -1
  36. package/build/esm/{index-f21deeb6.js → index-679dd359.js} +1 -1
  37. package/build/esm/{index-34cf1092.js → index-72664e72.js} +1 -1
  38. package/build/esm/index-7b4c9ffd.js +1 -0
  39. package/build/esm/{index-cb13973d.js → index-8e3a85f0.js} +1 -1
  40. package/build/esm/{index-9e5a2805.js → index-924d8b45.js} +1 -1
  41. package/build/esm/index-98f238b2.js +1 -0
  42. package/build/esm/{index-3d2b9817.js → index-9b020630.js} +1 -1
  43. package/build/esm/{index-cc5ea46f.js → index-ac89ac70.js} +1 -1
  44. package/build/esm/{index-fd0e0617.js → index-b51813fe.js} +1 -1
  45. package/build/esm/{index-a0bcdf6a.js → index-bd5220da.js} +1 -1
  46. package/build/esm/{index-bb8dc02f.js → index-c51596b2.js} +1 -1
  47. package/build/esm/{index-d6dac1a0.js → index-cff19603.js} +1 -1
  48. package/build/esm/{index-5cacbac8.js → index-d53f330a.js} +1 -1
  49. package/build/esm/{index-4786b57c.js → index-f09be292.js} +1 -1
  50. package/build/esm/index-f5ac3469.js +1 -0
  51. package/build/esm/{index-bcca5543.js → index-fcb7c05d.js} +1 -1
  52. package/build/esm/index.js +1 -1
  53. package/build/esm/{index.styled-b876c90a.js → index.styled-222b6ef8.js} +3 -3
  54. package/build/esm/{index.styles-00233f7a.js → index.styles-f450b969.js} +1 -1
  55. package/build/esm/lead.js +1 -1
  56. package/build/esm/mantine.js +1 -1
  57. package/build/esm/misc.js +1 -1
  58. package/build/esm/navigation.js +1 -1
  59. package/build/esm/onboardingV2.js +1 -1
  60. package/build/esm/pwg.js +3 -3
  61. package/build/esm/{routing-5b211351.js → routing-fa27835c.js} +1 -1
  62. package/build/esm/subot.js +1 -1
  63. package/build/esm/together.js +1 -1
  64. package/build/esm/{types-242705e6.js → types-1779ff39.js} +1 -1
  65. package/build/esm/{types-21b8927e.js → types-de0e0789.js} +1 -1
  66. package/build/esm/types.js +1 -1
  67. package/build/esm/{useCategory-2e217da0.js → useCategory-dc56ef34.js} +1 -1
  68. package/build/esm/useHealthToolCache-09b61354.js +1 -0
  69. package/build/esm/{usePlacesAutocomplete-ed4983f5.js → usePlacesAutocomplete-c2dd02dd.js} +1 -1
  70. package/build/esm/useTranslations-49e0430f.js +1 -0
  71. package/build/esm/{utils-39fb1c8c.js → utils-ab3bd9a9.js} +2 -2
  72. package/build/esm/{utils-19ad9237.js → utils-bc76e7d8.js} +1 -1
  73. package/build/esm/{utils-d4e0e9b5.js → utils-ce8e4c84.js} +1 -1
  74. package/build/esm/vaccination.js +11 -11
  75. package/build/footer.js +1 -1
  76. package/build/gAssets.js +1 -1
  77. package/build/{getDynamicHealthTool-3e4543ff.js → getDynamicHealthTool-91d3a539.js} +1 -1
  78. package/build/{getSocialList-196c323b.js → getSocialList-95d4b1ab.js} +1 -1
  79. package/build/hooks.js +1 -1
  80. package/build/i18n.js +1 -1
  81. package/build/i18nV2.js +1 -1
  82. package/build/{index-0c7093ea.js → index-031eda4d.js} +5 -5
  83. package/build/{index-065c9097.js → index-04bf4b9a.js} +1 -1
  84. package/build/{index-19e259ce.js → index-087d7573.js} +1 -1
  85. package/build/{index-6f8ff7df.js → index-0a35e29e.js} +1 -1
  86. package/build/{index-9003442e.js → index-0e2baf55.js} +1 -1
  87. package/build/{index-cbbe3154.js → index-1c74e473.js} +17 -17
  88. package/build/{index-4a8b5e48.js → index-20b8b28c.js} +1 -1
  89. package/build/{index-ff74de8e.js → index-22f6821f.js} +1 -1
  90. package/build/{index-d27a3f5f.js → index-3183ed6e.js} +1 -1
  91. package/build/{index-7154350f.js → index-3c0d0730.js} +1 -1
  92. package/build/{index-8e6644eb.js → index-4198e282.js} +1 -1
  93. package/build/{index-4c4d7568.js → index-5e65f738.js} +2 -2
  94. package/build/{index-5385e211.js → index-84f168eb.js} +1 -1
  95. package/build/{index-4de92198.js → index-8b4d8b74.js} +1 -1
  96. package/build/{index-96dd78ba.js → index-8d147028.js} +1 -1
  97. package/build/{index-0f6355d4.js → index-9f2fce62.js} +1 -1
  98. package/build/{index-8a21ecb2.js → index-a1e30b09.js} +1 -1
  99. package/build/{index-2420eee5.js → index-abe7bb48.js} +1 -1
  100. package/build/{index-425f3390.js → index-afd5d772.js} +1 -1
  101. package/build/{index-beef0ff7.js → index-c53c2cf6.js} +1 -1
  102. package/build/index-ebed7399.js +1 -0
  103. package/build/{index-e13a4f9a.js → index-f56af2a1.js} +1 -1
  104. package/build/{index-43df25b1.js → index-f80db37d.js} +1 -1
  105. package/build/index.js +1 -1
  106. package/build/{index.styled-a45b7854.js → index.styled-250b6af4.js} +1 -1
  107. package/build/{index.styles-ce607f17.js → index.styles-f2358064.js} +5 -5
  108. package/build/lead.js +1 -1
  109. package/build/mantine.js +1 -1
  110. package/build/misc.js +1 -1
  111. package/build/navigation.js +1 -1
  112. package/build/onboardingV2.js +5 -5
  113. package/build/pwg.js +1 -1
  114. package/build/{routing-46446fba.js → routing-ed60b4e3.js} +1 -1
  115. package/build/subot.js +1 -1
  116. package/build/together.js +1 -1
  117. package/build/{types-d2335814.js → types-2602cb14.js} +1 -1
  118. package/build/{types-e54d8d93.js → types-662fa8fb.js} +1 -1
  119. package/build/types.js +1 -1
  120. package/build/{useCategory-c99469f2.js → useCategory-f58f3f7e.js} +1 -1
  121. package/build/useHealthToolCache-d78d2251.js +1 -0
  122. package/build/{usePlacesAutocomplete-55e04a25.js → usePlacesAutocomplete-11729974.js} +1 -1
  123. package/build/{useTranslations-b435b717.js → useTranslations-eef7f548.js} +1 -1
  124. package/build/{utils-9778a239.js → utils-5af37bc5.js} +1 -1
  125. package/build/{utils-83803365.js → utils-74e9f3ab.js} +2 -2
  126. package/build/{utils-c18ec2df.js → utils-adde2380.js} +1 -1
  127. package/build/vaccination.js +1 -1
  128. package/package.json +2 -5
  129. package/build/esm/index-638a744e.js +0 -1
  130. package/build/esm/index-73532662.js +0 -1
  131. package/build/esm/index-c1cb45b2.js +0 -1
  132. package/build/esm/useHealthToolCache-011e34e2.js +0 -1
  133. package/build/esm/useTranslations-80f9bf98.js +0 -1
  134. package/build/index-07dff904.js +0 -1
  135. package/build/useHealthToolCache-dc437f4f.js +0 -1
  136. /package/build/{BMI_BOYS.percentile.monthly-0eb54c7c.js → BMI_BOYS.percentile.monthly-b574351a.js} +0 -0
  137. /package/build/{BMI_BOYS.percentile.weekly-b7bde0b1.js → BMI_BOYS.percentile.weekly-ad058945.js} +0 -0
  138. /package/build/{BMI_BOYS.percentile.yearly-2aa9ad44.js → BMI_BOYS.percentile.yearly-8ada8234.js} +0 -0
  139. /package/build/{BMI_BOYS.zscore.monthly-97389f6d.js → BMI_BOYS.zscore.monthly-f16e149c.js} +0 -0
  140. /package/build/{BMI_BOYS.zscore.weekly-bc5a17ee.js → BMI_BOYS.zscore.weekly-776e513d.js} +0 -0
  141. /package/build/{BMI_BOYS.zscore.yearly-95e1abf3.js → BMI_BOYS.zscore.yearly-3d6a4a73.js} +0 -0
  142. /package/build/{BMI_GIRLS.percentile.monthly-8a628c8b.js → BMI_GIRLS.percentile.monthly-10009b9f.js} +0 -0
  143. /package/build/{BMI_GIRLS.percentile.weekly-c3423d0b.js → BMI_GIRLS.percentile.weekly-6557eb44.js} +0 -0
  144. /package/build/{BMI_GIRLS.percentile.yearly-30c05aa5.js → BMI_GIRLS.percentile.yearly-3f4acf36.js} +0 -0
  145. /package/build/{BMI_GIRLS.zscore.monthly-e81868f9.js → BMI_GIRLS.zscore.monthly-6a304df3.js} +0 -0
  146. /package/build/{BMI_GIRLS.zscore.weekly-98365971.js → BMI_GIRLS.zscore.weekly-e0d6db84.js} +0 -0
  147. /package/build/{BMI_GIRLS.zscore.yearly-34dac101.js → BMI_GIRLS.zscore.yearly-a6ec380e.js} +0 -0
  148. /package/build/{ChevronDown-77fab19e.js → ChevronDown-a8966000.js} +0 -0
  149. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-f49c4a46.js → HEAD CIRCUM_BOYS.percentile.monthly-71a87239.js} +0 -0
  150. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-72afd132.js → HEAD CIRCUM_BOYS.percentile.weekly-b862aacb.js} +0 -0
  151. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-ab0deda0.js → HEAD CIRCUM_BOYS.percentile.yearly-13eada26.js} +0 -0
  152. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fbd5f8c4.js → HEAD CIRCUM_BOYS.zscore.monthly-f9c4f89e.js} +0 -0
  153. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-87f840f6.js → HEAD CIRCUM_BOYS.zscore.weekly-4e1a4178.js} +0 -0
  154. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-9a7dd00c.js → HEAD CIRCUM_BOYS.zscore.yearly-554a8878.js} +0 -0
  155. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-679b8839.js → HEAD CIRCUM_GIRLS.percentile.monthly-2910870c.js} +0 -0
  156. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-b4e20015.js → HEAD CIRCUM_GIRLS.percentile.weekly-0f14fedf.js} +0 -0
  157. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9cd60765.js → HEAD CIRCUM_GIRLS.percentile.yearly-596b0da0.js} +0 -0
  158. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ab6de2c6.js → HEAD CIRCUM_GIRLS.zscore.monthly-69ae9a0c.js} +0 -0
  159. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-7d38c523.js → HEAD CIRCUM_GIRLS.zscore.weekly-114e70a3.js} +0 -0
  160. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-eb9d57e8.js → HEAD CIRCUM_GIRLS.zscore.yearly-b6747ec7.js} +0 -0
  161. /package/build/{HEIGHT_BOYS.percentile.monthly-41de847f.js → HEIGHT_BOYS.percentile.monthly-cb959489.js} +0 -0
  162. /package/build/{HEIGHT_BOYS.percentile.weekly-62b868f0.js → HEIGHT_BOYS.percentile.weekly-7955c34e.js} +0 -0
  163. /package/build/{HEIGHT_BOYS.percentile.yearly-e2c7bb82.js → HEIGHT_BOYS.percentile.yearly-b073f41f.js} +0 -0
  164. /package/build/{HEIGHT_BOYS.zscore.monthly-5d6cc9db.js → HEIGHT_BOYS.zscore.monthly-1ae80a89.js} +0 -0
  165. /package/build/{HEIGHT_BOYS.zscore.weekly-d7b99302.js → HEIGHT_BOYS.zscore.weekly-cd4bc068.js} +0 -0
  166. /package/build/{HEIGHT_BOYS.zscore.yearly-e5699025.js → HEIGHT_BOYS.zscore.yearly-7eb6af8e.js} +0 -0
  167. /package/build/{HEIGHT_GIRLS.percentile.monthly-bac0286d.js → HEIGHT_GIRLS.percentile.monthly-d2959962.js} +0 -0
  168. /package/build/{HEIGHT_GIRLS.percentile.weekly-6999925f.js → HEIGHT_GIRLS.percentile.weekly-99981d42.js} +0 -0
  169. /package/build/{HEIGHT_GIRLS.percentile.yearly-ebfa2c19.js → HEIGHT_GIRLS.percentile.yearly-d1d13641.js} +0 -0
  170. /package/build/{HEIGHT_GIRLS.zscore.monthly-39be4dd2.js → HEIGHT_GIRLS.zscore.monthly-d9a63188.js} +0 -0
  171. /package/build/{HEIGHT_GIRLS.zscore.weekly-207cf2f5.js → HEIGHT_GIRLS.zscore.weekly-d58b3339.js} +0 -0
  172. /package/build/{HEIGHT_GIRLS.zscore.yearly-265aafc2.js → HEIGHT_GIRLS.zscore.yearly-ae58b0a3.js} +0 -0
  173. /package/build/{Subot-54546cbb.js → Subot-511ff255.js} +0 -0
  174. /package/build/{Visible-27b623f0.js → Visible-338d5d3b.js} +0 -0
  175. /package/build/{WEIGHT_BOYS.percentile.monthly-9ca3a316.js → WEIGHT_BOYS.percentile.monthly-3687233c.js} +0 -0
  176. /package/build/{WEIGHT_BOYS.percentile.weekly-7e51fb9b.js → WEIGHT_BOYS.percentile.weekly-c0915786.js} +0 -0
  177. /package/build/{WEIGHT_BOYS.percentile.yearly-b47c5be9.js → WEIGHT_BOYS.percentile.yearly-898b748c.js} +0 -0
  178. /package/build/{WEIGHT_BOYS.zscore.monthly-6d59370f.js → WEIGHT_BOYS.zscore.monthly-e47a72be.js} +0 -0
  179. /package/build/{WEIGHT_BOYS.zscore.weekly-38beac02.js → WEIGHT_BOYS.zscore.weekly-23cc874f.js} +0 -0
  180. /package/build/{WEIGHT_BOYS.zscore.yearly-1f4013a7.js → WEIGHT_BOYS.zscore.yearly-2c523e95.js} +0 -0
  181. /package/build/{WEIGHT_GIRLS.percentile.monthly-c9144c22.js → WEIGHT_GIRLS.percentile.monthly-232c03ec.js} +0 -0
  182. /package/build/{WEIGHT_GIRLS.percentile.weekly-5455b91e.js → WEIGHT_GIRLS.percentile.weekly-363f6163.js} +0 -0
  183. /package/build/{WEIGHT_GIRLS.percentile.yearly-03c736dd.js → WEIGHT_GIRLS.percentile.yearly-09c2db7a.js} +0 -0
  184. /package/build/{WEIGHT_GIRLS.zscore.monthly-415a66a8.js → WEIGHT_GIRLS.zscore.monthly-996f2f01.js} +0 -0
  185. /package/build/{WEIGHT_GIRLS.zscore.weekly-1e23361d.js → WEIGHT_GIRLS.zscore.weekly-1c937534.js} +0 -0
  186. /package/build/{WEIGHT_GIRLS.zscore.yearly-8db29178.js → WEIGHT_GIRLS.zscore.yearly-ab136277.js} +0 -0
  187. /package/build/{animation-1e9aff6a.js → animation-1e5b6297.js} +0 -0
  188. /package/build/{cookieHelper-59a64e32.js → cookieHelper-91788da6.js} +0 -0
  189. /package/build/esm/{BMI_BOYS.percentile.monthly-57e884f8.js → BMI_BOYS.percentile.monthly-f3616831.js} +0 -0
  190. /package/build/esm/{BMI_BOYS.percentile.weekly-b2c63459.js → BMI_BOYS.percentile.weekly-e94f9b0c.js} +0 -0
  191. /package/build/esm/{BMI_BOYS.percentile.yearly-8ca90fac.js → BMI_BOYS.percentile.yearly-8f7ac99b.js} +0 -0
  192. /package/build/esm/{BMI_BOYS.zscore.monthly-b493d2f9.js → BMI_BOYS.zscore.monthly-54be7428.js} +0 -0
  193. /package/build/esm/{BMI_BOYS.zscore.weekly-62ae4fbc.js → BMI_BOYS.zscore.weekly-6c12aa9f.js} +0 -0
  194. /package/build/esm/{BMI_BOYS.zscore.yearly-e2aad569.js → BMI_BOYS.zscore.yearly-1c23b3d9.js} +0 -0
  195. /package/build/esm/{BMI_GIRLS.percentile.monthly-7f8de0c2.js → BMI_GIRLS.percentile.monthly-8a502893.js} +0 -0
  196. /package/build/esm/{BMI_GIRLS.percentile.weekly-6e0b116a.js → BMI_GIRLS.percentile.weekly-fa839bec.js} +0 -0
  197. /package/build/esm/{BMI_GIRLS.percentile.yearly-4a395636.js → BMI_GIRLS.percentile.yearly-a4566ca8.js} +0 -0
  198. /package/build/esm/{BMI_GIRLS.zscore.monthly-be973fb7.js → BMI_GIRLS.zscore.monthly-aab4d85c.js} +0 -0
  199. /package/build/esm/{BMI_GIRLS.zscore.weekly-c19aae0e.js → BMI_GIRLS.zscore.weekly-f8488af5.js} +0 -0
  200. /package/build/esm/{BMI_GIRLS.zscore.yearly-7bf54eb9.js → BMI_GIRLS.zscore.yearly-a4d7a630.js} +0 -0
  201. /package/build/esm/{ChevronDown-b9b5a352.js → ChevronDown-7443ba17.js} +0 -0
  202. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-6e42d726.js → HEAD CIRCUM_BOYS.percentile.monthly-dd491a3d.js} +0 -0
  203. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-8999c4bf.js → HEAD CIRCUM_BOYS.percentile.weekly-9a4cc487.js} +0 -0
  204. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-b5760636.js → HEAD CIRCUM_BOYS.percentile.yearly-5ff7c492.js} +0 -0
  205. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-fe30f273.js → HEAD CIRCUM_BOYS.zscore.monthly-921be2d2.js} +0 -0
  206. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-17145cf6.js → HEAD CIRCUM_BOYS.zscore.weekly-f5d468d9.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-0d813a98.js → HEAD CIRCUM_BOYS.zscore.yearly-5199b4a7.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-ae35f7b2.js → HEAD CIRCUM_GIRLS.percentile.monthly-8679c7bc.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-430e5931.js → HEAD CIRCUM_GIRLS.percentile.weekly-9e2dcb2b.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ce5d85d6.js → HEAD CIRCUM_GIRLS.percentile.yearly-c6203100.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-b304dc6c.js → HEAD CIRCUM_GIRLS.zscore.monthly-856a5b1e.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-de588d96.js → HEAD CIRCUM_GIRLS.zscore.weekly-0783f118.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-44e77264.js → HEAD CIRCUM_GIRLS.zscore.yearly-a84257a0.js} +0 -0
  214. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-e574a87c.js → HEIGHT_BOYS.percentile.monthly-788fb5b4.js} +0 -0
  215. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-49bc6c02.js → HEIGHT_BOYS.percentile.weekly-f5190462.js} +0 -0
  216. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-99cf7774.js → HEIGHT_BOYS.percentile.yearly-afe4fd67.js} +0 -0
  217. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-63c3566b.js → HEIGHT_BOYS.zscore.monthly-bb98f05e.js} +0 -0
  218. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-a7eff90c.js → HEIGHT_BOYS.zscore.weekly-dfb95358.js} +0 -0
  219. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b06dea5e.js → HEIGHT_BOYS.zscore.yearly-055fefcb.js} +0 -0
  220. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-b154ae1d.js → HEIGHT_GIRLS.percentile.monthly-441d5eec.js} +0 -0
  221. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a3dd221b.js → HEIGHT_GIRLS.percentile.weekly-df673b20.js} +0 -0
  222. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-c1a93361.js → HEIGHT_GIRLS.percentile.yearly-b8635e96.js} +0 -0
  223. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-47b24f91.js → HEIGHT_GIRLS.zscore.monthly-8350897b.js} +0 -0
  224. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f3cd351a.js → HEIGHT_GIRLS.zscore.weekly-820a7ef3.js} +0 -0
  225. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-f6e9bb0c.js → HEIGHT_GIRLS.zscore.yearly-b2f2d906.js} +0 -0
  226. /package/build/esm/{Subot-0c45fa4c.js → Subot-3d309d90.js} +0 -0
  227. /package/build/esm/{Visible-3eb21335.js → Visible-45ab1e13.js} +0 -0
  228. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-87900c96.js → WEIGHT_BOYS.percentile.monthly-566b72c0.js} +0 -0
  229. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-6fb93a78.js → WEIGHT_BOYS.percentile.weekly-ae3bef15.js} +0 -0
  230. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-ccca0fe8.js → WEIGHT_BOYS.percentile.yearly-fd72f182.js} +0 -0
  231. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-35d466dc.js → WEIGHT_BOYS.zscore.monthly-4ebeca1a.js} +0 -0
  232. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-d74d6ff5.js → WEIGHT_BOYS.zscore.weekly-1edeedcc.js} +0 -0
  233. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-2c068e1e.js → WEIGHT_BOYS.zscore.yearly-b42da93c.js} +0 -0
  234. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-1ee7e829.js → WEIGHT_GIRLS.percentile.monthly-ab099390.js} +0 -0
  235. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-ab30775b.js → WEIGHT_GIRLS.percentile.weekly-e604f0e1.js} +0 -0
  236. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-893b6771.js → WEIGHT_GIRLS.percentile.yearly-9575be98.js} +0 -0
  237. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-c37f1d39.js → WEIGHT_GIRLS.zscore.monthly-bddddbe3.js} +0 -0
  238. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-3a1449f6.js → WEIGHT_GIRLS.zscore.weekly-f255cbfc.js} +0 -0
  239. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-aa00837d.js → WEIGHT_GIRLS.zscore.yearly-a99d0fd7.js} +0 -0
  240. /package/build/esm/{animation-03daa77e.js → animation-4d5baff8.js} +0 -0
  241. /package/build/esm/{cookieHelper-cbd9f06e.js → cookieHelper-0acd4fc8.js} +0 -0
  242. /package/build/esm/{index-c9bdb9a2.js → index-550480ee.js} +0 -0
  243. /package/build/esm/{index-7d682662.js → index-5dc45c1c.js} +0 -0
  244. /package/build/esm/{index-fb029176.js → index-a6ddd645.js} +0 -0
  245. /package/build/esm/{isProduction-cfb9150a.js → isProduction-135c9280.js} +0 -0
  246. /package/build/esm/{localizeNumberFormat-213a73b8.js → localizeNumberFormat-883148fd.js} +0 -0
  247. /package/build/esm/{normalizeLink-cc25681e.js → normalizeLink-75e03b67.js} +0 -0
  248. /package/build/esm/{number-dd894856.js → number-73b198fe.js} +0 -0
  249. /package/build/esm/{paths-2d37bc61.js → paths-61361575.js} +0 -0
  250. /package/build/esm/{theme-9f017335.js → theme-0d3c8845.js} +0 -0
  251. /package/build/esm/{translationsContext-9fc8f894.js → translationsContext-ee7ec6eb.js} +0 -0
  252. /package/build/esm/{tslib.es6-cabcb8ea.js → tslib.es6-c43c14a5.js} +0 -0
  253. /package/build/esm/{types-2d28585d.js → types-745b966e.js} +0 -0
  254. /package/build/esm/{useIsInit-81de6d8b.js → useIsInit-d5727c47.js} +0 -0
  255. /package/build/esm/{useOutsideClick-e1437a3f.js → useOutsideClick-e4f22be5.js} +0 -0
  256. /package/build/esm/{useScrollbarSize-6ecc2f5a.js → useScrollbarSize-0d367255.js} +0 -0
  257. /package/build/esm/{utils-3f639011.js → utils-1550f4c2.js} +0 -0
  258. /package/build/{index-4b719c83.js → index-52b005ff.js} +0 -0
  259. /package/build/{index-7005321e.js → index-983a543a.js} +0 -0
  260. /package/build/{index-21c825aa.js → index-f2e5a43e.js} +0 -0
  261. /package/build/{isProduction-426652cc.js → isProduction-8a3929cb.js} +0 -0
  262. /package/build/{localizeNumberFormat-5389239f.js → localizeNumberFormat-d00e3203.js} +0 -0
  263. /package/build/{normalizeLink-ef4fc463.js → normalizeLink-e4d8df7b.js} +0 -0
  264. /package/build/{number-f6e8e1a9.js → number-9930fc27.js} +0 -0
  265. /package/build/{paths-b1c94851.js → paths-ed97730a.js} +0 -0
  266. /package/build/{theme-98a7bede.js → theme-0bb94193.js} +0 -0
  267. /package/build/{translationsContext-6c5fb248.js → translationsContext-e09b4f33.js} +0 -0
  268. /package/build/{tslib.es6-d46558cb.js → tslib.es6-293338f5.js} +0 -0
  269. /package/build/{types-032556e4.js → types-140f0c7d.js} +0 -0
  270. /package/build/{useIsInit-8386673c.js → useIsInit-f9337a25.js} +0 -0
  271. /package/build/{useOutsideClick-5544e570.js → useOutsideClick-ac461ca7.js} +0 -0
  272. /package/build/{useScrollbarSize-d4ccc356.js → useScrollbarSize-9413af1b.js} +0 -0
  273. /package/build/{utils-469dda3f.js → utils-ec00b8cb.js} +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-2420eee5.js");require("./tslib.es6-d46558cb.js"),require("react"),require("./index-4de92198.js"),require("@mantine/core"),require("@mantine/hooks"),require("./theme-98a7bede.js"),require("./index-065c9097.js"),require("./index-d27a3f5f.js"),require("date-fns/locale"),require("./Subot-54546cbb.js"),require("./isProduction-426652cc.js"),require("dayjs"),require("./utils-469dda3f.js"),require("styled-components"),require("@mantine/carousel"),require("./index-beef0ff7.js"),require("./useTranslations-b435b717.js"),require("./translationsContext-6c5fb248.js"),require("string-format"),require("classnames"),require("./normalizeLink-ef4fc463.js"),require("./routing-46446fba.js"),require("./index-96dd78ba.js"),require("./utils-c18ec2df.js"),require("./cookieHelper-59a64e32.js"),require("slugify"),require("./index-4a8b5e48.js"),require("./utils-83803365.js"),require("lodash/throttle"),require("@mantine/dates"),require("./constants-28db3174.js"),require("./index.styles-ce607f17.js"),require("./constants-627c575a.js"),require("./animation-1e9aff6a.js"),require("react-keyed-flatten-children"),require("./ChevronDown-77fab19e.js"),require("./index-0f6355d4.js"),require("./index-43df25b1.js"),require("./useIsInit-8386673c.js"),require("./index.styled-a45b7854.js"),require("./index-4b719c83.js"),require("dayjs/plugin/relativeTime"),require("./index-21c825aa.js"),require("lodash/debounce"),require("./core-19b328be.js"),exports.NavigationV2=e.NavigationV2,exports.getNavMenuContent=e.getNavMenuContent,exports.getNavMenuContentWithCache=e.getNavMenuContentWithCache;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-abe7bb48.js");require("./tslib.es6-293338f5.js"),require("react"),require("./index-8b4d8b74.js"),require("@mantine/core"),require("@mantine/hooks"),require("./theme-0bb94193.js"),require("./index-04bf4b9a.js"),require("./index-3183ed6e.js"),require("date-fns/locale"),require("./Subot-511ff255.js"),require("./isProduction-8a3929cb.js"),require("dayjs"),require("./utils-ec00b8cb.js"),require("styled-components"),require("@mantine/carousel"),require("./index-c53c2cf6.js"),require("./useTranslations-eef7f548.js"),require("./translationsContext-e09b4f33.js"),require("string-format"),require("classnames"),require("./normalizeLink-e4d8df7b.js"),require("./routing-ed60b4e3.js"),require("./index-8d147028.js"),require("./utils-adde2380.js"),require("./cookieHelper-91788da6.js"),require("slugify"),require("./index-20b8b28c.js"),require("./utils-74e9f3ab.js"),require("lodash/throttle"),require("@mantine/dates"),require("./constants-0b9aa2f4.js"),require("./index.styles-f2358064.js"),require("./constants-ded45618.js"),require("./animation-1e5b6297.js"),require("react-keyed-flatten-children"),require("./ChevronDown-a8966000.js"),require("./index-9f2fce62.js"),require("./index-f80db37d.js"),require("./useIsInit-f9337a25.js"),require("./index.styled-250b6af4.js"),require("./index-52b005ff.js"),require("dayjs/plugin/relativeTime"),require("./index-f2e5a43e.js"),require("lodash/debounce"),require("./core-d774c80a.js"),exports.NavigationV2=e.NavigationV2,exports.getNavMenuContent=e.getNavMenuContent,exports.getNavMenuContentWithCache=e.getNavMenuContentWithCache;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mantine/core"),a=require("./index-4de92198.js");require("@mantine/dates");var n=require("./index-d27a3f5f.js");require("./Subot-54546cbb.js");var r=require("./index-065c9097.js"),o=require("./index-beef0ff7.js"),i=require("./theme-98a7bede.js");require("./translationsContext-6c5fb248.js"),require("string-format");var l=require("@mantine/hooks"),s=require("./utils-9778a239.js"),d=require("@mantine/form"),u=require("styled-components"),m=require("./utils-469dda3f.js"),c=require("./tslib.es6-d46558cb.js"),p=require("./index.styles-ce607f17.js");require("./constants-627c575a.js");var f=require("./utils-83803365.js"),g=require("./useTranslations-b435b717.js");require("./index.styled-a45b7854.js"),require("./index-4b719c83.js"),require("./utils-c18ec2df.js");var h=require("yup"),b=require("./index-9003442e.js"),E=require("./index-8e6644eb.js"),x=require("./Visible-27b623f0.js"),C=require("react-dom"),v=require("lodash/throttle"),L=require("./index-0f6355d4.js"),y=require("./index-07dff904.js"),w=require("date-fns"),S=require("react-keyed-flatten-children");function M(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function P(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("dayjs"),require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("./isProduction-426652cc.js"),require("./animation-1e9aff6a.js"),require("./cookieHelper-59a64e32.js"),require("slugify");var j=M(e),O=M(u),_=P(h),T=M(v),k=M(S);const B=e.createContext({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[q,F,I]=d.createFormContext(),z=O.default(t.Box)`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mantine/core"),a=require("./index-8b4d8b74.js");require("@mantine/dates");var n=require("./index-3183ed6e.js");require("./Subot-511ff255.js");var r=require("./index-04bf4b9a.js"),o=require("./index-c53c2cf6.js"),i=require("./theme-0bb94193.js");require("./translationsContext-e09b4f33.js"),require("string-format");var l=require("@mantine/hooks"),s=require("./utils-5af37bc5.js"),d=require("@mantine/form"),u=require("styled-components"),m=require("./utils-ec00b8cb.js"),c=require("./tslib.es6-293338f5.js"),p=require("./index.styles-f2358064.js");require("./constants-ded45618.js");var f=require("./utils-74e9f3ab.js"),g=require("./useTranslations-eef7f548.js");require("./index.styled-250b6af4.js"),require("./index-52b005ff.js"),require("./utils-adde2380.js");var b=require("yup"),h=require("./index-0e2baf55.js"),E=require("./index-4198e282.js"),x=require("./Visible-338d5d3b.js"),C=require("react-dom"),v=require("lodash/throttle"),L=require("./index-9f2fce62.js"),y=require("./index-ebed7399.js"),w=require("date-fns"),S=require("react-keyed-flatten-children");function M(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function P(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("dayjs"),require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("./isProduction-8a3929cb.js"),require("./animation-1e5b6297.js"),require("./cookieHelper-91788da6.js"),require("slugify");var j=M(e),O=M(u),_=P(b),T=M(v),k=M(S);const B=e.createContext({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[q,F,I]=d.createFormContext(),z=O.default(t.Box)`
2
2
  .phone-input {
3
3
  width: 100%;
4
4
  margin-bottom: 32px;
@@ -15,7 +15,7 @@
15
15
  border-radius: 0 4px 4px 0;
16
16
  }
17
17
  }
18
- `,N=e=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:i="",formContext:l}=e,d=c.__rest(e,["inputOrder","withSimilac","customTerms","formContext"]);const{t:u}=g.useTranslations(),m=l||F(),p={phone:e=>{var{label:n,name:i="phone"}=e,l=c.__rest(e,["label","name"]);return j.default.createElement(t.Input.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},n||u("onboarding.similac.input.phone")):void 0},j.default.createElement(a.Phone,Object.assign({defaultCountry:s.MAPPED_LOCALE[process.env.UNIFY_LOCALE]||"VN"},m.getInputProps(i),l)),j.default.createElement(t.Input.Error,{size:"md"},m.errors.phone))},full_name:e=>{var{label:t,name:n="name"}=e,r=c.__rest(e,["label","name"]);return j.default.createElement(a.Input,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.formEmail.yourName")),withAsterisk:!0},m.getInputProps(n),r))},email:e=>{var{label:t,name:n="email"}=e,r=c.__rest(e,["label","name"]);return j.default.createElement(a.Input,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.formEmail.yourEmail")),withAsterisk:!0},m.getInputProps(n),r))},dob:e=>{var{label:t,name:a="dob"}=e,n=c.__rest(e,["label","name"]);return j.default.createElement(b.DatePicker,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},m.getInputProps(a),n))},gender:e=>{var{label:t,name:n="gender"}=e,r=c.__rest(e,["label","name"]);return j.default.createElement(a.Radio.Group,Object.assign({className:"radio-group",label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("tools.selectGender"))},m.getInputProps(n),r),j.default.createElement(a.Radio,{value:"0",label:u("onboarding.formEmail.genderMale")}),j.default.createElement(a.Radio,{value:"1",label:u("onboarding.formEmail.genderFemale")}))},otp:({name:e="otp"})=>j.default.createElement("div",{className:"otp-input"},j.default.createElement(a.OTP,Object.assign({enterKeyHint:void 0,nonce:void 0},m.getInputProps(e))),j.default.createElement(t.Input.Error,null,m.errors.otp)),password:({label:e,name:t="password"})=>j.default.createElement(a.Input.Password,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},e||u("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:j.default.createElement(x.Visible,null)},m.getInputProps(t))),confirm_password:({label:e,name:t="confirmPassword"})=>j.default.createElement(a.Input.Password,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},e||u("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:j.default.createElement(x.Visible,null)},m.getInputProps(t))),term:({name:e="term",className:n=""})=>i?j.default.createElement("div",{style:{marginBottom:16},className:n},j.default.createElement(a.Checkbox,Object.assign({label:j.default.createElement(o.Text,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},i)},m.getInputProps(e,{type:"checkbox"}),{error:null})),j.default.createElement(t.Input.Error,{size:"md"},m.getInputProps("term",{type:"checkbox"}).error)):null,address:e=>{var{label:t,className:a="",name:n="address"}=e,r=c.__rest(e,["label","className","name"]);return j.default.createElement(E.AddressInput,Object.assign({className:`${a} input-control`,label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.similac.input.address"))},m.getInputProps(n),r))}},f=n.map((e=>{var t;const a="string"==typeof e?{inputType:e}:e;return null===(t=p[a.inputType])||void 0===t?void 0:t.call(p,a)}));return j.default.createElement(z,Object.assign({},d),f)},D=e=>_.object().shape({phone:_.string().required(e("onboarding.updatePhone.error")).default(""),name:_.string().required(e("onboarding.errorMessage.requiredName")),email:_.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:_.mixed().required(e("onboarding.similac.address.error")),term:_.bool().oneOf([!0],e("onboarding.similac.term.error"))});var A=e.forwardRef(((a,n)=>{var{inputOrder:r,onSubmit:i,validateSchema:l,defaultValues:s,isActive:u,customTerms:m,customFormTexts:f}=a,h=c.__rest(a,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:b,setSharedData:E,sharedData:x}=e.useContext(B),{t:C}=g.useTranslations(),v=I({initialValues:{term:!1,phone:(null==x?void 0:x.phone)||(null==s?void 0:s.phone)||"",email:(null==x?void 0:x.email)||(null==s?void 0:s.email)||"",name:(null==x?void 0:x.name)||(null==s?void 0:s.name)||""},validate:l||d.yupResolver(D(C))}),L=e=>c.__awaiter(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}))),b()}catch(e){console.error(e)}})),y=e=>{console.log(e)},w=()=>{var e;return null===(e=v.onSubmit(L,y))||void 0===e?void 0:e()};return e.useImperativeHandle(n,(()=>({submitForm:w}))),j.default.createElement(t.Box,Object.assign({"data-active":u},h),j.default.createElement(t.Box,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},j.default.createElement(t.Box,{sx:{textAlign:"center"}},j.default.createElement(p.Heading,{tag:"h4",as:"h2"},null==f?void 0:f.heading),j.default.createElement(o.Text,{size:"p3"},null==f?void 0:f.description)),j.default.createElement(q,{form:v},j.default.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:v.onSubmit(L,y)},j.default.createElement(t.Box,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},j.default.createElement(N,{inputOrder:r,customTerms:m,className:"friso-form"}))))))}));const Z=O.default.div`
18
+ `,N=e=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:i="",formContext:l}=e,d=c.__rest(e,["inputOrder","withSimilac","customTerms","formContext"]);const{t:u}=g.useTranslations(),m=l||F(),p={phone:e=>{var{label:n,name:i="phone"}=e,l=c.__rest(e,["label","name"]);return j.default.createElement(t.Input.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},n||u("onboarding.similac.input.phone")):void 0},j.default.createElement(a.Phone,Object.assign({defaultCountry:s.MAPPED_LOCALE[process.env.UNIFY_LOCALE]||"VN"},m.getInputProps(i),l)),j.default.createElement(t.Input.Error,{size:"md"},m.errors.phone))},full_name:e=>{var{label:t,name:n="name"}=e,r=c.__rest(e,["label","name"]);return j.default.createElement(a.Input,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.formEmail.yourName")),withAsterisk:!0},m.getInputProps(n),r))},email:e=>{var{label:t,name:n="email"}=e,r=c.__rest(e,["label","name"]);return j.default.createElement(a.Input,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.formEmail.yourEmail")),withAsterisk:!0},m.getInputProps(n),r))},dob:e=>{var{label:t,name:a="dob"}=e,n=c.__rest(e,["label","name"]);return j.default.createElement(h.DatePicker,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},m.getInputProps(a),n))},gender:e=>{var{label:t,name:n="gender"}=e,r=c.__rest(e,["label","name"]);return j.default.createElement(a.Radio.Group,Object.assign({className:"radio-group",label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("tools.selectGender"))},m.getInputProps(n),r),j.default.createElement(a.Radio,{value:"0",label:u("onboarding.formEmail.genderMale")}),j.default.createElement(a.Radio,{value:"1",label:u("onboarding.formEmail.genderFemale")}))},otp:({name:e="otp"})=>j.default.createElement("div",{className:"otp-input"},j.default.createElement(a.OTP,Object.assign({enterKeyHint:void 0,nonce:void 0},m.getInputProps(e))),j.default.createElement(t.Input.Error,null,m.errors.otp)),password:({label:e,name:t="password"})=>j.default.createElement(a.Input.Password,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},e||u("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:j.default.createElement(x.Visible,null)},m.getInputProps(t))),confirm_password:({label:e,name:t="confirmPassword"})=>j.default.createElement(a.Input.Password,Object.assign({label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},e||u("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:j.default.createElement(x.Visible,null)},m.getInputProps(t))),term:({name:e="term",className:n=""})=>i?j.default.createElement("div",{style:{marginBottom:16},className:n},j.default.createElement(a.Checkbox,Object.assign({label:j.default.createElement(o.Text,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},i)},m.getInputProps(e,{type:"checkbox"}),{error:null})),j.default.createElement(t.Input.Error,{size:"md"},m.getInputProps("term",{type:"checkbox"}).error)):null,address:e=>{var{label:t,className:a="",name:n="address"}=e,r=c.__rest(e,["label","className","name"]);return j.default.createElement(E.AddressInput,Object.assign({className:`${a} input-control`,label:j.default.createElement(o.Text,{size:"s4",weight:"semiBold",as:"span"},t||u("onboarding.similac.input.address"))},m.getInputProps(n),r))}},f=n.map((e=>{var t;const a="string"==typeof e?{inputType:e}:e;return null===(t=p[a.inputType])||void 0===t?void 0:t.call(p,a)}));return j.default.createElement(z,Object.assign({},d),f)},D=e=>_.object().shape({phone:_.string().required(e("onboarding.updatePhone.error")).default(""),name:_.string().required(e("onboarding.errorMessage.requiredName")),email:_.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:_.mixed().required(e("onboarding.similac.address.error")),term:_.bool().oneOf([!0],e("onboarding.similac.term.error"))});var A=e.forwardRef(((a,n)=>{var{inputOrder:r,onSubmit:i,validateSchema:l,defaultValues:s,isActive:u,customTerms:m,customFormTexts:f}=a,b=c.__rest(a,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:h,setSharedData:E,sharedData:x}=e.useContext(B),{t:C}=g.useTranslations(),v=I({initialValues:{term:!1,phone:(null==x?void 0:x.phone)||(null==s?void 0:s.phone)||"",email:(null==x?void 0:x.email)||(null==s?void 0:s.email)||"",name:(null==x?void 0:x.name)||(null==s?void 0:s.name)||""},validate:l||d.yupResolver(D(C))}),L=e=>c.__awaiter(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)}})),y=e=>{console.log(e)},w=()=>{var e;return null===(e=v.onSubmit(L,y))||void 0===e?void 0:e()};return e.useImperativeHandle(n,(()=>({submitForm:w}))),j.default.createElement(t.Box,Object.assign({"data-active":u},b),j.default.createElement(t.Box,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},j.default.createElement(t.Box,{sx:{textAlign:"center"}},j.default.createElement(p.Heading,{tag:"h4",as:"h2"},null==f?void 0:f.heading),j.default.createElement(o.Text,{size:"p3"},null==f?void 0:f.description)),j.default.createElement(q,{form:v},j.default.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:v.onSubmit(L,y)},j.default.createElement(t.Box,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},j.default.createElement(N,{inputOrder:r,customTerms:m,className:"friso-form"}))))))}));const Z=O.default.div`
19
19
  position: fixed;
20
20
  inset: 0;
21
21
  z-index: 1000;
@@ -137,7 +137,7 @@
137
137
  }
138
138
  `,Y=O.default.img`
139
139
  margin-bottom: 38px;
140
- `,K=a=>{var r,{heading:l,description:s,children:d,className:u,imgSrc:m,hiddenLogo:p=!1}=a,g=c.__rest(a,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:h,siteType:b}=e.useContext(B);return j.default.createElement(G,Object.assign({},g,{className:`hhg-comp-onboarding-container ${u}`,size:"sm"}),!p&&j.default.createElement(f.LogoIcon,{type:h?b:(null===(r=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===r?void 0:r.LOGO_TYPE)||"hellobacsi"}),j.default.createElement(Q,{className:p?"similac":""},m&&j.default.createElement(Y,{src:m,loading:"lazy"}),(l||s)&&j.default.createElement("div",{className:"header"},l&&j.default.createElement(t.Title,{order:3},l),s&&j.default.createElement(o.Text,{size:"p3",mt:8,color:i.theme.colors.gray600},s)),d))},J=O.default(K)`
140
+ `,K=a=>{var r,{heading:l,description:s,children:d,className:u,imgSrc:m,hiddenLogo:p=!1}=a,g=c.__rest(a,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:b,siteType:h}=e.useContext(B);return j.default.createElement(G,Object.assign({},g,{className:`hhg-comp-onboarding-container ${u}`,size:"sm"}),!p&&j.default.createElement(f.LogoIcon,{type:b?h:(null===(r=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===r?void 0:r.LOGO_TYPE)||"hellobacsi"}),j.default.createElement(Q,{className:p?"similac":""},m&&j.default.createElement(Y,{src:m,loading:"lazy"}),(l||s)&&j.default.createElement("div",{className:"header"},l&&j.default.createElement(t.Title,{order:3},l),s&&j.default.createElement(o.Text,{size:"p3",mt:8,color:i.theme.colors.gray600},s)),d))},J=O.default(K)`
141
141
  .phone-input {
142
142
  width: 100%;
143
143
  margin-bottom: 32px;
@@ -242,7 +242,7 @@
242
242
  }
243
243
  `,oe=O.default.img`
244
244
  margin-bottom: 38px;
245
- `,ie=a=>{var r,{heading:l,description:s,children:d,className:u,imgSrc:m,hiddenLogo:p=!1}=a,g=c.__rest(a,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:h,siteType:b}=e.useContext(B);return j.default.createElement(re,Object.assign({},g,{className:`hhg-comp-onboarding-container ${u}`,size:"sm"}),!p&&j.default.createElement(f.LogoIcon,{type:h?b:(null===(r=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===r?void 0:r.LOGO_TYPE)||"hellobacsi"}),j.default.createElement(ne,{className:p?"similac":""},m&&j.default.createElement(oe,{src:m,loading:"lazy"}),j.default.createElement("div",{className:"header"},j.default.createElement(t.Title,{order:3},l),j.default.createElement(o.Text,{size:"p3",mt:8,color:i.theme.colors.gray600},s)),d))},le=O.default(K)`
245
+ `,ie=a=>{var r,{heading:l,description:s,children:d,className:u,imgSrc:m,hiddenLogo:p=!1}=a,g=c.__rest(a,["heading","description","children","className","imgSrc","hiddenLogo"]);const{isMarryBaby:b,siteType:h}=e.useContext(B);return j.default.createElement(re,Object.assign({},g,{className:`hhg-comp-onboarding-container ${u}`,size:"sm"}),!p&&j.default.createElement(f.LogoIcon,{type:b?h:(null===(r=n.LOCALE_SPECS[process.env.UNIFY_LOCALE])||void 0===r?void 0:r.LOGO_TYPE)||"hellobacsi"}),j.default.createElement(ne,{className:p?"similac":""},m&&j.default.createElement(oe,{src:m,loading:"lazy"}),j.default.createElement("div",{className:"header"},j.default.createElement(t.Title,{order:3},l),j.default.createElement(o.Text,{size:"p3",mt:8,color:i.theme.colors.gray600},s)),d))},le=O.default(K)`
246
246
  .phone-input {
247
247
  width: 100%;
248
248
  margin-bottom: 32px;
@@ -282,4 +282,4 @@
282
282
  &:not([data-active='true']) {
283
283
  display: none !important;
284
284
  }
285
- `,ue=e=>_.object().shape({password:_.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:_.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([_.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),me={Provider:({children:t,siteType:a,setSharedData:n})=>{const[r,o]=e.useState(0),[i,l]=e.useState(0),[s,d]=e.useState({});return e.useEffect((()=>{null==n||n(s)}),[s,n]),j.default.createElement(B.Provider,{value:{currentStep:r,setCurrentStep:o,setMaxStep:l,nextStep:()=>r+1<=i&&o(r+1),prevStep:()=>r-1>=0&&o(r-1),siteType:a,isMarryBaby:"marryBaby"===a,sharedData:s,setSharedData:d}},t)},Modal:n=>{var{children:r,withSimilac:l,banner:s,withPortal:d}=n,u=c.__rest(n,["children","withSimilac","banner","withPortal"]);const{isMobile:p}=a.useScreenSize(),{isMarryBaby:f}=e.useContext(B),{t:h}=g.useTranslations();if(d&&"undefined"==typeof window)return null;const b=j.default.createElement(Z,Object.assign({},u),j.default.createElement(V,null,j.default.createElement(t.Grid,{sx:{[m.MediaQueries.mbDown]:{margin:0},".mantine-Grid-col":{[m.MediaQueries.mbDown]:{padding:0}}}},j.default.createElement(t.Grid.Col,{span:"object"!=typeof s&&!l||p?12:6,order:l?2:1,orderMd:l?1:2,sx:{zIndex:l?99:void 0}},j.default.createElement(H,{"data-similac":l,"data-has-banner":"object"==typeof s},r)),s&&"object"==typeof s&&!l&&j.default.createElement(t.Grid.Col,{span:p?12:6,order:1,orderMd:2},j.default.createElement(R,null,j.default.createElement($,{"data-is-marry-baby":f},j.default.createElement(W,null,s.heading&&j.default.createElement(t.Title,{order:1,mb:24},s.heading),s.description&&j.default.createElement(o.Text,{size:"p1",color:i.theme.colors.gray800},h("onboarding.welcomeScreen.content"))),j.default.createElement(U,null,s.imgSrc?j.default.createElement("img",{src:s.imgSrc,loading:"lazy"}):s.imgComponent?s.imgComponent:null)))),s&&"object"==typeof s&&l&&(s.imgSrc||s.imgComponent)&&j.default.createElement(t.Grid.Col,{span:"auto",order:1,orderMd:2},j.default.createElement(U,{className:"similac"},s.imgSrc?j.default.createElement("img",{src:s.imgSrc,loading:"lazy"}):s.imgComponent?s.imgComponent:null)))));return d?C.createPortal(b,m.getPopupWrapperDom()):b},Form:({onClose:t,onSubmit:n,canSkip:r=!0,customFormTexts:i,isActive:l,submitProps:s,submitLabel:u,skipProps:m,isWhatsApp:p})=>{const{t:f}=g.useTranslations(),{sharedData:h,setSharedData:b,nextStep:E}=e.useContext(B),x=I({initialValues:{phone:(null==h?void 0:h.phone)||""},validate:d.yupResolver(X(f))});return j.default.createElement(J,{heading:(null==i?void 0:i.heading)||f("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||f(p?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":l},j.default.createElement(q,{form:x},j.default.createElement("form",{onSubmit:x.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{b((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),E()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:["phone"]}),j.default.createElement(a.Button,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},p&&{leftIcon:j.default.createElement(o.Icon.WhatsApp,{size:18,useCurrentColor:!0})},s,{type:"submit","data-event-category":p?"OTP":"Sign Up","data-event-action":p?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),u||f(p?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),r&&j.default.createElement(a.Button,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},p&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),f("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:a,onResendCode:n,otpError:r,onClose:o,loading:u,canSkip:m})=>{const{sharedData:{email:p,retryEmailCount:f},setSharedData:h,prevStep:b,siteType:E,isMarryBaby:x,nextStep:C}=e.useContext(B),v=a||p||"",[w,S]=e.useState(30),M=l.useInterval((()=>S((e=>e-1))),1e3),[P,O]=l.useCounter(0,{min:0,max:3}),_=e.useRef(!0),{t:k}=g.useTranslations();e.useEffect((()=>(M.start(),M.stop)),[]),e.useEffect((()=>{0===w&&(M.stop(),_.current=!1)}),[w]);const F=I({initialValues:{otp:""},validate:d.yupResolver(te(k))});e.useEffect((()=>{r&&F.setFieldError("otp",r)}),[r]);const z=e.useMemo((()=>T.default((()=>{_.current||(O.increment(),S(30),null==n||n(v),M.start(),_.current=!0)}),1e3,{trailing:!1})),[v,n,M]),D=f>=2;return j.default.createElement(ee,{heading:k("onboarding.otpForm.heading"),description:j.default.createElement(j.default.Fragment,null,j.default.createElement("span",{dangerouslySetInnerHTML:{__html:k("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${i.theme.colors.gray800}">${s.hiddenEmailChar(v)}</b>`})}}),!D&&j.default.createElement("svg",{onClick:()=>{f>=2||(h((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),b())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},j.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},j.default.createElement(q,{form:F},j.default.createElement("form",{onSubmit:F.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{O.increment();!(yield null==t?void 0:t(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:["otp"]}),j.default.createElement("div",{className:"resend"},j.default.createElement(y.Text,{size:"p4",color:i.theme.colors.gray400},k("onboarding.otpForm.notReceiveOTP")),j.default.createElement(y.Text,{as:"a",size:"p4",color:x?i.theme.mbColors.pink:i.theme.colors.primaryBase,onClick:z},k("onboarding.otpForm.resendCode",{seconds:w}))),j.default.createElement(L.Button,{theme:E,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:u,disabled:u,"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"},k("onboarding.button.continue")),m&&P>=3&&j.default.createElement(L.Button,{theme:E,color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},k("onboarding.button.skip")))))},Phone:({onSubmit:a,phone:n,onResendCode:s,otpError:u,onClose:m,loading:p,canSkip:f,isWhatsApp:h})=>{const{sharedData:{phone:b,retryPhoneCount:E},setSharedData:x,prevStep:C,siteType:v,isMarryBaby:y,nextStep:w}=e.useContext(B),S=n||b||"",[M,P]=e.useState(30),O=l.useInterval((()=>P((e=>e-1))),1e3),[_,k]=l.useCounter(0,{min:0,max:3}),F=e.useRef(!0),{t:z}=g.useTranslations();e.useEffect((()=>(O.start(),O.stop)),[]),e.useEffect((()=>{0===M&&(O.stop(),F.current=!1)}),[M]);const D=I({initialValues:{otp:""},validate:d.yupResolver(te(z))});e.useEffect((()=>{u&&D.setFieldError("otp",u)}),[u]);const A=e.useMemo((()=>T.default((()=>{F.current||(k.increment(),P(30),null==s||s(S),O.start(),F.current=!0)}),1e3,{trailing:!1})),[S,s,O]),Z=E>=2,V=`<b style="color:${i.theme.colors.gray800}">${S.slice(0,-3).replace(/./g,"x").concat(S.slice(-3))}</b>`;return j.default.createElement(ee,{heading:h?j.default.createElement(t.Flex,{align:"center",justify:"center",gap:t.rem(8)},j.default.createElement("img",{style:{width:t.rem(24)},loading:"lazy",src:r.CommonGAssets.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),j.default.createElement("span",null,z("onboarding.otpWhatsapps.heading"))):z("onboarding.otpForm.heading"),description:j.default.createElement(j.default.Fragment,null,j.default.createElement("span",{dangerouslySetInnerHTML:{__html:z(h?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:V})}}),!Z&&j.default.createElement("svg",{onClick:()=>{E>=2||(x((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),C())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},j.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},j.default.createElement(q,{form:D},j.default.createElement("form",{onSubmit:D.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{k.increment();!(yield null==a?void 0:a(e.otp))&&w()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:["otp"]}),j.default.createElement("div",{className:"resend"},j.default.createElement(o.Text,{size:"p4",color:i.theme.colors.gray400},z("onboarding.otpForm.notReceiveOTP")),j.default.createElement(o.Text,{as:"a",size:"p4",color:y?i.theme.mbColors.pink:i.theme.colors.primaryBase,onClick:A},z("onboarding.otpForm.resendCode",{seconds:M}))),j.default.createElement(L.Button,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":h?"OTP":"Sign Up","data-event-action":h?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},z("onboarding.button.continue")),f&&_>=3&&j.default.createElement(L.Button,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:m,type:"button"},z("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:a,canSkip:r,loading:o,errorMessage:i,initialData:l})=>{const{t:s,locale:u}=g.useTranslations(),{siteType:m,isMarryBaby:p,setSharedData:f,nextStep:h}=e.useContext(B),b=I({validate:d.yupResolver(ae(s))});return e.useEffect((()=>{b.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),e.useEffect((()=>{i&&b.setFieldError("email",i)}),[i]),j.default.createElement(ie,{heading:s("onboarding.formEmail.heading"),description:s("onboarding.formEmail.description",{site:p?"Marry Baby":n.LOCALE_SPECS[u].SITE_NAME_FORMATTED})},j.default.createElement(q,{form:b},j.default.createElement("form",{className:"form",onSubmit:b.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){f((t=>Object.assign(Object.assign({},t),e)));!(yield null==a?void 0:a(Object.assign(Object.assign({},e),{birthday:e.birthday&&w.format(e.birthday,"yyyy-MM-dd")})))&&h()}))),(e=>{console.log({fieldErrors:e})}))},j.default.createElement(N,{inputOrder:["full_name","email","dob","gender"]}),j.default.createElement(L.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:m,isLoading:o,disabled:o},s("onboarding.button.continue")),r&&j.default.createElement(L.Button,{theme:m,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},s("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:a}=t,n=c.__rest(t,["onClose"]);const{t:r}=g.useTranslations(),{siteType:o}=e.useContext(B);return j.default.createElement(ie,Object.assign({},n),j.default.createElement(L.Button,{theme:o,size:"lg",onClick:a,className:"form-button"},r("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:r,canSkip:o=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:u}=t,m=c.__rest(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:p}=g.useTranslations(),{nextStep:f,setSharedData:h,sharedData:b}=e.useContext(B),{isMobile:E}=a.useScreenSize(),x=I({initialValues:{term:!1,phone:(null==b?void 0:b.phone)||(null==s?void 0:s.phone)||"",email:(null==b?void 0:b.email)||(null==s?void 0:s.email)||"",name:(null==b?void 0:b.name)||(null==s?void 0:s.name)||""},validate:d.yupResolver(se(p,!l))}),C=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return j.default.createElement(le,Object.assign({heading:(null==i?void 0:i.heading)||p("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||p("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":u},m),j.default.createElement(q,{form:x},j.default.createElement("form",{style:{width:"100%"},onSubmit:x.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{yield null==r?void 0:r(e),h((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),f()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:C,withSimilac:!0,customTerms:l}),j.default.createElement(a.Button,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},p("onboarding.button.continue")),o&&j.default.createElement(a.Button,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},p("onboarding.button.skip")))))},FrisoForm:A,UpdatePasswordForm:({onClose:a,onSubmit:n,canSkip:r,errorMessage:o,loading:i})=>{const{t:l}=g.useTranslations(),{nextStep:s}=e.useContext(B),u=I({initialValues:{password:"",confirmPassword:""},validate:d.yupResolver(ue(l))});return j.default.createElement(ie,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},j.default.createElement(q,{form:u},j.default.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!o&&s()}))),(e=>{console.log({fieldErrors:e})}))},j.default.createElement(N,{inputOrder:["password","confirm_password"]}),j.default.createElement(L.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),r&&j.default.createElement(L.Button,{color:"ghost",isBlock:!0,size:"lg",onClick:a},l("onboarding.button.skip")),o&&j.default.createElement(t.Input.Error,{className:"form-error"},o))))},StepRenderer:({children:t,onStepChange:a})=>{const{currentStep:n,setMaxStep:r}=e.useContext(B),o=j.default.Children.count(t);return e.useEffect((()=>{null==a||a(n)}),[n]),e.useEffect((()=>{r(o-1)}),[o]),j.default.createElement(j.default.Fragment,null,k.default(t).map(((t,a)=>{const r=a===n;return j.default.createElement(e.Fragment,{key:a},j.default.isValidElement(t)?t.props.alwaysRender||r?j.default.cloneElement(t,{isActive:a===n,stepIndex:a}):null:r?t:null)})))},ThankYou:e=>{var{onClose:n,thanksPageInfo:r,isActive:i}=e,l=c.__rest(e,["onClose","thanksPageInfo","isActive"]);const{t:s}=g.useTranslations(),{isMobile:d}=a.useScreenSize();return j.default.createElement(de,Object.assign({heading:"",description:"",hiddenLogo:d,"data-active":i},l),j.default.createElement(t.Container,{fluid:!0},j.default.createElement(t.Stack,{align:"center",spacing:8,w:"100%",ta:"center"},j.default.createElement(t.AspectRatio,{ratio:1,w:{base:120,md:160}},j.default.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},j.default.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},j.default.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),j.default.createElement("g",{mask:"url(#mask0_4580_96805)"},j.default.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),j.default.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),j.default.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),j.default.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),j.default.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),j.default.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),j.default.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),j.default.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),j.default.createElement("defs",null,j.default.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},j.default.createElement("stop",{stopColor:"#C4C4C4"}),j.default.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),j.default.createElement(p.Heading,{tag:"h3"},null==r?void 0:r.title),j.default.createElement(o.Text,{size:"p3",color:"gray.6"},null==r?void 0:r.description),j.default.createElement(a.Button,{mt:{base:16,md:24},fullWidth:d,size:"lg",onClick:n},s("similac.thankYou.done")))))}};exports.MAPPED_LOCALE=s.MAPPED_LOCALE,exports.DynamicForm=N,exports.Onboarding=me,exports.OnboardingContext=B;
285
+ `,ue=e=>_.object().shape({password:_.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:_.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([_.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),me={Provider:({children:t,siteType:a,setSharedData:n})=>{const[r,o]=e.useState(0),[i,l]=e.useState(0),[s,d]=e.useState({});return e.useEffect((()=>{null==n||n(s)}),[s,n]),j.default.createElement(B.Provider,{value:{currentStep:r,setCurrentStep:o,setMaxStep:l,nextStep:()=>r+1<=i&&o(r+1),prevStep:()=>r-1>=0&&o(r-1),siteType:a,isMarryBaby:"marryBaby"===a,sharedData:s,setSharedData:d}},t)},Modal:n=>{var{children:r,withSimilac:l,banner:s,withPortal:d}=n,u=c.__rest(n,["children","withSimilac","banner","withPortal"]);const{isMobile:p}=a.useScreenSize(),{isMarryBaby:f}=e.useContext(B),{t:b}=g.useTranslations();if(d&&"undefined"==typeof window)return null;const h=j.default.createElement(Z,Object.assign({},u),j.default.createElement(V,null,j.default.createElement(t.Grid,{sx:{[m.MediaQueries.mbDown]:{margin:0},".mantine-Grid-col":{[m.MediaQueries.mbDown]:{padding:0}}}},j.default.createElement(t.Grid.Col,{span:"object"!=typeof s&&!l||p?12:6,order:l?2:1,orderMd:l?1:2,sx:{zIndex:l?99:void 0}},j.default.createElement(H,{"data-similac":l,"data-has-banner":"object"==typeof s},r)),s&&"object"==typeof s&&!l&&j.default.createElement(t.Grid.Col,{span:p?12:6,order:1,orderMd:2},j.default.createElement(R,null,j.default.createElement($,{"data-is-marry-baby":f},j.default.createElement(W,null,s.heading&&j.default.createElement(t.Title,{order:1,mb:24},s.heading),s.description&&j.default.createElement(o.Text,{size:"p1",color:i.theme.colors.gray800},b("onboarding.welcomeScreen.content"))),j.default.createElement(U,null,s.imgSrc?j.default.createElement("img",{src:s.imgSrc,loading:"lazy"}):s.imgComponent?s.imgComponent:null)))),s&&"object"==typeof s&&l&&(s.imgSrc||s.imgComponent)&&j.default.createElement(t.Grid.Col,{span:"auto",order:1,orderMd:2},j.default.createElement(U,{className:"similac"},s.imgSrc?j.default.createElement("img",{src:s.imgSrc,loading:"lazy"}):s.imgComponent?s.imgComponent:null)))));return d?C.createPortal(h,m.getPopupWrapperDom()):h},Form:({onClose:t,onSubmit:n,canSkip:r=!0,customFormTexts:i,isActive:l,submitProps:s,submitLabel:u,skipProps:m,isWhatsApp:p})=>{const{t:f}=g.useTranslations(),{sharedData:b,setSharedData:h,nextStep:E}=e.useContext(B),x=I({initialValues:{phone:(null==b?void 0:b.phone)||""},validate:d.yupResolver(X(f))});return j.default.createElement(J,{heading:(null==i?void 0:i.heading)||f("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||f(p?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":l},j.default.createElement(q,{form:x},j.default.createElement("form",{onSubmit:x.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{h((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),E()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:["phone"]}),j.default.createElement(a.Button,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},p&&{leftIcon:j.default.createElement(o.Icon.WhatsApp,{size:18,useCurrentColor:!0})},s,{type:"submit","data-event-category":p?"OTP":"Sign Up","data-event-action":p?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),u||f(p?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),r&&j.default.createElement(a.Button,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},p&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),f("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:a,onResendCode:n,otpError:r,onClose:o,loading:u,canSkip:m})=>{const{sharedData:{email:p,retryEmailCount:f},setSharedData:b,prevStep:h,siteType:E,isMarryBaby:x,nextStep:C}=e.useContext(B),v=a||p||"",[w,S]=e.useState(30),M=l.useInterval((()=>S((e=>e-1))),1e3),[P,O]=l.useCounter(0,{min:0,max:3}),_=e.useRef(!0),{t:k}=g.useTranslations();e.useEffect((()=>(M.start(),M.stop)),[]),e.useEffect((()=>{0===w&&(M.stop(),_.current=!1)}),[w]);const F=I({initialValues:{otp:""},validate:d.yupResolver(te(k))});e.useEffect((()=>{r&&F.setFieldError("otp",r)}),[r]);const z=e.useMemo((()=>T.default((()=>{_.current||(O.increment(),S(30),null==n||n(v),M.start(),_.current=!0)}),1e3,{trailing:!1})),[v,n,M]),D=f>=2;return j.default.createElement(ee,{heading:k("onboarding.otpForm.heading"),description:j.default.createElement(j.default.Fragment,null,j.default.createElement("span",{dangerouslySetInnerHTML:{__html:k("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${i.theme.colors.gray800}">${s.hiddenEmailChar(v)}</b>`})}}),!D&&j.default.createElement("svg",{onClick:()=>{f>=2||(b((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),h())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},j.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},j.default.createElement(q,{form:F},j.default.createElement("form",{onSubmit:F.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{O.increment();!(yield null==t?void 0:t(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:["otp"]}),j.default.createElement("div",{className:"resend"},j.default.createElement(y.Text,{size:"p4",color:i.theme.colors.gray400},k("onboarding.otpForm.notReceiveOTP")),j.default.createElement(y.Text,{as:"a",size:"p4",color:x?i.theme.mbColors.pink:i.theme.colors.primaryBase,onClick:z},k("onboarding.otpForm.resendCode",{seconds:w}))),j.default.createElement(L.Button,{theme:E,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:u,disabled:u,"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"},k("onboarding.button.continue")),m&&P>=3&&j.default.createElement(L.Button,{theme:E,color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},k("onboarding.button.skip")))))},Phone:({onSubmit:a,phone:n,onResendCode:s,otpError:u,onClose:m,loading:p,canSkip:f,isWhatsApp:b})=>{const{sharedData:{phone:h,retryPhoneCount:E},setSharedData:x,prevStep:C,siteType:v,isMarryBaby:y,nextStep:w}=e.useContext(B),S=n||h||"",[M,P]=e.useState(30),O=l.useInterval((()=>P((e=>e-1))),1e3),[_,k]=l.useCounter(0,{min:0,max:3}),F=e.useRef(!0),{t:z}=g.useTranslations();e.useEffect((()=>(O.start(),O.stop)),[]),e.useEffect((()=>{0===M&&(O.stop(),F.current=!1)}),[M]);const D=I({initialValues:{otp:""},validate:d.yupResolver(te(z))});e.useEffect((()=>{u&&D.setFieldError("otp",u)}),[u]);const A=e.useMemo((()=>T.default((()=>{F.current||(k.increment(),P(30),null==s||s(S),O.start(),F.current=!0)}),1e3,{trailing:!1})),[S,s,O]),Z=E>=2,V=`<b style="color:${i.theme.colors.gray800}">${S.slice(0,-3).replace(/./g,"x").concat(S.slice(-3))}</b>`;return j.default.createElement(ee,{heading:b?j.default.createElement(t.Flex,{align:"center",justify:"center",gap:t.rem(8)},j.default.createElement("img",{style:{width:t.rem(24)},loading:"lazy",src:r.CommonGAssets.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),j.default.createElement("span",null,z("onboarding.otpWhatsapps.heading"))):z("onboarding.otpForm.heading"),description:j.default.createElement(j.default.Fragment,null,j.default.createElement("span",{dangerouslySetInnerHTML:{__html:z(b?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:V})}}),!Z&&j.default.createElement("svg",{onClick:()=>{E>=2||(x((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),C())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},j.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},j.default.createElement(q,{form:D},j.default.createElement("form",{onSubmit:D.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{k.increment();!(yield null==a?void 0:a(e.otp))&&w()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:["otp"]}),j.default.createElement("div",{className:"resend"},j.default.createElement(o.Text,{size:"p4",color:i.theme.colors.gray400},z("onboarding.otpForm.notReceiveOTP")),j.default.createElement(o.Text,{as:"a",size:"p4",color:y?i.theme.mbColors.pink:i.theme.colors.primaryBase,onClick:A},z("onboarding.otpForm.resendCode",{seconds:M}))),j.default.createElement(L.Button,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:p,disabled:p,"data-event-category":b?"OTP":"Sign Up","data-event-action":b?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},z("onboarding.button.continue")),f&&_>=3&&j.default.createElement(L.Button,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:m,type:"button"},z("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:a,canSkip:r,loading:o,errorMessage:i,initialData:l})=>{const{t:s,locale:u}=g.useTranslations(),{siteType:m,isMarryBaby:p,setSharedData:f,nextStep:b}=e.useContext(B),h=I({validate:d.yupResolver(ae(s))});return e.useEffect((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),e.useEffect((()=>{i&&h.setFieldError("email",i)}),[i]),j.default.createElement(ie,{heading:s("onboarding.formEmail.heading"),description:s("onboarding.formEmail.description",{site:p?"Marry Baby":n.LOCALE_SPECS[u].SITE_NAME_FORMATTED})},j.default.createElement(q,{form:h},j.default.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){f((t=>Object.assign(Object.assign({},t),e)));!(yield null==a?void 0:a(Object.assign(Object.assign({},e),{birthday:e.birthday&&w.format(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},j.default.createElement(N,{inputOrder:["full_name","email","dob","gender"]}),j.default.createElement(L.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:m,isLoading:o,disabled:o},s("onboarding.button.continue")),r&&j.default.createElement(L.Button,{theme:m,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},s("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:a}=t,n=c.__rest(t,["onClose"]);const{t:r}=g.useTranslations(),{siteType:o}=e.useContext(B);return j.default.createElement(ie,Object.assign({},n),j.default.createElement(L.Button,{theme:o,size:"lg",onClick:a,className:"form-button"},r("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:r,canSkip:o=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:u}=t,m=c.__rest(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:p}=g.useTranslations(),{nextStep:f,setSharedData:b,sharedData:h}=e.useContext(B),{isMobile:E}=a.useScreenSize(),x=I({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:d.yupResolver(se(p,!l))}),C=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return j.default.createElement(le,Object.assign({heading:(null==i?void 0:i.heading)||p("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||p("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":u},m),j.default.createElement(q,{form:x},j.default.createElement("form",{style:{width:"100%"},onSubmit:x.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){try{yield null==r?void 0:r(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),f()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},j.default.createElement(N,{inputOrder:C,withSimilac:!0,customTerms:l}),j.default.createElement(a.Button,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},p("onboarding.button.continue")),o&&j.default.createElement(a.Button,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},p("onboarding.button.skip")))))},FrisoForm:A,UpdatePasswordForm:({onClose:a,onSubmit:n,canSkip:r,errorMessage:o,loading:i})=>{const{t:l}=g.useTranslations(),{nextStep:s}=e.useContext(B),u=I({initialValues:{password:"",confirmPassword:""},validate:d.yupResolver(ue(l))});return j.default.createElement(ie,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},j.default.createElement(q,{form:u},j.default.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>c.__awaiter(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!o&&s()}))),(e=>{console.log({fieldErrors:e})}))},j.default.createElement(N,{inputOrder:["password","confirm_password"]}),j.default.createElement(L.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),r&&j.default.createElement(L.Button,{color:"ghost",isBlock:!0,size:"lg",onClick:a},l("onboarding.button.skip")),o&&j.default.createElement(t.Input.Error,{className:"form-error"},o))))},StepRenderer:({children:t,onStepChange:a})=>{const{currentStep:n,setMaxStep:r}=e.useContext(B),o=j.default.Children.count(t);return e.useEffect((()=>{null==a||a(n)}),[n]),e.useEffect((()=>{r(o-1)}),[o]),j.default.createElement(j.default.Fragment,null,k.default(t).map(((t,a)=>{const r=a===n;return j.default.createElement(e.Fragment,{key:a},j.default.isValidElement(t)?t.props.alwaysRender||r?j.default.cloneElement(t,{isActive:a===n,stepIndex:a}):null:r?t:null)})))},ThankYou:e=>{var{onClose:n,thanksPageInfo:r,isActive:i}=e,l=c.__rest(e,["onClose","thanksPageInfo","isActive"]);const{t:s}=g.useTranslations(),{isMobile:d}=a.useScreenSize();return j.default.createElement(de,Object.assign({heading:"",description:"",hiddenLogo:d,"data-active":i},l),j.default.createElement(t.Container,{fluid:!0},j.default.createElement(t.Stack,{align:"center",spacing:8,w:"100%",ta:"center"},j.default.createElement(t.AspectRatio,{ratio:1,w:{base:120,md:160}},j.default.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},j.default.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},j.default.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),j.default.createElement("g",{mask:"url(#mask0_4580_96805)"},j.default.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),j.default.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),j.default.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),j.default.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),j.default.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),j.default.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),j.default.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),j.default.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),j.default.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),j.default.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),j.default.createElement("defs",null,j.default.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},j.default.createElement("stop",{stopColor:"#C4C4C4"}),j.default.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),j.default.createElement(p.Heading,{tag:"h3"},null==r?void 0:r.title),j.default.createElement(o.Text,{size:"p3",color:"gray.6"},null==r?void 0:r.description),j.default.createElement(a.Button,{mt:{base:16,md:24},fullWidth:d,size:"lg",onClick:n},s("similac.thankYou.done")))))}};exports.MAPPED_LOCALE=s.MAPPED_LOCALE,exports.DynamicForm=N,exports.Onboarding=me,exports.OnboardingContext=B;
package/build/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./index-6f8ff7df.js"),a=require("./index-beef0ff7.js"),r=require("./index-0c7093ea.js"),l=require("./useTranslations-b435b717.js"),n=require("./theme-98a7bede.js"),i=require("recharts"),o=require("./index-4b719c83.js"),s=require("./useOutsideClick-5544e570.js"),c=require("styled-components"),d=require("./tslib.es6-d46558cb.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index.styled-a45b7854.js"),require("@mantine/core"),require("./Subot-54546cbb.js"),require("./index-065c9097.js"),require("./index-d27a3f5f.js"),require("date-fns/locale"),require("./isProduction-426652cc.js"),require("./index-4de92198.js"),require("@mantine/hooks"),require("dayjs"),require("./utils-469dda3f.js"),require("@mantine/carousel"),require("classnames"),require("./index-07dff904.js"),require("@mantine/dates"),require("./translationsContext-6c5fb248.js"),require("string-format");var m=u(e),f=u(c);const p=e=>{const{x:t,y:a,payload:r,activeWeek:l}=e;return l===r.value?m.default.createElement("g",{transform:`translate(${t},${a})`},m.default.createElement("circle",{r:12,fill:"marryBaby"===e.siteType?n.theme.mbColors.pink:n.theme.colors.primaryBase}),m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},r.value)):m.default.createElement("g",{transform:`translate(${t},${a})`},m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},r.value))},g=f.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./index-0a35e29e.js"),a=require("./index-c53c2cf6.js"),r=require("./index-031eda4d.js"),l=require("./useTranslations-eef7f548.js"),n=require("./theme-0bb94193.js"),i=require("recharts"),o=require("./index-52b005ff.js"),s=require("./useOutsideClick-ac461ca7.js"),c=require("styled-components"),d=require("./tslib.es6-293338f5.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index.styled-250b6af4.js"),require("@mantine/core"),require("./Subot-511ff255.js"),require("./index-04bf4b9a.js"),require("./index-3183ed6e.js"),require("date-fns/locale"),require("./isProduction-8a3929cb.js"),require("./index-8b4d8b74.js"),require("@mantine/hooks"),require("dayjs"),require("./utils-ec00b8cb.js"),require("@mantine/carousel"),require("classnames"),require("./index-ebed7399.js"),require("@mantine/dates"),require("./translationsContext-e09b4f33.js"),require("string-format");var m=u(e),f=u(c);const p=e=>{const{x:t,y:a,payload:r,activeWeek:l}=e;return l===r.value?m.default.createElement("g",{transform:`translate(${t},${a})`},m.default.createElement("circle",{r:12,fill:"marryBaby"===e.siteType?n.theme.mbColors.pink:n.theme.colors.primaryBase}),m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},r.value)):m.default.createElement("g",{transform:`translate(${t},${a})`},m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},r.value))},g=f.default.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- "use strict";var e=require("./index-d27a3f5f.js"),o=require("./isProduction-426652cc.js");exports.getCareApiDomain=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${o.isProduction?"health-care.":"service-health-care."}hellohealthgroup.com`,exports.getCurrentBaseUrl=(t,s)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV,i=!r&&!o.isProduction;return r?"http://localhost:3000":`https://${i?s?"fe.":"discover.":s?"www.":""}${e.domainLocales[s?"vi-VN_MB":t]}`},exports.getCurrentSsoUrl=(t,s)=>process.env.UNIFY_SSO_API||`https://${o.isProduction?"id.":"staging-id."}${e.domainLocales[s?"vi-VN_MB":t]}`,exports.getDiscoverApiDomain=t=>process.env.UNIFY_DISCOVER_API||`https://${o.isProduction?"wp.":"staging."}${e.domainLocales[t]}`,exports.getTogetherApiDomain=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${o.isProduction?"together.":"staging-together."}hellohealthgroup.com`;
1
+ "use strict";var e=require("./index-3183ed6e.js"),o=require("./isProduction-8a3929cb.js");exports.getCareApiDomain=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${o.isProduction?"health-care.":"service-health-care."}hellohealthgroup.com`,exports.getCurrentBaseUrl=(t,s)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV,i=!r&&!o.isProduction;return r?"http://localhost:3000":`https://${i?s?"fe.":"discover.":s?"www.":""}${e.domainLocales[s?"vi-VN_MB":t]}`},exports.getCurrentSsoUrl=(t,s)=>process.env.UNIFY_SSO_API||`https://${o.isProduction?"id.":"staging-id."}${e.domainLocales[s?"vi-VN_MB":t]}`,exports.getDiscoverApiDomain=t=>process.env.UNIFY_DISCOVER_API||`https://${o.isProduction?"wp.":"staging."}${e.domainLocales[t]}`,exports.getTogetherApiDomain=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${o.isProduction?"together.":"staging-together."}hellohealthgroup.com`;
package/build/subot.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./Subot-54546cbb.js"),i=require("./tslib.es6-d46558cb.js"),n=require("./index-d27a3f5f.js"),o=require("js-cookie"),a=require("fastdom"),l=require("fastdom/extensions/fastdom-promised"),r=require("string-format"),d=require("./utils-c18ec2df.js"),s=require("uuid"),c=require("./isProduction-426652cc.js"),u=require("hex-rgb"),p=require("classnames"),m=require("./index-21c825aa.js"),f=require("./index-7154350f.js"),v=require("framer-motion"),g=require("./utils-469dda3f.js"),b=require("styled-components"),h=require("./index-4de92198.js"),y=require("remarkable"),E=require("react-intersection-observer"),x=require("@mantine/core"),C=require("./index-beef0ff7.js"),N=require("dayjs"),T=require("dayjs/plugin/isSameOrBefore"),w=require("./theme-98a7bede.js");require("@mantine/dates"),require("./index-065c9097.js"),require("./translationsContext-6c5fb248.js"),require("@mantine/hooks");var _=require("./index-0f6355d4.js"),I=require("lodash/isEmpty"),k=require("react-hook-form"),S=require("react-phone-number-input"),O=require("@react-google-maps/api"),A=require("./usePlacesAutocomplete-55e04a25.js"),P=require("./index-4c4d7568.js");function M(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("./cookieHelper-59a64e32.js"),require("slugify"),require("./useTranslations-b435b717.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("@mantine/carousel");var B=M(e),j=M(o),R=M(a),L=M(l),U=M(r),D=M(u),F=M(p),H=M(b),q=M(N),z=M(T),Y=M(I),G=M(S);const Q=R.default.extend(L.default),V={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},X={cached:{},clearCached:e=>{console.log(X.cached),Object.keys(X.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),X.cached[e]=void 0}))},withCached:(e,t)=>i.__awaiter(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===X.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof X.cached[e]&&(t(X.cached[e]),clearInterval(n))}),100)}));if("object"==typeof X.cached[e])return X.cached[e];X.cached[e]="waitingTheFirstResponse";try{const i=yield t();return X.cached[e]=i,setTimeout((()=>{X.cached[e]=void 0}),18e5),i}catch(t){return X.cached[e]=void 0,Promise.reject(t)}}))},K=(e,t)=>{const{subotApiUrl:i}=null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+U.default(e,Object.assign({},t))},W=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(K(V.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),J=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},Z=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield X.withCached("SubotInlineFirstNode",(()=>i.__awaiter(void 0,void 0,void 0,(function*(){const t=yield d.callApi(K(V.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return J(t),t}))))}catch(e){return null}})),$=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(K(V.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),ee=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(K(V.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),te=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],ie=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...te],ne=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(ie.includes(i))if(te.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),oe=e=>[{id:s.v4(),label:JSON.stringify({title:"",description:""}),type:t.NodeIntentType.SSO_INTENT,url:""},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/shield.svg"}];function ae(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const le=e=>d.cookie.parse(e||"")["hhg-id"]||j.default.get("hhg-id")||"",re=e=>{if(e)return j.default.set("hhg-id",e),e;const t=le();if(t)return t;const i=s.v4();return j.default.set("hhg-id",i),i},de=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||j.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},se=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||j.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},ce=s.v4(),ue=()=>ce,pe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${c.isProduction?"":"discover."}${n.domainLocales[e]}`,me=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},fe=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},ve=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},ge=(e,i,n,o)=>{const a=ve(e[0]);if(!i)return{};const l=e.findIndex((e=>e.id==i)),r=e.reduce(((e,r,d)=>{var s,c;if(d>l)return e;const u=r,p=n&&u.id===i?{action_id:n}:u._message;let m=0;const f=null===(s=u.actions)||void 0===s?void 0:s.find((e=>e.id===(null==p?void 0:p.action_id)));m+=(null==f?void 0:f.score)||0;const v=void 0!==a[u.id],g=n&&u.id===i?o:null==p?void 0:p.form_submit_meta;if(v&&u.type===t.NodeType.FORM&&g){const e=a[u.id].action_id,t=null===(c=u.actions)||void 0===c?void 0:c.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(a[u.id].number&&["+","-","x","/"].includes(a[u.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=a[u.id].operator,i=a[u.id].number;let o=0;"+"===t&&(o=e+i),"-"===t&&(o=e-i),"x"===t&&(o=e*i),"/"===t&&(o=e/i),isNaN(o)||(m+=o)}}return e+m}),0);return{current_total_dynamic_score:r}},be=(e,i)=>{const n=ve(i[0]);if(0===Object.keys(n).length)return e;const o=i.filter((e=>e.type===t.NodeType.FORM));return Object.keys(n).forEach((t=>{var i,a,l;const r=o.find((e=>e.id===t)),d=null===(i=null==r?void 0:r.actions)||void 0===i?void 0:i.find((e=>{var i;return e.id===(null===(i=n[t])||void 0===i?void 0:i.action_id)})),s=null==d?void 0:d.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===s&&"number"===e.control));if(n[t].number&&["+","-","x","/"].includes(n[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const i=Number(c.value),o=n[t].operator,a=n[t].number;let l=0;if("+"===o&&(l=i+a),"-"===o&&(l=i-a),"x"===o&&(l=i*a),"/"===o&&(l=i/a),e.includes(`{{var:${s}}}`)){const t=new RegExp(`{{var:${s}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},he="other",ye="stateInlineSSO",Ee=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},xe=e=>{const i=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,i)=>{var n,o,a,l,r,d,s,c,u,p,m,f,v,g,b,h,y,E,x,C,N;if(i.actions&&(null===(n=i._message)||void 0===n?void 0:n.action_id)&&(null===(o=i._message)||void 0===o?void 0:o.action_value)){const n=i._message.action_value;if(i.type===t.NodeType.FORM){const t=["address","province","district","commune"],n=((null===(a=i._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>!t.includes(e.control))),o=((null===(l=i._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter((e=>t.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),m=[null===(r=o.address)||void 0===r?void 0:r.value,null===(d=o.commune)||void 0===d?void 0:d.value,null===(s=o.district)||void 0===s?void 0:s.value,null===(c=o.province)||void 0===c?void 0:c.value].filter(Boolean).join(", ");m&&o.address?e.push({attribute:o.address.key,value:m,label_question:(null===(p=null===(u=i.intents)||void 0===u?void 0:u[0])||void 0===p?void 0:p.label)||""}):n.forEach((t=>{var n,o;e.push({attribute:t.key,value:t.value,label_question:(null===(o=null===(n=i.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(i.type===t.NodeType.TEXT)if(i.is_multi_select){const t=Object.keys(i._message.selected_actions||{}),n=i.actions.filter((e=>e.label&&t.includes(e.id))).map((e=>e.label));t.length&&e.push({attribute:i.actions[0].key||"",value:n,label_question:(null===(f=null===(m=i.intents)||void 0===m?void 0:m[0])||void 0===f?void 0:f.label)||""})}else{const o=i._message.action_id,a=i.actions.find((e=>e.id===o)),l=null==a?void 0:a.label,r=null===(b=null===(g=null===(v=i._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find((e=>e.key===he)))||void 0===b?void 0:b.value,d=(null==a?void 0:a.type)===t.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;l&&o&&e.push({attribute:n,value:d&&r?r:l,label_question:(null===(y=null===(h=i.intents)||void 0===h?void 0:h[0])||void 0===y?void 0:y.label)||""})}if(i.type===t.NodeType.POLL){const t=i.id,n=(null===(x=null===(E=i._message)||void 0===E?void 0:E.current_polls)||void 0===x?void 0:x[t])||[],o=i.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:i.actions[0].key||"",value:o,label_question:(null===(N=null===(C=i.intents)||void 0===C?void 0:C[0])||void 0===N?void 0:N.label)||""})}}return e}),[]);return i},Ce=(e,i)=>{var n;try{if("ACUVUE"!==(null===(n=i.extra_settings)||void 0===n?void 0:n.subot_type))return;let o="",a="",l="",r=se().email;if((e||[]).forEach((e=>{var i,n,d;const s=e._message;if(!s)return;const c=null===(i=e.actions)||void 0===i?void 0:i.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?o=(null==c?void 0:c.label)||"":"voucher_color"===s.action_value&&(a=(null==c?void 0:c.label)||""),e.type===t.NodeType.FORM){const e=null===(n=s.form_submit_meta)||void 0===n?void 0:n.find((e=>"voucher_size"===e.key)),t=null===(d=s.form_submit_meta)||void 0===d?void 0:d.find((e=>"email"===e.control));e&&(l=e.value),t&&(r=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===o&&r)return{email:r,voucherName:o};if(o&&a&&l&&r)return{email:r,voucherName:`${o}|${a}|${l}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ne=({nodes:e,activeId:o,params:a,accountIdFromLogs:l})=>i.__awaiter(void 0,void 0,void 0,(function*(){try{let i="in_progress";const r=e[e.length-1];(null==r?void 0:r.type)&&t.NodeFinalTypes.includes(r.type)&&(i="complete");const s=e.slice(1),c={activeId:o,params:a,nodes:s,tracking:Object.assign(Object.assign({},Ee()),{full_url:window.location.href}),unifiedAnswers:xe(s),voucherAnswers:Ce(s,e[0])},u={cookie_id:re(),account_id:l||de()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(c),status:i,type:"inline",market:n.MAP_DOMAIN_BY_LOCALE[d.locale]};yield d.callApi(K(V.POST_SUBOT_CREATE_LOG),"POST",{data:u})}catch(e){}})),Te=(e,t)=>{try{const[i,n,o]=D.default(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},we=e.createContext({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),_e=({children:o,articleLink:a,subotId:l,isFullContainer:r,bgColor:s,primaryColor:c,isDisabledAnimationOnMobile:u,onCloseMobile:p,userInfo:m})=>{const{formatMessage:f,action:{pushNotifications:v}}=e.useContext(d.TogetherComponentGlobalContext),g=e.useRef(null),b=e.useRef(null),[h,y]=e.useState(!0),[E,x]=e.useState(""),[C,N]=e.useState([]),[T,w]=e.useState(!1),[_,I]=e.useState({});e.useEffect((()=>{const e=s||"#e3f2ff",t=c||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=g.current,a=(new Date).getTime();o&&(Q.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",Te(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",Te(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",Te(t,.3)||"#bcdeff")})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[s,c]);const k=e.useCallback((()=>{const e=window.gaData,t=window.location.origin+n.basePath+("tl-PH"===(null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.locale)?a.replace("fil/",""):a),i={bot_id:l,account_id:de()||null,action_id:"",action_value:"",cookie_id:re(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:j.default.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:ue()};return ne(i,null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.router.query)}),[]),S=e.useCallback((()=>{var e;null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),O=e.useCallback(((e,n=!0)=>i.__awaiter(void 0,void 0,void 0,(function*(){var o;if(!e||!e.url||!e.bot_id)return;let a="",l=[];y(!0);const r=yield Z(e.bot_id);1===(null==r?void 0:r._status)&&(a=null==r?void 0:r._data.id.toString(),l.push(null==r?void 0:r._data,null==r?void 0:r._data.first_node));const s=n?yield(c=l[0],i.__awaiter(void 0,void 0,void 0,(function*(){var e,t;try{if(!c)return null;const i=yield d.callApi(K(V.GET_SUBOT_LOG,{botId:c.id,cookieId:re(),accountId:de()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[c,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:de()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var c;s&&(l=s.nodes,a=s.activeId,b.current=(null===(o=s.params)||void 0===o?void 0:o.account_id)||0);const u=((e,{getParams:i})=>{try{if(!de())return null;const n=JSON.parse(localStorage.getItem(ye)||""),o=18e5;return(null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+o>Date.now()&&(localStorage.removeItem(ye),n.listNodes.slice(-1)[0].position===t.NodePosition.SSO)?{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},i()),n.params),{account_id:de()||null,cookie_id:re(n.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:k});if(u&&u.params.action_id&&u.params.action_value){const e=yield W(u.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(a=null==e?void 0:e._data.node.id,l=u.listNodes,l[l.length-1]=null==e?void 0:e._data.node,Ne({nodes:l,activeId:a,params:u.params,accountIdFromLogs:b.current}),setTimeout((()=>{S()}),100))}const p=(null==u?void 0:u.params)||(null==s?void 0:s.params)||e,[m,f]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(l[0],a,l);y(!1),x(m),N(f),I(Object.assign(Object.assign({},e),p))}))),[]),A=e.useCallback(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${l}"]`);i&&i.click();let n=E,o=[...C];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(y(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{N(o),x(n),y(!1),Ne({nodes:o,activeId:n,params:_,accountIdFromLogs:b.current})}),250)}),[C,E]),P=e.useCallback((e=>i.__awaiter(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),ge(C,E,e.action_id)),n=yield W(t);if(y(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:o}=e,a=i.__rest(e,["node"]),l=Object.assign(Object.assign({},o),{_message:Object.assign(Object.assign({},a),{node_id:o.id})});return void(-1!==C.findIndex((e=>e.id===l.id))?A(l):A(l,t))}v({title:f({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=C.find((e=>e.id==E));t&&t.hasOwnProperty("first_node")&&(x(C[1].id.toString()),Ne({nodes:C,activeId:C[1].id.toString(),params:k(),accountIdFromLogs:b.current}))}))),[A,C]),M=e.useCallback((()=>{const e=C.findIndex((({id:e})=>e==E));if(e&&-1!==e&&e>1){const t=C[e-1];x(t.id),Ne({nodes:C,activeId:t.id,params:_,accountIdFromLogs:b.current})}}),[C,E]),R=e.useCallback((()=>{const e=k();O(e,!1);const t=C[0],i=C[1];Ne({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:b.current})}),[k,O,C]),L=e.useCallback((e=>{N((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==E?t.map((t=>{const i=t;return i.id===E?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[E]);e.useEffect((()=>{if(j.default.get(n.GA_TOKEN_COOKIE)){const e=k();O(e)}else ae({condition:()=>Boolean(j.default.get(n.GA_TOKEN_COOKIE)),finished:()=>{const e=k();O(e)}})}),[]),e.useEffect((()=>{if(!C.length)return;C.find((e=>e.id==E))&&E||x(l+"")}),[E,C]);const U=e.useMemo((()=>({activeId:E,params:_,listNodes:C,loading:h,setLoading:y,getParams:k,onNext:P,onPrev:M,onSubmit:A,onStartOver:R,onChange:L,isShowFooter:T,setIsShowFooter:w,isFullContainer:r,isDisabledAnimationOnMobile:u,onCloseMobile:p,userInfo:m})),[E,P,M,A,L,R,T,_,C,h,y,k,r,u,p,m]);return C.length?B.default.createElement(we.Provider,{value:U},B.default.createElement("div",{ref:g},o)):null},Ie=e=>B.default.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.default.createElement("path",{d:"M5.99105 4.99067C5.79212 4.99072 5.59772 5.0501 5.43271 5.16121C5.2677 5.27233 5.13958 5.43013 5.06472 5.61444C4.98986 5.79875 4.97167 6.0012 5.01248 6.1959C5.05328 6.39061 5.15122 6.56872 5.29379 6.70747L10.5868 12.0004L5.29379 17.2934C5.19781 17.3855 5.12119 17.4959 5.0684 17.618C5.01562 17.7402 4.98773 17.8716 4.98638 18.0046C4.98503 18.1377 5.01023 18.2697 5.06052 18.3928C5.11081 18.516 5.18517 18.6279 5.27925 18.722C5.37333 18.8161 5.48523 18.8904 5.60841 18.9407C5.73159 18.991 5.86356 19.0162 5.9966 19.0149C6.12964 19.0135 6.26108 18.9856 6.38321 18.9328C6.50533 18.8801 6.6157 18.8034 6.70785 18.7075L12.0008 13.4145L17.2938 18.7075C17.3859 18.8034 17.4963 18.8801 17.6184 18.9328C17.7406 18.9856 17.872 19.0135 18.005 19.0149C18.1381 19.0162 18.27 18.991 18.3932 18.9407C18.5164 18.8904 18.6283 18.8161 18.7224 18.722C18.8165 18.6279 18.8908 18.516 18.9411 18.3928C18.9914 18.2697 19.0166 18.1377 19.0153 18.0047C19.0139 17.8716 18.986 17.7402 18.9332 17.618C18.8804 17.4959 18.8038 17.3855 18.7078 17.2934L13.4149 12.0004L18.7078 6.70747C18.8524 6.567 18.951 6.38616 18.991 6.18864C19.031 5.99112 19.0103 5.78614 18.9318 5.60055C18.8532 5.41497 18.7205 5.25744 18.5509 5.14861C18.3812 5.03978 18.1827 4.98473 17.9813 4.99067C17.7215 4.99841 17.4749 5.10699 17.2938 5.2934L12.0008 10.5864L6.70785 5.2934C6.61466 5.19761 6.50321 5.12146 6.3801 5.06947C6.25698 5.01747 6.1247 4.99068 5.99105 4.99067Z",fill:"#595959"})),ke="480px",Se=H.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./Subot-511ff255.js"),i=require("./tslib.es6-293338f5.js"),n=require("./index-3183ed6e.js"),o=require("js-cookie"),a=require("fastdom"),l=require("fastdom/extensions/fastdom-promised"),r=require("string-format"),d=require("./utils-adde2380.js"),s=require("uuid"),c=require("./isProduction-8a3929cb.js"),u=require("hex-rgb"),p=require("classnames"),m=require("./index-f2e5a43e.js"),f=require("./index-3c0d0730.js"),v=require("framer-motion"),g=require("./utils-ec00b8cb.js"),b=require("styled-components"),h=require("./index-8b4d8b74.js"),y=require("remarkable"),E=require("react-intersection-observer"),x=require("@mantine/core"),C=require("./index-c53c2cf6.js"),N=require("dayjs"),T=require("dayjs/plugin/isSameOrBefore"),w=require("./theme-0bb94193.js");require("@mantine/dates"),require("./index-04bf4b9a.js"),require("./translationsContext-e09b4f33.js"),require("@mantine/hooks");var _=require("./index-9f2fce62.js"),I=require("lodash/isEmpty"),k=require("react-hook-form"),S=require("react-phone-number-input"),O=require("@react-google-maps/api"),A=require("./usePlacesAutocomplete-11729974.js"),P=require("./index-5e65f738.js");function M(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("./cookieHelper-91788da6.js"),require("slugify"),require("./useTranslations-eef7f548.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("@mantine/carousel");var B=M(e),j=M(o),R=M(a),L=M(l),U=M(r),D=M(u),F=M(p),H=M(b),q=M(N),z=M(T),Y=M(I),G=M(S);const Q=R.default.extend(L.default),V={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},X={cached:{},clearCached:e=>{console.log(X.cached),Object.keys(X.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),X.cached[e]=void 0}))},withCached:(e,t)=>i.__awaiter(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===X.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof X.cached[e]&&(t(X.cached[e]),clearInterval(n))}),100)}));if("object"==typeof X.cached[e])return X.cached[e];X.cached[e]="waitingTheFirstResponse";try{const i=yield t();return X.cached[e]=i,setTimeout((()=>{X.cached[e]=void 0}),18e5),i}catch(t){return X.cached[e]=void 0,Promise.reject(t)}}))},K=(e,t)=>{const{subotApiUrl:i}=null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+U.default(e,Object.assign({},t))},W=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(K(V.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),J=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},Z=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield X.withCached("SubotInlineFirstNode",(()=>i.__awaiter(void 0,void 0,void 0,(function*(){const t=yield d.callApi(K(V.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return J(t),t}))))}catch(e){return null}})),$=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(K(V.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),ee=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(K(V.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),te=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],ie=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...te],ne=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(ie.includes(i))if(te.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),oe=e=>[{id:s.v4(),label:JSON.stringify({title:"",description:""}),type:t.NodeIntentType.SSO_INTENT,url:""},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/shield.svg"}];function ae(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const le=e=>d.cookie.parse(e||"")["hhg-id"]||j.default.get("hhg-id")||"",re=e=>{if(e)return j.default.set("hhg-id",e),e;const t=le();if(t)return t;const i=s.v4();return j.default.set("hhg-id",i),i},de=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||j.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},se=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||j.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},ce=s.v4(),ue=()=>ce,pe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${c.isProduction?"":"discover."}${n.domainLocales[e]}`,me=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},fe=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},ve=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},ge=(e,i,n,o)=>{const a=ve(e[0]);if(!i)return{};const l=e.findIndex((e=>e.id==i)),r=e.reduce(((e,r,d)=>{var s,c;if(d>l)return e;const u=r,p=n&&u.id===i?{action_id:n}:u._message;let m=0;const f=null===(s=u.actions)||void 0===s?void 0:s.find((e=>e.id===(null==p?void 0:p.action_id)));m+=(null==f?void 0:f.score)||0;const v=void 0!==a[u.id],g=n&&u.id===i?o:null==p?void 0:p.form_submit_meta;if(v&&u.type===t.NodeType.FORM&&g){const e=a[u.id].action_id,t=null===(c=u.actions)||void 0===c?void 0:c.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(a[u.id].number&&["+","-","x","/"].includes(a[u.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=a[u.id].operator,i=a[u.id].number;let o=0;"+"===t&&(o=e+i),"-"===t&&(o=e-i),"x"===t&&(o=e*i),"/"===t&&(o=e/i),isNaN(o)||(m+=o)}}return e+m}),0);return{current_total_dynamic_score:r}},be=(e,i)=>{const n=ve(i[0]);if(0===Object.keys(n).length)return e;const o=i.filter((e=>e.type===t.NodeType.FORM));return Object.keys(n).forEach((t=>{var i,a,l;const r=o.find((e=>e.id===t)),d=null===(i=null==r?void 0:r.actions)||void 0===i?void 0:i.find((e=>{var i;return e.id===(null===(i=n[t])||void 0===i?void 0:i.action_id)})),s=null==d?void 0:d.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===s&&"number"===e.control));if(n[t].number&&["+","-","x","/"].includes(n[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const i=Number(c.value),o=n[t].operator,a=n[t].number;let l=0;if("+"===o&&(l=i+a),"-"===o&&(l=i-a),"x"===o&&(l=i*a),"/"===o&&(l=i/a),e.includes(`{{var:${s}}}`)){const t=new RegExp(`{{var:${s}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},he="other",ye="stateInlineSSO",Ee=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},xe=e=>{const i=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,i)=>{var n,o,a,l,r,d,s,c,u,p,m,f,v,g,b,h,y,E,x,C,N;if(i.actions&&(null===(n=i._message)||void 0===n?void 0:n.action_id)&&(null===(o=i._message)||void 0===o?void 0:o.action_value)){const n=i._message.action_value;if(i.type===t.NodeType.FORM){const t=["address","province","district","commune"],n=((null===(a=i._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>!t.includes(e.control))),o=((null===(l=i._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter((e=>t.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),m=[null===(r=o.address)||void 0===r?void 0:r.value,null===(d=o.commune)||void 0===d?void 0:d.value,null===(s=o.district)||void 0===s?void 0:s.value,null===(c=o.province)||void 0===c?void 0:c.value].filter(Boolean).join(", ");m&&o.address?e.push({attribute:o.address.key,value:m,label_question:(null===(p=null===(u=i.intents)||void 0===u?void 0:u[0])||void 0===p?void 0:p.label)||""}):n.forEach((t=>{var n,o;e.push({attribute:t.key,value:t.value,label_question:(null===(o=null===(n=i.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(i.type===t.NodeType.TEXT)if(i.is_multi_select){const t=Object.keys(i._message.selected_actions||{}),n=i.actions.filter((e=>e.label&&t.includes(e.id))).map((e=>e.label));t.length&&e.push({attribute:i.actions[0].key||"",value:n,label_question:(null===(f=null===(m=i.intents)||void 0===m?void 0:m[0])||void 0===f?void 0:f.label)||""})}else{const o=i._message.action_id,a=i.actions.find((e=>e.id===o)),l=null==a?void 0:a.label,r=null===(b=null===(g=null===(v=i._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find((e=>e.key===he)))||void 0===b?void 0:b.value,d=(null==a?void 0:a.type)===t.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;l&&o&&e.push({attribute:n,value:d&&r?r:l,label_question:(null===(y=null===(h=i.intents)||void 0===h?void 0:h[0])||void 0===y?void 0:y.label)||""})}if(i.type===t.NodeType.POLL){const t=i.id,n=(null===(x=null===(E=i._message)||void 0===E?void 0:E.current_polls)||void 0===x?void 0:x[t])||[],o=i.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:i.actions[0].key||"",value:o,label_question:(null===(N=null===(C=i.intents)||void 0===C?void 0:C[0])||void 0===N?void 0:N.label)||""})}}return e}),[]);return i},Ce=(e,i)=>{var n;try{if("ACUVUE"!==(null===(n=i.extra_settings)||void 0===n?void 0:n.subot_type))return;let o="",a="",l="",r=se().email;if((e||[]).forEach((e=>{var i,n,d;const s=e._message;if(!s)return;const c=null===(i=e.actions)||void 0===i?void 0:i.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?o=(null==c?void 0:c.label)||"":"voucher_color"===s.action_value&&(a=(null==c?void 0:c.label)||""),e.type===t.NodeType.FORM){const e=null===(n=s.form_submit_meta)||void 0===n?void 0:n.find((e=>"voucher_size"===e.key)),t=null===(d=s.form_submit_meta)||void 0===d?void 0:d.find((e=>"email"===e.control));e&&(l=e.value),t&&(r=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===o&&r)return{email:r,voucherName:o};if(o&&a&&l&&r)return{email:r,voucherName:`${o}|${a}|${l}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ne=({nodes:e,activeId:o,params:a,accountIdFromLogs:l})=>i.__awaiter(void 0,void 0,void 0,(function*(){try{let i="in_progress";const r=e[e.length-1];(null==r?void 0:r.type)&&t.NodeFinalTypes.includes(r.type)&&(i="complete");const s=e.slice(1),c={activeId:o,params:a,nodes:s,tracking:Object.assign(Object.assign({},Ee()),{full_url:window.location.href}),unifiedAnswers:xe(s),voucherAnswers:Ce(s,e[0])},u={cookie_id:re(),account_id:l||de()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(c),status:i,type:"inline",market:n.MAP_DOMAIN_BY_LOCALE[d.locale]};yield d.callApi(K(V.POST_SUBOT_CREATE_LOG),"POST",{data:u})}catch(e){}})),Te=(e,t)=>{try{const[i,n,o]=D.default(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},we=e.createContext({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),_e=({children:o,articleLink:a,subotId:l,isFullContainer:r,bgColor:s,primaryColor:c,isDisabledAnimationOnMobile:u,onCloseMobile:p,userInfo:m})=>{const{formatMessage:f,action:{pushNotifications:v}}=e.useContext(d.TogetherComponentGlobalContext),g=e.useRef(null),b=e.useRef(null),[h,y]=e.useState(!0),[E,x]=e.useState(""),[C,N]=e.useState([]),[T,w]=e.useState(!1),[_,I]=e.useState({});e.useEffect((()=>{const e=s||"#e3f2ff",t=c||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=g.current,a=(new Date).getTime();o&&(Q.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",Te(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",Te(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",Te(t,.3)||"#bcdeff")})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[s,c]);const k=e.useCallback((()=>{const e=window.gaData,t=window.location.origin+n.basePath+("tl-PH"===(null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.locale)?a.replace("fil/",""):a),i={bot_id:l,account_id:de()||null,action_id:"",action_value:"",cookie_id:re(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:j.default.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:ue()};return ne(i,null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.router.query)}),[]),S=e.useCallback((()=>{var e;null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),O=e.useCallback(((e,n=!0)=>i.__awaiter(void 0,void 0,void 0,(function*(){var o;if(!e||!e.url||!e.bot_id)return;let a="",l=[];y(!0);const r=yield Z(e.bot_id);1===(null==r?void 0:r._status)&&(a=null==r?void 0:r._data.id.toString(),l.push(null==r?void 0:r._data,null==r?void 0:r._data.first_node));const s=n?yield(c=l[0],i.__awaiter(void 0,void 0,void 0,(function*(){var e,t;try{if(!c)return null;const i=yield d.callApi(K(V.GET_SUBOT_LOG,{botId:c.id,cookieId:re(),accountId:de()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[c,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:de()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var c;s&&(l=s.nodes,a=s.activeId,b.current=(null===(o=s.params)||void 0===o?void 0:o.account_id)||0);const u=((e,{getParams:i})=>{try{if(!de())return null;const n=JSON.parse(localStorage.getItem(ye)||""),o=18e5;return(null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+o>Date.now()&&(localStorage.removeItem(ye),n.listNodes.slice(-1)[0].position===t.NodePosition.SSO)?{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},i()),n.params),{account_id:de()||null,cookie_id:re(n.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:k});if(u&&u.params.action_id&&u.params.action_value){const e=yield W(u.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(a=null==e?void 0:e._data.node.id,l=u.listNodes,l[l.length-1]=null==e?void 0:e._data.node,Ne({nodes:l,activeId:a,params:u.params,accountIdFromLogs:b.current}),setTimeout((()=>{S()}),100))}const p=(null==u?void 0:u.params)||(null==s?void 0:s.params)||e,[m,f]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(l[0],a,l);y(!1),x(m),N(f),I(Object.assign(Object.assign({},e),p))}))),[]),A=e.useCallback(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${l}"]`);i&&i.click();let n=E,o=[...C];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(y(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{N(o),x(n),y(!1),Ne({nodes:o,activeId:n,params:_,accountIdFromLogs:b.current})}),250)}),[C,E]),P=e.useCallback((e=>i.__awaiter(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),ge(C,E,e.action_id)),n=yield W(t);if(y(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:o}=e,a=i.__rest(e,["node"]),l=Object.assign(Object.assign({},o),{_message:Object.assign(Object.assign({},a),{node_id:o.id})});return void(-1!==C.findIndex((e=>e.id===l.id))?A(l):A(l,t))}v({title:f({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=C.find((e=>e.id==E));t&&t.hasOwnProperty("first_node")&&(x(C[1].id.toString()),Ne({nodes:C,activeId:C[1].id.toString(),params:k(),accountIdFromLogs:b.current}))}))),[A,C]),M=e.useCallback((()=>{const e=C.findIndex((({id:e})=>e==E));if(e&&-1!==e&&e>1){const t=C[e-1];x(t.id),Ne({nodes:C,activeId:t.id,params:_,accountIdFromLogs:b.current})}}),[C,E]),R=e.useCallback((()=>{const e=k();O(e,!1);const t=C[0],i=C[1];Ne({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:b.current})}),[k,O,C]),L=e.useCallback((e=>{N((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==E?t.map((t=>{const i=t;return i.id===E?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[E]);e.useEffect((()=>{if(j.default.get(n.GA_TOKEN_COOKIE)){const e=k();O(e)}else ae({condition:()=>Boolean(j.default.get(n.GA_TOKEN_COOKIE)),finished:()=>{const e=k();O(e)}})}),[]),e.useEffect((()=>{if(!C.length)return;C.find((e=>e.id==E))&&E||x(l+"")}),[E,C]);const U=e.useMemo((()=>({activeId:E,params:_,listNodes:C,loading:h,setLoading:y,getParams:k,onNext:P,onPrev:M,onSubmit:A,onStartOver:R,onChange:L,isShowFooter:T,setIsShowFooter:w,isFullContainer:r,isDisabledAnimationOnMobile:u,onCloseMobile:p,userInfo:m})),[E,P,M,A,L,R,T,_,C,h,y,k,r,u,p,m]);return C.length?B.default.createElement(we.Provider,{value:U},B.default.createElement("div",{ref:g},o)):null},Ie=e=>B.default.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.default.createElement("path",{d:"M5.99105 4.99067C5.79212 4.99072 5.59772 5.0501 5.43271 5.16121C5.2677 5.27233 5.13958 5.43013 5.06472 5.61444C4.98986 5.79875 4.97167 6.0012 5.01248 6.1959C5.05328 6.39061 5.15122 6.56872 5.29379 6.70747L10.5868 12.0004L5.29379 17.2934C5.19781 17.3855 5.12119 17.4959 5.0684 17.618C5.01562 17.7402 4.98773 17.8716 4.98638 18.0046C4.98503 18.1377 5.01023 18.2697 5.06052 18.3928C5.11081 18.516 5.18517 18.6279 5.27925 18.722C5.37333 18.8161 5.48523 18.8904 5.60841 18.9407C5.73159 18.991 5.86356 19.0162 5.9966 19.0149C6.12964 19.0135 6.26108 18.9856 6.38321 18.9328C6.50533 18.8801 6.6157 18.8034 6.70785 18.7075L12.0008 13.4145L17.2938 18.7075C17.3859 18.8034 17.4963 18.8801 17.6184 18.9328C17.7406 18.9856 17.872 19.0135 18.005 19.0149C18.1381 19.0162 18.27 18.991 18.3932 18.9407C18.5164 18.8904 18.6283 18.8161 18.7224 18.722C18.8165 18.6279 18.8908 18.516 18.9411 18.3928C18.9914 18.2697 19.0166 18.1377 19.0153 18.0047C19.0139 17.8716 18.986 17.7402 18.9332 17.618C18.8804 17.4959 18.8038 17.3855 18.7078 17.2934L13.4149 12.0004L18.7078 6.70747C18.8524 6.567 18.951 6.38616 18.991 6.18864C19.031 5.99112 19.0103 5.78614 18.9318 5.60055C18.8532 5.41497 18.7205 5.25744 18.5509 5.14861C18.3812 5.03978 18.1827 4.98473 17.9813 4.99067C17.7215 4.99841 17.4749 5.10699 17.2938 5.2934L12.0008 10.5864L6.70785 5.2934C6.61466 5.19761 6.50321 5.12146 6.3801 5.06947C6.25698 5.01747 6.1247 4.99068 5.99105 4.99067Z",fill:"#595959"})),ke="480px",Se=H.default.div`
2
2
  position: relative;
3
3
 
4
4
  .si-inline-revamp-container {
package/build/together.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-d2335814.js"),r=require("./index-96dd78ba.js"),t=require("./utils-c18ec2df.js");require("react"),require("./index-beef0ff7.js"),require("./tslib.es6-d46558cb.js"),require("@mantine/core"),require("./theme-98a7bede.js"),require("./useTranslations-b435b717.js"),require("./translationsContext-6c5fb248.js"),require("string-format"),require("./index-4c4d7568.js"),require("styled-components"),require("innertext"),require("./index-4de92198.js"),require("@mantine/hooks"),require("./index-065c9097.js"),require("./index-d27a3f5f.js"),require("date-fns/locale"),require("./Subot-54546cbb.js"),require("./isProduction-426652cc.js"),require("dayjs"),require("./utils-469dda3f.js"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./index-425f3390.js"),require("./index.styles-ce607f17.js"),require("./constants-627c575a.js"),require("./animation-1e9aff6a.js"),require("react-keyed-flatten-children"),require("./paths-b1c94851.js"),require("./index-5385e211.js"),require("lodash/debounce"),require("react-contenteditable"),require("./index-0f6355d4.js"),require("./cookieHelper-59a64e32.js"),require("react-dom"),require("./number-f6e8e1a9.js"),require("date-fns"),require("dayjs/plugin/relativeTime"),require("./index-8a21ecb2.js"),require("./routing-46446fba.js"),require("./utils-83803365.js"),require("./index.styled-a45b7854.js"),require("./index-4b719c83.js"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SkipQuestionOfExpertBtn=e.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=e.SocialLinkPreview,exports.SourceList=e.SourceList,exports.SubmitReportForm=e.SubmitReportForm,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.VerifiedTag=e.VerifiedTag,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-2602cb14.js"),r=require("./index-8d147028.js"),t=require("./utils-adde2380.js");require("react"),require("./index-c53c2cf6.js"),require("./tslib.es6-293338f5.js"),require("@mantine/core"),require("./theme-0bb94193.js"),require("./useTranslations-eef7f548.js"),require("./translationsContext-e09b4f33.js"),require("string-format"),require("./index-5e65f738.js"),require("styled-components"),require("innertext"),require("./index-8b4d8b74.js"),require("@mantine/hooks"),require("./index-04bf4b9a.js"),require("./index-3183ed6e.js"),require("date-fns/locale"),require("./Subot-511ff255.js"),require("./isProduction-8a3929cb.js"),require("dayjs"),require("./utils-ec00b8cb.js"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./index-afd5d772.js"),require("./index.styles-f2358064.js"),require("./constants-ded45618.js"),require("./animation-1e5b6297.js"),require("react-keyed-flatten-children"),require("./paths-ed97730a.js"),require("./index-84f168eb.js"),require("lodash/debounce"),require("react-contenteditable"),require("./index-9f2fce62.js"),require("./cookieHelper-91788da6.js"),require("react-dom"),require("./number-9930fc27.js"),require("date-fns"),require("dayjs/plugin/relativeTime"),require("./index-a1e30b09.js"),require("./routing-ed60b4e3.js"),require("./utils-74e9f3ab.js"),require("./index.styled-250b6af4.js"),require("./index-52b005ff.js"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SkipQuestionOfExpertBtn=e.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=e.SocialLinkPreview,exports.SourceList=e.SourceList,exports.SubmitReportForm=e.SubmitReportForm,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.VerifiedTag=e.VerifiedTag,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react"),t=require("./index-beef0ff7.js");require("./translationsContext-6c5fb248.js"),require("string-format");var a=require("./utils-c18ec2df.js"),l=require("./tslib.es6-d46558cb.js"),o=require("@mantine/core"),n=require("./index-4c4d7568.js"),i=require("./useTranslations-b435b717.js"),r=require("innertext"),s=require("./theme-98a7bede.js"),d=require("./index-4de92198.js");require("@mantine/dates");var c=require("./index-d27a3f5f.js"),u=require("./Subot-54546cbb.js"),m=require("./index-065c9097.js");require("@mantine/hooks");var p=require("./index-425f3390.js"),g=require("./index-96dd78ba.js"),h=require("./index-5385e211.js"),f=require("lodash/debounce"),v=require("react-contenteditable"),b=require("./index-0f6355d4.js"),x=require("./index.styles-ce607f17.js"),y=require("./cookieHelper-59a64e32.js"),w=require("./utils-469dda3f.js"),C=require("react-dom"),E=require("styled-components"),k=require("./number-f6e8e1a9.js"),A=require("date-fns"),N=require("dayjs"),T=require("dayjs/plugin/relativeTime"),S=require("./index-8a21ecb2.js"),P=require("./routing-46446fba.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function M(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("./constants-627c575a.js"),require("./utils-83803365.js"),require("./index.styled-a45b7854.js"),require("./index-4b719c83.js");var z=M(e),L=I(e),B=I(r),R=I(f),O=I(v),j=M(C),F=I(E),D=I(N),V=I(T);const U=e=>z.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),z.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),_=e.createContext({}),H=({children:e,defaultParams:t})=>L.default.createElement(_.Provider,{value:{defaultParams:t}},e),W=t=>{const{data:{userInfo:l,env:{togetherBasePath:o}}}=e.useContext(a.TogetherComponentGlobalContext),{defaultParams:n}=e.useContext(_)||{},i=null==l?void 0:l.id,r=l&&"number"==typeof l.communities_interacted&&0===l.communities_interacted;return{authActionWrapper:(e,l)=>{const s=Object.assign(Object.assign(Object.assign({},n),t),l);if(!i||r){i||y.deleteCookie(a.BEARER_TOKEN_COOKIE),(null==s?void 0:s._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(s._joinCommunityIds).filter(Boolean))))),null==s||delete s._joinCommunityIds),(null==s?void 0:s._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(s._joinTopicIds).filter(Boolean))))),null==s||delete s._joinTopicIds);const e=(null==s?void 0:s._location)||window.location.href;return null==s||delete s._location,window.location.href=a.getUrlToSignUp(e,s,o),null}return e&&e()},params:Object.assign(Object.assign({},n),t)}},q=F.default.div`
1
+ "use strict";var e=require("react"),t=require("./index-c53c2cf6.js");require("./translationsContext-e09b4f33.js"),require("string-format");var a=require("./utils-adde2380.js"),l=require("./tslib.es6-293338f5.js"),o=require("@mantine/core"),n=require("./index-5e65f738.js"),i=require("./useTranslations-eef7f548.js"),r=require("innertext"),s=require("./theme-0bb94193.js"),d=require("./index-8b4d8b74.js");require("@mantine/dates");var c=require("./index-3183ed6e.js"),u=require("./Subot-511ff255.js"),m=require("./index-04bf4b9a.js");require("@mantine/hooks");var p=require("./index-afd5d772.js"),g=require("./index-8d147028.js"),h=require("./index-84f168eb.js"),f=require("lodash/debounce"),v=require("react-contenteditable"),b=require("./index-9f2fce62.js"),x=require("./index.styles-f2358064.js"),y=require("./cookieHelper-91788da6.js"),w=require("./utils-ec00b8cb.js"),C=require("react-dom"),E=require("styled-components"),k=require("./number-9930fc27.js"),A=require("date-fns"),N=require("dayjs"),T=require("dayjs/plugin/relativeTime"),S=require("./index-a1e30b09.js"),P=require("./routing-ed60b4e3.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function M(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("./constants-ded45618.js"),require("./utils-74e9f3ab.js"),require("./index.styled-250b6af4.js"),require("./index-52b005ff.js");var z=M(e),L=I(e),B=I(r),R=I(f),O=I(v),j=M(C),F=I(E),D=I(N),V=I(T);const U=e=>z.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),z.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),_=e.createContext({}),H=({children:e,defaultParams:t})=>L.default.createElement(_.Provider,{value:{defaultParams:t}},e),W=t=>{const{data:{userInfo:l,env:{togetherBasePath:o}}}=e.useContext(a.TogetherComponentGlobalContext),{defaultParams:n}=e.useContext(_)||{},i=null==l?void 0:l.id,r=l&&"number"==typeof l.communities_interacted&&0===l.communities_interacted;return{authActionWrapper:(e,l)=>{const s=Object.assign(Object.assign(Object.assign({},n),t),l);if(!i||r){i||y.deleteCookie(a.BEARER_TOKEN_COOKIE),(null==s?void 0:s._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(s._joinCommunityIds).filter(Boolean))))),null==s||delete s._joinCommunityIds),(null==s?void 0:s._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(s._joinTopicIds).filter(Boolean))))),null==s||delete s._joinTopicIds);const e=(null==s?void 0:s._location)||window.location.href;return null==s||delete s._location,window.location.href=a.getUrlToSignUp(e,s,o),null}return e&&e()},params:Object.assign(Object.assign({},n),t)}},q=F.default.div`
2
2
  .link-info-container {
3
3
  padding: 0.5rem 1rem;
4
4
  background: ${e=>e.color||"#f4faff"};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-d46558cb.js"),t=require("react"),a=require("./useTranslations-b435b717.js"),i=require("lodash/debounce"),o=require("./constants-627c575a.js"),l=require("./index-5385e211.js"),n=require("styled-components"),s=require("./index-beef0ff7.js"),r=require("./theme-98a7bede.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-5544e570.js"),u=require("./utils-469dda3f.js"),p=require("react-loading-skeleton"),h=require("./paths-b1c94851.js"),g=require("@mantine/core"),f=require("./index-d27a3f5f.js"),m=require("./cookieHelper-59a64e32.js"),C=require("./index-21c825aa.js"),b=require("./ChevronDown-77fab19e.js"),y=require("string-format");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=v(t),E=v(i),S=v(n),L=v(c),w=v(p),O=v(y);function k(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const I=S.default.div``,T=S.default.div`
1
+ "use strict";var e=require("./tslib.es6-293338f5.js"),t=require("react"),a=require("./useTranslations-eef7f548.js"),i=require("lodash/debounce"),o=require("./constants-ded45618.js"),l=require("./index-84f168eb.js"),n=require("styled-components"),s=require("./index-c53c2cf6.js"),r=require("./theme-0bb94193.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-ac461ca7.js"),u=require("./utils-ec00b8cb.js"),p=require("react-loading-skeleton"),h=require("./paths-ed97730a.js"),g=require("@mantine/core"),f=require("./index-3183ed6e.js"),m=require("./cookieHelper-91788da6.js"),C=require("./index-f2e5a43e.js"),b=require("./ChevronDown-a8966000.js"),y=require("string-format");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=v(t),E=v(i),S=v(n),L=v(c),w=v(p),O=v(y);function k(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const I=S.default.div``,T=S.default.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-54546cbb.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-511ff255.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-d46558cb.js"),a=require("react"),n=require("./cookieHelper-59a64e32.js"),t=require("./useTranslations-b435b717.js"),i=require("./Subot-54546cbb.js");function s(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const l={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},r={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=r,exports.PREGNANCY_SLUG=l,exports.useCategory=e=>{const{locale:n}=t.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(l[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=r[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,r[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,l,r,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(l=i.current)||void 0===l?void 0:l.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,l,h,u]=yield Promise.all([t.email?s(t.email):null,t.phone?s(t.phone):null,t.birthday?s(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?s(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?s(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
1
+ "use strict";var e=require("./tslib.es6-293338f5.js"),a=require("react"),n=require("./cookieHelper-91788da6.js"),t=require("./useTranslations-eef7f548.js"),i=require("./Subot-511ff255.js");function s(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const l={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},r={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=r,exports.PREGNANCY_SLUG=l,exports.useCategory=e=>{const{locale:n}=t.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(l[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=r[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,r[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,l,r,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(l=i.current)||void 0===l?void 0:l.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,l,h,u]=yield Promise.all([t.email?s(t.email):null,t.phone?s(t.phone):null,t.birthday?s(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?s(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?s(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./tslib.es6-293338f5.js"),t=require("react"),a=require("./getDynamicHealthTool-91d3a539.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-d46558cb.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
1
+ "use strict";var e=require("./tslib.es6-293338f5.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-6c5fb248.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
1
+ "use strict";var e=require("react"),t=require("./translationsContext-e09b4f33.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
@@ -1 +1 @@
1
- "use strict";var i=require("./Subot-54546cbb.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),L=i.substring(0,a),e=L.length>3?3:L.length;return i.replace(i.substring(e,a),i.slice(e,a).replace(/./g,"x"))};
1
+ "use strict";var i=require("./Subot-511ff255.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),L=i.substring(0,a),e=L.length>3?3:L.length;return i.replace(i.substring(e,a),i.slice(e,a).replace(/./g,"x"))};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./utils-469dda3f.js"),t=require("styled-components"),o=require("react"),s=require("./index-065c9097.js"),a=require("./index-4de92198.js"),n=require("./Subot-54546cbb.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
1
+ "use strict";var e=require("./utils-ec00b8cb.js"),t=require("styled-components"),o=require("react"),s=require("./index-04bf4b9a.js"),a=require("./index-8b4d8b74.js"),n=require("./Subot-511ff255.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -138,4 +138,4 @@
138
138
  width: unset;
139
139
  margin-bottom: 4px;
140
140
  margin-left: -3px;
141
- `,p=o.memo((({type:e,width:t,height:n})=>{const r=o.useMemo((()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:n||"27px",src:s.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:n||"57px",src:s.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:n||"28px",src:s.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[e,t,n]),{src:l,width:g,height:i}=r||{};return h.default.createElement(a.ImageWrap,{alt:`${e} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),d={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},m=[n.LOCALE.Vietnam,n.LOCALE.Taiwan,n.LOCALE.Indonesia,n.LOCALE.Malaysia],c=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],x={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]};exports.LogoIcon=p,exports.LunarNewYearLocale=m,exports.StyledLogo=g,exports.StyledProLogo=i,exports.isChristmas=e=>{const t=e.getDate();return 11===e.getMonth()&&t>=16&&t<=25},exports.isLabourDay=e=>{const t=e.getFullYear(),o=new Date(t,4,1),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+1),s<=e&&e<=a},exports.isLunarNewYear=e=>{const t=e.getFullYear(),o=d[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-7);const n=new Date(s);return n.setDate(s.getDate()+5),a<=e&&e<=n},exports.isNewYear=e=>{const t=e.getDate(),o=e.getMonth();return 11===o&&t>=26||0===o&&t<=15},exports.isRamadan=e=>{const t=e.getFullYear(),o=c.filter((e=>e.year===t));return!!o.length&&o.some((o=>{const s=o.start[2]||t,a=new Date(s,o.start[1],o.start[0]),n=new Date(s,o.end[1],o.end[0]);return a<=e&&e<=n}))},exports.isVN3004=e=>{const t=e.getFullYear(),o=new Date(t,3,30),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+2),s<=e&&e<=a},exports.isVNHungKing=e=>{const t=e.getFullYear(),o=x[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-1);const n=new Date(s);return n.setDate(s.getDate()+1),a<=e&&e<=n};
141
+ `,p=o.memo((({type:e,width:t,height:n})=>{const r=o.useMemo((()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:n||"27px",src:s.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:n||"57px",src:s.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:n||"28px",src:s.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[e,t,n]),{src:l,width:g,height:i}=r||{};return h.default.createElement(a.ImageWrap,{alt:`${e} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),m={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},d=[n.LOCALE.Vietnam,n.LOCALE.Taiwan,n.LOCALE.Indonesia,n.LOCALE.Malaysia],c=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],x={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]};exports.LogoIcon=p,exports.LunarNewYearLocale=d,exports.StyledLogo=g,exports.StyledProLogo=i,exports.isChristmas=e=>{const t=e.getDate();return 11===e.getMonth()&&t>=16&&t<=25},exports.isLabourDay=e=>{const t=e.getFullYear(),o=new Date(t,4,1),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+1),s<=e&&e<=a},exports.isLunarNewYear=e=>{const t=e.getFullYear(),o=m[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-7);const n=new Date(s);return n.setDate(s.getDate()+5),a<=e&&e<=n},exports.isNewYear=e=>{const t=e.getDate(),o=e.getMonth();return 11===o&&t>=26||0===o&&t<=15},exports.isRamadan=e=>{const t=e.getFullYear(),o=c.filter((e=>e.year===t));return!!o.length&&o.some((o=>{const s=o.start[2]||t,a=new Date(s,o.start[1],o.start[0]),n=new Date(s,o.end[1],o.end[0]);return a<=e&&e<=n}))},exports.isVN3004=e=>{const t=e.getFullYear(),o=new Date(t,3,30),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+2),s<=e&&e<=a},exports.isVNHungKing=e=>{const t=e.getFullYear(),o=x[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-1);const n=new Date(s);return n.setDate(s.getDate()+1),a<=e&&e<=n};