@hhgtech/hhg-components 1.24.5 → 1.24.6

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 (277) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components/atoms/pill/index.d.ts +4 -1
  5. package/build/components/molecules/pillCarousel/index.styled.d.ts +1 -1
  6. package/build/components.js +1 -1
  7. package/build/constants.js +1 -1
  8. package/build/{core-906cbbf8.js → core-5e701207.js} +1 -1
  9. package/build/{dataTransform-eb66021d.js → dataTransform-1e10f78e.js} +1 -1
  10. package/build/esm/babyGrowth.js +7 -7
  11. package/build/esm/cache.js +1 -1
  12. package/build/esm/care.js +1 -1
  13. package/build/esm/components.js +1 -1
  14. package/build/esm/constants.js +1 -1
  15. package/build/esm/{core-8e353a70.js → core-ba07b579.js} +1 -1
  16. package/build/esm/{dataTransform-143b77c5.js → dataTransform-4e3ae6dc.js} +1 -1
  17. package/build/esm/footer.js +1 -1
  18. package/build/esm/gAssets.js +1 -1
  19. package/build/esm/getDynamicHealthTool-30bda06e.js +1 -0
  20. package/build/esm/{getSocialList-b8a9bb82.js → getSocialList-6c37f445.js} +1 -1
  21. package/build/esm/hooks.js +1 -1
  22. package/build/esm/i18n.js +1 -1
  23. package/build/esm/{index-45d84312.js → index-02bac76b.js} +1 -1
  24. package/build/esm/{index-8607de36.js → index-17e42ece.js} +1 -1
  25. package/build/esm/index-1d4a0d5c.js +1 -0
  26. package/build/esm/{index-b534162c.js → index-4c6a114f.js} +1 -1
  27. package/build/esm/{index-618c5acc.js → index-4df4c64a.js} +11 -11
  28. package/build/esm/{index-9e0635bf.js → index-5c907f57.js} +1 -1
  29. package/build/esm/{index-10f82c35.js → index-6be94887.js} +1 -1
  30. package/build/esm/{index-5302477a.js → index-7066562e.js} +2 -2
  31. package/build/esm/{index-8c56e2c8.js → index-8eec55d7.js} +1 -1
  32. package/build/esm/{index-e3dd90bb.js → index-910dc53d.js} +1 -1
  33. package/build/esm/{index-60801017.js → index-9813fff2.js} +1 -1
  34. package/build/esm/{index-be95780c.js → index-9d8a3bc2.js} +1 -1
  35. package/build/esm/{index-662f07ae.js → index-ad9f626c.js} +1 -1
  36. package/build/esm/{index-88d35361.js → index-bcf00394.js} +1 -1
  37. package/build/esm/{index-dcb649f0.js → index-caab89aa.js} +1 -1
  38. package/build/esm/{index-d0662eea.js → index-d8ee9c42.js} +1 -1
  39. package/build/esm/{index-e3874cbf.js → index-df521e46.js} +1 -1
  40. package/build/esm/index-e2a4a2ac.js +1 -0
  41. package/build/esm/{index-7ff862c5.js → index-e9537a4b.js} +3 -3
  42. package/build/esm/{index-35f0d71e.js → index-ec3b78fd.js} +1 -1
  43. package/build/esm/{index-54acacd4.js → index-f8771d49.js} +1 -1
  44. package/build/esm/index.css +1 -1
  45. package/build/esm/index.js +1 -1
  46. package/build/esm/{index.styled-da2b8e9f.js → index.styled-18a1da40.js} +69 -69
  47. package/build/esm/{index.styled-af039b56.js → index.styled-312991ef.js} +1 -1
  48. package/build/esm/{index.styled-0ca85796.js → index.styled-37a07c81.js} +1 -1
  49. package/build/esm/index.styled-73977c25.js +45 -0
  50. package/build/esm/{index.styled-04f422fe.js → index.styled-8a404592.js} +1 -1
  51. package/build/esm/{index.styled-522e1bc5.js → index.styled-8aca3502.js} +1 -1
  52. package/build/esm/lead.js +1 -1
  53. package/build/esm/mantine.js +1 -1
  54. package/build/esm/misc.js +1 -1
  55. package/build/esm/navigation.js +1 -1
  56. package/build/esm/onboarding.js +1 -1
  57. package/build/esm/pwg.js +1 -1
  58. package/build/esm/{routing-ccb9c054.js → routing-c43ef7a7.js} +1 -1
  59. package/build/esm/{screenSizeContext-7b5ec7e6.js → screenSizeContext-41b07fe7.js} +1 -1
  60. package/build/esm/together.js +1 -1
  61. package/build/esm/translationsContext-546b5939.js +1 -0
  62. package/build/esm/translationsProvider-ca03465e.js +1 -0
  63. package/build/esm/{types-6a1a285c.js → types-3a48eaad.js} +1 -1
  64. package/build/esm/{types-a5c4217e.js → types-6971c397.js} +140 -78
  65. package/build/esm/types.js +1 -1
  66. package/build/esm/useHealthToolCache-0df8ff49.js +1 -0
  67. package/build/esm/{useRafState-43722b7b.js → useRafState-5040f534.js} +1 -1
  68. package/build/esm/{useTranslations-0798c8a1.js → useTranslations-775e5683.js} +1 -1
  69. package/build/footer.js +1 -1
  70. package/build/gAssets.js +1 -1
  71. package/build/{getDynamicHealthTool-ff2fc06b.js → getDynamicHealthTool-45229369.js} +1 -1
  72. package/build/{getSocialList-ec4cbcca.js → getSocialList-6f192cee.js} +1 -1
  73. package/build/hooks.js +1 -1
  74. package/build/i18n.js +1 -1
  75. package/build/{index-7feb076f.js → index-1057cac0.js} +1 -1
  76. package/build/index-37015e52.js +1 -0
  77. package/build/{index-4c9072ac.js → index-3c534f65.js} +1 -1
  78. package/build/{index-e3c19706.js → index-4127b76b.js} +1 -1
  79. package/build/{index-d76f511b.js → index-41b4c505.js} +1 -1
  80. package/build/{index-9082420d.js → index-44099851.js} +1 -1
  81. package/build/{index-28d904c7.js → index-4e3839e0.js} +1 -1
  82. package/build/{index-729ed1be.js → index-59791f7f.js} +1 -1
  83. package/build/{index-599c85a5.js → index-60255370.js} +1 -1
  84. package/build/{index-580da37b.js → index-6c8b9f77.js} +1 -1
  85. package/build/index-745889d2.js +1 -0
  86. package/build/{index-215ff1c8.js → index-7fc7f0ed.js} +5 -5
  87. package/build/{index-449b2b69.js → index-877239cf.js} +1 -1
  88. package/build/{index-f3881de8.js → index-8a723a4e.js} +1 -1
  89. package/build/index-9bee6643.js +1 -0
  90. package/build/{index-7fb0dc24.js → index-9bf5687e.js} +1 -1
  91. package/build/{index-20df02b1.js → index-9fde055b.js} +1 -1
  92. package/build/{index-64410ef7.js → index-aef7a6a6.js} +1 -1
  93. package/build/{index-1b17801e.js → index-b21c9d79.js} +1 -1
  94. package/build/{index-017b59a5.js → index-f2c37a7f.js} +1 -1
  95. package/build/{index-312eed7c.js → index-f307ffbf.js} +1 -1
  96. package/build/index.css +1 -1
  97. package/build/index.js +1 -1
  98. package/build/{index.styled-a1161683.js → index.styled-00a24e45.js} +1 -1
  99. package/build/{index.styled-0a8ea193.js → index.styled-3969ca8e.js} +1 -1
  100. package/build/{index.styled-76b6b655.js → index.styled-5ca93eaf.js} +2 -2
  101. package/build/{index.styled-e53ecaea.js → index.styled-6933a4d7.js} +4 -4
  102. package/build/{index.styled-e2754029.js → index.styled-8b634a9e.js} +1 -1
  103. package/build/index.styled-937af188.js +45 -0
  104. package/build/interfaces/types/index.d.ts +3 -1
  105. package/build/lead.js +1 -1
  106. package/build/mantine.js +1 -1
  107. package/build/misc.js +1 -1
  108. package/build/navigation.js +1 -1
  109. package/build/onboarding.js +1 -1
  110. package/build/pwg.js +1 -1
  111. package/build/{routing-dbeb47f7.js → routing-1baaddca.js} +1 -1
  112. package/build/{screenSizeContext-5f1c9a09.js → screenSizeContext-15105e3c.js} +2 -2
  113. package/build/together/api/utils.d.ts +4 -1
  114. package/build/together/components/organisms/cardReply/index.d.ts +3 -1
  115. package/build/together/components/organisms/cardReply/index.styled.d.ts +2 -0
  116. package/build/together/components/organisms/cardReply/sourceItem/index.d.ts +7 -0
  117. package/build/together/components/organisms/cardReply/sourceItem/index.styled.d.ts +2 -0
  118. package/build/together/components/organisms/cardReply/sourceList/index.d.ts +7 -0
  119. package/build/together/components/organisms/cardReply/sourceList/index.styled.d.ts +3 -0
  120. package/build/together/components/organisms/cardReply/sourceList/recommentCategories/index.d.ts +7 -0
  121. package/build/together/components/organisms/cardReply/sourceList/recommentCategories/index.styled.d.ts +6 -0
  122. package/build/together/components/organisms/cardReply/verifiedTag/index.d.ts +5 -0
  123. package/build/together/components/organisms/index.d.ts +2 -0
  124. package/build/together/interfaces/types.d.ts +26 -0
  125. package/build/together/togetherComponentGlobalContext.d.ts +3 -0
  126. package/build/together.js +1 -1
  127. package/build/translationsContext-886694fd.js +1 -0
  128. package/build/translationsProvider-b7ee3d1c.js +1 -0
  129. package/build/{types-b5b6761e.js → types-8eaa0c71.js} +37 -37
  130. package/build/{types-a5e359b0.js → types-fa31d2cb.js} +176 -114
  131. package/build/types.js +1 -1
  132. package/build/useHealthToolCache-043770bf.js +1 -0
  133. package/build/{useRafState-e3514574.js → useRafState-5116513d.js} +1 -1
  134. package/build/{useTranslations-f0e48961.js → useTranslations-722b00b0.js} +1 -1
  135. package/package.json +1 -1
  136. package/build/esm/getDynamicHealthTool-cd3b2315.js +0 -1
  137. package/build/esm/index-17fe8025.js +0 -1
  138. package/build/esm/index-2184e61e.js +0 -1
  139. package/build/esm/index.styled-15296982.js +0 -45
  140. package/build/esm/translationsContext-5692c52c.js +0 -1
  141. package/build/esm/translationsProvider-3994bf69.js +0 -1
  142. package/build/esm/useHealthToolCache-c26d0cf5.js +0 -1
  143. package/build/index-542d167e.js +0 -1
  144. package/build/index-5d69649d.js +0 -1
  145. package/build/index-a84f4eae.js +0 -1
  146. package/build/index.styled-d59702e3.js +0 -45
  147. package/build/translationsContext-20241bd3.js +0 -1
  148. package/build/translationsProvider-5dce9466.js +0 -1
  149. package/build/useHealthToolCache-b714820f.js +0 -1
  150. /package/build/{BMI_BOYS.percentile.monthly-ec15aec4.js → BMI_BOYS.percentile.monthly-99e995ec.js} +0 -0
  151. /package/build/{BMI_BOYS.percentile.weekly-25289ade.js → BMI_BOYS.percentile.weekly-b441bfcb.js} +0 -0
  152. /package/build/{BMI_BOYS.percentile.yearly-943db621.js → BMI_BOYS.percentile.yearly-917f4171.js} +0 -0
  153. /package/build/{BMI_BOYS.zscore.monthly-3ae0bd5d.js → BMI_BOYS.zscore.monthly-503fba4b.js} +0 -0
  154. /package/build/{BMI_BOYS.zscore.weekly-2e1f513a.js → BMI_BOYS.zscore.weekly-f2d24525.js} +0 -0
  155. /package/build/{BMI_BOYS.zscore.yearly-1a11ad7c.js → BMI_BOYS.zscore.yearly-a310bc9f.js} +0 -0
  156. /package/build/{BMI_GIRLS.percentile.monthly-5cc6e701.js → BMI_GIRLS.percentile.monthly-27ac9374.js} +0 -0
  157. /package/build/{BMI_GIRLS.percentile.weekly-b4e44a01.js → BMI_GIRLS.percentile.weekly-32e341de.js} +0 -0
  158. /package/build/{BMI_GIRLS.percentile.yearly-455be039.js → BMI_GIRLS.percentile.yearly-073d90c0.js} +0 -0
  159. /package/build/{BMI_GIRLS.zscore.monthly-ee317ab4.js → BMI_GIRLS.zscore.monthly-62b5adf1.js} +0 -0
  160. /package/build/{BMI_GIRLS.zscore.weekly-9cd57f30.js → BMI_GIRLS.zscore.weekly-cb4349e0.js} +0 -0
  161. /package/build/{BMI_GIRLS.zscore.yearly-fdfd2450.js → BMI_GIRLS.zscore.yearly-fe5f6e7b.js} +0 -0
  162. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-b5e8f066.js → HEAD CIRCUM_BOYS.percentile.monthly-6fd3bd8c.js} +0 -0
  163. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-e56b2d30.js → HEAD CIRCUM_BOYS.percentile.weekly-c8c36478.js} +0 -0
  164. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-d15175ca.js → HEAD CIRCUM_BOYS.percentile.yearly-bcca5824.js} +0 -0
  165. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-98d1978e.js → HEAD CIRCUM_BOYS.zscore.monthly-aef2999e.js} +0 -0
  166. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-277a1f91.js → HEAD CIRCUM_BOYS.zscore.weekly-911c190d.js} +0 -0
  167. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-464ef278.js → HEAD CIRCUM_BOYS.zscore.yearly-ce4cb759.js} +0 -0
  168. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-acaef34d.js → HEAD CIRCUM_GIRLS.percentile.monthly-985b9b19.js} +0 -0
  169. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-eb21226e.js → HEAD CIRCUM_GIRLS.percentile.weekly-ad8ff619.js} +0 -0
  170. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-7e4cdf2b.js → HEAD CIRCUM_GIRLS.percentile.yearly-7e9d7ecb.js} +0 -0
  171. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-d8c98b78.js → HEAD CIRCUM_GIRLS.zscore.monthly-44e9effb.js} +0 -0
  172. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-51d84f9d.js → HEAD CIRCUM_GIRLS.zscore.weekly-67a51505.js} +0 -0
  173. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-52282f9f.js → HEAD CIRCUM_GIRLS.zscore.yearly-c8b4ec58.js} +0 -0
  174. /package/build/{HEIGHT_BOYS.percentile.monthly-357de6d4.js → HEIGHT_BOYS.percentile.monthly-c5d551c1.js} +0 -0
  175. /package/build/{HEIGHT_BOYS.percentile.weekly-c36ab223.js → HEIGHT_BOYS.percentile.weekly-af06453b.js} +0 -0
  176. /package/build/{HEIGHT_BOYS.percentile.yearly-1758340e.js → HEIGHT_BOYS.percentile.yearly-a67a20ab.js} +0 -0
  177. /package/build/{HEIGHT_BOYS.zscore.monthly-b9c1ae0c.js → HEIGHT_BOYS.zscore.monthly-864639b8.js} +0 -0
  178. /package/build/{HEIGHT_BOYS.zscore.weekly-5e68e384.js → HEIGHT_BOYS.zscore.weekly-8b575b90.js} +0 -0
  179. /package/build/{HEIGHT_BOYS.zscore.yearly-e0c9e5a1.js → HEIGHT_BOYS.zscore.yearly-1c9e659b.js} +0 -0
  180. /package/build/{HEIGHT_GIRLS.percentile.monthly-673be268.js → HEIGHT_GIRLS.percentile.monthly-2a3755f8.js} +0 -0
  181. /package/build/{HEIGHT_GIRLS.percentile.weekly-d4b99665.js → HEIGHT_GIRLS.percentile.weekly-164b2f01.js} +0 -0
  182. /package/build/{HEIGHT_GIRLS.percentile.yearly-564fd98e.js → HEIGHT_GIRLS.percentile.yearly-5e7a5cd4.js} +0 -0
  183. /package/build/{HEIGHT_GIRLS.zscore.monthly-568ea0a1.js → HEIGHT_GIRLS.zscore.monthly-82fae0cf.js} +0 -0
  184. /package/build/{HEIGHT_GIRLS.zscore.weekly-067f1f09.js → HEIGHT_GIRLS.zscore.weekly-c6f8f256.js} +0 -0
  185. /package/build/{HEIGHT_GIRLS.zscore.yearly-b8a07582.js → HEIGHT_GIRLS.zscore.yearly-1b225524.js} +0 -0
  186. /package/build/{Locale-c7fa3258.js → Locale-e7a70d46.js} +0 -0
  187. /package/build/{Visible-1753d205.js → Visible-06d9004e.js} +0 -0
  188. /package/build/{WEIGHT_BOYS.percentile.monthly-6a64ca80.js → WEIGHT_BOYS.percentile.monthly-6e8ad14f.js} +0 -0
  189. /package/build/{WEIGHT_BOYS.percentile.weekly-d8c85aaa.js → WEIGHT_BOYS.percentile.weekly-004b1aac.js} +0 -0
  190. /package/build/{WEIGHT_BOYS.percentile.yearly-21946c04.js → WEIGHT_BOYS.percentile.yearly-7c39f966.js} +0 -0
  191. /package/build/{WEIGHT_BOYS.zscore.monthly-45b5ae37.js → WEIGHT_BOYS.zscore.monthly-ca9a4519.js} +0 -0
  192. /package/build/{WEIGHT_BOYS.zscore.weekly-95649b79.js → WEIGHT_BOYS.zscore.weekly-7cf6d0b0.js} +0 -0
  193. /package/build/{WEIGHT_BOYS.zscore.yearly-31eb237d.js → WEIGHT_BOYS.zscore.yearly-63074e8f.js} +0 -0
  194. /package/build/{WEIGHT_GIRLS.percentile.monthly-1e06e1cb.js → WEIGHT_GIRLS.percentile.monthly-af650ae0.js} +0 -0
  195. /package/build/{WEIGHT_GIRLS.percentile.weekly-03a69e29.js → WEIGHT_GIRLS.percentile.weekly-e143ce42.js} +0 -0
  196. /package/build/{WEIGHT_GIRLS.percentile.yearly-5c087f10.js → WEIGHT_GIRLS.percentile.yearly-12f660f7.js} +0 -0
  197. /package/build/{WEIGHT_GIRLS.zscore.monthly-a347b154.js → WEIGHT_GIRLS.zscore.monthly-aa740107.js} +0 -0
  198. /package/build/{WEIGHT_GIRLS.zscore.weekly-5e6b6391.js → WEIGHT_GIRLS.zscore.weekly-2e5ec23b.js} +0 -0
  199. /package/build/{WEIGHT_GIRLS.zscore.yearly-c9b5228c.js → WEIGHT_GIRLS.zscore.yearly-cfdcf8e7.js} +0 -0
  200. /package/build/{constants-ddac6872.js → constants-85e1b080.js} +0 -0
  201. /package/build/{cookieHelper-2ada587f.js → cookieHelper-1b04b8d6.js} +0 -0
  202. /package/build/{dataTransform-78ba3c18.js → dataTransform-d2c88d04.js} +0 -0
  203. /package/build/esm/{BMI_BOYS.percentile.monthly-0e4b53c5.js → BMI_BOYS.percentile.monthly-4ac317d9.js} +0 -0
  204. /package/build/esm/{BMI_BOYS.percentile.weekly-9b0f7428.js → BMI_BOYS.percentile.weekly-d4217f5d.js} +0 -0
  205. /package/build/esm/{BMI_BOYS.percentile.yearly-c7a4f774.js → BMI_BOYS.percentile.yearly-298da1c3.js} +0 -0
  206. /package/build/esm/{BMI_BOYS.zscore.monthly-f3925cfc.js → BMI_BOYS.zscore.monthly-bb0c45ab.js} +0 -0
  207. /package/build/esm/{BMI_BOYS.zscore.weekly-9cfac0aa.js → BMI_BOYS.zscore.weekly-26ed248e.js} +0 -0
  208. /package/build/esm/{BMI_BOYS.zscore.yearly-6c57c7ac.js → BMI_BOYS.zscore.yearly-dac43910.js} +0 -0
  209. /package/build/esm/{BMI_GIRLS.percentile.monthly-a5435cb3.js → BMI_GIRLS.percentile.monthly-0f702a70.js} +0 -0
  210. /package/build/esm/{BMI_GIRLS.percentile.weekly-717acbae.js → BMI_GIRLS.percentile.weekly-78839c68.js} +0 -0
  211. /package/build/esm/{BMI_GIRLS.percentile.yearly-89c57945.js → BMI_GIRLS.percentile.yearly-15c7b7b7.js} +0 -0
  212. /package/build/esm/{BMI_GIRLS.zscore.monthly-23eaf1f4.js → BMI_GIRLS.zscore.monthly-6a34fa2b.js} +0 -0
  213. /package/build/esm/{BMI_GIRLS.zscore.weekly-bbf2f3c6.js → BMI_GIRLS.zscore.weekly-0d67e78b.js} +0 -0
  214. /package/build/esm/{BMI_GIRLS.zscore.yearly-6fcedf47.js → BMI_GIRLS.zscore.yearly-1b55c733.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-df01aa58.js → HEAD CIRCUM_BOYS.percentile.monthly-afadd3a4.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-618596b7.js → HEAD CIRCUM_BOYS.percentile.weekly-0858ff45.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-a7d882ec.js → HEAD CIRCUM_BOYS.percentile.yearly-e744750c.js} +0 -0
  218. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-4a3beddd.js → HEAD CIRCUM_BOYS.zscore.monthly-b526c4e5.js} +0 -0
  219. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-48b56236.js → HEAD CIRCUM_BOYS.zscore.weekly-1af70787.js} +0 -0
  220. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-c5373fdc.js → HEAD CIRCUM_BOYS.zscore.yearly-e7d65dce.js} +0 -0
  221. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-463f2f38.js → HEAD CIRCUM_GIRLS.percentile.monthly-de401203.js} +0 -0
  222. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-ccbd7354.js → HEAD CIRCUM_GIRLS.percentile.weekly-21c35592.js} +0 -0
  223. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-c5a79b96.js → HEAD CIRCUM_GIRLS.percentile.yearly-00bc10fc.js} +0 -0
  224. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-f87bdd76.js → HEAD CIRCUM_GIRLS.zscore.monthly-cdf4cd4d.js} +0 -0
  225. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-ae013f46.js → HEAD CIRCUM_GIRLS.zscore.weekly-3e8fb6c0.js} +0 -0
  226. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-d720d25c.js → HEAD CIRCUM_GIRLS.zscore.yearly-f584c049.js} +0 -0
  227. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-4e631d51.js → HEIGHT_BOYS.percentile.monthly-c18efab1.js} +0 -0
  228. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-1e6c6344.js → HEIGHT_BOYS.percentile.weekly-f8cb517c.js} +0 -0
  229. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-24be6945.js → HEIGHT_BOYS.percentile.yearly-ef6de6a4.js} +0 -0
  230. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-0e5103e5.js → HEIGHT_BOYS.zscore.monthly-b398f208.js} +0 -0
  231. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-85585de8.js → HEIGHT_BOYS.zscore.weekly-2412510b.js} +0 -0
  232. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-9d29bbf1.js → HEIGHT_BOYS.zscore.yearly-aee09e2c.js} +0 -0
  233. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-71440641.js → HEIGHT_GIRLS.percentile.monthly-1371f3b9.js} +0 -0
  234. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-26a1ec0a.js → HEIGHT_GIRLS.percentile.weekly-d0fd790c.js} +0 -0
  235. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-99d6735a.js → HEIGHT_GIRLS.percentile.yearly-01733b61.js} +0 -0
  236. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-6a7d4c76.js → HEIGHT_GIRLS.zscore.monthly-d5c95852.js} +0 -0
  237. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-16f56f99.js → HEIGHT_GIRLS.zscore.weekly-b8332dab.js} +0 -0
  238. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-984ca853.js → HEIGHT_GIRLS.zscore.yearly-e34c1ace.js} +0 -0
  239. /package/build/esm/{Locale-8b8a9a2a.js → Locale-c2859cbd.js} +0 -0
  240. /package/build/esm/{Visible-1f1c6cf3.js → Visible-4fb94c78.js} +0 -0
  241. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-5766d1fe.js → WEIGHT_BOYS.percentile.monthly-96ecbcfc.js} +0 -0
  242. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-49a087b0.js → WEIGHT_BOYS.percentile.weekly-719fba60.js} +0 -0
  243. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-91e6cd00.js → WEIGHT_BOYS.percentile.yearly-92507450.js} +0 -0
  244. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-03a6080a.js → WEIGHT_BOYS.zscore.monthly-15d7ec1a.js} +0 -0
  245. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-67eece8d.js → WEIGHT_BOYS.zscore.weekly-1c217836.js} +0 -0
  246. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-6a312f24.js → WEIGHT_BOYS.zscore.yearly-efd1cd79.js} +0 -0
  247. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-ebb45c45.js → WEIGHT_GIRLS.percentile.monthly-82b0ed52.js} +0 -0
  248. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c6d44188.js → WEIGHT_GIRLS.percentile.weekly-58d2eac3.js} +0 -0
  249. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-12247262.js → WEIGHT_GIRLS.percentile.yearly-081b2462.js} +0 -0
  250. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-fbb64fbc.js → WEIGHT_GIRLS.zscore.monthly-5ff1ab58.js} +0 -0
  251. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-6ad13b13.js → WEIGHT_GIRLS.zscore.weekly-532bd494.js} +0 -0
  252. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-13b62b90.js → WEIGHT_GIRLS.zscore.yearly-a713b235.js} +0 -0
  253. /package/build/esm/{constants-556c3247.js → constants-93c0f504.js} +0 -0
  254. /package/build/esm/{cookieHelper-392ad0c1.js → cookieHelper-3ed6a96d.js} +0 -0
  255. /package/build/esm/{dataTransform-7020c72c.js → dataTransform-e314e2e9.js} +0 -0
  256. /package/build/esm/{index-9e379c0c.js → index-610b0a61.js} +0 -0
  257. /package/build/esm/{isProduction-b573d27d.js → isProduction-eaf18304.js} +0 -0
  258. /package/build/esm/{localizeNumberFormat-78158085.js → localizeNumberFormat-0f512db0.js} +0 -0
  259. /package/build/esm/{normalizeLink-813ca82d.js → normalizeLink-daed01bf.js} +0 -0
  260. /package/build/esm/{theme-d983d3ce.js → theme-1ec9d1bb.js} +0 -0
  261. /package/build/esm/{tslib.es6-08e3ef60.js → tslib.es6-50b51fee.js} +0 -0
  262. /package/build/esm/{useIsInit-cdb3953d.js → useIsInit-48c04692.js} +0 -0
  263. /package/build/esm/{useOutsideClick-8ca0d258.js → useOutsideClick-6887daed.js} +0 -0
  264. /package/build/esm/{useScrollbarSize-abd92a7f.js → useScrollbarSize-d9e91ee3.js} +0 -0
  265. /package/build/esm/{useUniqueId-31b9a492.js → useUniqueId-ea9424c6.js} +0 -0
  266. /package/build/esm/{utils-a669370e.js → utils-38353311.js} +0 -0
  267. /package/build/{index-68d65dab.js → index-6ee6a479.js} +0 -0
  268. /package/build/{isProduction-1273e541.js → isProduction-478dda22.js} +0 -0
  269. /package/build/{localizeNumberFormat-fe4bf183.js → localizeNumberFormat-03f0c406.js} +0 -0
  270. /package/build/{normalizeLink-ab89c9c3.js → normalizeLink-c2b3e666.js} +0 -0
  271. /package/build/{theme-ed0897de.js → theme-b80cd363.js} +0 -0
  272. /package/build/{tslib.es6-6b5ab03d.js → tslib.es6-1d85bdb1.js} +0 -0
  273. /package/build/{useIsInit-3b3c55b9.js → useIsInit-bdb10dda.js} +0 -0
  274. /package/build/{useOutsideClick-687f5dd7.js → useOutsideClick-9687a318.js} +0 -0
  275. /package/build/{useScrollbarSize-8d7b5fcd.js → useScrollbarSize-ce151e36.js} +0 -0
  276. /package/build/{useUniqueId-40f3ad2c.js → useUniqueId-39c13161.js} +0 -0
  277. /package/build/{utils-037a4287.js → utils-b4d04bd5.js} +0 -0
