@hhgtech/hhg-components 1.27.95 → 1.27.97

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 (282) 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/genderOptionControl/index.d.ts +8 -6
  5. package/build/components/atoms/genderOptionControl/index.styles.d.ts +14 -0
  6. package/build/components.js +1 -1
  7. package/build/constants.js +1 -1
  8. package/build/{core-46916f5b.js → core-e2826af2.js} +1 -1
  9. package/build/{dataTransform-ed88594f.js → dataTransform-67acfc20.js} +1 -1
  10. package/build/ecom.js +1 -1
  11. package/build/esm/babyGrowth.js +5 -5
  12. package/build/esm/cache.js +1 -1
  13. package/build/esm/care.js +1 -1
  14. package/build/esm/components/atoms/genderOptionControl/index.d.ts +8 -6
  15. package/build/esm/components/atoms/genderOptionControl/index.styles.d.ts +14 -0
  16. package/build/esm/components.js +1 -1
  17. package/build/esm/constants.js +1 -1
  18. package/build/esm/{core-93a2e453.js → core-f5681c9f.js} +1 -1
  19. package/build/esm/{dataTransform-c4031779.js → dataTransform-ffe381e3.js} +1 -1
  20. package/build/esm/ecom.js +1 -1
  21. package/build/esm/fixedBottomAdBlock-6d87adb6.js +1 -0
  22. package/build/esm/footer.js +1 -1
  23. package/build/esm/gAssets.js +1 -1
  24. package/build/esm/getDynamicHealthTool-161b5514.js +1 -0
  25. package/build/esm/{getSocialList-40f09f8c.js → getSocialList-de8e6c68.js} +1 -1
  26. package/build/esm/hooks.js +1 -1
  27. package/build/esm/i18n.js +1 -1
  28. package/build/esm/i18nV2.js +1 -1
  29. package/build/esm/{index-f09be610.js → index-119c00b7.js} +1 -1
  30. package/build/esm/{index-cad03239.js → index-2801f113.js} +1 -1
  31. package/build/esm/{index-75b526f3.js → index-3f8a6b5e.js} +2 -2
  32. package/build/esm/{index-489698f2.js → index-40d35a26.js} +1 -1
  33. package/build/esm/{index-ef967cd2.js → index-4efeaafb.js} +1 -1
  34. package/build/esm/index-5c940967.js +1 -0
  35. package/build/esm/{index-35f2c085.js → index-6fcc8bc3.js} +1 -1
  36. package/build/esm/{index-d7df4b0a.js → index-821974a1.js} +14 -21
  37. package/build/esm/{index-82e3d6c7.js → index-94ca9b0b.js} +1 -1
  38. package/build/esm/index-998315b6.js +1 -0
  39. package/build/esm/index-9f285e04.js +1 -0
  40. package/build/esm/{index-2de208c4.js → index-a75f3157.js} +3 -3
  41. package/build/esm/index-ba9bf2aa.js +1 -0
  42. package/build/esm/{index-d29e6780.js → index-e0784192.js} +1 -1
  43. package/build/esm/index-e25982d8.js +1 -0
  44. package/build/esm/{index-9740c20d.js → index-e440f31a.js} +1 -1
  45. package/build/esm/index-ebdb5ee9.js +1 -0
  46. package/build/esm/{index-29eafb40.js → index-ee1819c9.js} +1 -1
  47. package/build/esm/index-f456ff87.js +1 -0
  48. package/build/esm/{index-acb3d02b.js → index-f6bcb648.js} +4 -4
  49. package/build/esm/index-f8b70d7a.js +1 -0
  50. package/build/esm/index.js +1 -1
  51. package/build/esm/{index.styled-443b1b6e.js → index.styled-938364f7.js} +14 -11
  52. package/build/esm/{index.styled-98c3ec6c.js → index.styled-a2322aef.js} +6 -6
  53. package/build/esm/{index.styled-261bc592.js → index.styled-f375cb88.js} +3 -3
  54. package/build/esm/{utils-5e72a4b1.js → index.styles-7434589b.js} +2 -2
  55. package/build/esm/lead.js +1 -1
  56. package/build/esm/mantine.js +1 -1
  57. package/build/esm/misc.js +1 -1
  58. package/build/esm/navigation.js +1 -1
  59. package/build/esm/onboarding.js +1 -1
  60. package/build/esm/onboardingV2.js +4 -4
  61. package/build/esm/pwg.js +5 -5
  62. package/build/esm/{routing-7bebdfc1.js → routing-0e2cb50e.js} +1 -1
  63. package/build/esm/together.js +1 -1
  64. package/build/esm/{types-4046874c.js → types-1fa949bd.js} +1 -1
  65. package/build/esm/{types-d71252ef.js → types-97b8e4c8.js} +1 -1
  66. package/build/esm/types.js +1 -1
  67. package/build/esm/useHealthToolCache-67d0f3be.js +1 -0
  68. package/build/esm/{useRafState-eccaa466.js → useRafState-f7b7e184.js} +1 -1
  69. package/build/esm/useTranslations-3e20b105.js +1 -0
  70. package/build/esm/{utils-b4b66d1c.js → utils-7111bf36.js} +1 -1
  71. package/build/esm/vaccination.js +5 -5
  72. package/build/fixedBottomAdBlock-8d99f4cc.js +1 -0
  73. package/build/footer.js +1 -1
  74. package/build/gAssets.js +1 -1
  75. package/build/{getDynamicHealthTool-22ae935f.js → getDynamicHealthTool-89e345f4.js} +1 -1
  76. package/build/{getSocialList-c566a5b3.js → getSocialList-621d61f3.js} +1 -1
  77. package/build/hooks.js +1 -1
  78. package/build/i18n.js +1 -1
  79. package/build/i18nV2.js +1 -1
  80. package/build/index-0b029cb7.js +1 -0
  81. package/build/index-0c597de5.js +1 -0
  82. package/build/{index-48d25dc8.js → index-1a77ebba.js} +1 -1
  83. package/build/{index-1305fb6b.js → index-1f6543e8.js} +11 -11
  84. package/build/{index-7c0bb598.js → index-31db9b76.js} +4 -11
  85. package/build/index-47fd8dfd.js +1 -0
  86. package/build/index-6402ed24.js +1 -0
  87. package/build/index-73fc1f83.js +1 -0
  88. package/build/index-7b47e49c.js +1 -0
  89. package/build/{index-43f90b35.js → index-887f8002.js} +2 -2
  90. package/build/{index-3321b215.js → index-8b57a21d.js} +1 -1
  91. package/build/{index-b269ad76.js → index-8d7e5c00.js} +1 -1
  92. package/build/{index-d74f3cd2.js → index-96b34b52.js} +2 -2
  93. package/build/{index-bbb56481.js → index-abbdb0ce.js} +1 -1
  94. package/build/{index-088fe168.js → index-b5839c5f.js} +1 -1
  95. package/build/index-b5b42569.js +1 -0
  96. package/build/{index-be8aa912.js → index-b8f5ea3e.js} +1 -1
  97. package/build/{index-2a0a6ed1.js → index-d87aeb0c.js} +1 -1
  98. package/build/{index-e2ad8ef2.js → index-dd310cca.js} +1 -1
  99. package/build/index-f139c20e.js +1 -0
  100. package/build/{index-eda0c099.js → index-fd123a19.js} +1 -1
  101. package/build/index.js +1 -1
  102. package/build/index.styled-7406d988.js +50 -0
  103. package/build/{index.styled-933c15dd.js → index.styled-ac98c34c.js} +113 -110
  104. package/build/{index.styled-3971710d.js → index.styled-f444714f.js} +3 -3
  105. package/build/{utils-6b39ab96.js → index.styles-53f79814.js} +18 -18
  106. package/build/lead.js +1 -1
  107. package/build/mantine.js +1 -1
  108. package/build/misc.js +1 -1
  109. package/build/navigation.js +1 -1
  110. package/build/onboarding.js +1 -1
  111. package/build/onboardingV2.js +3 -3
  112. package/build/pwg.js +4 -4
  113. package/build/{routing-ae376396.js → routing-aee6f2fb.js} +1 -1
  114. package/build/together.js +1 -1
  115. package/build/{types-affd90ba.js → types-4978b529.js} +1 -1
  116. package/build/{types-46ef6808.js → types-e4c49659.js} +1 -1
  117. package/build/types.js +1 -1
  118. package/build/{useHealthToolCache-02702312.js → useHealthToolCache-2c8680ca.js} +1 -1
  119. package/build/{useRafState-c749af0c.js → useRafState-a8803e00.js} +1 -1
  120. package/build/{useTranslations-86ed18f8.js → useTranslations-dcb718af.js} +1 -1
  121. package/build/utils-2474d839.js +1 -0
  122. package/build/vaccination.js +1 -1
  123. package/package.json +1 -1
  124. package/build/esm/fixedBottomAdBlock-e9b0bcba.js +0 -1
  125. package/build/esm/getDynamicHealthTool-8692c8b6.js +0 -1
  126. package/build/esm/index-13375004.js +0 -1
  127. package/build/esm/index-2341f1b6.js +0 -1
  128. package/build/esm/index-28cac62d.js +0 -1
  129. package/build/esm/index-3f035756.js +0 -1
  130. package/build/esm/index-8aeeb8b9.js +0 -1
  131. package/build/esm/index-cbc21858.js +0 -1
  132. package/build/esm/index-d673bcd8.js +0 -1
  133. package/build/esm/index-ec65d586.js +0 -1
  134. package/build/esm/useHealthToolCache-d29b78f7.js +0 -1
  135. package/build/esm/useTranslations-2de41aac.js +0 -1
  136. package/build/fixedBottomAdBlock-e8e0de3d.js +0 -1
  137. package/build/index-3fd950a7.js +0 -1
  138. package/build/index-74197e5d.js +0 -1
  139. package/build/index-8498444a.js +0 -1
  140. package/build/index-92e7d5f2.js +0 -1
  141. package/build/index-ae048836.js +0 -1
  142. package/build/index-df258cbe.js +0 -1
  143. package/build/index-f3dc2cc3.js +0 -1
  144. package/build/index-f5e8d22e.js +0 -1
  145. package/build/index.styled-79fc8554.js +0 -50
  146. package/build/utils-66e41e2b.js +0 -1
  147. /package/build/{BMI_BOYS.percentile.monthly-8b084aa6.js → BMI_BOYS.percentile.monthly-c6e25448.js} +0 -0
  148. /package/build/{BMI_BOYS.percentile.weekly-b5088216.js → BMI_BOYS.percentile.weekly-f308f6c3.js} +0 -0
  149. /package/build/{BMI_BOYS.percentile.yearly-c6267d1b.js → BMI_BOYS.percentile.yearly-e6701fbe.js} +0 -0
  150. /package/build/{BMI_BOYS.zscore.monthly-71d8f013.js → BMI_BOYS.zscore.monthly-cba18417.js} +0 -0
  151. /package/build/{BMI_BOYS.zscore.weekly-579e8252.js → BMI_BOYS.zscore.weekly-a65102bd.js} +0 -0
  152. /package/build/{BMI_BOYS.zscore.yearly-31656354.js → BMI_BOYS.zscore.yearly-792b4184.js} +0 -0
  153. /package/build/{BMI_GIRLS.percentile.monthly-9a9d2d4a.js → BMI_GIRLS.percentile.monthly-f46868b6.js} +0 -0
  154. /package/build/{BMI_GIRLS.percentile.weekly-15390040.js → BMI_GIRLS.percentile.weekly-8404899e.js} +0 -0
  155. /package/build/{BMI_GIRLS.percentile.yearly-d131e590.js → BMI_GIRLS.percentile.yearly-a8ef28ec.js} +0 -0
  156. /package/build/{BMI_GIRLS.zscore.monthly-bb29510b.js → BMI_GIRLS.zscore.monthly-efb5b251.js} +0 -0
  157. /package/build/{BMI_GIRLS.zscore.weekly-b1913a92.js → BMI_GIRLS.zscore.weekly-c7a6711c.js} +0 -0
  158. /package/build/{BMI_GIRLS.zscore.yearly-0c4458a3.js → BMI_GIRLS.zscore.yearly-41fe7a03.js} +0 -0
  159. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-75e85569.js → HEAD CIRCUM_BOYS.percentile.monthly-326df1d5.js} +0 -0
  160. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-db5fab9a.js → HEAD CIRCUM_BOYS.percentile.weekly-bbe7f619.js} +0 -0
  161. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-07279317.js → HEAD CIRCUM_BOYS.percentile.yearly-27104613.js} +0 -0
  162. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-7530c2a1.js → HEAD CIRCUM_BOYS.zscore.monthly-2e4619cf.js} +0 -0
  163. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-1a2e1b20.js → HEAD CIRCUM_BOYS.zscore.weekly-a78f8880.js} +0 -0
  164. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-0a20d612.js → HEAD CIRCUM_BOYS.zscore.yearly-f553e13f.js} +0 -0
  165. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2e49d1cd.js → HEAD CIRCUM_GIRLS.percentile.monthly-ac5dd69d.js} +0 -0
  166. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-313d99b6.js → HEAD CIRCUM_GIRLS.percentile.weekly-4cb2a0d9.js} +0 -0
  167. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-f362c6bb.js → HEAD CIRCUM_GIRLS.percentile.yearly-4a7778ba.js} +0 -0
  168. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-ac262f15.js → HEAD CIRCUM_GIRLS.zscore.monthly-88b1c2a5.js} +0 -0
  169. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b0033916.js → HEAD CIRCUM_GIRLS.zscore.weekly-dac57086.js} +0 -0
  170. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-e9397d68.js → HEAD CIRCUM_GIRLS.zscore.yearly-4995f2cc.js} +0 -0
  171. /package/build/{HEIGHT_BOYS.percentile.monthly-5248ae29.js → HEIGHT_BOYS.percentile.monthly-ff87c1a9.js} +0 -0
  172. /package/build/{HEIGHT_BOYS.percentile.weekly-b389488f.js → HEIGHT_BOYS.percentile.weekly-ca132b75.js} +0 -0
  173. /package/build/{HEIGHT_BOYS.percentile.yearly-a176f7f9.js → HEIGHT_BOYS.percentile.yearly-864ea5eb.js} +0 -0
  174. /package/build/{HEIGHT_BOYS.zscore.monthly-aef04439.js → HEIGHT_BOYS.zscore.monthly-6d037446.js} +0 -0
  175. /package/build/{HEIGHT_BOYS.zscore.weekly-81c09cc2.js → HEIGHT_BOYS.zscore.weekly-cc604778.js} +0 -0
  176. /package/build/{HEIGHT_BOYS.zscore.yearly-2997a1b5.js → HEIGHT_BOYS.zscore.yearly-ed9dc66b.js} +0 -0
  177. /package/build/{HEIGHT_GIRLS.percentile.monthly-f19e010d.js → HEIGHT_GIRLS.percentile.monthly-6515c33f.js} +0 -0
  178. /package/build/{HEIGHT_GIRLS.percentile.weekly-dedd8cc2.js → HEIGHT_GIRLS.percentile.weekly-901c4481.js} +0 -0
  179. /package/build/{HEIGHT_GIRLS.percentile.yearly-76eb25a9.js → HEIGHT_GIRLS.percentile.yearly-98961052.js} +0 -0
  180. /package/build/{HEIGHT_GIRLS.zscore.monthly-fe633404.js → HEIGHT_GIRLS.zscore.monthly-1e632f3a.js} +0 -0
  181. /package/build/{HEIGHT_GIRLS.zscore.weekly-074cf44e.js → HEIGHT_GIRLS.zscore.weekly-72ddbcaf.js} +0 -0
  182. /package/build/{HEIGHT_GIRLS.zscore.yearly-44bc90c6.js → HEIGHT_GIRLS.zscore.yearly-6b5c18df.js} +0 -0
  183. /package/build/{Onboarding-e42d1210.js → Onboarding-7993a1aa.js} +0 -0
  184. /package/build/{Visible-9f9f3d51.js → Visible-8bc11c55.js} +0 -0
  185. /package/build/{WEIGHT_BOYS.percentile.monthly-c0c6d854.js → WEIGHT_BOYS.percentile.monthly-c09f2d80.js} +0 -0
  186. /package/build/{WEIGHT_BOYS.percentile.weekly-4c73e212.js → WEIGHT_BOYS.percentile.weekly-5b71127b.js} +0 -0
  187. /package/build/{WEIGHT_BOYS.percentile.yearly-02f3552c.js → WEIGHT_BOYS.percentile.yearly-4b535102.js} +0 -0
  188. /package/build/{WEIGHT_BOYS.zscore.monthly-1f77c2bd.js → WEIGHT_BOYS.zscore.monthly-12707c15.js} +0 -0
  189. /package/build/{WEIGHT_BOYS.zscore.weekly-ca9f3237.js → WEIGHT_BOYS.zscore.weekly-9c55567e.js} +0 -0
  190. /package/build/{WEIGHT_BOYS.zscore.yearly-34c3fd35.js → WEIGHT_BOYS.zscore.yearly-f9cd8424.js} +0 -0
  191. /package/build/{WEIGHT_GIRLS.percentile.monthly-0be01e44.js → WEIGHT_GIRLS.percentile.monthly-44bab69f.js} +0 -0
  192. /package/build/{WEIGHT_GIRLS.percentile.weekly-95c7d8bd.js → WEIGHT_GIRLS.percentile.weekly-4c28cc99.js} +0 -0
  193. /package/build/{WEIGHT_GIRLS.percentile.yearly-84b3be46.js → WEIGHT_GIRLS.percentile.yearly-0d9195d0.js} +0 -0
  194. /package/build/{WEIGHT_GIRLS.zscore.monthly-dc4e1605.js → WEIGHT_GIRLS.zscore.monthly-b1dce194.js} +0 -0
  195. /package/build/{WEIGHT_GIRLS.zscore.weekly-6eb2dc7c.js → WEIGHT_GIRLS.zscore.weekly-cfe9b3cc.js} +0 -0
  196. /package/build/{WEIGHT_GIRLS.zscore.yearly-2c91215c.js → WEIGHT_GIRLS.zscore.yearly-13941be9.js} +0 -0
  197. /package/build/{constants-8354639e.js → constants-1d32370a.js} +0 -0
  198. /package/build/{cookieHelper-c625c4e7.js → cookieHelper-cbd14b3e.js} +0 -0
  199. /package/build/{dataTransform-8026a434.js → dataTransform-21c87d7c.js} +0 -0
  200. /package/build/esm/{BMI_BOYS.percentile.monthly-d34592de.js → BMI_BOYS.percentile.monthly-9d42f590.js} +0 -0
  201. /package/build/esm/{BMI_BOYS.percentile.weekly-47e5df5e.js → BMI_BOYS.percentile.weekly-6839af28.js} +0 -0
  202. /package/build/esm/{BMI_BOYS.percentile.yearly-e2e5029c.js → BMI_BOYS.percentile.yearly-69bcb479.js} +0 -0
  203. /package/build/esm/{BMI_BOYS.zscore.monthly-d883894b.js → BMI_BOYS.zscore.monthly-23f8c532.js} +0 -0
  204. /package/build/esm/{BMI_BOYS.zscore.weekly-011a91ba.js → BMI_BOYS.zscore.weekly-89115d9c.js} +0 -0
  205. /package/build/esm/{BMI_BOYS.zscore.yearly-204d8fe7.js → BMI_BOYS.zscore.yearly-3306e312.js} +0 -0
  206. /package/build/esm/{BMI_GIRLS.percentile.monthly-980551d8.js → BMI_GIRLS.percentile.monthly-846e671f.js} +0 -0
  207. /package/build/esm/{BMI_GIRLS.percentile.weekly-61389004.js → BMI_GIRLS.percentile.weekly-0078c970.js} +0 -0
  208. /package/build/esm/{BMI_GIRLS.percentile.yearly-d351f63c.js → BMI_GIRLS.percentile.yearly-ac9e9a93.js} +0 -0
  209. /package/build/esm/{BMI_GIRLS.zscore.monthly-b6ca2f85.js → BMI_GIRLS.zscore.monthly-4d1f059f.js} +0 -0
  210. /package/build/esm/{BMI_GIRLS.zscore.weekly-9f70cb44.js → BMI_GIRLS.zscore.weekly-ee5080e3.js} +0 -0
  211. /package/build/esm/{BMI_GIRLS.zscore.yearly-4297363a.js → BMI_GIRLS.zscore.yearly-51f17ff5.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-4406d0e1.js → HEAD CIRCUM_BOYS.percentile.monthly-4e05e699.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-62f918f4.js → HEAD CIRCUM_BOYS.percentile.weekly-5f55a476.js} +0 -0
  214. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-49a3029d.js → HEAD CIRCUM_BOYS.percentile.yearly-0272d885.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-7450d6ae.js → HEAD CIRCUM_BOYS.zscore.monthly-d53f7a6f.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-c61dd471.js → HEAD CIRCUM_BOYS.zscore.weekly-c2f4a9a0.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-7e58815e.js → HEAD CIRCUM_BOYS.zscore.yearly-bee9d3d2.js} +0 -0
  218. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-9d507a46.js → HEAD CIRCUM_GIRLS.percentile.monthly-5ecd5dfc.js} +0 -0
  219. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-487cfa9d.js → HEAD CIRCUM_GIRLS.percentile.weekly-e517d104.js} +0 -0
  220. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-dd2dc610.js → HEAD CIRCUM_GIRLS.percentile.yearly-9f2f1438.js} +0 -0
  221. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-d0c44001.js → HEAD CIRCUM_GIRLS.zscore.monthly-1873c64a.js} +0 -0
  222. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-409cfd5a.js → HEAD CIRCUM_GIRLS.zscore.weekly-09517ed4.js} +0 -0
  223. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-7d5f7896.js → HEAD CIRCUM_GIRLS.zscore.yearly-e1e972d1.js} +0 -0
  224. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-3ef3c53e.js → HEIGHT_BOYS.percentile.monthly-2182b94f.js} +0 -0
  225. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-ffc261e5.js → HEIGHT_BOYS.percentile.weekly-738af159.js} +0 -0
  226. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-b5b7109e.js → HEIGHT_BOYS.percentile.yearly-36e31bfe.js} +0 -0
  227. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-c53045db.js → HEIGHT_BOYS.zscore.monthly-f5535c86.js} +0 -0
  228. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-00caae3c.js → HEIGHT_BOYS.zscore.weekly-a697d0f4.js} +0 -0
  229. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-9002687e.js → HEIGHT_BOYS.zscore.yearly-59787dee.js} +0 -0
  230. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-710dc4d3.js → HEIGHT_GIRLS.percentile.monthly-d3f42671.js} +0 -0
  231. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-4bf517d0.js → HEIGHT_GIRLS.percentile.weekly-21231514.js} +0 -0
  232. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-c49953c3.js → HEIGHT_GIRLS.percentile.yearly-0dbb8467.js} +0 -0
  233. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-c6b42f5d.js → HEIGHT_GIRLS.zscore.monthly-36411acb.js} +0 -0
  234. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-82bad22e.js → HEIGHT_GIRLS.zscore.weekly-c015b3c4.js} +0 -0
  235. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-56e934d4.js → HEIGHT_GIRLS.zscore.yearly-28728bba.js} +0 -0
  236. /package/build/esm/{Onboarding-5763ca04.js → Onboarding-70785e8f.js} +0 -0
  237. /package/build/esm/{Visible-24d96520.js → Visible-80be40d5.js} +0 -0
  238. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-ede2edef.js → WEIGHT_BOYS.percentile.monthly-f33b1c0c.js} +0 -0
  239. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-0c64c586.js → WEIGHT_BOYS.percentile.weekly-c49ec0f0.js} +0 -0
  240. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-5b853a1e.js → WEIGHT_BOYS.percentile.yearly-74b4142d.js} +0 -0
  241. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-61be4530.js → WEIGHT_BOYS.zscore.monthly-602b740f.js} +0 -0
  242. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-46763dac.js → WEIGHT_BOYS.zscore.weekly-01ae4068.js} +0 -0
  243. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-0e1ec647.js → WEIGHT_BOYS.zscore.yearly-7bf622b5.js} +0 -0
  244. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-fb83c8e7.js → WEIGHT_GIRLS.percentile.monthly-d6f39262.js} +0 -0
  245. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-ffa717b0.js → WEIGHT_GIRLS.percentile.weekly-f4125298.js} +0 -0
  246. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-e35ef531.js → WEIGHT_GIRLS.percentile.yearly-7a0938b0.js} +0 -0
  247. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-43441ed0.js → WEIGHT_GIRLS.zscore.monthly-3ee18ba9.js} +0 -0
  248. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-d422b838.js → WEIGHT_GIRLS.zscore.weekly-75d7f657.js} +0 -0
  249. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-5d2fb8c5.js → WEIGHT_GIRLS.zscore.yearly-3f77dac0.js} +0 -0
  250. /package/build/esm/{constants-ea0f6529.js → constants-124a0c69.js} +0 -0
  251. /package/build/esm/{cookieHelper-6294a113.js → cookieHelper-c3ac9f5c.js} +0 -0
  252. /package/build/esm/{dataTransform-2a0a8905.js → dataTransform-d411ac2b.js} +0 -0
  253. /package/build/esm/{index-b18806d2.js → index-f69aaefd.js} +0 -0
  254. /package/build/esm/{isProduction-abb13bd7.js → isProduction-0a64196b.js} +0 -0
  255. /package/build/esm/{localizeNumberFormat-e79ed160.js → localizeNumberFormat-83b574cc.js} +0 -0
  256. /package/build/esm/{normalizeLink-e0cd139b.js → normalizeLink-4cf48bd4.js} +0 -0
  257. /package/build/esm/{number-7a8cd3bf.js → number-d62307a5.js} +0 -0
  258. /package/build/esm/{paths-8fdcf121.js → paths-84e7b017.js} +0 -0
  259. /package/build/esm/{screenSizeContext-464da727.js → screenSizeContext-bdf24fa6.js} +0 -0
  260. /package/build/esm/{theme-fe07cf04.js → theme-72026c60.js} +0 -0
  261. /package/build/esm/{translationsContext-74811783.js → translationsContext-1e2e6dff.js} +0 -0
  262. /package/build/esm/{tslib.es6-5610e0fe.js → tslib.es6-287085c8.js} +0 -0
  263. /package/build/esm/{types-04ab1a7e.js → types-ba260963.js} +0 -0
  264. /package/build/esm/{useIsInit-18abd410.js → useIsInit-8d56ae19.js} +0 -0
  265. /package/build/esm/{useOutsideClick-31a8be15.js → useOutsideClick-8d3bf173.js} +0 -0
  266. /package/build/esm/{useScrollbarSize-e0c7d5ce.js → useScrollbarSize-773497db.js} +0 -0
  267. /package/build/esm/{useUniqueId-e1bf986b.js → useUniqueId-581c6a48.js} +0 -0
  268. /package/build/{index-7533a794.js → index-3cc148c2.js} +0 -0
  269. /package/build/{isProduction-1ea2adde.js → isProduction-b9a37b42.js} +0 -0
  270. /package/build/{localizeNumberFormat-bcbcf210.js → localizeNumberFormat-700f2f69.js} +0 -0
  271. /package/build/{normalizeLink-017886af.js → normalizeLink-819058cb.js} +0 -0
  272. /package/build/{number-3aeb6405.js → number-d9ae8a16.js} +0 -0
  273. /package/build/{paths-d920d8a7.js → paths-c0c06752.js} +0 -0
  274. /package/build/{screenSizeContext-52a038df.js → screenSizeContext-8d8226dc.js} +0 -0
  275. /package/build/{theme-7ea217c2.js → theme-46d96035.js} +0 -0
  276. /package/build/{translationsContext-e6ff846c.js → translationsContext-a0912c14.js} +0 -0
  277. /package/build/{tslib.es6-0dcc26ba.js → tslib.es6-a8db223b.js} +0 -0
  278. /package/build/{types-4b275f4e.js → types-fc0beaa8.js} +0 -0
  279. /package/build/{useIsInit-20150156.js → useIsInit-62a53088.js} +0 -0
  280. /package/build/{useOutsideClick-b1ad85b5.js → useOutsideClick-4eed75cd.js} +0 -0
  281. /package/build/{useScrollbarSize-6c8724f1.js → useScrollbarSize-e0d83678.js} +0 -0
  282. /package/build/{useUniqueId-9cf86af0.js → useUniqueId-7740c2ea.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./tslib.es6-5610e0fe.js";import t,{useMemo as o}from"react";import{L as n}from"./Onboarding-5763ca04.js";import{CommonGAssets as i}from"./gAssets.js";import{t as a}from"./theme-fe07cf04.js";import r from"styled-components";import{I as s,b as l}from"./index-acb3d02b.js";import{T as c}from"./index-489698f2.js";const d=r.div`
1
+ import{_ as e}from"./tslib.es6-287085c8.js";import t,{useMemo as o}from"react";import{L as n}from"./Onboarding-70785e8f.js";import{CommonGAssets as i}from"./gAssets.js";import{t as r}from"./theme-72026c60.js";import a from"styled-components";import{I as s,b as l}from"./index-f6bcb648.js";import{T as c}from"./index-40d35a26.js";const d=a.div`
2
2
  display: inline-flex;
3
3
  overflow: hidden;
4
4
  width: ${e=>e.size}px;
@@ -8,13 +8,13 @@ import{_ as e}from"./tslib.es6-5610e0fe.js";import t,{useMemo as o}from"react";i
8
8
  justify-content: center;
9
9
 
10
10
  border: 1px solid #e4e8ec;
11
- background-color: ${e=>e.backgroundColor||a.colors.white};
11
+ background-color: ${e=>e.backgroundColor||r.colors.white};
12
12
  border-radius: ${e=>e.borderRadius||"50%"};
13
13
  & > * {
14
14
  width: ${e=>e.iconSize}px;
15
15
  height: ${e=>e.iconSize}px;
16
16
  }
17
- `,p=r.div`
17
+ `,p=a.div`
18
18
  display: inline-block;
19
19
  height: 108px;
20
20
  background-color: ${e=>e.theme.colors.white};
@@ -36,14 +36,14 @@ import{_ as e}from"./tslib.es6-5610e0fe.js";import t,{useMemo as o}from"react";i
36
36
  & > * {
37
37
  pointer-events: none;
38
38
  }
39
- `,m=[n.Myanmar,n.Taiwan],b=r((n=>{var{icon:r,name:l,className:b,locale:g="en-PH",dataEventCategory:x,dataEventAction:h,dataEventLabel:v,onSelect:f}=n,u=e(n,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);const w=o((()=>null==b?void 0:b.includes("selected-week-pill")),[b]);return t.createElement(p,Object.assign({onClick:f,className:b?"week-pill".concat(" non-pointer-event-child ",b):"week-pill non-pointer-event-child","data-event-category":x,"data-event-action":h,"data-event-label":v},u),t.createElement(d,{size:64,iconSize:40,backgroundColor:a.colors.white},t.createElement(s,{src:r||i.getAssetPath("week_default.png"),alt:`week ${l}`})),w?t.createElement(c,Object.assign({type:"semiBold",size:"n1",color:a.colors.gray800},m.includes(g)&&{style:{fontSize:"10px"}}),l):t.createElement(c,Object.assign({size:"n1",color:a.colors.gray600},m.includes(g)&&{style:{fontSize:"10px"}}),l))}))`
39
+ `,m=[n.Myanmar,n.Taiwan],b=a((n=>{var{icon:a,name:l,className:b,locale:g="en-PH",dataEventCategory:x,dataEventAction:h,dataEventLabel:v,onSelect:f}=n,u=e(n,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);const w=o((()=>null==b?void 0:b.includes("selected-week-pill")),[b]);return t.createElement(p,Object.assign({onClick:f,className:b?"week-pill".concat(" non-pointer-event-child ",b):"week-pill non-pointer-event-child","data-event-category":x,"data-event-action":h,"data-event-label":v},u),t.createElement(d,{size:64,iconSize:40,backgroundColor:r.colors.white},t.createElement(s,{src:a||i.getAssetPath("week_default.png"),alt:`week ${l}`})),w?t.createElement(c,Object.assign({type:"semiBold",size:"n1",color:r.colors.gray800},m.includes(g)&&{style:{fontSize:"10px"}}),l):t.createElement(c,Object.assign({size:"n1",color:r.colors.gray600},m.includes(g)&&{style:{fontSize:"10px"}}),l))}))`
40
40
  box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
41
- `,g=r(l.Slide)`
41
+ `,g=a(l.Slide)`
42
42
  cursor: pointer;
43
43
  > div * {
44
44
  pointer-events: none;
45
45
  }
46
- `,x=r(l)`
46
+ `,x=a(l)`
47
47
  .centerred-pill-wrapper {
48
48
  padding: 16px 0;
49
49
  }
@@ -1,4 +1,4 @@
1
- import"dayjs";import{M as t}from"./screenSizeContext-464da727.js";import"react";import o from"styled-components";import{t as i}from"./theme-fe07cf04.js";import"./index-cad03239.js";import"./isProduction-abb13bd7.js";import"./Onboarding-5763ca04.js";import"./gAssets.js";import{b as p}from"./index-2de208c4.js";const r=o.div`
1
+ import"dayjs";import{M as t}from"./screenSizeContext-bdf24fa6.js";import"react";import o from"styled-components";import{t as i}from"./theme-72026c60.js";import"./index-2801f113.js";import"./isProduction-0a64196b.js";import"./Onboarding-70785e8f.js";import"./gAssets.js";import{b as p}from"./index-a75f3157.js";const r=o.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 1000;
@@ -94,7 +94,7 @@ import"dayjs";import{M as t}from"./screenSizeContext-464da727.js";import"react";
94
94
  border-radius: 0 4px 4px 0;
95
95
  }