@@ -0,0 +1,45 @@
1
+ import{_ as e}from"./tslib.es6-50b51fee.js";import t,{useMemo as o}from"react";import{L as i}from"./Locale-c2859cbd.js";import{CommonGAssets as n}from"./gAssets.js";import{t as a}from"./theme-1ec9d1bb.js";import{T as r}from"./index-6be94887.js";import l from"styled-components";import{C as s}from"./index-d8ee9c42.js";const c=l.div`
2
+ display: inline-flex;
3
+ overflow: hidden;
4
+ width: ${e=>e.size}px;
5
+ height: ${e=>e.size}px;
6
+ box-sizing: border-box;
7
+ align-items: center;
8
+ justify-content: center;
9
+
10
+ border: 1px solid #e4e8ec;
11
+ background-color: ${e=>e.backgroundColor||a.colors.white};
12
+ border-radius: ${e=>e.borderRadius||"50%"};
13
+ & > * {
14
+ width: ${e=>e.iconSize}px;
15
+ height: ${e=>e.iconSize}px;
16
+ }
17
+ `,d=l.div`
18
+ display: inline-block;
19
+ height: 108px;
20
+ background-color: ${e=>e.theme.colors.white};
21
+ border-radius: 60px;
22
+ cursor: pointer;
23
+ &.selected-week-pill {
24
+ background-color: ${e=>e.theme.colors.pink100};
25
+ }
26
+
27
+ & > div:first-child {
28
+ margin: 4px 4px 0;
29
+ }
30
+
31
+ & > p {
32
+ margin-top: 8px;
33
+ text-align: center;
34
+ }
35
+
36
+ & > * {
37
+ pointer-events: none;
38
+ }
39
+ `,p=[i.Myanmar,i.Taiwan],m=l((i=>{var{icon:l,name:s,className:m,locale:b="en-PH",dataEventCategory:g,dataEventAction:x,dataEventLabel:h,onSelect:v}=i,f=e(i,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);const u=o((()=>null==m?void 0:m.includes("selected-week-pill")),[m]);return t.createElement(d,Object.assign({onClick:v,className:m?"week-pill".concat(" non-pointer-event-child ",m):"week-pill non-pointer-event-child","data-event-category":g,"data-event-action":x,"data-event-label":h},f),t.createElement(c,{size:64,iconSize:40,backgroundColor:a.colors.white},t.createElement("img",{src:l||n.getAssetPath("week_default.png"),alt:""})),u?t.createElement(r,Object.assign({type:"semiBold",size:"n1",color:a.colors.gray800},p.includes(b)&&{style:{fontSize:"10px"}}),s):t.createElement(r,Object.assign({size:"n1",color:a.colors.gray600},p.includes(b)&&{style:{fontSize:"10px"}}),s))}))`
40
+ box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
41
+ `,b=l(s.Slide)``,g=l(s)`
42
+ .centerred-pill-wrapper {
43
+ padding: 16px 0;
44
+ }
45
+ `;export{g as S,b as a,m as b};
@@ -1,4 +1,4 @@
1
- import e from"react";import{M as t}from"./utils-a669370e.js";import o from"styled-components";var i="DjBFAbd";const a=({children:t,className:o,style:a,htmlFor:s,size:r})=>e.createElement("label",{"data-size":r,className:`${i} ${o||""}`,style:a,htmlFor:s},t),s=o.div`
1
+ import e from"react";import{M as t}from"./utils-38353311.js";import o from"styled-components";var i="DjBFAbd";const a=({children:t,className:o,style:a,htmlFor:s,size:r})=>e.createElement("label",{"data-size":r,className:`${i} ${o||""}`,style:a,htmlFor:s},t),s=o.div`
2
2
  position: relative;
3
3
  width: 100%;
4
4
 
@@ -1,4 +1,4 @@
1
- import e,{memo as t,useRef as i,useState as a,useEffect as n,useImperativeHandle as o,Fragment as r,useMemo as s}from"react";import l,{keyframes as d,css as c}from"styled-components";import{M as p}from"./utils-a669370e.js";import{L as h}from"./index-45d84312.js";import{T as m}from"./index-10f82c35.js";import{B as u}from"./index-e3874cbf.js";import{A as g,H as x,T as f,B as b,P as y}from"./index.styled-af039b56.js";import{I as v}from"./index-662f07ae.js";import{_ as w}from"./tslib.es6-08e3ef60.js";import k from"dayjs";import"./screenSizeContext-7b5ec7e6.js";import{t as E}from"./theme-d983d3ce.js";import"./index-9e0635bf.js";import"./isProduction-b573d27d.js";import{G as C}from"./Locale-8b8a9a2a.js";import"./gAssets.js";import{c as $,a as D}from"./index-e3dd90bb.js";import{yupResolver as S}from"@hookform/resolvers/yup";import{useForm as _,Controller as T}from"react-hook-form";import{B as z,I,D as N,M as A}from"./index-7ff862c5.js";import{u as P}from"./useTranslations-0798c8a1.js";import{ar as B,b as j}from"./index.styled-da2b8e9f.js";import{L as O}from"./index.styled-04f422fe.js";import{C as L}from"./index-5302477a.js";import{format as M,addDays as F}from"date-fns";import"@mantine/core";import{M as U}from"./index-dcb649f0.js";import"./index-9e379c0c.js";import{S as q}from"./index-35f0d71e.js";import R from"react-day-picker/DayPickerInput";const H=({type:t,size:i="small",label:a,name:n,checked:o,value:r,className:s,isDisabled:l=!1,onChange:d,dataEventCategory:c,dataEventAction:p,dataEventLabel:h})=>{const m=!!p&&!!c&&!!h?{"data-event-category":c,"data-event-action":p,"data-event-label":h}:{};return e.createElement(g,{"data-disabled":l,className:s,"data-type":t,"data-size":i},e.createElement("label",Object.assign({style:{display:"flex",alignItems:"center"}},m),e.createElement("input",Object.assign({type:"radio",checked:o,name:n,value:r,onChange:()=>d(r)},m)),a))},V=t((()=>e.createElement("div",{className:"shoppable"},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("rect",{width:"24",height:"24",rx:"12",fill:"#1B3250"}),e.createElement("path",{d:"M16.6667 8.00033H15.3333C15.3333 6.16033 13.84 4.66699 12 4.66699C10.16 4.66699 8.66667 6.16033 8.66667 8.00033H7.33333C6.6 8.00033 6 8.60033 6 9.33366V17.3337C6 18.067 6.6 18.667 7.33333 18.667H16.6667C17.4 18.667 18 18.067 18 17.3337V9.33366C18 8.60033 17.4 8.00033 16.6667 8.00033ZM12 6.00033C13.1067 6.00033 14 6.89366 14 8.00033H10C10 6.89366 10.8933 6.00033 12 6.00033ZM12 12.667C10.4467 12.667 9.14 11.607 8.77333 10.167C8.66 9.74699 8.98667 9.33366 9.42 9.33366C9.73333 9.33366 9.98667 9.56033 10.0733 9.86699C10.3067 10.7137 11.08 11.3337 12 11.3337C12.92 11.3337 13.6933 10.7137 13.9267 9.86699C14.0133 9.56033 14.2667 9.33366 14.58 9.33366C15.0133 9.33366 15.3333 9.74699 15.2267 10.167C14.86 11.607 13.5533 12.667 12 12.667Z",fill:"white"}))))),G=t((({dataEventCategoryForBookmark:t,dataEventActionForBookmark:i,dataEventLabelForBookmark:a})=>e.createElement("svg",{"data-event-category":t,"data-event-action":i,"data-event-label":a,width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M13 15L7 11.1111L1 15V2.55556C1 2.143 1.18061 1.74733 1.5021 1.45561C1.82359 1.16389 2.25963 1 2.71429 1H11.2857C11.7404 1 12.1764 1.16389 12.4979 1.45561C12.8194 1.74733 13 2.143 13 2.55556V15Z",fill:"#2ED69E",stroke:"#2ED69E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))),W=t((({dataEventCategoryForBookmark:t,dataEventActionForBookmark:i,dataEventLabelForBookmark:a})=>e.createElement("svg",{"data-event-category":t,"data-event-action":i,"data-event-label":a,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.75 2.25H5.25C4.425 2.25 3.75 2.925 3.75 3.75V15.75L9 13.5L14.25 15.75V3.75C14.25 2.925 13.575 2.25 12.75 2.25Z",fill:"#D2D6DC"})))),Y=l.div`
1
+ import e,{memo as t,useRef as i,useState as a,useEffect as n,useImperativeHandle as o,Fragment as r,useMemo as s}from"react";import l,{keyframes as d,css as c}from"styled-components";import{M as p}from"./utils-38353311.js";import{L as h}from"./index-02bac76b.js";import{T as m}from"./index-6be94887.js";import{B as u}from"./index-df521e46.js";import{A as g,H as x,T as f,B as b,P as y}from"./index.styled-312991ef.js";import{I as v}from"./index-ad9f626c.js";import{_ as w}from"./tslib.es6-50b51fee.js";import k from"dayjs";import"./screenSizeContext-41b07fe7.js";import{t as E}from"./theme-1ec9d1bb.js";import"./index-5c907f57.js";import"./isProduction-eaf18304.js";import{G as C}from"./Locale-c2859cbd.js";import"./gAssets.js";import{c as $,a as D}from"./index-910dc53d.js";import{yupResolver as S}from"@hookform/resolvers/yup";import{useForm as _,Controller as T}from"react-hook-form";import{B as z,I,D as N,M as A}from"./index-e9537a4b.js";import{u as P}from"./useTranslations-775e5683.js";import{ar as B,b as j}from"./index.styled-18a1da40.js";import{L as O}from"./index.styled-8a404592.js";import{C as L}from"./index-7066562e.js";import{format as M,addDays as F}from"date-fns";import"@mantine/core";import{M as U}from"./index-caab89aa.js";import"./index-610b0a61.js";import{S as q}from"./index-ec3b78fd.js";import R from"react-day-picker/DayPickerInput";const H=({type:t,size:i="small",label:a,name:n,checked:o,value:r,className:s,isDisabled:l=!1,onChange:d,dataEventCategory:c,dataEventAction:p,dataEventLabel:h})=>{const m=!!p&&!!c&&!!h?{"data-event-category":c,"data-event-action":p,"data-event-label":h}:{};return e.createElement(g,{"data-disabled":l,className:s,"data-type":t,"data-size":i},e.createElement("label",Object.assign({style:{display:"flex",alignItems:"center"}},m),e.createElement("input",Object.assign({type:"radio",checked:o,name:n,value:r,onChange:()=>d(r)},m)),a))},V=t((()=>e.createElement("div",{className:"shoppable"},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("rect",{width:"24",height:"24",rx:"12",fill:"#1B3250"}),e.createElement("path",{d:"M16.6667 8.00033H15.3333C15.3333 6.16033 13.84 4.66699 12 4.66699C10.16 4.66699 8.66667 6.16033 8.66667 8.00033H7.33333C6.6 8.00033 6 8.60033 6 9.33366V17.3337C6 18.067 6.6 18.667 7.33333 18.667H16.6667C17.4 18.667 18 18.067 18 17.3337V9.33366C18 8.60033 17.4 8.00033 16.6667 8.00033ZM12 6.00033C13.1067 6.00033 14 6.89366 14 8.00033H10C10 6.89366 10.8933 6.00033 12 6.00033ZM12 12.667C10.4467 12.667 9.14 11.607 8.77333 10.167C8.66 9.74699 8.98667 9.33366 9.42 9.33366C9.73333 9.33366 9.98667 9.56033 10.0733 9.86699C10.3067 10.7137 11.08 11.3337 12 11.3337C12.92 11.3337 13.6933 10.7137 13.9267 9.86699C14.0133 9.56033 14.2667 9.33366 14.58 9.33366C15.0133 9.33366 15.3333 9.74699 15.2267 10.167C14.86 11.607 13.5533 12.667 12 12.667Z",fill:"white"}))))),G=t((({dataEventCategoryForBookmark:t,dataEventActionForBookmark:i,dataEventLabelForBookmark:a})=>e.createElement("svg",{"data-event-category":t,"data-event-action":i,"data-event-label":a,width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M13 15L7 11.1111L1 15V2.55556C1 2.143 1.18061 1.74733 1.5021 1.45561C1.82359 1.16389 2.25963 1 2.71429 1H11.2857C11.7404 1 12.1764 1.16389 12.4979 1.45561C12.8194 1.74733 13 2.143 13 2.55556V15Z",fill:"#2ED69E",stroke:"#2ED69E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))),W=t((({dataEventCategoryForBookmark:t,dataEventActionForBookmark:i,dataEventLabelForBookmark:a})=>e.createElement("svg",{"data-event-category":t,"data-event-action":i,"data-event-label":a,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M12.75 2.25H5.25C4.425 2.25 3.75 2.925 3.75 3.75V15.75L9 13.5L14.25 15.75V3.75C14.25 2.925 13.575 2.25 12.75 2.25Z",fill:"#D2D6DC"})))),Y=l.div`
2
2
  --dropdown-padding: 12px 18px 12px 16px;
3
3
  position: relative;
4
4
  box-sizing: border-box;
package/build/esm/lead.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t}from"./tslib.es6-08e3ef60.js";import a,{createContext as l,useMemo as n,useRef as o,useState as i,useEffect as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-5692c52c.js";import{g as u,s as p}from"./cookieHelper-392ad0c1.js";import{b as h,a as g}from"./utils-a669370e.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-0798c8a1.js";import{H as f}from"./index.styled-af039b56.js";import{B as y}from"./index-e3874cbf.js";import{CommonGAssets as k}from"./gAssets.js";import"./index.styled-04f422fe.js";import"./index-5302477a.js";import"@mantine/core";import"./index.styled-0ca85796.js";import"string-format";import"./index-9e379c0c.js";import"./index.styled-522e1bc5.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-da2b8e9f.js";import"./index-7ff862c5.js";import"lodash/throttle";import"keen-slider/react";import"./index-9e0635bf.js";import _ from"dayjs";import"@mantine/hooks";import{I as E,N as w}from"./index-e3dd90bb.js";import"react-hook-form";import"./isProduction-b573d27d.js";import"./Locale-8b8a9a2a.js";import"./screenSizeContext-7b5ec7e6.js";import"styled-components";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-15296982.js";import"@mantine/dates";import{R as C,j as N,D as S,e as T}from"./index-88d35361.js";import{S as x}from"./index-54acacd4.js";import{M as O}from"./index-618c5acc.js";import{createFormContext as P}from"@mantine/form";import"./index-d0662eea.js";import"yup";import{T as j}from"./index-10f82c35.js";import{t as B}from"./theme-d983d3ce.js";import"./index-45d84312.js";import"./index-662f07ae.js";import"@hookform/resolvers/yup";import"./index-dcb649f0.js";import"./index-35f0d71e.js";import"slugify";import"./routing-ccb9c054.js";import"dayjs/plugin/relativeTime";import"./useScrollbarSize-abd92a7f.js";import"./useUniqueId-31b9a492.js";import"@mantine/carousel";import"./Visible-1f1c6cf3.js";const L={LINKS:1,TAGS:2};let I="https://dev.leadgen.hellobacsi.com/";const A={MOBILE:1,DESKTOP:2};let $="";I.includes("localhost")&&(I="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&($="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const H={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var R={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":R,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":R},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),Y=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o}),a.createElement("img",{className:"le-only-desktop",src:n})),a.createElement(q,{onClose:i,containerClassName:"close-button-top-right"})))),J=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"}))))),z=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover"}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${$}`},r)))));const K=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},G={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},Z=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),G.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},ee=({phone:e})=>G.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),te=({phone:e,otp:t})=>G.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),ae={email:{},phone:{}},le=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ae[n][o]){if(ae[n][o].value)return i;if(!ae[n][o].value&&ae[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield Z({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield X({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ae[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),ne=({content:e,inlinePosition:t})=>{const a=n((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},oe=({content:e})=>{const t=n((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[ie,re,se]=P(),de="undefined"==typeof window,ce={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},me=(e="",a="",l="",n=500)=>{const[o,s]=i([]),[d,c]=i(!1);return r((()=>{let i;return e?i=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(de)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:ce[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),n):o.length&&s([]),()=>{window.clearTimeout(i)}}),[e,n,a]),{isLoading:d,predictions:o}},ue=["places"],pe=({name:e,placeholder:t,locale:l})=>{var s;const d=re(),[c,m]=i(""),[u,p]=i(""),{predictions:h}=me(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=i(null),[b,f]=i(!1),y=o(Math.random().toString(36).substring(7)),k=n((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return r((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?f(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{f(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:ue,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+y.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},he=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${$}`},e),ge=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${$}`},e),ve=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=re();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ge,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(he,{key:r,align:u},m);case"TextBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(E.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(T,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(pe,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(S,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(y,{type:"button",size:"md",className:`lead-modal__btn ${$}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(N.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(N,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(E,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(C.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(C,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},be=({phone:e,onSuccess:l,autoSendWhenOpen:n})=>{const{t:s}=b(),[d,c]=i(""),[m,u]=i(!1),[p,h]=i(0),g=o(null),[v,k]=i(),[_,w]=i(""),C=o();r((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield ee({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return r((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),r((()=>{n&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield te({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(f,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(j,{size:"p1",color:B.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(E,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(y,{size:"md",color:"primary",className:`lead-modal__btn ${$}`,disabled:!d},s("lead.otp.verify")),a.createElement(y,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${$}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},fe=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:f,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),P=x.submitBlock.data.url,j=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,I=location.pathname,A=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,H]=i(!0),[R,F]=i(""),W=o(),V=()=>{R?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;r((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ae.email={},ae.phone={}}),[]);const Y=o(!1),J=o(!1),{form:K,validateObj:G}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:i=[]})=>{const{t:r}=b(),s=n((()=>{const n=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],o=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?r("validator.required"):null==t?void 0:t(a)};return e.filter((e=>n.includes(e.name))).reduce(((e,n)=>"NumberBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Number(e)))return r("validator.number")}))}):"EmailBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return r("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{email:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===n.name||"PhoneOtpBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return r("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{phone:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Date.parse(e)))return r("validator.date")}))}):Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=se({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=o(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:Y,validatingEmailRef:J,campaignId:_,campaign_subot_id:E}),Q=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":I,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||""}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},f?a.createElement(z,{title:f.title,titleAlign:f.titleAlign,subtitle:f.subtitle,subtitleAlign:f.subtitleAlign,link:f.link,linkNewTab:f.linkNewTab,linkText:f.linkText,image:f.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:k.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:""}):null))),R&&a.createElement(be,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,K.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ie,{form:K},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),K.setTouched(Object.keys(G).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||Y.current||setTimeout((()=>{K.onSubmit((e=>{var t,a,l;if(!Object.keys(K.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${$}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${$}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ve,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${$}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${$}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>H(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},j," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:P||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(y,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${$}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(q,{onClose:V,containerClassName:"close-button-top-right"}))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?Q:"Sidebar"==h?a.createElement(oe,{content:Q}):h.includes("Inline")?a.createElement(ne,{content:Q,inlinePosition:t.popupInlinePosition}):null},ye=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname;return a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},ke=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n})),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))),_e=[],Ee=[],we=[];const Ce=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Ne=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Se=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Te=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Se(a),o=Se(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=H[i];return!(Ne(r).getTime()>o.getTime()&&(we.push(e),1))}(e):0===e.formatted_status&&(_e.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Se(l),i=Se(n);if(!o||!i)return!1;const r=H[a],s=Ne(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(Ee.push(e),!0)})(e));let xe=null;function Oe({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Te))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==A.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==A.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",_e),Pe("--listCampaignScheduledToActivated",Ee),Pe("--listCampaignActiveButExpired",we);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const f=[...m,...b],y=document.cookie.split("; ").map((e=>e.split("=")[0])),k=y.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=y.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=f.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ce(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),xe&&clearTimeout(xe),xe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const je=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);r((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:f,image:y,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=f,S=f.imageBlocks?JSON.parse(f.imageBlocks):{},T=JSON.parse(f.actionBlocks),x=JSON.parse(f.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const P={1:{},2:{},3:{}},j=o("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;P[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${f.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${f.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=P[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(Y,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:y,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(ke,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:y,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(J,{popupId:j.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:y,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(fe,{popupId:j.current,extraFields:f,onClose:n,onOtherSubmit:L,imageMobile:y,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,P),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(ye,{popupId:j.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:y,imageDesktop:k,currentLayout:N}):null},Be=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var f;const y=o(),k=o(Date.now()),{apiUrl:E}=n((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[w,C]=i(null),[N,S]=i(""),[T,x]=i(null);r((()=>{K.apiLeadUrl=E,K.apiSubotUrl=v}),[E,v]);const O=(e,t)=>{C(e),S(t)},P=()=>{var e,t;if(!w)return;Pe(`👋👋👋 CLOSE POPUP ${w.code} 👋👋👋`);const a=Number(null===(e=w.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=w.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${w.code}`,`target_${w.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${E}api/campaign/${w.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),C(null),x(null)};r((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;P(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),y.current&&window.removeEventListener("scroll",y.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return r((()=>{w&&(k.current=Date.now())}),[w]),a.createElement(V.Provider,{value:{apiUrl:E,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(f=null==w?void 0:w.extra_fields)||void 0===f?void 0:f.popupVersion)&&a.createElement(je,{campaign:w,action:N,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const f=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),y=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:f.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?_(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:y};n&&o[n].value_en&&(k.category=o[n].value_en);const C=Number((null===(i=null===(t=w.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),N=Number((null===(s=null===(r=w.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==N&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==N&&(Pe(`⌛ Popup will show again after ${C} days!`),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,days:C,path:"/"})),fetch(`${E}api/campaign/${w.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==w.extra_fields.popupShowThankYou)return P(),void document.body.classList.remove("noscroll");let S=!0;const T=w.thank_you_image||`${E}admin/img/thanksyou.png`;let O,j,B=w.extra_fields.popupThankyouTitle||"Thank you.",L=w.extra_fields.popupThankyouDesc||"We appreciate your time!",I="",A="",$="";if("2.1"==w.extra_fields.popupVersion){const e=w.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",I=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",A=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",j=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,$=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=w.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(S=!1)}x(S?{title:B,titleAlign:I,subtitle:L,subtitleAlign:A,link:$,linkNewTab:j,linkText:O,image:T}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},f.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:P,showThankyou:T,locale:h})),g())))};export{Be as LeadGen};
1
+ import{_ as e,a as t}from"./tslib.es6-50b51fee.js";import a,{createContext as l,useMemo as n,useRef as o,useState as i,useEffect as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-546b5939.js";import{g as u,s as p}from"./cookieHelper-3ed6a96d.js";import{b as h,a as g}from"./utils-38353311.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-775e5683.js";import{H as f}from"./index.styled-312991ef.js";import{B as y}from"./index-df521e46.js";import{CommonGAssets as k}from"./gAssets.js";import"./index.styled-8a404592.js";import"./index-7066562e.js";import"@mantine/core";import"./index.styled-37a07c81.js";import"string-format";import"./index-610b0a61.js";import"./index.styled-8aca3502.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-18a1da40.js";import"./index-e9537a4b.js";import"lodash/throttle";import"keen-slider/react";import"./index-5c907f57.js";import _ from"dayjs";import"@mantine/hooks";import{I as E,N as w}from"./index-910dc53d.js";import"react-hook-form";import"./isProduction-eaf18304.js";import"./Locale-c2859cbd.js";import"./screenSizeContext-41b07fe7.js";import"styled-components";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-73977c25.js";import"@mantine/dates";import{R as C,j as N,D as S,e as T}from"./index-bcf00394.js";import{S as x}from"./index-f8771d49.js";import{M as O}from"./index-4df4c64a.js";import{createFormContext as P}from"@mantine/form";import"./index-d8ee9c42.js";import"yup";import{T as j}from"./index-6be94887.js";import{t as B}from"./theme-1ec9d1bb.js";import"./index-02bac76b.js";import"./index-ad9f626c.js";import"@hookform/resolvers/yup";import"./index-caab89aa.js";import"./index-ec3b78fd.js";import"slugify";import"./routing-c43ef7a7.js";import"dayjs/plugin/relativeTime";import"./useScrollbarSize-d9e91ee3.js";import"./useUniqueId-ea9424c6.js";import"@mantine/carousel";import"./Visible-4fb94c78.js";const L={LINKS:1,TAGS:2};let I="https://dev.leadgen.hellobacsi.com/";const A={MOBILE:1,DESKTOP:2};let $="";I.includes("localhost")&&(I="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&($="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const H={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var R={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":R,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":R},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),Y=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o}),a.createElement("img",{className:"le-only-desktop",src:n})),a.createElement(q,{onClose:i,containerClassName:"close-button-top-right"})))),J=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"}))))),z=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover"}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${$}`},r)))));const K=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},G={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},Z=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),G.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},ee=({phone:e})=>G.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),te=({phone:e,otp:t})=>G.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),ae={email:{},phone:{}},le=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ae[n][o]){if(ae[n][o].value)return i;if(!ae[n][o].value&&ae[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield Z({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield X({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ae[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),ne=({content:e,inlinePosition:t})=>{const a=n((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},oe=({content:e})=>{const t=n((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[ie,re,se]=P(),de="undefined"==typeof window,ce={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},me=(e="",a="",l="",n=500)=>{const[o,s]=i([]),[d,c]=i(!1);return r((()=>{let i;return e?i=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(de)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:ce[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),n):o.length&&s([]),()=>{window.clearTimeout(i)}}),[e,n,a]),{isLoading:d,predictions:o}},ue=["places"],pe=({name:e,placeholder:t,locale:l})=>{var s;const d=re(),[c,m]=i(""),[u,p]=i(""),{predictions:h}=me(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=i(null),[b,f]=i(!1),y=o(Math.random().toString(36).substring(7)),k=n((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return r((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?f(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{f(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:ue,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+y.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},he=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${$}`},e),ge=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${$}`},e),ve=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=re();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ge,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(he,{key:r,align:u},m);case"TextBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(E.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(T,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(pe,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(S,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(y,{type:"button",size:"md",className:`lead-modal__btn ${$}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(N.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(N,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(E,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(C.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(C,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},be=({phone:e,onSuccess:l,autoSendWhenOpen:n})=>{const{t:s}=b(),[d,c]=i(""),[m,u]=i(!1),[p,h]=i(0),g=o(null),[v,k]=i(),[_,w]=i(""),C=o();r((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield ee({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return r((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),r((()=>{n&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield te({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(f,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(j,{size:"p1",color:B.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(E,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(y,{size:"md",color:"primary",className:`lead-modal__btn ${$}`,disabled:!d},s("lead.otp.verify")),a.createElement(y,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${$}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},fe=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:f,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),P=x.submitBlock.data.url,j=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,I=location.pathname,A=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,H]=i(!0),[R,F]=i(""),W=o(),V=()=>{R?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;r((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ae.email={},ae.phone={}}),[]);const Y=o(!1),J=o(!1),{form:K,validateObj:G}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:i=[]})=>{const{t:r}=b(),s=n((()=>{const n=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],o=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?r("validator.required"):null==t?void 0:t(a)};return e.filter((e=>n.includes(e.name))).reduce(((e,n)=>"NumberBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Number(e)))return r("validator.number")}))}):"EmailBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return r("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{email:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===n.name||"PhoneOtpBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return r("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{phone:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Date.parse(e)))return r("validator.date")}))}):Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=se({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=o(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:Y,validatingEmailRef:J,campaignId:_,campaign_subot_id:E}),Q=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":I,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||""}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},f?a.createElement(z,{title:f.title,titleAlign:f.titleAlign,subtitle:f.subtitle,subtitleAlign:f.subtitleAlign,link:f.link,linkNewTab:f.linkNewTab,linkText:f.linkText,image:f.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:k.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:""}):null))),R&&a.createElement(be,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,K.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ie,{form:K},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),K.setTouched(Object.keys(G).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||Y.current||setTimeout((()=>{K.onSubmit((e=>{var t,a,l;if(!Object.keys(K.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${$}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${$}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ve,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${$}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${$}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>H(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},j," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:P||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(y,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${$}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(q,{onClose:V,containerClassName:"close-button-top-right"}))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?Q:"Sidebar"==h?a.createElement(oe,{content:Q}):h.includes("Inline")?a.createElement(ne,{content:Q,inlinePosition:t.popupInlinePosition}):null},ye=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname;return a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},ke=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n})),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))),_e=[],Ee=[],we=[];const Ce=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Ne=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Se=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Te=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Se(a),o=Se(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=H[i];return!(Ne(r).getTime()>o.getTime()&&(we.push(e),1))}(e):0===e.formatted_status&&(_e.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Se(l),i=Se(n);if(!o||!i)return!1;const r=H[a],s=Ne(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(Ee.push(e),!0)})(e));let xe=null;function Oe({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Te))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==A.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==A.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",_e),Pe("--listCampaignScheduledToActivated",Ee),Pe("--listCampaignActiveButExpired",we);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const f=[...m,...b],y=document.cookie.split("; ").map((e=>e.split("=")[0])),k=y.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=y.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=f.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ce(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),xe&&clearTimeout(xe),xe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const je=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);r((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:f,image:y,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=f,S=f.imageBlocks?JSON.parse(f.imageBlocks):{},T=JSON.parse(f.actionBlocks),x=JSON.parse(f.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const P={1:{},2:{},3:{}},j=o("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;P[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${f.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${f.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=P[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(Y,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:y,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(ke,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:y,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(J,{popupId:j.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:y,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(fe,{popupId:j.current,extraFields:f,onClose:n,onOtherSubmit:L,imageMobile:y,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,P),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(ye,{popupId:j.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:y,imageDesktop:k,currentLayout:N}):null},Be=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var f;const y=o(),k=o(Date.now()),{apiUrl:E}=n((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[w,C]=i(null),[N,S]=i(""),[T,x]=i(null);r((()=>{K.apiLeadUrl=E,K.apiSubotUrl=v}),[E,v]);const O=(e,t)=>{C(e),S(t)},P=()=>{var e,t;if(!w)return;Pe(`👋👋👋 CLOSE POPUP ${w.code} 👋👋👋`);const a=Number(null===(e=w.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=w.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${w.code}`,`target_${w.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${E}api/campaign/${w.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),C(null),x(null)};r((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;P(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),y.current&&window.removeEventListener("scroll",y.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return r((()=>{w&&(k.current=Date.now())}),[w]),a.createElement(V.Provider,{value:{apiUrl:E,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(f=null==w?void 0:w.extra_fields)||void 0===f?void 0:f.popupVersion)&&a.createElement(je,{campaign:w,action:N,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const f=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),y=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:f.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?_(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:y};n&&o[n].value_en&&(k.category=o[n].value_en);const C=Number((null===(i=null===(t=w.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),N=Number((null===(s=null===(r=w.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==N&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==N&&(Pe(`⌛ Popup will show again after ${C} days!`),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,days:C,path:"/"})),fetch(`${E}api/campaign/${w.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==w.extra_fields.popupShowThankYou)return P(),void document.body.classList.remove("noscroll");let S=!0;const T=w.thank_you_image||`${E}admin/img/thanksyou.png`;let O,j,B=w.extra_fields.popupThankyouTitle||"Thank you.",L=w.extra_fields.popupThankyouDesc||"We appreciate your time!",I="",A="",$="";if("2.1"==w.extra_fields.popupVersion){const e=w.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",I=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",A=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",j=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,$=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=w.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(S=!1)}x(S?{title:B,titleAlign:I,subtitle:L,subtitleAlign:A,link:$,linkNewTab:j,linkText:O,image:T}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},f.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:P,showThankyou:T,locale:h})),g())))};export{Be as LeadGen};
@@ -1 +1 @@
1
- export{S as Select}from"./index-54acacd4.js";import{f as t,u as a,g as s}from"./index-88d35361.js";export{A as Accordion,h as Avatar,i as Carousel,j as Checkbox,D as DatePicker,k as MAPPED_LOCALE,O as OTP,e as Phone,R as Radio,g as getMantineThemeOverride,u as useMantineLocale}from"./index-88d35361.js";import{_ as r}from"./tslib.es6-08e3ef60.js";import o,{useMemo as n}from"react";import{Indicator as c,Badge as l,Spoiler as m,LoadingOverlay as d,Switch as p,MantineProvider as b,clsx as x,Title as f,Text as v,Button as E}from"@mantine/core";import"dayjs";import"./screenSizeContext-7b5ec7e6.js";import"styled-components";import{t as y}from"./theme-d983d3ce.js";import"./index-9e0635bf.js";import"./utils-a669370e.js";import"./isProduction-b573d27d.js";import"./Locale-8b8a9a2a.js";import"./gAssets.js";export{M as Modal}from"./index-8607de36.js";import{T as P}from"./index-10f82c35.js";import{u as H}from"./useTranslations-0798c8a1.js";export{I as Input,e as emotionCache}from"./index-e3dd90bb.js";export{C as CentralCarousel}from"./index-d0662eea.js";export{S as Slider}from"./index-35f0d71e.js";import"@mantine/dates";import"@mantine/carousel";import"lodash/throttle";import"./translationsContext-5692c52c.js";import"string-format";import"@mantine/hooks";import"./index-e3874cbf.js";const N=e=>{var{styles:t}=e,a=r(e,["styles"]);return o.createElement(c,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({indicator:{backgroundColor:y.colors.red700},processing:{animationDirection:"alternate"}},t)},a))},L=e=>o.createElement(t,Object.assign({minRows:2,maxRows:4},e)),T=e=>{var{color:t=y.colors.primaryBase,styles:a}=e,s=r(e,["color","styles"]);return o.createElement(l,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},s))},z=e=>{var{children:t,line:a,lineHeight:s,trackingAttributes:i,maxHeight:c,customExpandFn:l}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=H(),u=n((()=>c||(a&&s?a*s:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const g=n((()=>i?{"data-event-category":i.dataEventCategory,"data-event-action":i.dataEventAction,"data-event-label":i.dataEventLabel}:{}),[i]);return o.createElement(m,Object.assign({showLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},g,{onClick:l}),p("articlePage.readMore")),hideLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},g),p("articlePage.showLess"))},d,{maxHeight:u}),t)},w=e=>o.createElement(d,Object.assign({loaderProps:{color:y.colors.primaryBase}},e)),B=p,F=e=>{var{children:t,locale:i}=e,n=r(e,["children","locale"]);return a(i),o.createElement(b,Object.assign({theme:s(i)},n),t)};var G={container:"MON6sfi",iconContainer:"pS-tJD7",icon:"s3tJ9-5",title:"fNsZr1b",description:"uuxV74v",button:"YohjTDU"};function J(e){const{icon:t,title:a,description:s,button:i,buttonProps:n,style:c,className:l}=e,m=n||{},{size:d="lg",variant:p="outline"}=m,u=r(m,["size","variant"]),g=t;return o.createElement("div",{className:x("result",G.container,l),style:c},g&&o.createElement("div",{className:x("resultIconContainer",G.iconContainer)},o.createElement(g,{className:x("resultIcon",G.icon)})),o.createElement(f,{order:3,size:"h3",className:x("resultTitle",G.title)},a),o.createElement(v,{className:x("resultDescription",G.description)},s),i&&o.createElement(E,Object.assign({},u,{size:d,variant:p,className:x("resultButton",G.button,u.className)}),i))}export{T as Badge,N as Indicator,w as LoadingOverlay,F as MantineProvider,J as Result,z as Spoiler,B as Switch,L as TextArea};
1
+ export{S as Select}from"./index-f8771d49.js";import{f as t,u as s,g as a}from"./index-bcf00394.js";export{A as Accordion,h as Avatar,i as Carousel,j as Checkbox,D as DatePicker,k as MAPPED_LOCALE,O as OTP,e as Phone,R as Radio,g as getMantineThemeOverride,u as useMantineLocale}from"./index-bcf00394.js";import{_ as r}from"./tslib.es6-50b51fee.js";import o,{useMemo as n}from"react";import{Indicator as c,Badge as l,Spoiler as m,LoadingOverlay as d,Switch as p,MantineProvider as b,clsx as f,Title as x,Text as v,Button as E}from"@mantine/core";import"dayjs";import"./screenSizeContext-41b07fe7.js";import"styled-components";import{t as y}from"./theme-1ec9d1bb.js";import"./index-5c907f57.js";import"./utils-38353311.js";import"./isProduction-eaf18304.js";import"./Locale-c2859cbd.js";import"./gAssets.js";export{M as Modal}from"./index-17e42ece.js";import{T as P}from"./index-6be94887.js";import{u as H}from"./useTranslations-775e5683.js";export{I as Input,e as emotionCache}from"./index-910dc53d.js";export{C as CentralCarousel}from"./index-d8ee9c42.js";export{S as Slider}from"./index-ec3b78fd.js";import"@mantine/dates";import"@mantine/carousel";import"lodash/throttle";import"./translationsContext-546b5939.js";import"string-format";import"@mantine/hooks";import"./index-df521e46.js";const N=e=>{var{styles:t}=e,s=r(e,["styles"]);return o.createElement(c,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({indicator:{backgroundColor:y.colors.red700},processing:{animationDirection:"alternate"}},t)},s))},L=e=>o.createElement(t,Object.assign({minRows:2,maxRows:4},e)),T=e=>{var{color:t=y.colors.primaryBase,styles:s}=e,a=r(e,["color","styles"]);return o.createElement(l,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},s)},a))},z=e=>{var{children:t,line:s,lineHeight:a,trackingAttributes:i,maxHeight:c,customExpandFn:l}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=H(),u=n((()=>c||(s&&a?s*a:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=n((()=>i?{"data-event-category":i.dataEventCategory,"data-event-action":i.dataEventAction,"data-event-label":i.dataEventLabel}:{}),[i]);return o.createElement(m,Object.assign({showLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},b,{onClick:l}),p("articlePage.readMore")),hideLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)},w=e=>o.createElement(d,Object.assign({loaderProps:{color:y.colors.primaryBase}},e)),B=p,F=e=>{var{children:t,locale:i}=e,n=r(e,["children","locale"]);return s(i),o.createElement(b,Object.assign({theme:a(i)},n),t)};var G={container:"MON6sfi",iconContainer:"pS-tJD7",icon:"s3tJ9-5",title:"fNsZr1b",description:"uuxV74v",button:"YohjTDU"};function J(e){const{icon:t,title:s,description:a,button:i,buttonProps:n,style:c,className:l}=e,m=n||{},{size:d="lg",variant:p="outline"}=m,u=r(m,["size","variant"]),b=t;return o.createElement("div",{className:f("result",G.container,l),style:c},b&&o.createElement("div",{className:f("resultIconContainer",G.iconContainer)},o.createElement(b,{className:f("resultIcon",G.icon)})),o.createElement(x,{order:3,size:"h3",className:f("resultTitle",G.title)},s),o.createElement(v,{className:f("resultDescription",G.description)},a),i&&o.createElement(E,Object.assign({},u,{size:d,variant:p,className:f("resultButton",G.button,u.className)}),i))}export{T as Badge,N as Indicator,w as LoadingOverlay,F as MantineProvider,J as Result,z as Spoiler,B as Switch,L as TextArea};
package/build/esm/misc.js CHANGED
@@ -1 +1 @@
1
- export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-78158085.js";export{S as ScreenSizeContext,j as ScreenSizeContextProvider,h as fadeIn,i as getWindowSizeGroups,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./screenSizeContext-7b5ec7e6.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-392ad0c1.js";import"react";import"styled-components";export{t as theme}from"./theme-d983d3ce.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-7020c72c.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-ccb9c054.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,b as getWrapperDomWithSelector,m as makeParams,c as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-a669370e.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-cd3b2315.js";export{g as getSocialList}from"./getSocialList-b8a9bb82.js";import"dayjs";import"lodash/throttle";import"./index-9e0635bf.js";import"./Locale-8b8a9a2a.js";import"./isProduction-b573d27d.js";import"./tslib.es6-08e3ef60.js";import"./core-8e353a70.js";import"./normalizeLink-813ca82d.js";import"./gAssets.js";
1
+ export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-0f512db0.js";export{S as ScreenSizeContext,j as ScreenSizeContextProvider,h as fadeIn,i as getWindowSizeGroups,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./screenSizeContext-41b07fe7.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-3ed6a96d.js";import"react";import"styled-components";export{t as theme}from"./theme-1ec9d1bb.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-e314e2e9.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-c43ef7a7.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,b as getWrapperDomWithSelector,m as makeParams,c as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-38353311.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-30bda06e.js";export{g as getSocialList}from"./getSocialList-6c37f445.js";import"dayjs";import"lodash/throttle";import"./index-5c907f57.js";import"./Locale-c2859cbd.js";import"./isProduction-eaf18304.js";import"./tslib.es6-50b51fee.js";import"./core-ba07b579.js";import"./normalizeLink-daed01bf.js";import"./gAssets.js";
@@ -1 +1 @@
1
- import"./tslib.es6-08e3ef60.js";import"react";import"./core-8e353a70.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-b534162c.js";import"./index-9e0635bf.js";import"./normalizeLink-813ca82d.js";import"./routing-ccb9c054.js";import"./dataTransform-143b77c5.js";import"./index.styled-da2b8e9f.js";import"./isProduction-b573d27d.js";import"./gAssets.js";import"./Locale-8b8a9a2a.js";import"./useUniqueId-31b9a492.js";import"./index-10f82c35.js";import"./index-45d84312.js";import"./index-5302477a.js";import"./utils-a669370e.js";import"styled-components";import"./useTranslations-0798c8a1.js";import"./translationsContext-5692c52c.js";import"string-format";import"lodash/throttle";import"./index.styled-af039b56.js";import"./theme-d983d3ce.js";import"./index.styled-04f422fe.js";import"dayjs";import"./screenSizeContext-7b5ec7e6.js";import"./index-e3874cbf.js";import"@mantine/core";import"./cookieHelper-392ad0c1.js";import"./index.styled-0ca85796.js";import"./index-9e379c0c.js";import"./constants-556c3247.js";import"./useIsInit-cdb3953d.js";import"lodash/debounce";import"slugify";import"dayjs/plugin/relativeTime";
1
+ import"./tslib.es6-50b51fee.js";import"react";import"./core-ba07b579.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-4c6a114f.js";import"./index-5c907f57.js";import"./normalizeLink-daed01bf.js";import"./routing-c43ef7a7.js";import"./dataTransform-4e3ae6dc.js";import"./index.styled-18a1da40.js";import"./isProduction-eaf18304.js";import"./gAssets.js";import"./Locale-c2859cbd.js";import"./useUniqueId-ea9424c6.js";import"./index-6be94887.js";import"./index-02bac76b.js";import"./index-7066562e.js";import"./utils-38353311.js";import"styled-components";import"./useTranslations-775e5683.js";import"./translationsContext-546b5939.js";import"string-format";import"lodash/throttle";import"./index.styled-312991ef.js";import"./theme-1ec9d1bb.js";import"./index.styled-8a404592.js";import"dayjs";import"./screenSizeContext-41b07fe7.js";import"./index-df521e46.js";import"@mantine/core";import"./cookieHelper-3ed6a96d.js";import"./index.styled-37a07c81.js";import"./index-610b0a61.js";import"./constants-93c0f504.js";import"./useIsInit-48c04692.js";import"lodash/debounce";import"slugify";import"dayjs/plugin/relativeTime";
@@ -1 +1 @@
1
- export{M as MAPPED_LOCALE,b as OnboardingForm,O as OnboardingModal,a as OnboardingStep,c as OtpForm}from"./index-618c5acc.js";import"./tslib.es6-08e3ef60.js";import"react";import"@mantine/hooks";import"./index.styled-af039b56.js";import"styled-components";import"./theme-d983d3ce.js";import"./utils-a669370e.js";import"./index.styled-04f422fe.js";import"./index-5302477a.js";import"./gAssets.js";import"./index-9e0635bf.js";import"./Locale-8b8a9a2a.js";import"./isProduction-b573d27d.js";import"./index-10f82c35.js";import"dayjs";import"./screenSizeContext-7b5ec7e6.js";import"lodash/throttle";import"./index-e3874cbf.js";import"@mantine/core";import"./index.styled-0ca85796.js";import"./useTranslations-0798c8a1.js";import"./translationsContext-5692c52c.js";import"string-format";import"./index-9e379c0c.js";import"lodash/debounce";import"@mantine/form";import"./index-88d35361.js";import"@mantine/dates";import"@mantine/carousel";import"./index-e3dd90bb.js";import"yup";import"./index-d0662eea.js";import"date-fns";import"./Visible-1f1c6cf3.js";
1
+ export{M as MAPPED_LOCALE,b as OnboardingForm,O as OnboardingModal,a as OnboardingStep,c as OtpForm}from"./index-4df4c64a.js";import"./tslib.es6-50b51fee.js";import"react";import"@mantine/hooks";import"./index.styled-312991ef.js";import"styled-components";import"./theme-1ec9d1bb.js";import"./utils-38353311.js";import"./index.styled-8a404592.js";import"./index-7066562e.js";import"./gAssets.js";import"./index-5c907f57.js";import"./Locale-c2859cbd.js";import"./isProduction-eaf18304.js";import"./index-6be94887.js";import"dayjs";import"./screenSizeContext-41b07fe7.js";import"lodash/throttle";import"./index-df521e46.js";import"@mantine/core";import"./index.styled-37a07c81.js";import"./useTranslations-775e5683.js";import"./translationsContext-546b5939.js";import"string-format";import"./index-610b0a61.js";import"lodash/debounce";import"@mantine/form";import"./index-bcf00394.js";import"@mantine/dates";import"@mantine/carousel";import"./index-910dc53d.js";import"yup";import"./index-d8ee9c42.js";import"date-fns";import"./Visible-4fb94c78.js";
package/build/esm/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as o}from"./index-dcb649f0.js";import{T as n}from"./index-10f82c35.js";import{P as i}from"./index-17fe8025.js";import{u as c}from"./useTranslations-0798c8a1.js";import{t as s}from"./theme-d983d3ce.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as x}from"./index-9e379c0c.js";import{a as f}from"./useOutsideClick-8ca0d258.js";import E from"styled-components";import{_ as k}from"./tslib.es6-08e3ef60.js";import"./index.styled-0ca85796.js";import"./Locale-8b8a9a2a.js";import"./index.styled-15296982.js";import"./gAssets.js";import"./index-9e0635bf.js";import"./isProduction-b573d27d.js";import"./index-d0662eea.js";import"@mantine/carousel";import"@mantine/hooks";import"./translationsContext-5692c52c.js";import"string-format";const w=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:l,activeWeek:a,t:o})=>{const n=o(`bmi.result.${l}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:l}:{})))},v=t=>{const{x:r,y:l,payload:a,activeWeek:o}=t;return o===a.value?e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},j=E.div`
1
+ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as o}from"./index-caab89aa.js";import{T as n}from"./index-6be94887.js";import{P as i}from"./index-1d4a0d5c.js";import{u as c}from"./useTranslations-775e5683.js";import{t as s}from"./theme-1ec9d1bb.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as x}from"./index-610b0a61.js";import{a as f}from"./useOutsideClick-6887daed.js";import E from"styled-components";import{_ as k}from"./tslib.es6-50b51fee.js";import"./index.styled-37a07c81.js";import"./Locale-c2859cbd.js";import"./index.styled-73977c25.js";import"./gAssets.js";import"./index-5c907f57.js";import"./isProduction-eaf18304.js";import"./index-d8ee9c42.js";import"@mantine/carousel";import"@mantine/hooks";import"./translationsContext-546b5939.js";import"string-format";const w=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:l,activeWeek:a,t:o})=>{const n=o(`bmi.result.${l}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:l}:{})))},v=t=>{const{x:r,y:l,payload:a,activeWeek:o}=t;return o===a.value?e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},j=E.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{d as e}from"./index-9e0635bf.js";import{i as t}from"./isProduction-b573d27d.js";const s=(s,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!t?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":s]}`},o=(s,o)=>process.env.UNIFY_SSO_API||`https://${t?"id.":"staging-id."}${e[o?"vi-VN_MB":s]}`,r=()=>process.env.UNIFY_TOGETHER_API||`https://${t?"together.":"staging-together."}hellohealthgroup.com`,i=s=>process.env.UNIFY_DISCOVER_API||`https://${t?"wp.":"staging."}${e[s]}`,n=()=>process.env.UNIFY_CARE_API||`https://${t?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,i as c,n as d,s as g};
1
+ import{d as e}from"./index-5c907f57.js";import{i as t}from"./isProduction-eaf18304.js";const s=(s,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!t?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":s]}`},o=(s,o)=>process.env.UNIFY_SSO_API||`https://${t?"id.":"staging-id."}${e[o?"vi-VN_MB":s]}`,r=()=>process.env.UNIFY_TOGETHER_API||`https://${t?"together.":"staging-together."}hellohealthgroup.com`,i=s=>process.env.UNIFY_DISCOVER_API||`https://${t?"wp.":"staging."}${e[s]}`,n=()=>process.env.UNIFY_CARE_API||`https://${t?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,i as c,n as d,s as g};
@@ -1,4 +1,4 @@
1
- import{keyframes as t}from"styled-components";import r,{createContext as i,useState as s,useEffect as a,useMemo as n}from"react";import e from"lodash/throttle";import{B as o}from"./utils-a669370e.js";const d=t`
1
+ import{keyframes as t}from"styled-components";import r,{createContext as i,useState as s,useEffect as a,useMemo as n}from"react";import e from"lodash/throttle";import{B as o}from"./utils-38353311.js";const d=t`
2
2
  from {
3
3
  transform: translate3d(0, 100%, 0);
4
4
  visibility: visible;
@@ -1 +1 @@
1
- export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-a5c4217e.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,U as UserAvatar}from"./index.styled-da2b8e9f.js";export{d as TogetherDataTransforms}from"./dataTransform-143b77c5.js";import"react";import"./index-10f82c35.js";import"./tslib.es6-08e3ef60.js";import"./translationsContext-5692c52c.js";import"string-format";import"@mantine/core";import"./index-e3874cbf.js";import"./index.styled-522e1bc5.js";import"styled-components";import"./utils-a669370e.js";import"./index-45d84312.js";import"./gAssets.js";import"./index-9e0635bf.js";import"./Locale-8b8a9a2a.js";import"./isProduction-b573d27d.js";import"./index-5302477a.js";import"./index.styled-af039b56.js";import"./theme-d983d3ce.js";import"./index.styled-04f422fe.js";import"dayjs";import"./screenSizeContext-7b5ec7e6.js";import"lodash/throttle";import"./index-662f07ae.js";import"./index-e3dd90bb.js";import"@mantine/hooks";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-7ff862c5.js";import"./useScrollbarSize-abd92a7f.js";import"lodash/debounce";import"react-dom";import"./useTranslations-0798c8a1.js";import"./useUniqueId-31b9a492.js";import"./index-dcb649f0.js";import"./index.styled-0ca85796.js";import"date-fns";import"./index-9e379c0c.js";import"./index-35f0d71e.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-be95780c.js";import"react-contenteditable";import"keen-slider/react";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-15296982.js";import"./index-d0662eea.js";import"@mantine/carousel";import"@mantine/dates";import"./cookieHelper-392ad0c1.js";import"dayjs/plugin/relativeTime";import"./index-88d35361.js";import"./index-8607de36.js";import"slugify";import"./routing-ccb9c054.js";
1
+ export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-6971c397.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,U as UserAvatar}from"./index.styled-18a1da40.js";export{d as TogetherDataTransforms}from"./dataTransform-4e3ae6dc.js";import"./tslib.es6-50b51fee.js";import"react";import"@mantine/core";import"./index-df521e46.js";import"./index-6be94887.js";import"./index.styled-8aca3502.js";import"styled-components";import"./utils-38353311.js";import"./index-02bac76b.js";import"./gAssets.js";import"./index-5c907f57.js";import"./Locale-c2859cbd.js";import"./isProduction-eaf18304.js";import"./index-7066562e.js";import"./index.styled-312991ef.js";import"./theme-1ec9d1bb.js";import"./index.styled-8a404592.js";import"dayjs";import"./screenSizeContext-41b07fe7.js";import"lodash/throttle";import"./index-ad9f626c.js";import"./index-910dc53d.js";import"@mantine/hooks";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-e9537a4b.js";import"./useScrollbarSize-d9e91ee3.js";import"lodash/debounce";import"react-dom";import"./useTranslations-775e5683.js";import"./translationsContext-546b5939.js";import"string-format";import"./useUniqueId-ea9424c6.js";import"./index-caab89aa.js";import"./index.styled-37a07c81.js";import"date-fns";import"./index-610b0a61.js";import"./index-ec3b78fd.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-9d8a3bc2.js";import"react-contenteditable";import"./cookieHelper-3ed6a96d.js";import"keen-slider/react";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-73977c25.js";import"./index-d8ee9c42.js";import"@mantine/carousel";import"@mantine/dates";import"dayjs/plugin/relativeTime";import"./index-bcf00394.js";import"./index-17e42ece.js";import"./routing-c43ef7a7.js";import"slugify";