96
96
  }
97
- `,c=o(p)`
97
+ `,g=o(p)`
98
98
  .otp-input {
99
99
  margin-bottom: 36px;
100
100
  ${t.mbDown} {
@@ -127,4 +127,4 @@ import"dayjs";import{M as t}from"./screenSizeContext-464da727.js";import"react";
127
127
  margin-bottom: 3px;
128
128
  margin-left: 3px;
129
129
  }
130
- `;export{b as S,x as a,c as b,r as c,n as d,a as e,e as f,d as g,m as h,s as i};
130
+ `;export{b as S,x as a,g as b,r as c,n as d,a as e,e as f,d as g,m as h,s as i};
@@ -1,4 +1,4 @@
1
- import{_ as e,a as t}from"./tslib.es6-5610e0fe.js";import*as a from"react";import r,{memo as o,useMemo as i,useState as l,forwardRef as n,createContext as s,useEffect as c,Fragment as d,Component as p,useCallback as h,useRef as u,useImperativeHandle as g}from"react";import{createStyles as m,Button as b,Autocomplete as f,Image as E,ActionIcon as v,Select as w,rem as x,Text as y,AspectRatio as L,em as C,useMantineTheme as _,Box as O,Breadcrumbs as T,Textarea as A,Accordion as k,Indicator as I,Avatar as S,FileInput as R,createEmotionCache as $,NumberInput as M,PasswordInput as P,TextInput as B,Input as D,Checkbox as j,Slider as H,Radio as N,Flex as z,Tabs as G,ScrollArea as U,Popover as V}from"@mantine/core";import F,{css as Z}from"styled-components";import{I as K}from"./index-acb3d02b.js";import{t as W}from"./theme-fe07cf04.js";import{M as Y,s as q,e as X,b as Q,f as J,c as ee,g as te,a as ae,d as re,B as oe}from"./screenSizeContext-464da727.js";import{CommonGAssets as ie}from"./gAssets.js";import{L as le,C as ne,I as se}from"./index-ef967cd2.js";import{L as ce}from"./Onboarding-5763ca04.js";import{T as de}from"./index-489698f2.js";import"./translationsContext-74811783.js";import pe from"string-format";import he from"dayjs";import{I as ue,s as ge}from"./index-cad03239.js";import{i as me}from"./isProduction-abb13bd7.js";import be from"react-keyed-flatten-children";import{useUncontrolled as fe,useDebouncedValue as Ee,useDisclosure as ve,useClickOutside as we}from"@mantine/hooks";import"@mantine/dates";import{Carousel as xe}from"@mantine/carousel";import{a as ye}from"./useUniqueId-e1bf986b.js";import"lodash/debounce";import{g as Le}from"./cookieHelper-6294a113.js";import Ce from"slugify";const _e=F.div`
1
+ import{_ as e,a as t}from"./tslib.es6-287085c8.js";import*as a from"react";import r,{memo as o,useMemo as i,useState as l,forwardRef as n,createContext as s,useEffect as c,Fragment as d,Component as p,useCallback as h,useRef as u,useImperativeHandle as g}from"react";import{createStyles as m,Button as b,Autocomplete as f,Image as E,ActionIcon as v,Select as w,rem as x,Text as y,AspectRatio as L,em as C,useMantineTheme as _,Box as O,Breadcrumbs as T,Textarea as A,Accordion as k,Indicator as I,Avatar as S,FileInput as R,createEmotionCache as $,NumberInput as M,PasswordInput as P,TextInput as B,Input as D,Checkbox as j,Slider as H,Radio as N,Flex as z,Tabs as G,ScrollArea as U,Popover as V}from"@mantine/core";import F,{css as Z}from"styled-components";import{I as K}from"./index-f6bcb648.js";import{t as W}from"./theme-72026c60.js";import{M as Y,s as q,e as X,b as Q,f as J,c as ee,g as te,a as ae,d as re,B as oe}from"./screenSizeContext-bdf24fa6.js";import{CommonGAssets as ie}from"./gAssets.js";import{L as le,C as ne,I as se}from"./index-4efeaafb.js";import{L as ce}from"./Onboarding-70785e8f.js";import{T as de}from"./index-40d35a26.js";import"./translationsContext-1e2e6dff.js";import pe from"string-format";import he from"dayjs";import{I as ue,s as ge}from"./index-2801f113.js";import{i as me}from"./isProduction-0a64196b.js";import be from"react-keyed-flatten-children";import{useUncontrolled as fe,useDebouncedValue as Ee,useDisclosure as ve,useClickOutside as we}from"@mantine/hooks";import"@mantine/dates";import{Carousel as xe}from"@mantine/carousel";import{a as ye}from"./useUniqueId-581c6a48.js";import"lodash/debounce";import{g as Le}from"./cookieHelper-c3ac9f5c.js";import Ce from"slugify";const _e=F.div`
2
2
  background-color: var(--background-color, transparent);
3
3
  color: white;
4
4
  cursor: pointer;
@@ -1209,4 +1209,4 @@ import{_ as e,a as t}from"./tslib.es6-5610e0fe.js";import*as a from"react";impor
1209
1209
  * Copyright(c) 2015 Douglas Christopher Wilson
1210
1210
  * MIT Licensed
1211
1211
  */
1212
- var cr=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var a={},r=(t||{}).decode||ur,o=0;for(;o<e.length;){var i=e.indexOf("=",o);if(-1===i)break;var l=e.indexOf(";",o);if(-1===l)l=e.length;else if(l<i){o=e.lastIndexOf(";",i-1)+1;continue}var n=e.slice(o,i).trim();if(void 0===a[n]){var s=e.slice(i+1,l).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),a[n]=mr(s,r)}o=l+1}return a},dr=function(e,t,a){var r=a||{},o=r.encode||gr;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!hr.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!hr.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var n=r.maxAge-0;if(isNaN(n)||!isFinite(n))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(n)}if(r.domain){if(!hr.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!hr.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var s=r.expires;if(!function(e){return"[object Date]"===pr.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+s.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},pr=Object.prototype.toString,hr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function ur(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function gr(e){return encodeURIComponent(e)}function mr(e,t){try{return t(e)}catch(t){return e}}var br={parse:cr,serialize:dr};const fr={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"}},Er={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},vr={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},wr={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},xr={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},yr=s({data:xr,action:{pushNotifications:e=>e,sanitizeFunction:e=>e}});let Lr=xr;const Cr=({locale:e="vi-VN",children:t,userInfo:a,router:o,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:n=(e=>e),pushNotifications:s=(()=>!1)})=>{const[d,p]=l();return Lr={userInfo:a,locale:e,togetherUserId:d,router:o,env:i},c((()=>{(null==a?void 0:a.id)&&qr(Ur(fr.PROFILE,{_locale:e}),"GET").then((e=>{var t;p(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==a?void 0:a.id]),r.createElement(yr.Provider,{value:{data:{userInfo:a,locale:e,togetherUserId:d,router:o,env:i},action:{pushNotifications:s,sanitizeFunction:n}}},t)},_r="DD/MM/YYYY",Or="/images/avatar.jpg",Tr="/images/default-image.jpg",Ar={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},kr={"id-ID":{"kalkulator-bmi":Ar.BMI,"kebutuhan-kalori":Ar.BMR,"kalkulator-hari-perkiraan-lahir":Ar.DUE_DATE,"kalkulator-masa-subur-2":Ar.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":Ar.PWG,"kalkulator-detak-jantung-saat-olahraga":Ar.THR},"ms-MY":{"kalkulator-bmi":Ar.BMI,"kalkulator-bmr":Ar.BMR,"kalkulator-tarikh-bersalin":Ar.DUE_DATE,"kalkulator-kesuburan":Ar.OVULATION,"kalkulator-tambah-berat-badan-hamil":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"vi-VN":{"cach-tinh-chi-so-bmi":Ar.BMI,"tinh-chi-so-bmr":Ar.BMR,"cong-cu-tinh-ngay-du-sinh":Ar.DUE_DATE,"tinh-ngay-rung-trung":Ar.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":Ar.PWG,"cong-cu-do-nhip-tim":Ar.THR},"zh-TW":{"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"due-date-calculator":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnancy-weight-gain-calculator":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"en-PH":{"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"due-date-calculator":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnancy-weight-gain-calculator":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":Ar.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":Ar.BMR,"เครื่องมือคำนวณกำหนดคลอด":Ar.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":Ar.OVULATION,"เครื่องคำนวณน้ำหนักตัว":Ar.PWG,"เครื่องวัดอัตราการเต้น":Ar.THR},"hi-IN":{"bmi-calculator-en":Ar.BMI,"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"delivery-date-calculator":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnancy-weight-gain-calculator":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"km-KH":{"គណនា-bmi":Ar.BMI,"គណនា-bmr":Ar.BMR,"គណនាថ្ងៃសម្រាលកូន":Ar.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":Ar.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":Ar.PWG,"គណនារកចង្វាក់បេះដូងល្អ":Ar.THR},"my-MM":{"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"due-date-calendar":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnaancy-weight-calculator":Ar.PWG,"target-heartrate":Ar.THR,"pregnancy-weight-calculator":Ar.PWG,"target-heart-rate":Ar.THR}},Ir="hhg_user_token",Sr="together_admin_token",Rr={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},$r={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},Mr=20,Pr={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var Br=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:_r,DEFAULT_AVATAR_IMG:Or,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:Tr,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:Ar,LOCALE_HEALTH_TOOLS:kr,BEARER_TOKEN_COOKIE:Ir,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:Sr,Z_INDEX:Rr,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:$r,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:Pr});const Dr={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},jr={"vi-VN":"marrybaby.vn"},Hr=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",Nr=e=>{const{env:{isMarryBaby:t}}=Lr;return`https://${t?jr[e]:Dr[e]}`},zr=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},Gr=e=>{const{env:{isMarryBaby:t}}=Lr;if("undefined"!=typeof window)return window.location.origin;const a="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${a?t?"fe.":"discover.":t?"www.":""}${Dr[e]}`},Ur=(e,t,a)=>{let r="";a&&(r=Object.keys(a).map((e=>e+"="+a[e])).join("&"));const{togetherBaseApiUrl:o=""}=(null==Lr?void 0:Lr.env)||{};let i=pe(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:Nr(String(t._locale))}:{}),t));return i+=`${i.includes("?")?"&":"?"}${r}`,o+"api/v1/"+zr(i)},Vr=(e,t,a)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:o=""}=(null==Lr?void 0:Lr.env)||{};return(!me&&a?o:r)+"wp-json/api/"+zr(pe(e,Object.assign({},t)))},Fr=(e,t,a)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:o=""}=(null==Lr?void 0:Lr.env)||{};return(a&&!me?o:r)+"wp-json/api/"+zr(pe(e,Object.assign({},t)))},Zr=(e,t)=>{const{careBaseApiUrl:a=""}=(null==Lr?void 0:Lr.env)||{};return(a||"https://service-health-care.hellohealthgroup.com/")+zr(pe(e,Object.assign({},t)))},Kr=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),Wr=(e,a,r,o=!1)=>t(void 0,void 0,void 0,(function*(){var t,i,l,n;try{const t=yield fetch(o?e:(n=e,encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(t)return t}catch(a){return console.log(a),console.log({url:e,status:null===(t=null==a?void 0:a.response)||void 0===t?void 0:t.status,statusText:null===(i=null==a?void 0:a.response)||void 0===i?void 0:i.statusText}),(null===(l=null==a?void 0:a.response)||void 0===l?void 0:l.data)||null}return null})),Yr=(e,a="GET",r,o)=>t(void 0,void 0,void 0,(function*(){var t,i,l,n,s,c;try{const n="string"==typeof e?e:e.url,s="string"==typeof e?e:e.backupUrl,c=br.parse(o||""),d=c[Ir]||Le(Ir);if(!d||!d.length)return Wr(s||n,a,r);try{const e=yield fetch(n,Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({Authorization:"Bearer "+d},null==r?void 0:r.headers)})).then((e=>e.json()));if(null===(t=null==e?void 0:e.messages)||void 0===t?void 0:t.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return Wr(s||n,a,r);if(e)return e}catch(e){return console.log({status:null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.status,statusText:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.statusText}),Wr(s||n,a,r)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),(null===(c=null==e?void 0:e.response)||void 0===c?void 0:c.data)||null}return null})),qr=(e,a,r,o)=>t(void 0,void 0,void 0,(function*(){try{const t=br.parse(o||""),i=t[Ir]||Le(Ir);if(i&&i.length){const t=yield fetch(e,Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({Authorization:"Bearer "+i},null==r?void 0:r.headers)})).then((e=>e.json()));if(t)return t}}catch(e){return null}return null})),Xr=(e,a,r,o)=>t(void 0,void 0,void 0,(function*(){try{const t=br.parse(o||""),i=t[Sr]||Le(Sr);if(i&&i.length){const t=yield fetch(e,Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({Authorization:"Bearer "+i},null==r?void 0:r.headers)})).then((e=>e.json()));if(t)return t}}catch(e){return null}return null}));function Qr(e,t,a){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+a+"$2"):e+o+t+"="+a}const Jr=(e,t,a="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let o="undefined"!=typeof window?window.location.origin:"";o||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(o=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:a}=Lr.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{Qr(r,e,t[e])})),Qr(r,"source","communities"),a?`${a}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${o}${a}/on-boarding?return=${encodeURIComponent(r)}`,t)},eo=(e,t,a,r)=>a&&t?`${a}-${t}`:`${Ce(e||"",{lower:!0,locale:r||Hr})}-${t}`,to=({name:e,id:t,locale:a})=>{var r;return`/care/${null===(r=Pr[a||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${eo(e,t)}`},ao=({name:e,id:t,slug:a,locale:r})=>{var o;return`/care/${null===(o=Pr[r||"vi-VN"])||void 0===o?void 0:o.HOSPITAL}/${eo(e,t,a)}`};export{Za as $,ma as A,_r as B,rr as C,xr as D,Wt as E,tt as F,Lr as G,it as H,Ar as I,za as J,_e as K,st as L,Ae as M,Ut as N,Wr as O,xt as P,Zr as Q,ct as R,qt as S,St as T,pt as U,ht as V,ut as W,lt as X,nt as Y,yt as Z,Ka as _,Mt as a,Ct as a0,Rr as a1,Nt as a2,Dt as a3,jt as a4,Ht as a5,zt as a6,Gt as a7,Qt as a8,Ir as a9,Oa as aA,ta as aB,or as aC,Fa as aD,er as aE,Ga as aF,ka as aG,ra as aH,Ta as aI,Aa as aJ,Ra as aK,sa as aL,Ba as aM,ya as aN,pa as aO,sr as aP,Da as aQ,Jr as aa,Ur as ab,fr as ac,Tr as ad,Gr as ae,Er as af,Dr as ag,ao as ah,to as ai,Vr as aj,vr as ak,wr as al,Xr as am,qr as an,Mr as ao,Or as ap,Xt as aq,lr as ar,$r as as,Fr as at,Yr as au,jr as av,Pa as aw,Va as ax,Ua as ay,Ia as az,Yt as b,Br as c,yr as d,Cr as e,Oe as f,Te as g,ke as h,Ie as i,Se as j,Re as k,$e as l,at as m,gt as n,mt as o,bt as p,Lt as q,kt as r,Tt as s,At as t,Rt as u,Pt as v,ua as w,la as x,Ma as y,fa as z};
1212
+ var cr=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var a={},r=(t||{}).decode||ur,o=0;for(;o<e.length;){var i=e.indexOf("=",o);if(-1===i)break;var l=e.indexOf(";",o);if(-1===l)l=e.length;else if(l<i){o=e.lastIndexOf(";",i-1)+1;continue}var n=e.slice(o,i).trim();if(void 0===a[n]){var s=e.slice(i+1,l).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),a[n]=mr(s,r)}o=l+1}return a},dr=function(e,t,a){var r=a||{},o=r.encode||gr;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!hr.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!hr.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var n=r.maxAge-0;if(isNaN(n)||!isFinite(n))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(n)}if(r.domain){if(!hr.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!hr.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var s=r.expires;if(!function(e){return"[object Date]"===pr.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+s.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},pr=Object.prototype.toString,hr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function ur(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function gr(e){return encodeURIComponent(e)}function mr(e,t){try{return t(e)}catch(t){return e}}var br={parse:cr,serialize:dr};const fr={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"}},Er={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},vr={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},wr={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},xr={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},yr=s({data:xr,action:{pushNotifications:e=>e,sanitizeFunction:e=>e}});let Lr=xr;const Cr=({locale:e="vi-VN",children:t,userInfo:a,router:o,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:n=(e=>e),pushNotifications:s=(()=>!1)})=>{const[d,p]=l();return Lr={userInfo:a,locale:e,togetherUserId:d,router:o,env:i},c((()=>{(null==a?void 0:a.id)&&qr(Ur(fr.PROFILE,{_locale:e}),"GET").then((e=>{var t;p(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==a?void 0:a.id]),r.createElement(yr.Provider,{value:{data:{userInfo:a,locale:e,togetherUserId:d,router:o,env:i},action:{pushNotifications:s,sanitizeFunction:n}}},t)},_r="DD/MM/YYYY",Or="/images/avatar.jpg",Tr="/images/default-image.jpg",Ar={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},kr={"id-ID":{"kalkulator-bmi":Ar.BMI,"kebutuhan-kalori":Ar.BMR,"kalkulator-hari-perkiraan-lahir":Ar.DUE_DATE,"kalkulator-masa-subur-2":Ar.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":Ar.PWG,"kalkulator-detak-jantung-saat-olahraga":Ar.THR},"ms-MY":{"kalkulator-bmi":Ar.BMI,"kalkulator-bmr":Ar.BMR,"kalkulator-tarikh-bersalin":Ar.DUE_DATE,"kalkulator-kesuburan":Ar.OVULATION,"kalkulator-tambah-berat-badan-hamil":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"vi-VN":{"cach-tinh-chi-so-bmi":Ar.BMI,"tinh-chi-so-bmr":Ar.BMR,"cong-cu-tinh-ngay-du-sinh":Ar.DUE_DATE,"tinh-ngay-rung-trung":Ar.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":Ar.PWG,"cong-cu-do-nhip-tim":Ar.THR},"zh-TW":{"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"due-date-calculator":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnancy-weight-gain-calculator":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"en-PH":{"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"due-date-calculator":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnancy-weight-gain-calculator":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":Ar.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":Ar.BMR,"เครื่องมือคำนวณกำหนดคลอด":Ar.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":Ar.OVULATION,"เครื่องคำนวณน้ำหนักตัว":Ar.PWG,"เครื่องวัดอัตราการเต้น":Ar.THR},"hi-IN":{"bmi-calculator-en":Ar.BMI,"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"delivery-date-calculator":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnancy-weight-gain-calculator":Ar.PWG,"target-heart-rate-calculator":Ar.THR},"km-KH":{"គណនា-bmi":Ar.BMI,"គណនា-bmr":Ar.BMR,"គណនាថ្ងៃសម្រាលកូន":Ar.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":Ar.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":Ar.PWG,"គណនារកចង្វាក់បេះដូងល្អ":Ar.THR},"my-MM":{"bmi-calculator":Ar.BMI,"bmr-calculator":Ar.BMR,"due-date-calendar":Ar.DUE_DATE,"ovulation-calculator":Ar.OVULATION,"pregnaancy-weight-calculator":Ar.PWG,"target-heartrate":Ar.THR,"pregnancy-weight-calculator":Ar.PWG,"target-heart-rate":Ar.THR}},Ir="hhg_user_token",Sr="together_admin_token",Rr={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},$r={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},Mr=20,Pr={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var Br=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:_r,DEFAULT_AVATAR_IMG:Or,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:Tr,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:Ar,LOCALE_HEALTH_TOOLS:kr,BEARER_TOKEN_COOKIE:Ir,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:Sr,Z_INDEX:Rr,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:$r,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:Pr});const Dr={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},jr={"vi-VN":"marrybaby.vn"},Hr=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",Nr=e=>{const{env:{isMarryBaby:t}}=Lr;return`https://${t?jr[e]:Dr[e]}`},zr=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},Gr=e=>{const{env:{isMarryBaby:t}}=Lr;if("undefined"!=typeof window)return window.location.origin;const a="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${a?t?"fe.":"discover.":t?"www.":""}${Dr[e]}`},Ur=(e,t,a)=>{let r="";a&&(r=Object.keys(a).map((e=>e+"="+a[e])).join("&"));const{togetherBaseApiUrl:o=""}=(null==Lr?void 0:Lr.env)||{};let i=pe(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:Nr(String(t._locale))}:{}),t));return i+=`${i.includes("?")?"&":"?"}${r}`,o+"api/v1/"+zr(i)},Vr=(e,t,a)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:o=""}=(null==Lr?void 0:Lr.env)||{};return(!me&&a?o:r)+"wp-json/api/"+zr(pe(e,Object.assign({},t)))},Fr=(e,t,a)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:o=""}=(null==Lr?void 0:Lr.env)||{};return(a&&!me?o:r)+"wp-json/api/"+zr(pe(e,Object.assign({},t)))},Zr=(e,t)=>{const{careBaseApiUrl:a=""}=(null==Lr?void 0:Lr.env)||{};return(a||"https://service-health-care.hellohealthgroup.com/")+zr(pe(e,Object.assign({},t)))},Kr=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),Wr=(e,a,r,o=!1)=>t(void 0,void 0,void 0,(function*(){var t,i,l,n;try{const t=yield fetch(o?e:(n=e,encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(t)return t}catch(a){return console.log(a),console.log({url:e,status:null===(t=null==a?void 0:a.response)||void 0===t?void 0:t.status,statusText:null===(i=null==a?void 0:a.response)||void 0===i?void 0:i.statusText}),(null===(l=null==a?void 0:a.response)||void 0===l?void 0:l.data)||null}return null})),Yr=(e,a="GET",r,o)=>t(void 0,void 0,void 0,(function*(){var t,i,l,n,s,c;try{const n="string"==typeof e?e:e.url,s="string"==typeof e?e:e.backupUrl,c=br.parse(o||""),d=c[Ir]||Le(Ir);if(!d||!d.length)return Wr(s||n,a,r);try{const e=yield fetch(n,Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({Authorization:"Bearer "+d},null==r?void 0:r.headers)})).then((e=>e.json()));if(null===(t=null==e?void 0:e.messages)||void 0===t?void 0:t.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return Wr(s||n,a,r);if(e)return e}catch(e){return console.log({status:null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.status,statusText:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.statusText}),Wr(s||n,a,r)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),(null===(c=null==e?void 0:e.response)||void 0===c?void 0:c.data)||null}return null})),qr=(e,a,r,o)=>t(void 0,void 0,void 0,(function*(){try{const t=br.parse(o||""),i=t[Ir]||Le(Ir);if(i&&i.length){const t=yield fetch(e,Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({Authorization:"Bearer "+i},null==r?void 0:r.headers)})).then((e=>e.json()));if(t)return t}}catch(e){return null}return null})),Xr=(e,a,r,o)=>t(void 0,void 0,void 0,(function*(){try{const t=br.parse(o||""),i=t[Sr]||Le(Sr);if(i&&i.length){const t=yield fetch(e,Object.assign(Object.assign({method:a},Kr(r)),{headers:Object.assign({Authorization:"Bearer "+i},null==r?void 0:r.headers)})).then((e=>e.json()));if(t)return t}}catch(e){return null}return null}));function Qr(e,t,a){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+a+"$2"):e+o+t+"="+a}const Jr=(e,t,a="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let o="undefined"!=typeof window?window.location.origin:"";o||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(o=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:a}=Lr.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{Qr(r,e,t[e])})),Qr(r,"source","communities"),a?`${a}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${o}${a}/on-boarding?return=${encodeURIComponent(r)}`,t)},eo=(e,t,a,r)=>a&&t?`${a}-${t}`:`${Ce(e||"",{lower:!0,locale:r||Hr})}-${t}`,to=({name:e,id:t,locale:a})=>{var r;return`/care/${null===(r=Pr[a||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${eo(e,t)}`},ao=({name:e,id:t,slug:a,locale:r})=>{var o;return`/care/${null===(o=Pr[r||"vi-VN"])||void 0===o?void 0:o.HOSPITAL}/${eo(e,t,a)}`};var ro=m((e=>({root:{},wrapper:{gap:x(8)},groupErr:{fontSize:x(14)},itemRoot:{flexGrow:1,width:"50%",'&[data-checked="true"]':{".mantine-Radio-label":{borderColor:e.fn.primaryColor()}}},itemLabelWrapper:{padding:0,width:"100%"},itemLabel:{position:"relative",padding:`${x(6)} ${x(16)}`,border:`1px solid ${e.colors.gray[2]}`,borderRadius:x(4),cursor:"pointer",'&[data-disabled="true"]':{background:e.colors.gray[1],color:`${e.colors.gray[4]} !important`,img:{opacity:.5}},img:{height:x(26)}},itemInner:{display:"none"}})));export{Ka as $,ma as A,fa as B,rr as C,xr as D,_r as E,tt as F,Lr as G,it as H,Wt as I,Ar as J,za as K,st as L,_e as M,Ae as N,Ut as O,xt as P,Wr as Q,Zr as R,qt as S,St as T,ct as U,pt as V,ht as W,ut as X,lt as Y,nt as Z,yt as _,Mt as a,Za as a0,Ct as a1,Rr as a2,Nt as a3,Dt as a4,jt as a5,Ht as a6,zt as a7,Gt as a8,Qt as a9,Ia as aA,Oa as aB,ta as aC,or as aD,Fa as aE,er as aF,Ga as aG,ka as aH,ra as aI,Ta as aJ,Aa as aK,Ra as aL,sa as aM,Ba as aN,ya as aO,pa as aP,sr as aQ,Da as aR,Ir as aa,Jr as ab,Ur as ac,fr as ad,Tr as ae,Gr as af,Er as ag,Dr as ah,ao as ai,to as aj,Vr as ak,vr as al,wr as am,Xr as an,qr as ao,Mr as ap,Or as aq,Xt as ar,lr as as,$r as at,Fr as au,Yr as av,jr as aw,Pa as ax,Va as ay,Ua as az,Yt as b,Br as c,yr as d,Cr as e,Oe as f,Te as g,ke as h,Ie as i,Se as j,Re as k,$e as l,at as m,gt as n,mt as o,bt as p,Lt as q,kt as r,Tt as s,At as t,Rt as u,Pt as v,ro as w,ua as x,la as y,Ma as z};
package/build/esm/lead.js CHANGED
@@ -1 +1 @@
1
- import{a as e,_ as t}from"./tslib.es6-5610e0fe.js";import a,{createContext as l,useState as n,useEffect as o,useMemo as i,useRef as r,useContext as d}from"react";import s from"lodash/debounce";import{v1 as c}from"uuid";import{a8 as m,J as u,aD as p,aF as h,aC as g,aQ as v,H as b}from"./utils-5e72a4b1.js";import"./index-acb3d02b.js";import{B as f}from"./index-d29e6780.js";import{CommonGAssets as y}from"./gAssets.js";import{Portal as k,Box as _,Transition as E,Overlay as w}from"@mantine/core";import"./index-ef967cd2.js";import{l as C,k as N}from"./screenSizeContext-464da727.js";import{t as x}from"./theme-fe07cf04.js";import{T as S}from"./translationsContext-74811783.js";import"string-format";import"@mantine/dates";import"./index-cad03239.js";import"./Onboarding-5763ca04.js";import T from"dayjs";import"styled-components";import"./isProduction-abb13bd7.js";import"@mantine/hooks";import"./index-d7df4b0a.js";import"innertext";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-443b1b6e.js";import{createPortal as O}from"react-dom";import"./index-75b526f3.js";import"lodash/throttle";import"./types-04ab1a7e.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-98c3ec6c.js";import{M as P}from"./utils-b4b66d1c.js";import{D as j}from"./index-28cac62d.js";import"./index-2de208c4.js";import"./index.styled-261bc592.js";import{createFormContext as B}from"@mantine/form";import"yup";import{u as $}from"./useTranslations-2de41aac.js";import{T as L}from"./index-489698f2.js";import{g as A,s as I}from"./cookieHelper-6294a113.js";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-e1bf986b.js";import"slugify";import"date-fns/locale";import"./index-8aeeb8b9.js";import"./index-82e3d6c7.js";import"@hookform/resolvers/yup";import"./index-f09be610.js";import"./index-d673bcd8.js";import"./routing-7bebdfc1.js";import"dayjs/plugin/relativeTime";const U=1,D=2;let R="https://dev.leadgen.hellobacsi.com/";const H=1,M=2;let F="";R.includes("localhost")&&(R="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(F="pink");let W="https://"+location.hostname+location.pathname+location.search;W=W.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const V={"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}},q=V[document.documentElement.lang]||V["vi-VN"];const J={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 z={"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 Y={"en-PH":z,"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":z},G=e=>{const t=Y[e];return t||Y["en-PH"]},K=l({}),Q=e=>{const[t,a]=n(16),[l,i]=n(9),[r,d]=n(!1);return o((()=>{if(d(!1),e){const t=new Image;t.addEventListener("load",(()=>{a(t.naturalWidth),i(t.naturalHeight),d(!0)})),t.addEventListener("error",(()=>{a(16),i(9),d(!0)})),t.src=e}else a(16),i(9),d(!0)}),[e]),{loaded:r,width:t,height:l}},X=({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"}))),Z=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>{const{width:d,height:s,loaded:c}=Q(o),{width:m,height:u,loaded:p}=Q(n);return c&&p?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o,style:{aspectRatio:`${d}/${s}`}}),a.createElement("img",{className:"le-only-desktop",src:n,style:{aspectRatio:`${m}/${u}`}})),a.createElement(X,{onClose:i,containerClassName:"close-button-top-right"})))):null},ee=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:d,imageDesktop:s,imageMobile:c,onClose:m,onOtherSubmit:u})=>{const{width:p,height:h,loaded:g}=Q(c),{width:v,height:b,loaded:f}=Q(s);return g&&f?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"}},s?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5,aspectRatio:`${v}/${b}`},src:s})):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:d?"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(X,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100,aspectRatio:`${p}/${h}`},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:d?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(X,{onClose:m,containerClassName:"close-button-top-right"}))))):null},te="undefined"==typeof window,ae={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},le=(t="",a="",l="",i=500)=>{const[r,d]=n([]),[s,c]=n(!1);return o((()=>{let n;return t?n=window.setTimeout((()=>e(void 0,void 0,void 0,(function*(){var n;if(t)try{c(!0);const o=yield((t="",a="",l="vi")=>e(void 0,void 0,void 0,(function*(){return new Promise(((e,n)=>{if(!t)return n("Need valid text input");if(te)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},a?{componentRestrictions:{country:a}}:{}),{language:ae[l]}),e)}catch(e){n(e)}}))})))(t,a,l);d(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else d([])}))),i):r.length&&d([]),()=>{window.clearTimeout(n)}}),[t,i,a]),{isLoading:s,predictions:r}};const ne=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},oe={call(e){var{url:a,data:l}=e,n=t(e,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${ne.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},ie={call(e){var{url:a,data:l}=e,n=t(e,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${ne.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},re=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),ie.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},de=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),oe.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},se=({phone:e})=>oe.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),ce=({phone:e,otp:t})=>oe.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),me={email:{},phone:{}},ue=(t,a,l)=>e(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(me[n][o]){if(me[n][o].value)return i;if(!me[n][o].value&&me[n][o].expire>Date.now())return""}const r=yield((t,a,l)=>e(void 0,void 0,void 0,(function*(){const e="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield de({campaign_id:[t],[e]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield re({bot_id:a,[e]:n}))._errorCode?o:void 0})))(t,a,l);return me[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),[pe,he,ge]=B(),ve=["places"],be=({name:e,placeholder:t,locale:l})=>{var d;const s=he(),[c,u]=n(""),[p,h]=n(""),{predictions:g}=le(c,"","tl-PH"===l?"en":null===(d=null==l?void 0:l.split("-"))||void 0===d?void 0:d[0]),[v,b]=n(null),[f,y]=n(!1),k=r(Math.random().toString(36).substring(7)),_=i((()=>{const e=g.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===p));return!p||t?e:[{value:p,label:p}].concat(e)}),[g,p]);return o((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{b((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),f?a.createElement(a.Fragment,null,v&&a.createElement(v,{googleMapsApiKey:"AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",libraries:ve,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(m,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:_,searchValue:c,onSearchChange:e=>{u(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>h(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-"+k.current,rightSection:a.createElement(a.Fragment,null)},s.getInputProps(e)))):a.createElement("div",{style:{height:73}})},fe=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${F}`},e),ye=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${F}`},e),ke=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=he();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:d="",data:s={}}=e||{},{placeholder:c,value:b,align:y,listQuestion:k,isSendMailChimp:_=!1,newtab:E,url:w}=s;switch(d){case"TitleBlock":return a.createElement(ye,{key:r,align:y},b);case"SubtitleBlock":return a.createElement(fe,{key:r,align:y},b);case"TextBlock":return a.createElement(u,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:b},i.getInputProps(b)));case"NumberBlock":return a.createElement(v,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:b},i.getInputProps(b)));case"EmailBlock":return a.createElement(u,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:b},i.getInputProps(b)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+b+"-"+r;return a.createElement(u.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(b)),a.createElement(g,{name:b,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(b,e)},id:e,defaultCountry:l&&P[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(be,{key:r,name:b,placeholder:c,locale:l});case"DateBlock":return a.createElement(j,Object.assign({withAsterisk:!0,key:r,type:"default",name:b,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(b)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:E?"blank":"parrent",href:w,style:{textDecoration:"none"}},a.createElement(f,{type:"button",size:"md",className:`lead-modal__btn ${F}`,onClick:()=>{null==n||n(),null==o||o()}},b)));case"CheckboxBlock":return a.createElement(a.Fragment,null,_&&a.createElement("div",{style:{display:"none"},"data-name":b+"-mailchimp"}),a.createElement(h.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md",sx:{display:"flex",flexDirection:"column",gap:8}},i.getInputProps(b)),k.map(((e,t)=>a.createElement(h,{name:b,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,_&&a.createElement(u,{type:"hidden",name:b+"-mailchimp",value:_}),a.createElement(p.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(b)),k.map(((e,t)=>a.createElement(p,{name:b,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":b,"data-control":"dropdown"}),a.createElement(m,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:b,data:k.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(b))))}return null})))},_e=({phone:t,onSuccess:l,autoSendWhenOpen:i})=>{const{t:d}=$(),[s,c]=n(""),[m,p]=n(!1),[h,g]=n(0),v=r(null),[y,k]=n(),[_,E]=n(""),w=r();o((()=>{e(void 0,void 0,void 0,(function*(){var e;if(!w.current){const e=yield import("react-phone-number-input");w.current=e.formatPhoneNumberIntl}E((null===(e=w.current)||void 0===e?void 0:e.call(w,t))||t)}))}),[t]);const C=()=>e(void 0,void 0,void 0,(function*(){var e;if(!t)return;const a=yield se({phone:t}),n=null===(e=null==a?void 0:a._messages)||void 0===e?void 0:e[0];"Send sms successfully"===n?(g(60),setTimeout((()=>{v.current&&(v.current.focus(),v.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return o((()=>{setTimeout((()=>{h>0&&g((e=>e-1))}),1e3)}),[h]),o((()=>{i&&!h&&C()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),e(void 0,void 0,void 0,(function*(){if(!t||!s)return;const e=yield ce({phone:t,otp:s}),a=null==e?void 0:e._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(b,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},d("lead.otp.title")),a.createElement(L,{size:"p1",color:x.colors.gray600},d("lead.otp.desc",{phone:_})),a.createElement(u,{ref:v,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:s,onChange:e=>{p(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?y:void 0}),a.createElement(f,{size:"md",color:"primary",className:`lead-modal__btn ${F}`,disabled:!s},d("lead.otp.verify")),a.createElement(f,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${F}`,onClick:()=>{C()},disabled:!!h},d("lead.otp.resend",{timer:h?` (${h}s)`:""}))))},Ee=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:d})=>{const{width:s,height:c,loaded:m}=Q(d);return m?a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:d,style:{maxHeight:162,objectFit:"cover",aspectRatio:`${s}/${c}`},loading:"lazy"}),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 ${F}`},r))))):null},we=({content:e,inlinePosition:t})=>{const a=i((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?O(e,a):null},Ce=({content:e})=>{const t=i((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>O(e,C(t,"sidebar-lead-modal-wrapper")))))},Ne=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:d,imageMobile:s,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:b,campaignId:k,campaign_subot_id:_,locale:E})=>{var w,C,N;const x=JSON.parse(t.listBlockAdded),S=JSON.parse(t.actionBlocks),T=JSON.parse(t.textBlocks),O=S.submitBlock.data.url,P=S.submitBlock.data.text,j=S.submitBlock.data.text2,B=S.submitBlock.data.value,L=location.pathname,A=h.includes("Inline")||"Sidebar"===h,I="Slider"===h,[U,D]=n(!0),[R,H]=n(""),M=r(),W=()=>{R?H(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;o((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),me.email={},me.phone={}}),[]);const V=r(!1),J=r(!1),{form:z,validateObj:Y}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:n=[]})=>{const{t:o}=$(),d=i((()=>{const i=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],r=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?o("validator.required"):null==t?void 0:t(a)};return e.filter((e=>i.includes(e.name))).reduce(((e,i)=>"NumberBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Number(e)))return o("validator.number")}))}):"EmailBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return o("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ue(l,n,{email:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===i.name||"PhoneOtpBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),q.countryCode))return o("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ue(l,n,{phone:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Date.parse(e)))return o("validator.date")}))}):Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),s=ge({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:d}),c=r(s);return c.current=s,{form:s,validateObj:d}})({listBlockAdded:x,validatingPhoneRef:V,validatingEmailRef:J,campaignId:k,campaign_subot_id:_}),{width:G,height:K,loaded:Z}=Q(p),{width:ee,height:te,loaded:ae}=Q(s),{width:le,height:ne,loaded:oe}=Q(c),ie=ae&&oe&&("Fullscreen"!=h||Z),re=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":L,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${I?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||"",style:{aspectRatio:`${G}/${K}`}}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},b?a.createElement(Ee,{title:b.title,titleAlign:b.titleAlign,subtitle:b.subtitle,subtitleAlign:b.subtitleAlign,link:b.link,linkNewTab:b.linkNewTab,linkText:b.linkText,image:b.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:y.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"},loading:"lazy"}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?s?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:s,style:{aspectRatio:`${ee}/${te}`},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:{objectFit:"cover",aspectRatio:`${le}/${ne}`},src:c,alt:""}):null,s?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:s,alt:"",style:{aspectRatio:`${ee}/${te}`}}):null))),R&&a.createElement(_e,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(M.current,z.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(pe,{form:z},a.createElement("form",{ref:M,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),z.setTouched(Object.keys(Y).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||V.current||setTimeout((()=>{z.onSubmit((e=>{var t,a,l;if(!Object.keys(z.errors).length){if(x.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=x.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 H(e[n])}null==v||v(M.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(w=T.titleBlock.data)||void 0===w?void 0:w.align)} ${F}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(C=T.titleBlock.data)||void 0===C?void 0:C.align)} ${F}`},T.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ke,{listBlockAdded:x,popupId:e,locale:E,onClose:W,onOtherSubmit:d})),(null===(N=null==S?void 0:S.submitBlock)||void 0===N?void 0:N.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${F}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${F}`,type:"checkbox","aria-label":"Checkbox label",checked:U,onChange:e=>D(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:O||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},j)))),a.createElement(f,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${F}`,disabled:!U},B))))))),!h.includes("Inline")&&a.createElement(X,{onClose:W,containerClassName:"close-button-top-right"}))));return ie?h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?re:"Sidebar"==h?a.createElement(Ce,{content:re}):h.includes("Inline")?a.createElement(we,{content:re,inlinePosition:t.popupInlinePosition}):null:null},xe=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:d,onOtherSubmit:s})=>{const c=location.pathname,{width:m,height:u,loaded:p}=Q(i),{width:h,height:g,loaded:v}=Q(r);return p&&v?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==d?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r,style:{aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:s,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(X,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==d?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%",aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:s,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(X,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%",aspectRatio:`${m}/${u}`}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:s,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(X,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o}))))):null},Se=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>{const{width:r,height:d,loaded:s}=Q(n);return s?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n,style:{aspectRatio:`${r}/${d}`}})),a.createElement(X,{onClose:o,containerClassName:"close-button-top-right"})))):null},Te=[],Oe=[],Pe=[],je=[],Be=[];const $e=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Le=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,d]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,d)}catch(e){return null}};const Ae=e=>!function(e){var t;const a=Number(null===(t=e.rules.find((e=>"exclude_sponsored"==e.rule)))||void 0===t?void 0:t.value);return!(!Boolean(document.querySelector(".hhg-disclaimer-text"))||!a||(je.push(e),0))}(e)&&(!!function(e){var t,a;try{const l=null===(t=e.rules.find((e=>"exclude_sponsored_list"==e.rule)))||void 0===t?void 0:t.value,n=l instanceof Array?l:JSON.parse(l),o=Number(null===(a=document.querySelector("[data-sponsored-id]"))||void 0===a?void 0:a.getAttribute("data-sponsored-id"));return!o||o<=0||0===n.length||(!!n.find((e=>e.id==o))||(Be.push({id:e.id,rules:e.rules}),!1))}catch(e){return!0}}(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=Le(a),o=Le(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1;return!($e(J[i]).getTime()>o.getTime()&&(Pe.push(e),1))}(e):0===e.formatted_status&&(Te.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=Le(l),i=Le(n);if(!o||!i)return!1;const r=$e(J[a]).getTime();return r<=i.getTime()&&r>=o.getTime()&&(Oe.push(e),!0)})(e))));let Ie=null;function Ue({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:A("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r;if(De("List campagin: ",e),W="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(Ae))||[];A("hhg-id")||(I("hhg-id",c(),{domain:"."+a,path:"/"}),De("😍 Set HHG ID cookie"));let s=[];s=/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==H)))):d.filter((e=>e.device_types.some((e=>e.id==M)))),De("👓 campaignsDevice",s),De("--listCampaignScheduled",Te),De("--listCampaignScheduledToActivated",Oe),De("--listCampaignActiveButExpired",Pe),De("--listCampaignExcludeSonsored",je),De("--listCampaignDifferentSponsor",Be);let m=s.map(((e,t)=>e.targets.filter((e=>e.type==U)).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 u=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let p=[],h=[];u&&u.length&&(p=s.map(((e,t)=>e.targets.filter((e=>e.type==D)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),h=p.filter((e=>u.includes(e.target))));const g=[...m,...h],v=document.cookie.split("; ").map((e=>e.split("=")[0])),b=v.filter((e=>e.includes("lead_submited")));De("--listCampaignCodeSubmited",b);const f=v.filter((e=>e.includes("lead_closed")));De("--listCampaignCodeClosed",f);const y=[...b,...f],k=(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})(g.filter((e=>!y.some((t=>t.includes(s[e.campaignIndex].code))))));if(De("--listCampaignValid : ",k),k&&k.length){const e=s[k[0].campaignIndex];De("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);De("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);De("scrollRule",n);let o="TIME";if(Number.isInteger(a)&&(o="TIME",De("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),Ie&&clearTimeout(Ie),Ie=setTimeout((()=>{null==l||l(e,o)}),1e3*a)),Number.isInteger(n)){o="SCROLL",De("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,i=t.offsetHeight;De("👓 Element check scroll: ",t);const r=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let d=0;t>=a&&(d=Math.round((t-a)/(i-innerHeight)*100)),De("---Scroll",d,n),d>=n&&(window.removeEventListener("scroll",r),null==l||l(e,o))};window.addEventListener("scroll",r,{passive:!0})}}else De("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{De("Lead error: ",e)}))}const De=(...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 Re=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:s})=>{var m,u;const{apiUrl:p,siteDomain:h}=d(K);o((()=>{const e=A("_ga")||null;fetch(`${p}api/campaign/${f}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:A("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:g,image:v,image_desktop:b,code:f,image_background:y,image_overlay_mobile:k,image_overlay_desktop:_}=e||{},{currentLayout:E}=g,w=g.imageBlocks?JSON.parse(g.imageBlocks):{},C=JSON.parse(g.actionBlocks),N=JSON.parse(g.textBlocks);let x=(null===(u=null===(m=null==N?void 0:N.titleBlock)||void 0===m?void 0:m.data)||void 0===u?void 0:u.value)||"";const S={1:{},2:{},3:{}},T=r("lead-modal-"+c()),O=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t=11,a=e.search("{{category_");return+e.charAt(t+a)}return null}(x);if(O){De("⚡️ Has categoryLevel",O);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${O}`)),a=e.find((e=>e.name===`content_category_en_${O}`));if(!t||!a)return De("⚡️ No META TAG for categoryLevel, not show popup",O),null;S[O]={value:t.content,value_en:a.content},x=x.replace(`{{category_${O}}}`,t.content),De("⚡️ Set categoryData ",O)}else De("⚡️ No categoryLevel",O);const P=()=>{var t,a,l,o;if(De("👌 Other submit click"),document.body.classList.remove("noscroll"),E.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&&(De("⛔ Popup never show again!"),I(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,path:"/"})),1==r&&(De(`⌛ Popup will show again after ${i} days!`),I(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,days:i,path:"/"}));const d=A("_ga")||null,s={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:A("hhg-id"),ga_client_id:d};O&&(s.category=S[O].value_en),fetch(`${p}api/campaign/${f}/lead`,{method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&De(e)})).catch((e=>{De("Error:",e)})),null==n||n()};return"CenterTab"===E?a.createElement(Z,{popupId:T.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,imageMobile:v,imageDestkop:b,onClose:n,onOtherSubmit:P}):"Tab"===E?a.createElement(Se,{popupId:T.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,image:v,onClose:n,onOtherSubmit:P}):"Floating"===E?a.createElement(ee,{popupId:T.current,title:x,titleAlign:N.titleBlock.data.align,subtitle:N.subtitleBlock.data.value,subtitleAlign:N.subtitleBlock.data.align,url:C.linkButtonBlock.data.url,urlText:C.linkButtonBlock.data.value,newTab:C.linkButtonBlock.data.newtab,imageMobile:v,imageDesktop:b,onClose:n,onOtherSubmit:P}):E.includes("LightBox")||E.includes("Inline")||"Fullscreen"==E||"Sidebar"==E||"Slider"==E?a.createElement(Ne,{popupId:T.current,extraFields:g,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,imageBackground:y,currentLayout:E,title:x,onSubmit:(e,t)=>l(e,t,O,S),key:E,imageOverlayDesktop:_,imageOverlayMobile:k,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:s}):E.includes("Skin")?a.createElement(xe,{popupId:T.current,link:C.linkButtonBlock.data.url,linkNewTab:!!C.linkButtonBlock.data.newtab,linkText:C.linkButtonBlock.data.value,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,currentLayout:E}):null},He=({apiUrl:t,siteDomain:l,siteId:d,locale:c,apiSubotUrl:m,DEBUG_URL:u})=>{var p;const h=r(),g=r(Date.now()),{apiUrl:v}=i((()=>{let e=t;return e.includes("localhost")&&(e="https://dev.leadgen.hellobacsi.com/"),{apiUrl:e}}),[t,l,d]),[b,f]=n(null),[y,C]=n(""),[x,O]=n(null);o((()=>{ne.apiLeadUrl=v,ne.apiSubotUrl=m}),[v,m]);const P=(e,t)=>{f(e),C(t)},j=()=>{var e,t;if(!b)return;De(`👋👋👋 CLOSE POPUP ${b.code} 👋👋👋`);const a=Number(null===(e=b.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=b.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&I(`lead_closed_${b.code}`,`target_${null==b?void 0:b.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${v}api/campaign/${b.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:A("hhg-id"),duration:Math.ceil((Date.now()-g.current)/1e3)})}),f(null),O(null)};o((()=>{if(window.next){const e=s((e=>{De("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;j(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?De("🔥 This URL page has show popup!"):(De("--Process checkShowPopup"),Ue({leadApi:v,leadDomain:l,leadSiteId:d,onShowPopup:P,DEBUG_URL:u})),h.current&&window.removeEventListener("scroll",h.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Ue({leadApi:v,leadDomain:l,leadSiteId:d,onShowPopup:P,DEBUG_URL:u})}),[]);const B=(t,a,n,o)=>e(void 0,void 0,void 0,(function*(){var e,i,r,d,s,c,m,u,p,h,g;if(!a)return;De("submitHandler",n,o);const f=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),y=A("_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((e=>{var a,l;const n=(null===(a=t.querySelector(`*[name="${e.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=t.querySelector(`*[data-extra][data-name="${e.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(e.value),null==q?void 0:q.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?T(e.value).format("YYYY-MM-DD"):e.value;return{key:e.name,value:o,control:n,is_sent_mailchimp:t.querySelector(`div[data-name="${e.name}-mailchimp"]`)?"true":"false"}})),cookie_id:A("hhg-id"),ga_client_id:y};n&&o[n].value_en&&(k.category=o[n].value_en);const _=Number((null===(i=null===(e=b.rules)||void 0===e?void 0:e.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),E=Number((null===(d=null===(r=b.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===d?void 0:d.value)||0);if(0==E&&(De("⛔ Popup never show again!"),I(`lead_submited_${b.code}`,`target_${null==b?void 0:b.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==E&&(De(`⌛ Popup will show again after ${_} days!`),I(`lead_submited_${b.code}`,`target_${null==b?void 0:b.extra_fields.targetType}`,{domain:"."+l,days:_,path:"/"})),fetch(`${v}api/campaign/${b.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==(null==b?void 0:b.extra_fields.popupShowThankYou))return j(),void document.body.classList.remove("noscroll");let w=!0;const C=b.thank_you_image||`${v}admin/img/thanksyou.png`;let N,x,S=(null==b?void 0:b.extra_fields.popupThankyouTitle)||"Thank you.",P=(null==b?void 0:b.extra_fields.popupThankyouDesc)||"We appreciate your time!",B="",$="",L="";if("2.1"==(null==b?void 0:b.extra_fields.popupVersion)){const e=b.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));S=(null===(s=null==a?void 0:a.data)||void 0===s?void 0:s.value)||"",B=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",P=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",$=(null===(u=null==l?void 0:l.data)||void 0===u?void 0:u.align)||"",N=(null===(p=null==n?void 0:n.data)||void 0===p?void 0:p.value)||"",x=(null===(h=null==n?void 0:n.data)||void 0===h?void 0:h.newtab)||!1,L=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.url)||"";const o=b.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(w=!1)}O(w?{title:S,titleAlign:B,subtitle:P,subtitleAlign:$,link:L,linkNewTab:x,linkText:N,image:C}: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))}));return o((()=>{b&&(g.current=Date.now())}),[b]),a.createElement(K.Provider,{value:{apiUrl:v,siteDomain:l,siteId:d,locale:c}},a.createElement(S.Provider,{value:{locale:c,values:G(c)}},a.createElement(k,{target:N()},a.createElement(_,{sx:{position:"fixed",zIndex:9999999999}},a.createElement(E,{mounted:Boolean("2.1"===(null===(p=null==b?void 0:b.extra_fields)||void 0===p?void 0:p.popupVersion)),transition:"fade",duration:600,timingFunction:"ease"},(e=>{var t;return a.createElement(_,{style:e},"2.1"===(null===(t=null==b?void 0:b.extra_fields)||void 0===t?void 0:t.popupVersion)&&a.createElement(a.Fragment,null,!!b.extra_fields.currentLayout&&!b.extra_fields.currentLayout.includes("Inline")&&!b.extra_fields.currentLayout.includes("Sidebar")&&a.createElement(w,{color:"#000",opacity:.5,center:!0,zIndex:400,pos:"fixed",onClick:()=>j()}),a.createElement(Re,{campaign:b,action:y,onSubmit:B,onClose:j,showThankyou:x,locale:c})))}))))))};export{He as LeadGen};
1
+ import{a as e,_ as t}from"./tslib.es6-287085c8.js";import a,{createContext as l,useState as n,useEffect as o,useMemo as i,useRef as r,useContext as s}from"react";import d from"lodash/debounce";import{v1 as c}from"uuid";import{a9 as m,K as u,aE as p,aG as h,aD as g,aR as v,H as b}from"./index.styles-7434589b.js";import"./index-f6bcb648.js";import{B as f}from"./index-e0784192.js";import{CommonGAssets as y}from"./gAssets.js";import{Portal as k,Box as _,Transition as E,Overlay as w}from"@mantine/core";import"./index-4efeaafb.js";import{l as C,k as N}from"./screenSizeContext-bdf24fa6.js";import{t as x}from"./theme-72026c60.js";import{T as S}from"./translationsContext-1e2e6dff.js";import"string-format";import"@mantine/dates";import"./index-2801f113.js";import"./Onboarding-70785e8f.js";import T from"dayjs";import"styled-components";import"./isProduction-0a64196b.js";import"@mantine/hooks";import"./index-821974a1.js";import"innertext";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-938364f7.js";import{createPortal as O}from"react-dom";import"./index-3f8a6b5e.js";import"lodash/throttle";import"./types-ba260963.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-a2322aef.js";import{M as P}from"./utils-7111bf36.js";import{D as j}from"./index-5c940967.js";import"./index-a75f3157.js";import"./index.styled-f375cb88.js";import{createFormContext as B}from"@mantine/form";import"yup";import{u as $}from"./useTranslations-3e20b105.js";import{T as L}from"./index-40d35a26.js";import{g as A,s as I}from"./cookieHelper-c3ac9f5c.js";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-581c6a48.js";import"slugify";import"date-fns/locale";import"./index-f8b70d7a.js";import"./index-94ca9b0b.js";import"@hookform/resolvers/yup";import"./index-119c00b7.js";import"./index-998315b6.js";import"./routing-0e2cb50e.js";import"dayjs/plugin/relativeTime";const U=1,D=2;let R="https://dev.leadgen.hellobacsi.com/";const H=1,M=2;let F="";R.includes("localhost")&&(R="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(F="pink");let W="https://"+location.hostname+location.pathname+location.search;W=W.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const V={"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}},q=V[document.documentElement.lang]||V["vi-VN"];const z={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 J={"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 Y={"en-PH":J,"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":J},G=e=>{const t=Y[e];return t||Y["en-PH"]},K=l({}),Q=e=>{const[t,a]=n(16),[l,i]=n(9),[r,s]=n(!1);return o((()=>{if(s(!1),e){const t=new Image;t.addEventListener("load",(()=>{a(t.naturalWidth),i(t.naturalHeight),s(!0)})),t.addEventListener("error",(()=>{a(16),i(9),s(!0)})),t.src=e}else a(16),i(9),s(!0)}),[e]),{loaded:r,width:t,height:l}},X=({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"}))),Z=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>{const{width:s,height:d,loaded:c}=Q(o),{width:m,height:u,loaded:p}=Q(n);return c&&p?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o,style:{aspectRatio:`${s}/${d}`}}),a.createElement("img",{className:"le-only-desktop",src:n,style:{aspectRatio:`${m}/${u}`}})),a.createElement(X,{onClose:i,containerClassName:"close-button-top-right"})))):null},ee=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>{const{width:p,height:h,loaded:g}=Q(c),{width:v,height:b,loaded:f}=Q(d);return g&&f?a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5,aspectRatio:`${v}/${b}`},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(X,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100,aspectRatio:`${p}/${h}`},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(X,{onClose:m,containerClassName:"close-button-top-right"}))))):null},te="undefined"==typeof window,ae={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},le=(t="",a="",l="",i=500)=>{const[r,s]=n([]),[d,c]=n(!1);return o((()=>{let n;return t?n=window.setTimeout((()=>e(void 0,void 0,void 0,(function*(){var n;if(t)try{c(!0);const o=yield((t="",a="",l="vi")=>e(void 0,void 0,void 0,(function*(){return new Promise(((e,n)=>{if(!t)return n("Need valid text input");if(te)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},a?{componentRestrictions:{country:a}}:{}),{language:ae[l]}),e)}catch(e){n(e)}}))})))(t,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),i):r.length&&s([]),()=>{window.clearTimeout(n)}}),[t,i,a]),{isLoading:d,predictions:r}};const ne=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},oe={call(e){var{url:a,data:l}=e,n=t(e,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${ne.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},ie={call(e){var{url:a,data:l}=e,n=t(e,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${ne.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((()=>({})))}},re=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),ie.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},se=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),oe.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},de=({phone:e})=>oe.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),ce=({phone:e,otp:t})=>oe.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),me={email:{},phone:{}},ue=(t,a,l)=>e(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(me[n][o]){if(me[n][o].value)return i;if(!me[n][o].value&&me[n][o].expire>Date.now())return""}const r=yield((t,a,l)=>e(void 0,void 0,void 0,(function*(){const e="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield se({campaign_id:[t],[e]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield re({bot_id:a,[e]:n}))._errorCode?o:void 0})))(t,a,l);return me[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),[pe,he,ge]=B(),ve=["places"],be=({name:e,placeholder:t,locale:l})=>{var s;const d=he(),[c,u]=n(""),[p,h]=n(""),{predictions:g}=le(c,"","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[v,b]=n(null),[f,y]=n(!1),k=r(Math.random().toString(36).substring(7)),_=i((()=>{const e=g.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===p));return!p||t?e:[{value:p,label:p}].concat(e)}),[g,p]);return o((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{b((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),f?a.createElement(a.Fragment,null,v&&a.createElement(v,{googleMapsApiKey:"AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",libraries:ve,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(m,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:_,searchValue:c,onSearchChange:e=>{u(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>h(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-"+k.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},fe=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${F}`},e),ye=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${F}`},e),ke=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=he();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:b,align:y,listQuestion:k,isSendMailChimp:_=!1,newtab:E,url:w}=d;switch(s){case"TitleBlock":return a.createElement(ye,{key:r,align:y},b);case"SubtitleBlock":return a.createElement(fe,{key:r,align:y},b);case"TextBlock":return a.createElement(u,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:b},i.getInputProps(b)));case"NumberBlock":return a.createElement(v,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:b},i.getInputProps(b)));case"EmailBlock":return a.createElement(u,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:b},i.getInputProps(b)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+b+"-"+r;return a.createElement(u.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(b)),a.createElement(g,{name:b,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(b,e)},id:e,defaultCountry:l&&P[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(be,{key:r,name:b,placeholder:c,locale:l});case"DateBlock":return a.createElement(j,Object.assign({withAsterisk:!0,key:r,type:"default",name:b,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(b)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:E?"blank":"parrent",href:w,style:{textDecoration:"none"}},a.createElement(f,{type:"button",size:"md",className:`lead-modal__btn ${F}`,onClick:()=>{null==n||n(),null==o||o()}},b)));case"CheckboxBlock":return a.createElement(a.Fragment,null,_&&a.createElement("div",{style:{display:"none"},"data-name":b+"-mailchimp"}),a.createElement(h.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md",sx:{display:"flex",flexDirection:"column",gap:8}},i.getInputProps(b)),k.map(((e,t)=>a.createElement(h,{name:b,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,_&&a.createElement(u,{type:"hidden",name:b+"-mailchimp",value:_}),a.createElement(p.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(b)),k.map(((e,t)=>a.createElement(p,{name:b,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":b,"data-control":"dropdown"}),a.createElement(m,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:b,data:k.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(b))))}return null})))},_e=({phone:t,onSuccess:l,autoSendWhenOpen:i})=>{const{t:s}=$(),[d,c]=n(""),[m,p]=n(!1),[h,g]=n(0),v=r(null),[y,k]=n(),[_,E]=n(""),w=r();o((()=>{e(void 0,void 0,void 0,(function*(){var e;if(!w.current){const e=yield import("react-phone-number-input");w.current=e.formatPhoneNumberIntl}E((null===(e=w.current)||void 0===e?void 0:e.call(w,t))||t)}))}),[t]);const C=()=>e(void 0,void 0,void 0,(function*(){var e;if(!t)return;const a=yield de({phone:t}),n=null===(e=null==a?void 0:a._messages)||void 0===e?void 0:e[0];"Send sms successfully"===n?(g(60),setTimeout((()=>{v.current&&(v.current.focus(),v.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return o((()=>{setTimeout((()=>{h>0&&g((e=>e-1))}),1e3)}),[h]),o((()=>{i&&!h&&C()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),e(void 0,void 0,void 0,(function*(){if(!t||!d)return;const e=yield ce({phone:t,otp:d}),a=null==e?void 0:e._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(b,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(L,{size:"p1",color:x.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(u,{ref:v,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=>{p(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?y:void 0}),a.createElement(f,{size:"md",color:"primary",className:`lead-modal__btn ${F}`,disabled:!d},s("lead.otp.verify")),a.createElement(f,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${F}`,onClick:()=>{C()},disabled:!!h},s("lead.otp.resend",{timer:h?` (${h}s)`:""}))))},Ee=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>{const{width:d,height:c,loaded:m}=Q(s);return m?a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover",aspectRatio:`${d}/${c}`},loading:"lazy"}),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 ${F}`},r))))):null},we=({content:e,inlinePosition:t})=>{const a=i((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?O(e,a):null},Ce=({content:e})=>{const t=i((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>O(e,C(t,"sidebar-lead-modal-wrapper")))))},Ne=({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:b,campaignId:k,campaign_subot_id:_,locale:E})=>{var w,C,N;const x=JSON.parse(t.listBlockAdded),S=JSON.parse(t.actionBlocks),T=JSON.parse(t.textBlocks),O=S.submitBlock.data.url,P=S.submitBlock.data.text,j=S.submitBlock.data.text2,B=S.submitBlock.data.value,L=location.pathname,A=h.includes("Inline")||"Sidebar"===h,I="Slider"===h,[U,D]=n(!0),[R,H]=n(""),M=r(),W=()=>{R?H(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;o((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),me.email={},me.phone={}}),[]);const V=r(!1),z=r(!1),{form:J,validateObj:Y}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:n=[]})=>{const{t:o}=$(),s=i((()=>{const i=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],r=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?o("validator.required"):null==t?void 0:t(a)};return e.filter((e=>i.includes(e.name))).reduce(((e,i)=>"NumberBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Number(e)))return o("validator.number")}))}):"EmailBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return o("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ue(l,n,{email:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===i.name||"PhoneOtpBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),q.countryCode))return o("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ue(l,n,{phone:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Date.parse(e)))return o("validator.date")}))}):Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=ge({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=r(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:x,validatingPhoneRef:V,validatingEmailRef:z,campaignId:k,campaign_subot_id:_}),{width:G,height:K,loaded:Z}=Q(p),{width:ee,height:te,loaded:ae}=Q(d),{width:le,height:ne,loaded:oe}=Q(c),ie=ae&&oe&&("Fullscreen"!=h||Z),re=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":L,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${I?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||"",style:{aspectRatio:`${G}/${K}`}}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},b?a.createElement(Ee,{title:b.title,titleAlign:b.titleAlign,subtitle:b.subtitle,subtitleAlign:b.subtitleAlign,link:b.link,linkNewTab:b.linkNewTab,linkText:b.linkText,image:b.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:y.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"},loading:"lazy"}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,style:{aspectRatio:`${ee}/${te}`},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:{objectFit:"cover",aspectRatio:`${le}/${ne}`},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:"",style:{aspectRatio:`${ee}/${te}`}}):null))),R&&a.createElement(_e,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(M.current,J.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(pe,{form:J},a.createElement("form",{ref:M,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),J.setTouched(Object.keys(Y).reduce(((e,t)=>(e[t]=!0,e)),{})),z.current||V.current||setTimeout((()=>{J.onSubmit((e=>{var t,a,l;if(!Object.keys(J.errors).length){if(x.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=x.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 H(e[n])}null==v||v(M.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(w=T.titleBlock.data)||void 0===w?void 0:w.align)} ${F}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(C=T.titleBlock.data)||void 0===C?void 0:C.align)} ${F}`},T.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ke,{listBlockAdded:x,popupId:e,locale:E,onClose:W,onOtherSubmit:s})),(null===(N=null==S?void 0:S.submitBlock)||void 0===N?void 0:N.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${F}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${F}`,type:"checkbox","aria-label":"Checkbox label",checked:U,onChange:e=>D(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:O||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},j)))),a.createElement(f,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${F}`,disabled:!U},B))))))),!h.includes("Inline")&&a.createElement(X,{onClose:W,containerClassName:"close-button-top-right"}))));return ie?h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?re:"Sidebar"==h?a.createElement(Ce,{content:re}):h.includes("Inline")?a.createElement(we,{content:re,inlinePosition:t.popupInlinePosition}):null:null},xe=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname,{width:m,height:u,loaded:p}=Q(i),{width:h,height:g,loaded:v}=Q(r);return p&&v?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r,style:{aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(X,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%",aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(X,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%",aspectRatio:`${m}/${u}`}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(X,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o}))))):null},Se=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>{const{width:r,height:s,loaded:d}=Q(n);return d?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n,style:{aspectRatio:`${r}/${s}`}})),a.createElement(X,{onClose:o,containerClassName:"close-button-top-right"})))):null},Te=[],Oe=[],Pe=[],je=[],Be=[];const $e=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Le=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 Ae=e=>!function(e){var t;const a=Number(null===(t=e.rules.find((e=>"exclude_sponsored"==e.rule)))||void 0===t?void 0:t.value);return!(!Boolean(document.querySelector(".hhg-disclaimer-text"))||!a||(je.push(e),0))}(e)&&(!!function(e){var t,a;try{const l=null===(t=e.rules.find((e=>"exclude_sponsored_list"==e.rule)))||void 0===t?void 0:t.value,n=l instanceof Array?l:JSON.parse(l),o=Number(null===(a=document.querySelector("[data-sponsored-id]"))||void 0===a?void 0:a.getAttribute("data-sponsored-id"));return!o||o<=0||0===n.length||(!!n.find((e=>e.id==o))||(Be.push({id:e.id,rules:e.rules}),!1))}catch(e){return!0}}(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=Le(a),o=Le(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1;return!($e(z[i]).getTime()>o.getTime()&&(Pe.push(e),1))}(e):0===e.formatted_status&&(Te.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=Le(l),i=Le(n);if(!o||!i)return!1;const r=$e(z[a]).getTime();return r<=i.getTime()&&r>=o.getTime()&&(Oe.push(e),!0)})(e))));let Ie=null;function Ue({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:A("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r;if(De("List campagin: ",e),W="https://"+location.hostname+location.pathname+location.search,1==e._status){const s=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Ae))||[];A("hhg-id")||(I("hhg-id",c(),{domain:"."+a,path:"/"}),De("😍 Set HHG ID cookie"));let d=[];d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?s.filter((e=>e.device_types.some((e=>e.id==H)))):s.filter((e=>e.device_types.some((e=>e.id==M)))),De("👓 campaignsDevice",d),De("--listCampaignScheduled",Te),De("--listCampaignScheduledToActivated",Oe),De("--listCampaignActiveButExpired",Pe),De("--listCampaignExcludeSonsored",je),De("--listCampaignDifferentSponsor",Be);let m=d.map(((e,t)=>e.targets.filter((e=>e.type==U)).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 u=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let p=[],h=[];u&&u.length&&(p=d.map(((e,t)=>e.targets.filter((e=>e.type==D)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),h=p.filter((e=>u.includes(e.target))));const g=[...m,...h],v=document.cookie.split("; ").map((e=>e.split("=")[0])),b=v.filter((e=>e.includes("lead_submited")));De("--listCampaignCodeSubmited",b);const f=v.filter((e=>e.includes("lead_closed")));De("--listCampaignCodeClosed",f);const y=[...b,...f],k=(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})(g.filter((e=>!y.some((t=>t.includes(d[e.campaignIndex].code))))));if(De("--listCampaignValid : ",k),k&&k.length){const e=d[k[0].campaignIndex];De("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);De("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);De("scrollRule",n);let o="TIME";if(Number.isInteger(a)&&(o="TIME",De("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),Ie&&clearTimeout(Ie),Ie=setTimeout((()=>{null==l||l(e,o)}),1e3*a)),Number.isInteger(n)){o="SCROLL",De("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,i=t.offsetHeight;De("👓 Element check scroll: ",t);const r=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let s=0;t>=a&&(s=Math.round((t-a)/(i-innerHeight)*100)),De("---Scroll",s,n),s>=n&&(window.removeEventListener("scroll",r),null==l||l(e,o))};window.addEventListener("scroll",r,{passive:!0})}}else De("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{De("Lead error: ",e)}))}const De=(...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 Re=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var m,u;const{apiUrl:p,siteDomain:h}=s(K);o((()=>{const e=A("_ga")||null;fetch(`${p}api/campaign/${f}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:A("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:g,image:v,image_desktop:b,code:f,image_background:y,image_overlay_mobile:k,image_overlay_desktop:_}=e||{},{currentLayout:E}=g,w=g.imageBlocks?JSON.parse(g.imageBlocks):{},C=JSON.parse(g.actionBlocks),N=JSON.parse(g.textBlocks);let x=(null===(u=null===(m=null==N?void 0:N.titleBlock)||void 0===m?void 0:m.data)||void 0===u?void 0:u.value)||"";const S={1:{},2:{},3:{}},T=r("lead-modal-"+c()),O=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t=11,a=e.search("{{category_");return+e.charAt(t+a)}return null}(x);if(O){De("⚡️ Has categoryLevel",O);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${O}`)),a=e.find((e=>e.name===`content_category_en_${O}`));if(!t||!a)return De("⚡️ No META TAG for categoryLevel, not show popup",O),null;S[O]={value:t.content,value_en:a.content},x=x.replace(`{{category_${O}}}`,t.content),De("⚡️ Set categoryData ",O)}else De("⚡️ No categoryLevel",O);const P=()=>{var t,a,l,o;if(De("👌 Other submit click"),document.body.classList.remove("noscroll"),E.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&&(De("⛔ Popup never show again!"),I(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,path:"/"})),1==r&&(De(`⌛ Popup will show again after ${i} days!`),I(`lead_submited_${f}`,`target_${g.popupVersion}`,{domain:"."+h,days:i,path:"/"}));const s=A("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:A("hhg-id"),ga_client_id:s};O&&(d.category=S[O].value_en),fetch(`${p}api/campaign/${f}/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&&De(e)})).catch((e=>{De("Error:",e)})),null==n||n()};return"CenterTab"===E?a.createElement(Z,{popupId:T.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,imageMobile:v,imageDestkop:b,onClose:n,onOtherSubmit:P}):"Tab"===E?a.createElement(Se,{popupId:T.current,url:w.imageMobile.data.url,newTab:w.imageMobile.data.newtab,image:v,onClose:n,onOtherSubmit:P}):"Floating"===E?a.createElement(ee,{popupId:T.current,title:x,titleAlign:N.titleBlock.data.align,subtitle:N.subtitleBlock.data.value,subtitleAlign:N.subtitleBlock.data.align,url:C.linkButtonBlock.data.url,urlText:C.linkButtonBlock.data.value,newTab:C.linkButtonBlock.data.newtab,imageMobile:v,imageDesktop:b,onClose:n,onOtherSubmit:P}):E.includes("LightBox")||E.includes("Inline")||"Fullscreen"==E||"Sidebar"==E||"Slider"==E?a.createElement(Ne,{popupId:T.current,extraFields:g,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,imageBackground:y,currentLayout:E,title:x,onSubmit:(e,t)=>l(e,t,O,S),key:E,imageOverlayDesktop:_,imageOverlayMobile:k,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):E.includes("Skin")?a.createElement(xe,{popupId:T.current,link:C.linkButtonBlock.data.url,linkNewTab:!!C.linkButtonBlock.data.newtab,linkText:C.linkButtonBlock.data.value,onClose:n,onOtherSubmit:P,imageMobile:v,imageDesktop:b,currentLayout:E}):null},He=({apiUrl:t,siteDomain:l,siteId:s,locale:c,apiSubotUrl:m,DEBUG_URL:u})=>{var p;const h=r(),g=r(Date.now()),{apiUrl:v}=i((()=>{let e=t;return e.includes("localhost")&&(e="https://dev.leadgen.hellobacsi.com/"),{apiUrl:e}}),[t,l,s]),[b,f]=n(null),[y,C]=n(""),[x,O]=n(null);o((()=>{ne.apiLeadUrl=v,ne.apiSubotUrl=m}),[v,m]);const P=(e,t)=>{f(e),C(t)},j=()=>{var e,t;if(!b)return;De(`👋👋👋 CLOSE POPUP ${b.code} 👋👋👋`);const a=Number(null===(e=b.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=b.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&I(`lead_closed_${b.code}`,`target_${null==b?void 0:b.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${v}api/campaign/${b.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:A("hhg-id"),duration:Math.ceil((Date.now()-g.current)/1e3)})}),f(null),O(null)};o((()=>{if(window.next){const e=d((e=>{De("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;j(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?De("🔥 This URL page has show popup!"):(De("--Process checkShowPopup"),Ue({leadApi:v,leadDomain:l,leadSiteId:s,onShowPopup:P,DEBUG_URL:u})),h.current&&window.removeEventListener("scroll",h.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Ue({leadApi:v,leadDomain:l,leadSiteId:s,onShowPopup:P,DEBUG_URL:u})}),[]);const B=(t,a,n,o)=>e(void 0,void 0,void 0,(function*(){var e,i,r,s,d,c,m,u,p,h,g;if(!a)return;De("submitHandler",n,o);const f=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),y=A("_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((e=>{var a,l;const n=(null===(a=t.querySelector(`*[name="${e.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=t.querySelector(`*[data-extra][data-name="${e.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(e.value),null==q?void 0:q.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?T(e.value).format("YYYY-MM-DD"):e.value;return{key:e.name,value:o,control:n,is_sent_mailchimp:t.querySelector(`div[data-name="${e.name}-mailchimp"]`)?"true":"false"}})),cookie_id:A("hhg-id"),ga_client_id:y};n&&o[n].value_en&&(k.category=o[n].value_en);const _=Number((null===(i=null===(e=b.rules)||void 0===e?void 0:e.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),E=Number((null===(s=null===(r=b.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==E&&(De("⛔ Popup never show again!"),I(`lead_submited_${b.code}`,`target_${null==b?void 0:b.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==E&&(De(`⌛ Popup will show again after ${_} days!`),I(`lead_submited_${b.code}`,`target_${null==b?void 0:b.extra_fields.targetType}`,{domain:"."+l,days:_,path:"/"})),fetch(`${v}api/campaign/${b.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==(null==b?void 0:b.extra_fields.popupShowThankYou))return j(),void document.body.classList.remove("noscroll");let w=!0;const C=b.thank_you_image||`${v}admin/img/thanksyou.png`;let N,x,S=(null==b?void 0:b.extra_fields.popupThankyouTitle)||"Thank you.",P=(null==b?void 0:b.extra_fields.popupThankyouDesc)||"We appreciate your time!",B="",$="",L="";if("2.1"==(null==b?void 0:b.extra_fields.popupVersion)){const e=b.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));S=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",B=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",P=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",$=(null===(u=null==l?void 0:l.data)||void 0===u?void 0:u.align)||"",N=(null===(p=null==n?void 0:n.data)||void 0===p?void 0:p.value)||"",x=(null===(h=null==n?void 0:n.data)||void 0===h?void 0:h.newtab)||!1,L=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.url)||"";const o=b.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(w=!1)}O(w?{title:S,titleAlign:B,subtitle:P,subtitleAlign:$,link:L,linkNewTab:x,linkText:N,image:C}: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))}));return o((()=>{b&&(g.current=Date.now())}),[b]),a.createElement(K.Provider,{value:{apiUrl:v,siteDomain:l,siteId:s,locale:c}},a.createElement(S.Provider,{value:{locale:c,values:G(c)}},a.createElement(k,{target:N()},a.createElement(_,{sx:{position:"fixed",zIndex:9999999999}},a.createElement(E,{mounted:Boolean("2.1"===(null===(p=null==b?void 0:b.extra_fields)||void 0===p?void 0:p.popupVersion)),transition:"fade",duration:600,timingFunction:"ease"},(e=>{var t;return a.createElement(_,{style:e},"2.1"===(null===(t=null==b?void 0:b.extra_fields)||void 0===t?void 0:t.popupVersion)&&a.createElement(a.Fragment,null,!!b.extra_fields.currentLayout&&!b.extra_fields.currentLayout.includes("Inline")&&!b.extra_fields.currentLayout.includes("Sidebar")&&a.createElement(w,{color:"#000",opacity:.5,center:!0,zIndex:400,pos:"fixed",onClick:()=>j()}),a.createElement(Re,{campaign:b,action:y,onSubmit:B,onClose:j,showThankyou:x,locale:c})))}))))))};export{He as LeadGen};
@@ -1 +1 @@
1
- import{aG as e,aH as t,aI as a}from"./utils-5e72a4b1.js";export{aK as Accordion,A as Anchor,z as AspectRatio,y as Avatar,aJ as Breadcrumbs,E as Button,aL as Carousel,aF as Checkbox,J as Input,aB as MAPPED_LOCALE,aO as OTHER_THEME_CONFIG,aE as OTP,aC as Phone,aP as Popover,aD as Radio,a8 as Select,ar as Tabs,w as Text,aM as emotionCache,aN as getHeadingStyles,aI as getMantineThemeOverride,aA as themeColors,aH as useMantineLocale}from"./utils-5e72a4b1.js";export{D as DatePicker}from"./index-28cac62d.js";export{I as Indicator}from"./index-cbc21858.js";import s,{useMemo as r}from"react";export{M as Modal}from"./index-13375004.js";import{_ as o}from"./tslib.es6-5610e0fe.js";import{Badge as i,Spoiler as n,LoadingOverlay as l,MantineProvider as c,clsx as m,Title as d,Text as p,Button as u}from"@mantine/core";import{t as f}from"./theme-fe07cf04.js";import{T as g}from"./index-489698f2.js";import{u as h}from"./useTranslations-2de41aac.js";export{b as CentralCarousel}from"./index-acb3d02b.js";export{S as Slider}from"./index-d673bcd8.js";export{S as Switch}from"./index-b18806d2.js";import"styled-components";import"./screenSizeContext-464da727.js";import"lodash/throttle";import"./gAssets.js";import"./index-cad03239.js";import"date-fns/locale";import"./Onboarding-5763ca04.js";import"./isProduction-abb13bd7.js";import"./index-ef967cd2.js";import"dayjs";import"./useUniqueId-e1bf986b.js";import"./translationsContext-74811783.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/hooks";import"@mantine/dates";import"@mantine/carousel";import"lodash/debounce";import"./cookieHelper-6294a113.js";import"slugify";import"./index-d29e6780.js";const j=t=>s.createElement(e,Object.assign({minRows:2,maxRows:4},t)),x=e=>{var{color:t=f.colors.primaryBase,styles:a}=e,r=o(e,["color","styles"]);return s.createElement(i,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},r))},v=e=>{var{children:t,line:a,lineHeight:i,trackingAttributes:l,maxHeight:c,customExpandFn:m}=e,d=o(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=h(),u=r((()=>c||(a&&i?a*i:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=r((()=>l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}),[l]);return s.createElement(n,Object.assign({showLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},b,{onClick:m}),p("articlePage.readMore")),hideLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)};const O=e=>(function(e=!1){s.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),s.createElement(l,Object.assign({loaderProps:{color:f.colors.primaryBase}},e))),C=e=>{var{children:r,locale:i,template:n="hb"}=e,l=o(e,["children","locale","template"]);return t(i),s.createElement(c,Object.assign({theme:a(i,n)},l),r)};var H="MON6sfi",P="pS-tJD7",N="s3tJ9-5",T="fNsZr1b",k="uuxV74v",B="YohjTDU";function L(e){const{icon:t,title:a,description:r,button:i,buttonProps:n,style:l,className:c}=e,b=n||{},{size:f="lg",variant:g="outline"}=b,h=o(b,["size","variant"]),j=t;return s.createElement("div",{className:m("result",H,c),style:l},j&&s.createElement("div",{className:m("resultIconContainer",P)},s.createElement(j,{className:m("resultIcon",N)})),s.createElement(d,{order:3,size:"h3",className:m("resultTitle",T)},a),s.createElement(p,{className:m("resultDescription",k)},r),i&&s.createElement(u,Object.assign({},h,{size:f,variant:g,className:m("resultButton",B,h.className)}),i))}export{x as Badge,O as LoadingOverlay,C as MantineProvider,L as Result,v as Spoiler,j as TextArea};
1
+ import{aH as e,aI as t,aJ as a}from"./index.styles-7434589b.js";export{aL as Accordion,A as Anchor,B as AspectRatio,z as Avatar,aK as Breadcrumbs,I as Button,aM as Carousel,aG as Checkbox,K as Input,aC as MAPPED_LOCALE,aP as OTHER_THEME_CONFIG,aF as OTP,aD as Phone,aQ as Popover,aE as Radio,a9 as Select,as as Tabs,x as Text,aN as emotionCache,aO as getHeadingStyles,aJ as getMantineThemeOverride,aB as themeColors,aI as useMantineLocale}from"./index.styles-7434589b.js";export{D as DatePicker}from"./index-5c940967.js";export{I as Indicator}from"./index-ba9bf2aa.js";import s,{useMemo as o}from"react";export{M as Modal}from"./index-ebdb5ee9.js";import{_ as r}from"./tslib.es6-287085c8.js";import{Badge as i,Spoiler as n,LoadingOverlay as l,MantineProvider as c,clsx as m,Title as d,Text as p,Button as u}from"@mantine/core";import{t as f}from"./theme-72026c60.js";import{T as g}from"./index-40d35a26.js";import{u as h}from"./useTranslations-3e20b105.js";export{b as CentralCarousel}from"./index-f6bcb648.js";export{S as Slider}from"./index-998315b6.js";export{S as Switch}from"./index-f69aaefd.js";import"styled-components";import"./screenSizeContext-bdf24fa6.js";import"lodash/throttle";import"./gAssets.js";import"./index-2801f113.js";import"date-fns/locale";import"./Onboarding-70785e8f.js";import"./isProduction-0a64196b.js";import"./index-4efeaafb.js";import"dayjs";import"./useUniqueId-581c6a48.js";import"./translationsContext-1e2e6dff.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/hooks";import"@mantine/dates";import"@mantine/carousel";import"lodash/debounce";import"./cookieHelper-c3ac9f5c.js";import"slugify";import"./index-e0784192.js";const j=t=>s.createElement(e,Object.assign({minRows:2,maxRows:4},t)),v=e=>{var{color:t=f.colors.primaryBase,styles:a}=e,o=r(e,["color","styles"]);return s.createElement(i,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},o))},y=e=>{var{children:t,line:a,lineHeight:i,trackingAttributes:l,maxHeight:c,customExpandFn:m}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=h(),b=o((()=>c||(a&&i?a*i:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const u=o((()=>l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}),[l]);return s.createElement(n,Object.assign({showLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},u,{onClick:m}),p("articlePage.readMore")),hideLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},u),p("articlePage.showLess"))},d,{maxHeight:b}),t)};const E=e=>(function(e=!1){s.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),s.createElement(l,Object.assign({loaderProps:{color:f.colors.primaryBase}},e))),O=e=>{var{children:o,locale:i,template:n="hb"}=e,l=r(e,["children","locale","template"]);return t(i),s.createElement(c,Object.assign({theme:a(i,n)},l),o)};var C="MON6sfi",H="pS-tJD7",P="s3tJ9-5",N="fNsZr1b",T="uuxV74v",w="YohjTDU";function k(e){const{icon:t,title:a,description:o,button:i,buttonProps:n,style:l,className:c}=e,b=n||{},{size:f="lg",variant:x="outline"}=b,g=r(b,["size","variant"]),h=t;return s.createElement("div",{className:m("result",C,c),style:l},h&&s.createElement("div",{className:m("resultIconContainer",H)},s.createElement(h,{className:m("resultIcon",P)})),s.createElement(d,{order:3,size:"h3",className:m("resultTitle",N)},a),s.createElement(p,{className:m("resultDescription",T)},o),i&&s.createElement(u,Object.assign({},g,{size:f,variant:x,className:m("resultButton",w,g.className)}),i))}export{v as Badge,E as LoadingOverlay,O as MantineProvider,k as Result,y as Spoiler,j as TextArea};
package/build/esm/misc.js CHANGED
@@ -1 +1 @@
1
- export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-e79ed160.js";export{B as Breakpoints,M as MediaQueries,S as ScreenSizeContext,q as ScreenSizeContextProvider,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,p as getWindowSizeGroups,l as getWrapperDomWithSelector,m as makeParams,o as safeEncodeURI,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,n as startCase,t as toggleNoScroll}from"./screenSizeContext-464da727.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-6294a113.js";import"react";import"styled-components";export{M as MBTheme,t as theme}from"./theme-fe07cf04.js";export{a as abbreviateNumber}from"./number-7a8cd3bf.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-7bebdfc1.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-8692c8b6.js";export{g as getSocialList}from"./getSocialList-40f09f8c.js";export{f as formatPill}from"./dataTransform-2a0a8905.js";import"dayjs";import"lodash/throttle";import"./index-cad03239.js";import"date-fns/locale";import"./Onboarding-5763ca04.js";import"./isProduction-abb13bd7.js";import"./tslib.es6-5610e0fe.js";import"./core-93a2e453.js";import"./normalizeLink-e0cd139b.js";import"./gAssets.js";
1
+ export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-83b574cc.js";export{B as Breakpoints,M as MediaQueries,S as ScreenSizeContext,q as ScreenSizeContextProvider,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,p as getWindowSizeGroups,l as getWrapperDomWithSelector,m as makeParams,o as safeEncodeURI,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,n as startCase,t as toggleNoScroll}from"./screenSizeContext-bdf24fa6.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-c3ac9f5c.js";import"react";import"styled-components";export{M as MBTheme,t as theme}from"./theme-72026c60.js";export{a as abbreviateNumber}from"./number-d62307a5.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-0e2cb50e.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-161b5514.js";export{g as getSocialList}from"./getSocialList-de8e6c68.js";export{f as formatPill}from"./dataTransform-d411ac2b.js";import"dayjs";import"lodash/throttle";import"./index-2801f113.js";import"date-fns/locale";import"./Onboarding-70785e8f.js";import"./isProduction-0a64196b.js";import"./tslib.es6-287085c8.js";import"./core-f5681c9f.js";import"./normalizeLink-4cf48bd4.js";import"./gAssets.js";
@@ -1 +1 @@
1
- import"./tslib.es6-5610e0fe.js";import"react";import"./core-93a2e453.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-2341f1b6.js";import"./index-cad03239.js";import"./normalizeLink-e0cd139b.js";import"./routing-7bebdfc1.js";import"./dataTransform-c4031779.js";import"./index.styled-443b1b6e.js";import"./isProduction-abb13bd7.js";import"./utils-5e72a4b1.js";import"@mantine/core";import"styled-components";import"./index-acb3d02b.js";import"@mantine/carousel";import"@mantine/hooks";import"./theme-fe07cf04.js";import"./screenSizeContext-464da727.js";import"lodash/throttle";import"./gAssets.js";import"date-fns/locale";import"./Onboarding-5763ca04.js";import"./index-ef967cd2.js";import"dayjs";import"./useUniqueId-e1bf986b.js";import"./index-489698f2.js";import"./translationsContext-74811783.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/dates";import"lodash/debounce";import"./cookieHelper-6294a113.js";import"slugify";import"./index-8aeeb8b9.js";import"./useTranslations-2de41aac.js";import"./index-d29e6780.js";import"./constants-ea0f6529.js";import"./index-cbc21858.js";import"./useIsInit-18abd410.js";import"dayjs/plugin/relativeTime";
1
+ import"./tslib.es6-287085c8.js";import"react";import"./core-f5681c9f.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-9f285e04.js";import"./index-2801f113.js";import"./normalizeLink-4cf48bd4.js";import"./routing-0e2cb50e.js";import"./dataTransform-ffe381e3.js";import"./index.styled-938364f7.js";import"./isProduction-0a64196b.js";import"./index.styles-7434589b.js";import"@mantine/core";import"styled-components";import"./index-f6bcb648.js";import"@mantine/carousel";import"@mantine/hooks";import"./theme-72026c60.js";import"./screenSizeContext-bdf24fa6.js";import"lodash/throttle";import"./gAssets.js";import"date-fns/locale";import"./Onboarding-70785e8f.js";import"./index-4efeaafb.js";import"dayjs";import"./useUniqueId-581c6a48.js";import"./index-40d35a26.js";import"./translationsContext-1e2e6dff.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/dates";import"lodash/debounce";import"./cookieHelper-c3ac9f5c.js";import"slugify";import"./index-f8b70d7a.js";import"./useTranslations-3e20b105.js";import"./index-e0784192.js";import"./constants-124a0c69.js";import"./index-ba9bf2aa.js";import"./useIsInit-8d56ae19.js";import"dayjs/plugin/relativeTime";