@hhgtech/hhg-components 1.24.0 → 1.24.2

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/btnChoice/index.d.ts +14 -0
  5. package/build/components/atoms/btnChoice/index.styled.d.ts +1 -0
  6. package/build/components/atoms/icons/Alert.d.ts +4 -0
  7. package/build/components/atoms/index.d.ts +1 -0
  8. package/build/components/organisms/navigationV2/components/molecules/navigationBar/index.d.ts +2 -4
  9. package/build/components/organisms/navigationV2/hooks/useHeaderHeight.d.ts +1 -2
  10. package/build/components/organisms/navigationV2/types.d.ts +0 -3
  11. package/build/components.js +1 -1
  12. package/build/constants.js +1 -1
  13. package/build/core-55717f7f.js +1 -0
  14. package/build/{dataTransform-fcf0a572.js → dataTransform-7d7dfd7b.js} +1 -1
  15. package/build/esm/babyGrowth.js +10 -10
  16. package/build/esm/cache.js +1 -1
  17. package/build/esm/care.js +1 -1
  18. package/build/esm/components.js +1 -1
  19. package/build/esm/constants.js +1 -1
  20. package/build/esm/{core-8afe5a4d.js → core-d97def5a.js} +1 -1
  21. package/build/esm/{dataTransform-915aed8c.js → dataTransform-e55b0814.js} +1 -1
  22. package/build/esm/footer.js +1 -1
  23. package/build/esm/gAssets.js +1 -1
  24. package/build/esm/getDynamicHealthTool-9de77812.js +1 -0
  25. package/build/esm/{getSocialList-278ea87c.js → getSocialList-0f75623c.js} +1 -1
  26. package/build/esm/hooks.js +1 -1
  27. package/build/esm/i18n.js +1 -1
  28. package/build/esm/{index-d02e0f58.js → index-030cc7b1.js} +1 -1
  29. package/build/esm/{index-150d757e.js → index-171e03d4.js} +1 -1
  30. package/build/esm/{index-cb50aeb8.js → index-1e6b2f81.js} +11 -11
  31. package/build/esm/{index-a2e77867.js → index-273f0079.js} +1 -1
  32. package/build/esm/{index-f98bb958.js → index-352d3b93.js} +1 -1
  33. package/build/esm/{index-b5f6d798.js → index-6c89cda7.js} +1 -1
  34. package/build/esm/{index-653fcb30.js → index-7019d03b.js} +1 -1
  35. package/build/esm/{index-78cd9f91.js → index-70d1e740.js} +1 -1
  36. package/build/esm/{index-c4acfb04.js → index-71fbbcbb.js} +1 -1
  37. package/build/esm/index-76ebfd27.js +1 -0
  38. package/build/esm/index-7cca791b.js +1 -0
  39. package/build/esm/{index-fe31b09c.js → index-864cc721.js} +1 -1
  40. package/build/esm/{index-b5e35ec5.js → index-a336a1db.js} +1 -1
  41. package/build/esm/{index-364770a0.js → index-afb6d214.js} +1 -1
  42. package/build/esm/index-c02d1687.js +1 -0
  43. package/build/esm/{index-9d45815e.js → index-c229fe69.js} +1 -1
  44. package/build/esm/{index-7b6296d5.js → index-d7887904.js} +1 -1
  45. package/build/esm/{index-c9e0a1b5.js → index-d982759f.js} +1 -1
  46. package/build/esm/{index-05542543.js → index-db529e55.js} +1 -1
  47. package/build/esm/index-f2cd27c4.js +1 -0
  48. package/build/esm/index-fd984d2c.js +1 -0
  49. package/build/esm/index.css +1 -1
  50. package/build/esm/index.js +1 -1
  51. package/build/esm/{index.styled-2465841d.js → index.styled-1c51dd30.js} +1 -1
  52. package/build/esm/{index.styled-6b6e612e.js → index.styled-35a637ea.js} +1 -1
  53. package/build/esm/{index.styled-67c29a17.js → index.styled-3b400a96.js} +184 -184
  54. package/build/esm/{index.styled-7f0b774b.js → index.styled-6d1d56fb.js} +1 -1
  55. package/build/esm/{index.styled-6abf9e6a.js → index.styled-af078e75.js} +3 -3
  56. package/build/esm/{index.styled-c65f9df8.js → index.styled-f34f5ba2.js} +1 -1
  57. package/build/esm/lead.js +1 -1
  58. package/build/esm/mantine.js +1 -1
  59. package/build/esm/misc.js +1 -1
  60. package/build/esm/navigation.js +1 -1
  61. package/build/esm/onboarding.js +1 -1
  62. package/build/esm/pwg.js +5 -5
  63. package/build/esm/{routing-e4b4ee8f.js → routing-fee735f1.js} +1 -1
  64. package/build/esm/{screenSizeContext-b29efdb0.js → screenSizeContext-0691e053.js} +3 -3
  65. package/build/esm/together.js +1 -1
  66. package/build/esm/translationsContext-09bd8a0a.js +1 -0
  67. package/build/esm/translationsProvider-fdde2ea4.js +1 -0
  68. package/build/esm/{types-978544c0.js → types-cf6feba2.js} +138 -109
  69. package/build/esm/{types-d532ba8d.js → types-d546f58d.js} +37 -37
  70. package/build/esm/types.js +1 -1
  71. package/build/esm/useHealthToolCache-b2135a6e.js +1 -0
  72. package/build/esm/{useRafState-a50dc032.js → useRafState-fa9e17cf.js} +1 -1
  73. package/build/esm/useTranslations-c60222d8.js +1 -0
  74. package/build/footer.js +1 -1
  75. package/build/gAssets.js +1 -1
  76. package/build/{getDynamicHealthTool-e361a825.js → getDynamicHealthTool-6f1b87dc.js} +1 -1
  77. package/build/{getSocialList-e0fa1cc8.js → getSocialList-b540fa59.js} +1 -1
  78. package/build/hooks.js +1 -1
  79. package/build/i18n.js +1 -1
  80. package/build/{index-c8db56b7.js → index-00e9a05d.js} +1 -1
  81. package/build/{index-8a6a7cc0.js → index-07ac5cf6.js} +1 -1
  82. package/build/{index-f9086275.js → index-07fc4aa9.js} +1 -1
  83. package/build/index-1d5bc9a9.js +1 -0
  84. package/build/{index-f8b86c53.js → index-37acc28e.js} +1 -1
  85. package/build/{index-e98fdd8c.js → index-3c60268a.js} +1 -1
  86. package/build/{index-94d7557e.js → index-55e7dac6.js} +1 -1
  87. package/build/{index-b6acdcae.js → index-5d0307d4.js} +1 -1
  88. package/build/index-69b752ee.js +1 -0
  89. package/build/{index-af3b3f09.js → index-6bc8a1d7.js} +1 -1
  90. package/build/index-744499b6.js +1 -0
  91. package/build/{index-9152ca1d.js → index-78bcfd75.js} +1 -1
  92. package/build/{index-d8eec019.js → index-ad989db4.js} +1 -1
  93. package/build/{index-2cbdb4bf.js → index-aeaff848.js} +1 -1
  94. package/build/{index-a1d07633.js → index-b1fe162d.js} +1 -1
  95. package/build/index-b74a0a20.js +1 -0
  96. package/build/{index-8f5c7ee3.js → index-c862c9d0.js} +1 -1
  97. package/build/{index-aa3c9ce0.js → index-c89bc9a0.js} +1 -1
  98. package/build/{index-11f0284b.js → index-cd544a17.js} +5 -5
  99. package/build/index-e3995411.js +1 -0
  100. package/build/{index-2b30377d.js → index-f05edeb7.js} +1 -1
  101. package/build/index.css +1 -1
  102. package/build/index.js +1 -1
  103. package/build/{index.styled-6e461cdf.js → index.styled-28176c86.js} +4 -4
  104. package/build/{index.styled-642f11f7.js → index.styled-535158ec.js} +1 -1
  105. package/build/{index.styled-e3aa6f73.js → index.styled-5f8e0c73.js} +4 -4
  106. package/build/{index.styled-805b1f85.js → index.styled-8f370fc4.js} +1 -1
  107. package/build/{index.styled-eb8f4b1e.js → index.styled-aa328234.js} +216 -216
  108. package/build/{index.styled-6ff0df3f.js → index.styled-daea52dd.js} +1 -1
  109. package/build/lead.js +1 -1
  110. package/build/mantine.js +1 -1
  111. package/build/misc.js +1 -1
  112. package/build/navigation.js +1 -1
  113. package/build/onboarding.js +1 -1
  114. package/build/pwg.js +1 -1
  115. package/build/{routing-72b2705b.js → routing-642ddf54.js} +1 -1
  116. package/build/{screenSizeContext-aa77f70a.js → screenSizeContext-ecfa4789.js} +10 -10
  117. package/build/together/components/molecules/cardAuthor/index.d.ts +1 -1
  118. package/build/together/components/molecules/createNewPostContent/index.styled.d.ts +2 -0
  119. package/build/together/components/molecules/profileDetail/index.d.ts +2 -2
  120. package/build/together/components/molecules/profileDetailModal/index.d.ts +2 -2
  121. package/build/together.js +1 -1
  122. package/build/translationsContext-868e45b8.js +1 -0
  123. package/build/translationsProvider-85371058.js +1 -0
  124. package/build/{types-02e3f27e.js → types-1e06826e.js} +111 -82
  125. package/build/{types-8aaea47a.js → types-a34e3598.js} +1 -1
  126. package/build/types.js +1 -1
  127. package/build/useHealthToolCache-04541130.js +1 -0
  128. package/build/{useRafState-012ffb1f.js → useRafState-92aca2e1.js} +1 -1
  129. package/build/useTranslations-5adcd9d0.js +1 -0
  130. package/package.json +1 -4
  131. package/build/core-b2fe46dd.js +0 -1
  132. package/build/ecom.js +0 -1
  133. package/build/esm/ecom.js +0 -1
  134. package/build/esm/getDynamicHealthTool-5bc53bc9.js +0 -1
  135. package/build/esm/index-18a9e3fb.js +0 -1
  136. package/build/esm/index-21b4181b.js +0 -1
  137. package/build/esm/index-2c15a988.js +0 -1
  138. package/build/esm/index-5923c954.js +0 -1
  139. package/build/esm/index-5a00107b.js +0 -1
  140. package/build/esm/translationsContext-fc21efad.js +0 -1
  141. package/build/esm/translationsProvider-84f592ea.js +0 -1
  142. package/build/esm/types-2bbcf540.js +0 -1
  143. package/build/esm/useHealthToolCache-23715185.js +0 -1
  144. package/build/esm/useTranslations-7f736d5f.js +0 -1
  145. package/build/index-0207c31b.js +0 -1
  146. package/build/index-2d563c87.js +0 -1
  147. package/build/index-635e21cc.js +0 -1
  148. package/build/index-a83a062e.js +0 -1
  149. package/build/index-b4ea7a21.js +0 -1
  150. package/build/translationsContext-c77a479e.js +0 -1
  151. package/build/translationsProvider-631b95ce.js +0 -1
  152. package/build/types-5a9b3c87.js +0 -1
  153. package/build/useHealthToolCache-7f3b83ae.js +0 -1
  154. package/build/useTranslations-fa071ccf.js +0 -1
  155. /package/build/{BMI_BOYS.percentile.monthly-49a7e033.js → BMI_BOYS.percentile.monthly-408e9bfb.js} +0 -0
  156. /package/build/{BMI_BOYS.percentile.weekly-c3647a26.js → BMI_BOYS.percentile.weekly-b1338b89.js} +0 -0
  157. /package/build/{BMI_BOYS.percentile.yearly-b182554a.js → BMI_BOYS.percentile.yearly-7fc9c0f2.js} +0 -0
  158. /package/build/{BMI_BOYS.zscore.monthly-6e49f68e.js → BMI_BOYS.zscore.monthly-562acf5b.js} +0 -0
  159. /package/build/{BMI_BOYS.zscore.weekly-473f821a.js → BMI_BOYS.zscore.weekly-2992bead.js} +0 -0
  160. /package/build/{BMI_BOYS.zscore.yearly-91a7ef2e.js → BMI_BOYS.zscore.yearly-25989859.js} +0 -0
  161. /package/build/{BMI_GIRLS.percentile.monthly-489e52dc.js → BMI_GIRLS.percentile.monthly-372b23a7.js} +0 -0
  162. /package/build/{BMI_GIRLS.percentile.weekly-232aa9fd.js → BMI_GIRLS.percentile.weekly-043fc58d.js} +0 -0
  163. /package/build/{BMI_GIRLS.percentile.yearly-fe7db447.js → BMI_GIRLS.percentile.yearly-02746f0c.js} +0 -0
  164. /package/build/{BMI_GIRLS.zscore.monthly-1eeee735.js → BMI_GIRLS.zscore.monthly-e42373ee.js} +0 -0
  165. /package/build/{BMI_GIRLS.zscore.weekly-27ad267f.js → BMI_GIRLS.zscore.weekly-f78a8ed7.js} +0 -0
  166. /package/build/{BMI_GIRLS.zscore.yearly-ddb674d8.js → BMI_GIRLS.zscore.yearly-ce57ddaa.js} +0 -0
  167. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-0a67b15b.js → HEAD CIRCUM_BOYS.percentile.monthly-6497a435.js} +0 -0
  168. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-7ef9f7a7.js → HEAD CIRCUM_BOYS.percentile.weekly-f4d16b6b.js} +0 -0
  169. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-22d0bdda.js → HEAD CIRCUM_BOYS.percentile.yearly-e9f1053e.js} +0 -0
  170. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-d07fa700.js → HEAD CIRCUM_BOYS.zscore.monthly-9eb54ede.js} +0 -0
  171. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-85731a7c.js → HEAD CIRCUM_BOYS.zscore.weekly-6024679c.js} +0 -0
  172. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-3dbc3d23.js → HEAD CIRCUM_BOYS.zscore.yearly-18bc54c7.js} +0 -0
  173. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-9c94c219.js → HEAD CIRCUM_GIRLS.percentile.monthly-92a1d587.js} +0 -0
  174. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-3d6afa9f.js → HEAD CIRCUM_GIRLS.percentile.weekly-9a2f99b4.js} +0 -0
  175. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-23f85bb3.js → HEAD CIRCUM_GIRLS.percentile.yearly-cd3bac4c.js} +0 -0
  176. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-9e2e4574.js → HEAD CIRCUM_GIRLS.zscore.monthly-785c4345.js} +0 -0
  177. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-970f3868.js → HEAD CIRCUM_GIRLS.zscore.weekly-fc781271.js} +0 -0
  178. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-5f91a7be.js → HEAD CIRCUM_GIRLS.zscore.yearly-d949e9d9.js} +0 -0
  179. /package/build/{HEIGHT_BOYS.percentile.monthly-fc85d952.js → HEIGHT_BOYS.percentile.monthly-78db1423.js} +0 -0
  180. /package/build/{HEIGHT_BOYS.percentile.weekly-f90cdf3c.js → HEIGHT_BOYS.percentile.weekly-d99a4dd3.js} +0 -0
  181. /package/build/{HEIGHT_BOYS.percentile.yearly-69d74ff2.js → HEIGHT_BOYS.percentile.yearly-a016bff4.js} +0 -0
  182. /package/build/{HEIGHT_BOYS.zscore.monthly-c4c6ec23.js → HEIGHT_BOYS.zscore.monthly-68b17fbc.js} +0 -0
  183. /package/build/{HEIGHT_BOYS.zscore.weekly-5e246b85.js → HEIGHT_BOYS.zscore.weekly-b2b23fe2.js} +0 -0
  184. /package/build/{HEIGHT_BOYS.zscore.yearly-a9a6c560.js → HEIGHT_BOYS.zscore.yearly-88edb0de.js} +0 -0
  185. /package/build/{HEIGHT_GIRLS.percentile.monthly-ad9e6190.js → HEIGHT_GIRLS.percentile.monthly-7a15712d.js} +0 -0
  186. /package/build/{HEIGHT_GIRLS.percentile.weekly-6ad975ae.js → HEIGHT_GIRLS.percentile.weekly-4d75130f.js} +0 -0
  187. /package/build/{HEIGHT_GIRLS.percentile.yearly-a5be7a5c.js → HEIGHT_GIRLS.percentile.yearly-b32b2c80.js} +0 -0
  188. /package/build/{HEIGHT_GIRLS.zscore.monthly-8be73103.js → HEIGHT_GIRLS.zscore.monthly-68dbca9d.js} +0 -0
  189. /package/build/{HEIGHT_GIRLS.zscore.weekly-9e844863.js → HEIGHT_GIRLS.zscore.weekly-dcd2a433.js} +0 -0
  190. /package/build/{HEIGHT_GIRLS.zscore.yearly-3794c302.js → HEIGHT_GIRLS.zscore.yearly-8ead4def.js} +0 -0
  191. /package/build/{Locale-0c6090ac.js → Locale-7e3ca7c0.js} +0 -0
  192. /package/build/{Visible-5cc9afc6.js → Visible-40a679de.js} +0 -0
  193. /package/build/{WEIGHT_BOYS.percentile.monthly-ec4e917a.js → WEIGHT_BOYS.percentile.monthly-c8e73018.js} +0 -0
  194. /package/build/{WEIGHT_BOYS.percentile.weekly-cf18e9d9.js → WEIGHT_BOYS.percentile.weekly-4ff120fe.js} +0 -0
  195. /package/build/{WEIGHT_BOYS.percentile.yearly-0d17cbec.js → WEIGHT_BOYS.percentile.yearly-024d65dc.js} +0 -0
  196. /package/build/{WEIGHT_BOYS.zscore.monthly-8055934c.js → WEIGHT_BOYS.zscore.monthly-83ee5d94.js} +0 -0
  197. /package/build/{WEIGHT_BOYS.zscore.weekly-42499533.js → WEIGHT_BOYS.zscore.weekly-ed1a1cb0.js} +0 -0
  198. /package/build/{WEIGHT_BOYS.zscore.yearly-f566a157.js → WEIGHT_BOYS.zscore.yearly-5ed420de.js} +0 -0
  199. /package/build/{WEIGHT_GIRLS.percentile.monthly-378ceed4.js → WEIGHT_GIRLS.percentile.monthly-e899d07a.js} +0 -0
  200. /package/build/{WEIGHT_GIRLS.percentile.weekly-097016f4.js → WEIGHT_GIRLS.percentile.weekly-1f04c49b.js} +0 -0
  201. /package/build/{WEIGHT_GIRLS.percentile.yearly-b8cab7d6.js → WEIGHT_GIRLS.percentile.yearly-4b99678e.js} +0 -0
  202. /package/build/{WEIGHT_GIRLS.zscore.monthly-18e50eb6.js → WEIGHT_GIRLS.zscore.monthly-e3cdbd8f.js} +0 -0
  203. /package/build/{WEIGHT_GIRLS.zscore.weekly-07eb577d.js → WEIGHT_GIRLS.zscore.weekly-3b813b48.js} +0 -0
  204. /package/build/{WEIGHT_GIRLS.zscore.yearly-61d9aba2.js → WEIGHT_GIRLS.zscore.yearly-79c89092.js} +0 -0
  205. /package/build/{constants-c4903a50.js → constants-e21f0b46.js} +0 -0
  206. /package/build/{cookieHelper-9f080637.js → cookieHelper-eb98abd2.js} +0 -0
  207. /package/build/{dataTransform-a110e001.js → dataTransform-ecea3c17.js} +0 -0
  208. /package/build/esm/{BMI_BOYS.percentile.monthly-6162dbd1.js → BMI_BOYS.percentile.monthly-ccb640ac.js} +0 -0
  209. /package/build/esm/{BMI_BOYS.percentile.weekly-ff0abf39.js → BMI_BOYS.percentile.weekly-243ea33f.js} +0 -0
  210. /package/build/esm/{BMI_BOYS.percentile.yearly-0a5cbf88.js → BMI_BOYS.percentile.yearly-3025f53c.js} +0 -0
  211. /package/build/esm/{BMI_BOYS.zscore.monthly-3bb589cb.js → BMI_BOYS.zscore.monthly-de6806cb.js} +0 -0
  212. /package/build/esm/{BMI_BOYS.zscore.weekly-f5d0d55b.js → BMI_BOYS.zscore.weekly-3ebca6d8.js} +0 -0
  213. /package/build/esm/{BMI_BOYS.zscore.yearly-168bb8ab.js → BMI_BOYS.zscore.yearly-058fcd00.js} +0 -0
  214. /package/build/esm/{BMI_GIRLS.percentile.monthly-1bf2c569.js → BMI_GIRLS.percentile.monthly-23065930.js} +0 -0
  215. /package/build/esm/{BMI_GIRLS.percentile.weekly-fb2f3e86.js → BMI_GIRLS.percentile.weekly-69dab4c2.js} +0 -0
  216. /package/build/esm/{BMI_GIRLS.percentile.yearly-506acc36.js → BMI_GIRLS.percentile.yearly-71c947c1.js} +0 -0
  217. /package/build/esm/{BMI_GIRLS.zscore.monthly-b64e0a5b.js → BMI_GIRLS.zscore.monthly-422e2c2d.js} +0 -0
  218. /package/build/esm/{BMI_GIRLS.zscore.weekly-f1a9c248.js → BMI_GIRLS.zscore.weekly-49e5a406.js} +0 -0
  219. /package/build/esm/{BMI_GIRLS.zscore.yearly-eff14fa8.js → BMI_GIRLS.zscore.yearly-41e2debf.js} +0 -0
  220. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-4b557dea.js → HEAD CIRCUM_BOYS.percentile.monthly-554c5e16.js} +0 -0
  221. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-d301205d.js → HEAD CIRCUM_BOYS.percentile.weekly-c491131c.js} +0 -0
  222. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-cbf0239b.js → HEAD CIRCUM_BOYS.percentile.yearly-0e7c4a87.js} +0 -0
  223. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-1e472bf5.js → HEAD CIRCUM_BOYS.zscore.monthly-41dc5963.js} +0 -0
  224. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-5fc4fbf2.js → HEAD CIRCUM_BOYS.zscore.weekly-373afb27.js} +0 -0
  225. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-7fd04beb.js → HEAD CIRCUM_BOYS.zscore.yearly-098586af.js} +0 -0
  226. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-0af48708.js → HEAD CIRCUM_GIRLS.percentile.monthly-47e01731.js} +0 -0
  227. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-d6b698bd.js → HEAD CIRCUM_GIRLS.percentile.weekly-45b42b11.js} +0 -0
  228. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-f7b231b7.js → HEAD CIRCUM_GIRLS.percentile.yearly-c82a6323.js} +0 -0
  229. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-83186826.js → HEAD CIRCUM_GIRLS.zscore.monthly-34267000.js} +0 -0
  230. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-c0791949.js → HEAD CIRCUM_GIRLS.zscore.weekly-ba0d45ac.js} +0 -0
  231. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-dfa2a71e.js → HEAD CIRCUM_GIRLS.zscore.yearly-a1e21860.js} +0 -0
  232. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-b39865ac.js → HEIGHT_BOYS.percentile.monthly-a491bca8.js} +0 -0
  233. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-df5a99f1.js → HEIGHT_BOYS.percentile.weekly-a9fb125c.js} +0 -0
  234. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-7e0b7ed8.js → HEIGHT_BOYS.percentile.yearly-970004f1.js} +0 -0
  235. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-559b4b5d.js → HEIGHT_BOYS.zscore.monthly-9ba44c43.js} +0 -0
  236. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-544455a6.js → HEIGHT_BOYS.zscore.weekly-fa4808db.js} +0 -0
  237. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-81690a5c.js → HEIGHT_BOYS.zscore.yearly-2c9a7833.js} +0 -0
  238. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-4fa737ad.js → HEIGHT_GIRLS.percentile.monthly-e63f7ca7.js} +0 -0
  239. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-2c85d07d.js → HEIGHT_GIRLS.percentile.weekly-2d8f517c.js} +0 -0
  240. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-1b366b28.js → HEIGHT_GIRLS.percentile.yearly-a4eff434.js} +0 -0
  241. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-d26f368c.js → HEIGHT_GIRLS.zscore.monthly-311441d6.js} +0 -0
  242. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-5e356b98.js → HEIGHT_GIRLS.zscore.weekly-b56b9668.js} +0 -0
  243. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-82c23bb8.js → HEIGHT_GIRLS.zscore.yearly-81032535.js} +0 -0
  244. /package/build/esm/{Locale-00425d00.js → Locale-eb5c1404.js} +0 -0
  245. /package/build/esm/{Visible-7eca30b5.js → Visible-07795e71.js} +0 -0
  246. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b4bf9069.js → WEIGHT_BOYS.percentile.monthly-b973b1f6.js} +0 -0
  247. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-28cf566c.js → WEIGHT_BOYS.percentile.weekly-89ab2311.js} +0 -0
  248. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-22454f28.js → WEIGHT_BOYS.percentile.yearly-e265fc63.js} +0 -0
  249. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-7c5c813b.js → WEIGHT_BOYS.zscore.monthly-168a8b46.js} +0 -0
  250. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-58a385f6.js → WEIGHT_BOYS.zscore.weekly-064b321a.js} +0 -0
  251. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-e4806377.js → WEIGHT_BOYS.zscore.yearly-cf73c6ef.js} +0 -0
  252. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-26c96203.js → WEIGHT_GIRLS.percentile.monthly-1d67cf72.js} +0 -0
  253. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-a75e2e5b.js → WEIGHT_GIRLS.percentile.weekly-8634c492.js} +0 -0
  254. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-08ff921c.js → WEIGHT_GIRLS.percentile.yearly-7f59e5a6.js} +0 -0
  255. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-88a3e7cd.js → WEIGHT_GIRLS.zscore.monthly-bc4a7445.js} +0 -0
  256. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-e5bfd844.js → WEIGHT_GIRLS.zscore.weekly-b75b3937.js} +0 -0
  257. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-547bc55e.js → WEIGHT_GIRLS.zscore.yearly-8f9f6975.js} +0 -0
  258. /package/build/esm/{constants-d1288784.js → constants-f12d28db.js} +0 -0
  259. /package/build/esm/{cookieHelper-e007aa92.js → cookieHelper-ba549449.js} +0 -0
  260. /package/build/esm/{dataTransform-2fba1b2c.js → dataTransform-7d0b1f4d.js} +0 -0
  261. /package/build/esm/{index-87ee0d76.js → index-cd32035c.js} +0 -0
  262. /package/build/esm/{isProduction-fab10892.js → isProduction-ce48b119.js} +0 -0
  263. /package/build/esm/{localizeNumberFormat-0724d25a.js → localizeNumberFormat-f270c7a8.js} +0 -0
  264. /package/build/esm/{normalizeLink-2ec03ba7.js → normalizeLink-e5f38f0b.js} +0 -0
  265. /package/build/esm/{theme-a631c5ab.js → theme-8c9da911.js} +0 -0
  266. /package/build/esm/{tslib.es6-0039c19c.js → tslib.es6-096e3330.js} +0 -0
  267. /package/build/esm/{useIsInit-e1781437.js → useIsInit-30a401da.js} +0 -0
  268. /package/build/esm/{useOutsideClick-68a3714e.js → useOutsideClick-e971e2dc.js} +0 -0
  269. /package/build/esm/{useScrollbarSize-3d17e421.js → useScrollbarSize-2bea8fa8.js} +0 -0
  270. /package/build/esm/{useUniqueId-818c7708.js → useUniqueId-82da9bb3.js} +0 -0
  271. /package/build/esm/{utils-7ce226e8.js → utils-7ad4d5e8.js} +0 -0
  272. /package/build/{index-0cad5f1b.js → index-2623bfbf.js} +0 -0
  273. /package/build/{isProduction-e392487d.js → isProduction-c0ec86cc.js} +0 -0
  274. /package/build/{localizeNumberFormat-eda96ba2.js → localizeNumberFormat-f4659ed4.js} +0 -0
  275. /package/build/{normalizeLink-62e8417c.js → normalizeLink-ab43a7d0.js} +0 -0
  276. /package/build/{theme-9a2f5576.js → theme-2b0363d3.js} +0 -0
  277. /package/build/{tslib.es6-c8b5aa16.js → tslib.es6-82190b70.js} +0 -0
  278. /package/build/{useIsInit-e8b04977.js → useIsInit-f6c093d8.js} +0 -0
  279. /package/build/{useOutsideClick-f11e7192.js → useOutsideClick-68d7e1cf.js} +0 -0
  280. /package/build/{useScrollbarSize-328d9797.js → useScrollbarSize-2f42f4b3.js} +0 -0
  281. /package/build/{useUniqueId-5a393d9b.js → useUniqueId-a7bc500a.js} +0 -0
  282. /package/build/{utils-d98a0819.js → utils-196545e2.js} +0 -0
@@ -1,4 +1,4 @@
1
- import e from"react";import{M as t}from"./utils-7ce226e8.js";import o from"styled-components";var i="DjBFAbd";const a=({children:t,className:o,style:a,htmlFor:s,size:r})=>e.createElement("label",{"data-size":r,className:`${i} ${o||""}`,style:a,htmlFor:s},t),s=o.div`
1
+ import e from"react";import{M as t}from"./utils-7ad4d5e8.js";import o from"styled-components";var i="DjBFAbd";const a=({children:t,className:o,style:a,htmlFor:s,size:r})=>e.createElement("label",{"data-size":r,className:`${i} ${o||""}`,style:a,htmlFor:s},t),s=o.div`
2
2
  position: relative;
3
3
  width: 100%;
4
4
 
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./tslib.es6-0039c19c.js";import o,{useMemo as i}from"react";import{L as r}from"./Locale-00425d00.js";import{CommonGAssets as t}from"./gAssets.js";import{t as n}from"./theme-a631c5ab.js";import{T as s}from"./index-7b6296d5.js";import l from"styled-components";import{C as c}from"./index-c9e0a1b5.js";const a=l.div`
1
+ import{_ as e}from"./tslib.es6-096e3330.js";import o,{useMemo as i}from"react";import{L as r}from"./Locale-eb5c1404.js";import{CommonGAssets as t}from"./gAssets.js";import{t as n}from"./theme-8c9da911.js";import{T as s}from"./index-d7887904.js";import l from"styled-components";import{C as c}from"./index-d982759f.js";const a=l.div`
2
2
  display: inline-flex;
3
3
  overflow: hidden;
4
4
  width: ${e=>e.size}px;
@@ -14,7 +14,7 @@ import{_ as e}from"./tslib.es6-0039c19c.js";import o,{useMemo as i}from"react";i
14
14
  width: ${e=>e.iconSize}px;
15
15
  height: ${e=>e.iconSize}px;
16
16
  }
17
- `,p=l.div`
17
+ `,d=l.div`
18
18
  display: inline-block;
19
19
  height: 108px;
20
20
  background-color: ${e=>e.theme.colors.white};
@@ -36,7 +36,7 @@ import{_ as e}from"./tslib.es6-0039c19c.js";import o,{useMemo as i}from"react";i
36
36
  & > * {
37
37
  pointer-events: none;
38
38
  }
39
- `,d=[r.Myanmar,r.Taiwan],m=l((r=>{var{icon:l,name:c,className:m,locale:g="en-PH",onSelect:x}=r,b=e(r,["icon","name","className","locale","onSelect"]);const h=i((()=>null==m?void 0:m.includes("selected-week-pill")),[m]);return o.createElement(p,Object.assign({onClick:x,className:m?"week-pill".concat(" non-pointer-event-child ",m):"week-pill non-pointer-event-child"},b),o.createElement(a,{size:64,iconSize:40,backgroundColor:n.colors.white},o.createElement("img",{src:l||t.getAssetPath("week_default.png"),alt:""})),h?o.createElement(s,Object.assign({type:"semiBold",size:"n1",color:n.colors.gray800},d.includes(g)&&{style:{fontSize:"10px"}}),c):o.createElement(s,Object.assign({size:"n1",color:n.colors.gray600},d.includes(g)&&{style:{fontSize:"10px"}}),c))}))`
39
+ `,p=[r.Myanmar,r.Taiwan],m=l((r=>{var{icon:l,name:c,className:m,locale:g="en-PH",onSelect:x}=r,b=e(r,["icon","name","className","locale","onSelect"]);const h=i((()=>null==m?void 0:m.includes("selected-week-pill")),[m]);return o.createElement(d,Object.assign({onClick:x,className:m?"week-pill".concat(" non-pointer-event-child ",m):"week-pill non-pointer-event-child"},b),o.createElement(a,{size:64,iconSize:40,backgroundColor:n.colors.white},o.createElement("img",{src:l||t.getAssetPath("week_default.png"),alt:""})),h?o.createElement(s,Object.assign({type:"semiBold",size:"n1",color:n.colors.gray800},p.includes(g)&&{style:{fontSize:"10px"}}),c):o.createElement(s,Object.assign({size:"n1",color:n.colors.gray600},p.includes(g)&&{style:{fontSize:"10px"}}),c))}))`
40
40
  box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
41
41
  `,g=l(c.Slide)``,x=l(c)`
42
42
  .centerred-pill-wrapper {
@@ -1,4 +1,4 @@
1
- import{M as e}from"./utils-7ce226e8.js";import t from"styled-components";import{t as i}from"./theme-a631c5ab.js";import{B as o}from"./index.styled-6b6e612e.js";import a,{useMemo as r,createContext as n,useState as l,useEffect as s,memo as p,useContext as d}from"react";import{u as c}from"./useTranslations-7f736d5f.js";import{CommonGAssets as m}from"./gAssets.js";import{a as g,_ as h}from"./tslib.es6-0039c19c.js";import{C as u,a as b,T as x,d as f}from"./index-d02e0f58.js";import{g as y}from"./cookieHelper-e007aa92.js";import _ from"slugify";import v from"string-format";import{g as w,a as E,b as T,c as O}from"./routing-e4b4ee8f.js";import A from"dayjs";import I from"dayjs/plugin/relativeTime";const L=t.div`
1
+ import{M as e}from"./utils-7ad4d5e8.js";import t from"styled-components";import{t as i}from"./theme-8c9da911.js";import{B as o}from"./index.styled-35a637ea.js";import a,{useMemo as r,createContext as n,useState as l,useEffect as s,memo as p,useContext as d}from"react";import{u as c}from"./useTranslations-c60222d8.js";import{CommonGAssets as m}from"./gAssets.js";import{a as g,_ as h}from"./tslib.es6-096e3330.js";import{C as u,a as b,T as x,d as f}from"./index-030cc7b1.js";import{g as y}from"./cookieHelper-ba549449.js";import _ from"slugify";import v from"string-format";import{g as w,a as E,b as T,c as O}from"./routing-fee735f1.js";import A from"dayjs";import I from"dayjs/plugin/relativeTime";const L=t.div`
2
2
  position: fixed;
3
3
  left: 50%;
4
4
 
package/build/esm/lead.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t}from"./tslib.es6-0039c19c.js";import a,{createContext as l,useMemo as n,useRef as o,useState as i,useEffect as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-fc21efad.js";import{g as u,s as p}from"./cookieHelper-e007aa92.js";import{b as h,a as g}from"./utils-7ce226e8.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-7f736d5f.js";import{H as f}from"./index.styled-6b6e612e.js";import{B as y}from"./index-f98bb958.js";import{CommonGAssets as k}from"./gAssets.js";import"./index.styled-7f0b774b.js";import"./index-05542543.js";import"@mantine/core";import"./index.styled-2465841d.js";import"string-format";import"./index-87ee0d76.js";import"./index.styled-67c29a17.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-c65f9df8.js";import"./index-a2e77867.js";import"lodash/throttle";import"keen-slider/react";import"./index-d02e0f58.js";import _ from"dayjs";import"./types-2bbcf540.js";import"@mantine/hooks";import{I as E,N as w}from"./index-150d757e.js";import"react-hook-form";import"./isProduction-fab10892.js";import"./Locale-00425d00.js";import"./screenSizeContext-b29efdb0.js";import"styled-components";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-6abf9e6a.js";import"@mantine/dates";import{R as C,j as N,D as S,e as T}from"./index-9d45815e.js";import{S as x}from"./index-364770a0.js";import{M as O}from"./index-cb50aeb8.js";import{createFormContext as j}from"@mantine/form";import"./index-c9e0a1b5.js";import"yup";import{T as P}from"./index-7b6296d5.js";import{t as B}from"./theme-a631c5ab.js";import"./index-78cd9f91.js";import"./index-fe31b09c.js";import"@hookform/resolvers/yup";import"./index-b5f6d798.js";import"./index-653fcb30.js";import"slugify";import"./routing-e4b4ee8f.js";import"dayjs/plugin/relativeTime";import"./useScrollbarSize-3d17e421.js";import"./useUniqueId-818c7708.js";import"@mantine/carousel";import"./Visible-7eca30b5.js";const L={LINKS:1,TAGS:2};let I="https://dev.leadgen.hellobacsi.com/";const A={MOBILE:1,DESKTOP:2};let $="";I.includes("localhost")&&(I="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&($="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const H={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var R={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":R,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":R},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),Y=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o}),a.createElement("img",{className:"le-only-desktop",src:n})),a.createElement(q,{onClose:i,containerClassName:"close-button-top-right"})))),J=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"}))))),z=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover"}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${$}`},r)))));const K=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},G={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},Z=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),G.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},ee=({phone:e})=>G.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),te=({phone:e,otp:t})=>G.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),ae={email:{},phone:{}},le=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ae[n][o]){if(ae[n][o].value)return i;if(!ae[n][o].value&&ae[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield Z({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield X({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ae[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),ne=({content:e,inlinePosition:t})=>{const a=n((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},oe=({content:e})=>{const t=n((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[ie,re,se]=j(),de="undefined"==typeof window,ce={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},me=(e="",a="",l="",n=500)=>{const[o,s]=i([]),[d,c]=i(!1);return r((()=>{let i;return e?i=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(de)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:ce[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),n):o.length&&s([]),()=>{window.clearTimeout(i)}}),[e,n,a]),{isLoading:d,predictions:o}},ue=["places"],pe=({name:e,placeholder:t,locale:l})=>{var s;const d=re(),[c,m]=i(""),[u,p]=i(""),{predictions:h}=me(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=i(null),[b,f]=i(!1),y=o(Math.random().toString(36).substring(7)),k=n((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return r((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?f(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{f(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:ue,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+y.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},he=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${$}`},e),ge=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${$}`},e),ve=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=re();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ge,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(he,{key:r,align:u},m);case"TextBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(E.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(T,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(pe,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(S,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(y,{type:"button",size:"md",className:`lead-modal__btn ${$}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(N.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(N,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(E,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(C.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(C,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},be=({phone:e,onSuccess:l,autoSendWhenOpen:n})=>{const{t:s}=b(),[d,c]=i(""),[m,u]=i(!1),[p,h]=i(0),g=o(null),[v,k]=i(),[_,w]=i(""),C=o();r((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield ee({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return r((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),r((()=>{n&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield te({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(f,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(P,{size:"p1",color:B.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(E,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(y,{size:"md",color:"primary",className:`lead-modal__btn ${$}`,disabled:!d},s("lead.otp.verify")),a.createElement(y,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${$}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},fe=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:f,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),j=x.submitBlock.data.url,P=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,I=location.pathname,A=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,H]=i(!0),[R,F]=i(""),W=o(),V=()=>{R?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;r((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ae.email={},ae.phone={}}),[]);const Y=o(!1),J=o(!1),{form:K,validateObj:G}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:i=[]})=>{const{t:r}=b(),s=n((()=>{const n=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],o=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?r("validator.required"):null==t?void 0:t(a)};return e.filter((e=>n.includes(e.name))).reduce(((e,n)=>"NumberBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Number(e)))return r("validator.number")}))}):"EmailBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return r("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{email:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===n.name||"PhoneOtpBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return r("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{phone:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Date.parse(e)))return r("validator.date")}))}):Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=se({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=o(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:Y,validatingEmailRef:J,campaignId:_,campaign_subot_id:E}),Q=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":I,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||""}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},f?a.createElement(z,{title:f.title,titleAlign:f.titleAlign,subtitle:f.subtitle,subtitleAlign:f.subtitleAlign,link:f.link,linkNewTab:f.linkNewTab,linkText:f.linkText,image:f.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:k.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:""}):null))),R&&a.createElement(be,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,K.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ie,{form:K},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),K.setTouched(Object.keys(G).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||Y.current||setTimeout((()=>{K.onSubmit((e=>{var t,a,l;if(!Object.keys(K.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${$}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${$}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ve,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${$}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${$}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>H(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:j||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(y,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${$}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(q,{onClose:V,containerClassName:"close-button-top-right"}))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?Q:"Sidebar"==h?a.createElement(oe,{content:Q}):h.includes("Inline")?a.createElement(ne,{content:Q,inlinePosition:t.popupInlinePosition}):null},ye=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname;return a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},ke=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n})),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))),_e=[],Ee=[],we=[];const Ce=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Ne=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Se=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Te=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Se(a),o=Se(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=H[i];return!(Ne(r).getTime()>o.getTime()&&(we.push(e),1))}(e):0===e.formatted_status&&(_e.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Se(l),i=Se(n);if(!o||!i)return!1;const r=H[a],s=Ne(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(Ee.push(e),!0)})(e));let xe=null;function Oe({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(je("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Te))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),je("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==A.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==A.DESKTOP)))),je("👓 campaignsDevice",c),je("--listCampaignScheduled",_e),je("--listCampaignScheduledToActivated",Ee),je("--listCampaignActiveButExpired",we);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const f=[...m,...b],y=document.cookie.split("; ").map((e=>e.split("=")[0])),k=y.filter((e=>e.includes("lead_submited")));je("--listCampaignCodeSubmited",k);const _=y.filter((e=>e.includes("lead_closed")));je("--listCampaignCodeClosed",_);const E=[...k,..._],w=f.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ce(w);if(je("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];je("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);je("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);je("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);je("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(je("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",je("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),xe&&clearTimeout(xe),xe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",je("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;je("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),je("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else je("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{je("Lead error: ",e)}))}const je=(...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 Pe=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);r((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:f,image:y,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=f,S=f.imageBlocks?JSON.parse(f.imageBlocks):{},T=JSON.parse(f.actionBlocks),x=JSON.parse(f.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const j={1:{},2:{},3:{}},P=o("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){je("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return je("⚡️ No META TAG for categoryLevel, not show popup",B),null;j[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),je("⚡️ Set categoryData ",B)}else je("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(je("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(je("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${f.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(je(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${f.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=j[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&je(e)})).catch((e=>{je("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(Y,{popupId:P.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:y,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(ke,{popupId:P.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:y,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(J,{popupId:P.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:y,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(fe,{popupId:P.current,extraFields:f,onClose:n,onOtherSubmit:L,imageMobile:y,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,j),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(ye,{popupId:P.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:y,imageDesktop:k,currentLayout:N}):null},Be=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var f;const y=o(),k=o(Date.now()),{apiUrl:E}=n((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[w,C]=i(null),[N,S]=i(""),[T,x]=i(null);r((()=>{K.apiLeadUrl=E,K.apiSubotUrl=v}),[E,v]);const O=(e,t)=>{C(e),S(t)},j=()=>{var e,t;if(!w)return;je(`👋👋👋 CLOSE POPUP ${w.code} 👋👋👋`);const a=Number(null===(e=w.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=w.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${w.code}`,`target_${w.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${E}api/campaign/${w.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),C(null),x(null)};r((()=>{if(window.next){const e=d((e=>{je("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;j(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?je("🔥 This URL page has show popup!"):(je("--Process checkShowPopup"),Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),y.current&&window.removeEventListener("scroll",y.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return r((()=>{w&&(k.current=Date.now())}),[w]),a.createElement(V.Provider,{value:{apiUrl:E,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(f=null==w?void 0:w.extra_fields)||void 0===f?void 0:f.popupVersion)&&a.createElement(Pe,{campaign:w,action:N,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;je("submitHandler",n,o);const f=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),y=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:f.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?_(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:y};n&&o[n].value_en&&(k.category=o[n].value_en);const C=Number((null===(i=null===(t=w.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),N=Number((null===(s=null===(r=w.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==N&&(je("⛔ Popup never show again!"),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==N&&(je(`⌛ Popup will show again after ${C} days!`),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,days:C,path:"/"})),fetch(`${E}api/campaign/${w.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==w.extra_fields.popupShowThankYou)return j(),void document.body.classList.remove("noscroll");let S=!0;const T=w.thank_you_image||`${E}admin/img/thanksyou.png`;let O,P,B=w.extra_fields.popupThankyouTitle||"Thank you.",L=w.extra_fields.popupThankyouDesc||"We appreciate your time!",I="",A="",$="";if("2.1"==w.extra_fields.popupVersion){const e=w.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",I=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",A=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",P=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,$=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=w.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(S=!1)}x(S?{title:B,titleAlign:I,subtitle:L,subtitleAlign:A,link:$,linkNewTab:P,linkText:O,image:T}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},f.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:j,showThankyou:T,locale:h})),g())))};export{Be as LeadGen};
1
+ import{_ as e,a as t}from"./tslib.es6-096e3330.js";import a,{createContext as l,useMemo as n,useRef as o,useState as i,useEffect as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-09bd8a0a.js";import{g as u,s as p}from"./cookieHelper-ba549449.js";import{b as h,a as g}from"./utils-7ad4d5e8.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-c60222d8.js";import{H as y}from"./index.styled-35a637ea.js";import{B as f}from"./index-352d3b93.js";import{CommonGAssets as k}from"./gAssets.js";import"./index.styled-6d1d56fb.js";import"./index-db529e55.js";import"@mantine/core";import"./index.styled-1c51dd30.js";import"string-format";import"./index-cd32035c.js";import"./index.styled-3b400a96.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-f34f5ba2.js";import"./index-273f0079.js";import"lodash/throttle";import"keen-slider/react";import"./index-030cc7b1.js";import _ from"dayjs";import"@mantine/hooks";import{I as E,N as w}from"./index-171e03d4.js";import"react-hook-form";import"./isProduction-ce48b119.js";import"./Locale-eb5c1404.js";import"./screenSizeContext-0691e053.js";import"styled-components";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-af078e75.js";import"@mantine/dates";import{R as C,j as N,D as S,e as T}from"./index-c229fe69.js";import{S as x}from"./index-afb6d214.js";import{M as O}from"./index-1e6b2f81.js";import{createFormContext as P}from"@mantine/form";import"./index-d982759f.js";import"yup";import{T as j}from"./index-d7887904.js";import{t as B}from"./theme-8c9da911.js";import"./index-70d1e740.js";import"./index-864cc721.js";import"@hookform/resolvers/yup";import"./index-6c89cda7.js";import"./index-7019d03b.js";import"slugify";import"./routing-fee735f1.js";import"dayjs/plugin/relativeTime";import"./useScrollbarSize-2bea8fa8.js";import"./useUniqueId-82da9bb3.js";import"@mantine/carousel";import"./Visible-07795e71.js";const L={LINKS:1,TAGS:2};let I="https://dev.leadgen.hellobacsi.com/";const A={MOBILE:1,DESKTOP:2};let $="";I.includes("localhost")&&(I="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&($="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const H={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var R={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":R,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":R},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),Y=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o}),a.createElement("img",{className:"le-only-desktop",src:n})),a.createElement(q,{onClose:i,containerClassName:"close-button-top-right"})))),J=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"}))))),z=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover"}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${$}`},r)))));const K=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},G={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},Z=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),G.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},ee=({phone:e})=>G.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),te=({phone:e,otp:t})=>G.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),ae={email:{},phone:{}},le=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ae[n][o]){if(ae[n][o].value)return i;if(!ae[n][o].value&&ae[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield Z({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield X({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ae[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),ne=({content:e,inlinePosition:t})=>{const a=n((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},oe=({content:e})=>{const t=n((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[ie,re,se]=P(),de="undefined"==typeof window,ce={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},me=(e="",a="",l="",n=500)=>{const[o,s]=i([]),[d,c]=i(!1);return r((()=>{let i;return e?i=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(de)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:ce[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),n):o.length&&s([]),()=>{window.clearTimeout(i)}}),[e,n,a]),{isLoading:d,predictions:o}},ue=["places"],pe=({name:e,placeholder:t,locale:l})=>{var s;const d=re(),[c,m]=i(""),[u,p]=i(""),{predictions:h}=me(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=i(null),[b,y]=i(!1),f=o(Math.random().toString(36).substring(7)),k=n((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return r((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:ue,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+f.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},he=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${$}`},e),ge=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${$}`},e),ve=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=re();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ge,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(he,{key:r,align:u},m);case"TextBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(E.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(T,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(pe,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(S,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(f,{type:"button",size:"md",className:`lead-modal__btn ${$}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(N.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(N,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(E,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(C.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(C,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},be=({phone:e,onSuccess:l,autoSendWhenOpen:n})=>{const{t:s}=b(),[d,c]=i(""),[m,u]=i(!1),[p,h]=i(0),g=o(null),[v,k]=i(),[_,w]=i(""),C=o();r((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield ee({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return r((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),r((()=>{n&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield te({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(y,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(j,{size:"p1",color:B.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(E,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(f,{size:"md",color:"primary",className:`lead-modal__btn ${$}`,disabled:!d},s("lead.otp.verify")),a.createElement(f,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${$}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},ye=({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:y,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),P=x.submitBlock.data.url,j=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,I=location.pathname,A=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,H]=i(!0),[R,F]=i(""),W=o(),V=()=>{R?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;r((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ae.email={},ae.phone={}}),[]);const Y=o(!1),J=o(!1),{form:K,validateObj:G}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:i=[]})=>{const{t:r}=b(),s=n((()=>{const n=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],o=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?r("validator.required"):null==t?void 0:t(a)};return e.filter((e=>n.includes(e.name))).reduce(((e,n)=>"NumberBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Number(e)))return r("validator.number")}))}):"EmailBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return r("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{email:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===n.name||"PhoneOtpBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return r("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{phone:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Date.parse(e)))return r("validator.date")}))}):Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=se({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=o(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:Y,validatingEmailRef:J,campaignId:_,campaign_subot_id:E}),Q=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":I,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||""}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},y?a.createElement(z,{title:y.title,titleAlign:y.titleAlign,subtitle:y.subtitle,subtitleAlign:y.subtitleAlign,link:y.link,linkNewTab:y.linkNewTab,linkText:y.linkText,image:y.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:k.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:""}):null))),R&&a.createElement(be,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,K.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ie,{form:K},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),K.setTouched(Object.keys(G).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||Y.current||setTimeout((()=>{K.onSubmit((e=>{var t,a,l;if(!Object.keys(K.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${$}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${$}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ve,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${$}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${$}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>H(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},j," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:P||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(f,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${$}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(q,{onClose:V,containerClassName:"close-button-top-right"}))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?Q:"Sidebar"==h?a.createElement(oe,{content:Q}):h.includes("Inline")?a.createElement(ne,{content:Q,inlinePosition:t.popupInlinePosition}):null},fe=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname;return a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},ke=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n})),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))),_e=[],Ee=[],we=[];const Ce=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Ne=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Se=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Te=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Se(a),o=Se(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=H[i];return!(Ne(r).getTime()>o.getTime()&&(we.push(e),1))}(e):0===e.formatted_status&&(_e.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Se(l),i=Se(n);if(!o||!i)return!1;const r=H[a],s=Ne(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(Ee.push(e),!0)})(e));let xe=null;function Oe({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Te))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==A.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==A.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",_e),Pe("--listCampaignScheduledToActivated",Ee),Pe("--listCampaignActiveButExpired",we);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const y=[...m,...b],f=document.cookie.split("; ").map((e=>e.split("=")[0])),k=f.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=f.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=y.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ce(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),xe&&clearTimeout(xe),xe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const je=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);r((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:y,image:f,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=y,S=y.imageBlocks?JSON.parse(y.imageBlocks):{},T=JSON.parse(y.actionBlocks),x=JSON.parse(y.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const P={1:{},2:{},3:{}},j=o("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;P[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=P[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(Y,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:f,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(ke,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:f,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(J,{popupId:j.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:f,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(ye,{popupId:j.current,extraFields:y,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,P),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(fe,{popupId:j.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,currentLayout:N}):null},Be=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var y;const f=o(),k=o(Date.now()),{apiUrl:E}=n((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[w,C]=i(null),[N,S]=i(""),[T,x]=i(null);r((()=>{K.apiLeadUrl=E,K.apiSubotUrl=v}),[E,v]);const O=(e,t)=>{C(e),S(t)},P=()=>{var e,t;if(!w)return;Pe(`👋👋👋 CLOSE POPUP ${w.code} 👋👋👋`);const a=Number(null===(e=w.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=w.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${w.code}`,`target_${w.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${E}api/campaign/${w.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),C(null),x(null)};r((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;P(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),f.current&&window.removeEventListener("scroll",f.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return r((()=>{w&&(k.current=Date.now())}),[w]),a.createElement(V.Provider,{value:{apiUrl:E,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(y=null==w?void 0:w.extra_fields)||void 0===y?void 0:y.popupVersion)&&a.createElement(je,{campaign:w,action:N,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const y=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),f=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:y.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?_(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:f};n&&o[n].value_en&&(k.category=o[n].value_en);const C=Number((null===(i=null===(t=w.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),N=Number((null===(s=null===(r=w.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==N&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==N&&(Pe(`⌛ Popup will show again after ${C} days!`),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,days:C,path:"/"})),fetch(`${E}api/campaign/${w.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==w.extra_fields.popupShowThankYou)return P(),void document.body.classList.remove("noscroll");let S=!0;const T=w.thank_you_image||`${E}admin/img/thanksyou.png`;let O,j,B=w.extra_fields.popupThankyouTitle||"Thank you.",L=w.extra_fields.popupThankyouDesc||"We appreciate your time!",I="",A="",$="";if("2.1"==w.extra_fields.popupVersion){const e=w.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",I=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",A=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",j=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,$=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=w.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(S=!1)}x(S?{title:B,titleAlign:I,subtitle:L,subtitleAlign:A,link:$,linkNewTab:j,linkText:O,image:T}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},y.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:P,showThankyou:T,locale:h})),g())))};export{Be as LeadGen};
@@ -1 +1 @@
1
- export{S as Select}from"./index-364770a0.js";import{f as t,u as a,g as s}from"./index-9d45815e.js";export{A as Accordion,h as Avatar,i as Carousel,j as Checkbox,D as DatePicker,k as MAPPED_LOCALE,O as OTP,e as Phone,R as Radio,g as getMantineThemeOverride,u as useMantineLocale}from"./index-9d45815e.js";import{_ as r}from"./tslib.es6-0039c19c.js";import o,{useMemo as n}from"react";import{Indicator as c,Badge as l,Spoiler as m,LoadingOverlay as d,Switch as p,MantineProvider as b,clsx as f,Title as x,Text as v,Button as E}from"@mantine/core";import"dayjs";import"./screenSizeContext-b29efdb0.js";import"styled-components";import{t as y}from"./theme-a631c5ab.js";import"./index-d02e0f58.js";import"./utils-7ce226e8.js";import"./isProduction-fab10892.js";import"./Locale-00425d00.js";import"./gAssets.js";export{M as Modal}from"./index-b5e35ec5.js";import{T as P}from"./index-7b6296d5.js";import{u as H}from"./useTranslations-7f736d5f.js";export{I as Input,e as emotionCache}from"./index-150d757e.js";export{C as CentralCarousel}from"./index-c9e0a1b5.js";export{S as Slider}from"./index-653fcb30.js";import"@mantine/dates";import"@mantine/carousel";import"lodash/throttle";import"./translationsContext-fc21efad.js";import"string-format";import"@mantine/hooks";import"./index-f98bb958.js";const N=e=>{var{styles:t}=e,a=r(e,["styles"]);return o.createElement(c,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({indicator:{backgroundColor:y.colors.red700},processing:{animationDirection:"alternate"}},t)},a))},L=e=>o.createElement(t,Object.assign({minRows:2,maxRows:4},e)),T=e=>{var{color:t=y.colors.primaryBase,styles:a}=e,s=r(e,["color","styles"]);return o.createElement(l,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},s))},z=e=>{var{children:t,line:a,lineHeight:s,trackingAttributes:i,maxHeight:c,customExpandFn:l}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=H(),u=n((()=>c||(a&&s?a*s:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=n((()=>i?{"data-event-category":i.dataEventCategory,"data-event-action":i.dataEventAction,"data-event-label":i.dataEventLabel}:{}),[i]);return o.createElement(m,Object.assign({showLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},b,{onClick:l}),p("articlePage.readMore")),hideLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)},w=e=>o.createElement(d,Object.assign({loaderProps:{color:y.colors.primaryBase}},e)),B=p,F=e=>{var{children:t,locale:i}=e,n=r(e,["children","locale"]);return a(i),o.createElement(b,Object.assign({theme:s(i)},n),t)};var G={container:"MON6sfi",iconContainer:"pS-tJD7",icon:"s3tJ9-5",title:"fNsZr1b",description:"uuxV74v",button:"YohjTDU"};function J(e){const{icon:t,title:a,description:s,button:i,buttonProps:n,style:c,className:l}=e,m=n||{},{size:d="lg",variant:p="outline"}=m,u=r(m,["size","variant"]),b=t;return o.createElement("div",{className:f("result",G.container,l),style:c},b&&o.createElement("div",{className:f("resultIconContainer",G.iconContainer)},o.createElement(b,{className:f("resultIcon",G.icon)})),o.createElement(x,{order:3,size:"h3",className:f("resultTitle",G.title)},a),o.createElement(v,{className:f("resultDescription",G.description)},s),i&&o.createElement(E,Object.assign({},u,{size:d,variant:p,className:f("resultButton",G.button,u.className)}),i))}export{T as Badge,N as Indicator,w as LoadingOverlay,F as MantineProvider,J as Result,z as Spoiler,B as Switch,L as TextArea};
1
+ export{S as Select}from"./index-afb6d214.js";import{f as t,u as a,g as s}from"./index-c229fe69.js";export{A as Accordion,h as Avatar,i as Carousel,j as Checkbox,D as DatePicker,k as MAPPED_LOCALE,O as OTP,e as Phone,R as Radio,g as getMantineThemeOverride,u as useMantineLocale}from"./index-c229fe69.js";import{_ as r}from"./tslib.es6-096e3330.js";import o,{useMemo as n}from"react";import{Indicator as c,Badge as l,Spoiler as m,LoadingOverlay as d,Switch as p,MantineProvider as b,clsx as x,Title as f,Text as v,Button as E}from"@mantine/core";import"dayjs";import"./screenSizeContext-0691e053.js";import"styled-components";import{t as y}from"./theme-8c9da911.js";import"./index-030cc7b1.js";import"./utils-7ad4d5e8.js";import"./isProduction-ce48b119.js";import"./Locale-eb5c1404.js";import"./gAssets.js";export{M as Modal}from"./index-a336a1db.js";import{T as P}from"./index-d7887904.js";import{u as H}from"./useTranslations-c60222d8.js";export{I as Input,e as emotionCache}from"./index-171e03d4.js";export{C as CentralCarousel}from"./index-d982759f.js";export{S as Slider}from"./index-7019d03b.js";import"@mantine/dates";import"@mantine/carousel";import"lodash/throttle";import"./translationsContext-09bd8a0a.js";import"string-format";import"@mantine/hooks";import"./index-352d3b93.js";const N=e=>{var{styles:t}=e,a=r(e,["styles"]);return o.createElement(c,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({indicator:{backgroundColor:y.colors.red700},processing:{animationDirection:"alternate"}},t)},a))},L=e=>o.createElement(t,Object.assign({minRows:2,maxRows:4},e)),T=e=>{var{color:t=y.colors.primaryBase,styles:a}=e,s=r(e,["color","styles"]);return o.createElement(l,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},s))},z=e=>{var{children:t,line:a,lineHeight:s,trackingAttributes:i,maxHeight:c,customExpandFn:l}=e,d=r(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=H(),u=n((()=>c||(a&&s?a*s:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=n((()=>i?{"data-event-category":i.dataEventCategory,"data-event-action":i.dataEventAction,"data-event-label":i.dataEventLabel}:{}),[i]);return o.createElement(m,Object.assign({showLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},b,{onClick:l}),p("articlePage.readMore")),hideLabel:o.createElement(P,Object.assign({size:"p3",color:y.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)},w=e=>o.createElement(d,Object.assign({loaderProps:{color:y.colors.primaryBase}},e)),B=p,F=e=>{var{children:t,locale:i}=e,n=r(e,["children","locale"]);return a(i),o.createElement(b,Object.assign({theme:s(i)},n),t)};var G={container:"MON6sfi",iconContainer:"pS-tJD7",icon:"s3tJ9-5",title:"fNsZr1b",description:"uuxV74v",button:"YohjTDU"};function J(e){const{icon:t,title:a,description:s,button:i,buttonProps:n,style:c,className:l}=e,m=n||{},{size:d="lg",variant:p="outline"}=m,u=r(m,["size","variant"]),b=t;return o.createElement("div",{className:x("result",G.container,l),style:c},b&&o.createElement("div",{className:x("resultIconContainer",G.iconContainer)},o.createElement(b,{className:x("resultIcon",G.icon)})),o.createElement(f,{order:3,size:"h3",className:x("resultTitle",G.title)},a),o.createElement(v,{className:x("resultDescription",G.description)},s),i&&o.createElement(E,Object.assign({},u,{size:d,variant:p,className:x("resultButton",G.button,u.className)}),i))}export{T as Badge,N as Indicator,w as LoadingOverlay,F as MantineProvider,J as Result,z as Spoiler,B as Switch,L as TextArea};
package/build/esm/misc.js CHANGED
@@ -1 +1 @@
1
- export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-0724d25a.js";export{S as ScreenSizeContext,j as ScreenSizeContextProvider,h as fadeIn,i as getWindowSizeGroups,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./screenSizeContext-b29efdb0.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-e007aa92.js";import"react";import"styled-components";export{t as theme}from"./theme-a631c5ab.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-2fba1b2c.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-e4b4ee8f.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,b as getWrapperDomWithSelector,m as makeParams,c as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-7ce226e8.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-5bc53bc9.js";export{g as getSocialList}from"./getSocialList-278ea87c.js";import"dayjs";import"lodash/throttle";import"./index-d02e0f58.js";import"./Locale-00425d00.js";import"./isProduction-fab10892.js";import"./tslib.es6-0039c19c.js";import"./core-8afe5a4d.js";import"./normalizeLink-2ec03ba7.js";import"./gAssets.js";
1
+ export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-f270c7a8.js";export{S as ScreenSizeContext,j as ScreenSizeContextProvider,h as fadeIn,i as getWindowSizeGroups,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./screenSizeContext-0691e053.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-ba549449.js";import"react";import"styled-components";export{t as theme}from"./theme-8c9da911.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-7d0b1f4d.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-fee735f1.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,b as getWrapperDomWithSelector,m as makeParams,c as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-7ad4d5e8.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-9de77812.js";export{g as getSocialList}from"./getSocialList-0f75623c.js";import"dayjs";import"lodash/throttle";import"./index-030cc7b1.js";import"./Locale-eb5c1404.js";import"./isProduction-ce48b119.js";import"./tslib.es6-096e3330.js";import"./core-d97def5a.js";import"./normalizeLink-e5f38f0b.js";import"./gAssets.js";
@@ -1 +1 @@
1
- import"./tslib.es6-0039c19c.js";import"react";import"./core-8afe5a4d.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-c4acfb04.js";import"./index-d02e0f58.js";import"./normalizeLink-2ec03ba7.js";import"./routing-e4b4ee8f.js";import"./dataTransform-915aed8c.js";import"./index.styled-c65f9df8.js";import"./isProduction-fab10892.js";import"./gAssets.js";import"./Locale-00425d00.js";import"./useUniqueId-818c7708.js";import"./index-7b6296d5.js";import"./index-78cd9f91.js";import"./index-05542543.js";import"./utils-7ce226e8.js";import"styled-components";import"./useTranslations-7f736d5f.js";import"./translationsContext-fc21efad.js";import"string-format";import"lodash/throttle";import"./index.styled-6b6e612e.js";import"./theme-a631c5ab.js";import"./index.styled-7f0b774b.js";import"dayjs";import"./screenSizeContext-b29efdb0.js";import"./index-f98bb958.js";import"@mantine/core";import"./cookieHelper-e007aa92.js";import"./index.styled-2465841d.js";import"./index-87ee0d76.js";import"./constants-d1288784.js";import"./useIsInit-e1781437.js";import"lodash/debounce";import"slugify";import"dayjs/plugin/relativeTime";
1
+ import"./tslib.es6-096e3330.js";import"react";import"./core-d97def5a.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-71fbbcbb.js";import"./index-030cc7b1.js";import"./normalizeLink-e5f38f0b.js";import"./routing-fee735f1.js";import"./dataTransform-e55b0814.js";import"./index.styled-f34f5ba2.js";import"./isProduction-ce48b119.js";import"./gAssets.js";import"./Locale-eb5c1404.js";import"./useUniqueId-82da9bb3.js";import"./index-d7887904.js";import"./index-70d1e740.js";import"./index-db529e55.js";import"./utils-7ad4d5e8.js";import"styled-components";import"./useTranslations-c60222d8.js";import"./translationsContext-09bd8a0a.js";import"string-format";import"lodash/throttle";import"./index.styled-35a637ea.js";import"./theme-8c9da911.js";import"./index.styled-6d1d56fb.js";import"dayjs";import"./screenSizeContext-0691e053.js";import"./index-352d3b93.js";import"@mantine/core";import"./cookieHelper-ba549449.js";import"./index.styled-1c51dd30.js";import"./index-cd32035c.js";import"./constants-f12d28db.js";import"./useIsInit-30a401da.js";import"lodash/debounce";import"slugify";import"dayjs/plugin/relativeTime";
@@ -1 +1 @@
1
- export{M as MAPPED_LOCALE,b as OnboardingForm,O as OnboardingModal,a as OnboardingStep,c as OtpForm}from"./index-cb50aeb8.js";import"./tslib.es6-0039c19c.js";import"react";import"@mantine/hooks";import"./index.styled-6b6e612e.js";import"styled-components";import"./theme-a631c5ab.js";import"./utils-7ce226e8.js";import"./index.styled-7f0b774b.js";import"./index-05542543.js";import"./gAssets.js";import"./index-d02e0f58.js";import"./Locale-00425d00.js";import"./isProduction-fab10892.js";import"./index-7b6296d5.js";import"dayjs";import"./screenSizeContext-b29efdb0.js";import"lodash/throttle";import"./index-f98bb958.js";import"@mantine/core";import"./index.styled-2465841d.js";import"./useTranslations-7f736d5f.js";import"./translationsContext-fc21efad.js";import"string-format";import"./index-87ee0d76.js";import"lodash/debounce";import"@mantine/form";import"./index-9d45815e.js";import"@mantine/dates";import"@mantine/carousel";import"./index-150d757e.js";import"yup";import"./index-c9e0a1b5.js";import"date-fns";import"./Visible-7eca30b5.js";
1
+ export{M as MAPPED_LOCALE,b as OnboardingForm,O as OnboardingModal,a as OnboardingStep,c as OtpForm}from"./index-1e6b2f81.js";import"./tslib.es6-096e3330.js";import"react";import"@mantine/hooks";import"./index.styled-35a637ea.js";import"styled-components";import"./theme-8c9da911.js";import"./utils-7ad4d5e8.js";import"./index.styled-6d1d56fb.js";import"./index-db529e55.js";import"./gAssets.js";import"./index-030cc7b1.js";import"./Locale-eb5c1404.js";import"./isProduction-ce48b119.js";import"./index-d7887904.js";import"dayjs";import"./screenSizeContext-0691e053.js";import"lodash/throttle";import"./index-352d3b93.js";import"@mantine/core";import"./index.styled-1c51dd30.js";import"./useTranslations-c60222d8.js";import"./translationsContext-09bd8a0a.js";import"string-format";import"./index-cd32035c.js";import"lodash/debounce";import"@mantine/form";import"./index-c229fe69.js";import"@mantine/dates";import"@mantine/carousel";import"./index-171e03d4.js";import"yup";import"./index-d982759f.js";import"date-fns";import"./Visible-07795e71.js";
package/build/esm/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as o}from"./index-b5f6d798.js";import{T as n}from"./index-7b6296d5.js";import{P as i}from"./index-2c15a988.js";import{u as s}from"./useTranslations-7f736d5f.js";import{t as c}from"./theme-a631c5ab.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as f}from"./index-87ee0d76.js";import{a as x}from"./useOutsideClick-68a3714e.js";import E from"styled-components";import{_ as k}from"./tslib.es6-0039c19c.js";import"./index.styled-2465841d.js";import"./Locale-00425d00.js";import"./index.styled-6abf9e6a.js";import"./gAssets.js";import"./index-d02e0f58.js";import"./isProduction-fab10892.js";import"./index-c9e0a1b5.js";import"@mantine/carousel";import"@mantine/hooks";import"./translationsContext-fc21efad.js";import"string-format";const w=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:l,activeWeek:a,t:o})=>{const n=o(`bmi.result.${l}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:l}:{})))},v=t=>{const{x:r,y:l,payload:a,activeWeek:o}=t;return o===a.value?e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},j=E.div`
1
+ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as o}from"./index-6c89cda7.js";import{T as n}from"./index-d7887904.js";import{P as i}from"./index-fd984d2c.js";import{u as c}from"./useTranslations-c60222d8.js";import{t as s}from"./theme-8c9da911.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as x}from"./index-cd32035c.js";import{a as f}from"./useOutsideClick-e971e2dc.js";import E from"styled-components";import{_ as k}from"./tslib.es6-096e3330.js";import"./index.styled-1c51dd30.js";import"./Locale-eb5c1404.js";import"./index.styled-af078e75.js";import"./gAssets.js";import"./index-030cc7b1.js";import"./isProduction-ce48b119.js";import"./index-d982759f.js";import"@mantine/carousel";import"@mantine/hooks";import"./translationsContext-09bd8a0a.js";import"string-format";const w=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:l,activeWeek:a,t:o})=>{const n=o(`bmi.result.${l}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===a?{toolTipLabel:r,translatedStatus:n,status:l}:{})))},v=t=>{const{x:r,y:l,payload:a,activeWeek:o}=t;return o===a.value?e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):e.createElement("g",{transform:`translate(${r},${l})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},j=E.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -18,7 +18,7 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
18
18
  display: flex;
19
19
  align-items: center;
20
20
  padding: 4px 8px;
21
- background: ${c.colors.yellow600};
21
+ background: ${s.colors.yellow600};
22
22
  border-radius: 3px;
23
23
  } */
24
24
  & > * {
@@ -55,14 +55,14 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
55
55
  align-items: center;
56
56
  gap: 4px;
57
57
  }
58
- `,B=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],W=r=>{var l,a,o,i,s;const{payload:m,active:d}=r,p=null===(l=null==m?void 0:m[0])||void 0===l?void 0:l.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>B.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(j,null,e.createElement("div",null,null===(a=p.toolTipLabel)||void 0===a?void 0:a[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,type:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},L=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:j=[],status:T,withLine:B=!1,siteType:L})=>{const{t:z}=s(),S="marryBaby"===L,F=t((()=>w({weightByWeek:i,weightBefore:o,toolTipLabel:j,status:T,activeWeek:E,t:z})),[i,o,j,T,E]),[I,M]=r(!1),N=l(null);return x(N,(()=>M(!1))),e.createElement(C,null,S?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(F)&&F.length>0&&e.createElement(C,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:F,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(W,Object.assign({active:!B&&I&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(v,Object.assign({},t,{activeWeek:E,siteType:L})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?c.mbColors.tonePink:c.colors.blue100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:N,r:4}),fill:S?c.mbColors.pink:c.colors.primaryBase,stroke:S?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,l=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:l}=s(),o="marryBaby"===r;return e.createElement(T,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.lightPink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},l("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:c.colors.blue100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},l("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.pink}),e.createElement(a,{type:"bodytext-3",color:c.mbColors.dark},l("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:c.colors.gray600},l("pwg.placeholder.weight")))))},F=E.div`
58
+ `,B=[{name:"overweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"underweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"healthy",backgroundColor:s.colors.green50,color:s.colors.green900}],W=r=>{var l,a,o,i,c;const{payload:m,active:d}=r,p=null===(l=null==m?void 0:m[0])||void 0===l?void 0:l.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>B.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(j,null,e.createElement("div",null,null===(a=p.toolTipLabel)||void 0===a?void 0:a[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:s.colors.gray800,type:"semiBold"},null===(c=p.toolTipLabel)||void 0===c?void 0:c[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},L=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:j=[],status:T,withLine:B=!1,siteType:L})=>{const{t:z}=c(),S="marryBaby"===L,F=t((()=>w({weightByWeek:i,weightBefore:o,toolTipLabel:j,status:T,activeWeek:E,t:z})),[i,o,j,T,E]),[I,M]=r(!1),N=l(null);return f(N,(()=>M(!1))),e.createElement(C,null,S?e.createElement(a,{type:"bodytext-3",color:s.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:s.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(F)&&F.length>0&&e.createElement(C,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:F,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:s.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(W,Object.assign({active:!B&&I&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(v,Object.assign({},t,{activeWeek:E,siteType:L})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:s.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?s.mbColors.tonePink:s.colors.blue100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(x,{ref:N,r:4}),fill:S?s.mbColors.pink:s.colors.primaryBase,stroke:S?s.mbColors.pink:s.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(a,{type:"bodytext-3",color:s.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:s.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,l=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||s.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:l}=c(),o="marryBaby"===r;return e.createElement(T,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:s.mbColors.lightPink}),e.createElement(a,{type:"bodytext-3",color:s.mbColors.dark},l("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:s.colors.blue100}),e.createElement(n,{size:"n1",color:s.colors.gray600},e.createElement(n,{size:"n1",as:"span"},l("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:s.mbColors.pink}),e.createElement(a,{type:"bodytext-3",color:s.mbColors.dark},l("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:s.colors.gray600},l("pwg.placeholder.weight")))))},F=E.div`
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  align-items: center;
62
62
  padding: 24px 16px;
63
63
  width: 100%;
64
64
  gap: 24px;
65
- border: 1px solid ${c.colors.neutral100};
65
+ border: 1px solid ${s.colors.neutral100};
66
66
  border-radius: 8px;
67
67
  .chart-header {
68
68
  text-align: center;
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as l}from"react";import{M as a,a as
70
70
  > div {
71
71
  width: 100%;
72
72
  }
73
- `,I=({chartProps:t,pillCarouselProps:r,idealWeight:l,description:a,siteType:m})=>{const{t:d}=s(),p="marryBaby"===m;return e.createElement(F,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:c.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:c.colors.gray800},d("pregnancyTool.weightSuggested")),a&&a),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:l,siteType:m}),e.createElement(L,Object.assign({},t,{siteType:m}))))};export{I as PregnancyWeightGainChart};
73
+ `,I=({chartProps:t,pillCarouselProps:r,idealWeight:l,description:a,siteType:m})=>{const{t:d}=c(),p="marryBaby"===m;return e.createElement(F,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:s.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:s.colors.gray800},d("pregnancyTool.weightSuggested")),a&&a),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:l,siteType:m}),e.createElement(L,Object.assign({},t,{siteType:m}))))};export{I as PregnancyWeightGainChart};
@@ -1 +1 @@
1
- import{d as e}from"./index-d02e0f58.js";import{i as t}from"./isProduction-fab10892.js";const s=(s,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!t?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":s]}`},o=(s,o)=>process.env.UNIFY_SSO_API||`https://${t?"id.":"staging-id."}${e[o?"vi-VN_MB":s]}`,r=()=>process.env.UNIFY_TOGETHER_API||`https://${t?"together.":"staging-together."}hellohealthgroup.com`,i=s=>process.env.UNIFY_DISCOVER_API||`https://${t?"wp.":"staging."}${e[s]}`,n=()=>process.env.UNIFY_CARE_API||`https://${t?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,i as c,n as d,s as g};
1
+ import{d as e}from"./index-030cc7b1.js";import{i as t}from"./isProduction-ce48b119.js";const s=(s,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!t?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":s]}`},o=(s,o)=>process.env.UNIFY_SSO_API||`https://${t?"id.":"staging-id."}${e[o?"vi-VN_MB":s]}`,r=()=>process.env.UNIFY_TOGETHER_API||`https://${t?"together.":"staging-together."}hellohealthgroup.com`,i=s=>process.env.UNIFY_DISCOVER_API||`https://${t?"wp.":"staging."}${e[s]}`,n=()=>process.env.UNIFY_CARE_API||`https://${t?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,i as c,n as d,s as g};
@@ -1,4 +1,4 @@
1
- import{keyframes as t}from"styled-components";import r,{createContext as i,useState as s,useEffect as a,useMemo as n}from"react";import e from"lodash/throttle";import{B as o}from"./utils-7ce226e8.js";const d=t`
1
+ import{keyframes as t}from"styled-components";import r,{createContext as i,useState as s,useEffect as a,useMemo as n}from"react";import e from"lodash/throttle";import{B as o}from"./utils-7ad4d5e8.js";const d=t`
2
2
  from {
3
3
  transform: translate3d(0, 100%, 0);
4
4
  visibility: visible;
@@ -70,7 +70,7 @@ to {
70
70
  visibility: hidden;
71
71
  transform: translate3d(0, -100%, 0);
72
72
  }
73
- `,c=t`
73
+ `,h=t`
74
74
  from {
75
75
  opacity: 0;
76
76
  }
@@ -78,4 +78,4 @@ to {
78
78
  to {
79
79
  opacity: 1;
80
80
  }
81
- `,h=i({isInit:!0}),w=t=>{const r=(t=>"number"==typeof t?t:"undefined"!=typeof window&&window.innerWidth||0)(t);return{smallMobile:r<o.BREAK_POINT_SMALL_MOBILE,mobile:r>=o.BREAK_POINT_SMALL_MOBILE&&r<o.BREAK_POINT_MOBILE,tablet:r>=o.BREAK_POINT_MOBILE&&r<o.BREAK_POINT_TABLET,pc:r>=o.BREAK_POINT_TABLET&&r<o.BREAK_POINT_PC,xl:r>=o.BREAK_POINT_PC}},B=({children:t})=>{const[i,o]=s((()=>({isInit:!0})));a((()=>{const t=e((()=>{o({width:window.innerWidth,height:window.innerHeight,isInit:!1})}),200);return window.addEventListener("resize",t,{passive:!0}),()=>{window.removeEventListener("resize",t)}}),[]);const d=n((()=>w(i.width)),[i.width]);return r.createElement(h.Provider,{value:Object.assign(Object.assign({},i),{sizeGroups:d})},t)};export{h as S,l as a,m as b,f as c,E as d,b as e,v as f,_ as g,c as h,w as i,B as j,d as s};
81
+ `,c=i({isInit:!0}),w=t=>{const r=(t=>"number"==typeof t?t:"undefined"!=typeof window&&window.innerWidth||0)(t);return{smallMobile:r<o.BREAK_POINT_SMALL_MOBILE,mobile:r>=o.BREAK_POINT_SMALL_MOBILE&&r<o.BREAK_POINT_MOBILE,tablet:r>=o.BREAK_POINT_MOBILE&&r<o.BREAK_POINT_TABLET,pc:r>=o.BREAK_POINT_TABLET&&r<o.BREAK_POINT_PC,xl:r>=o.BREAK_POINT_PC}},B=({children:t})=>{const[i,o]=s((()=>({isInit:!0})));a((()=>{const t=e((()=>{o({width:window.innerWidth,height:window.innerHeight,isInit:!1})}),200);return window.addEventListener("resize",t,{passive:!0}),()=>{window.removeEventListener("resize",t)}}),[]);const d=n((()=>w(i.width)),[i.width]);return r.createElement(c.Provider,{value:Object.assign(Object.assign({},i),{sizeGroups:d})},t)};export{c as S,l as a,m as b,f as c,E as d,b as e,v as f,_ as g,h,w as i,B as j,d as s};
@@ -1 +1 @@
1
- export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-978544c0.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,U as UserAvatar}from"./index.styled-c65f9df8.js";export{d as TogetherDataTransforms}from"./dataTransform-915aed8c.js";import"react";import"./index-7b6296d5.js";import"./tslib.es6-0039c19c.js";import"./translationsContext-fc21efad.js";import"string-format";import"@mantine/core";import"./index-f98bb958.js";import"./index.styled-67c29a17.js";import"styled-components";import"./utils-7ce226e8.js";import"./index-78cd9f91.js";import"./gAssets.js";import"./index-d02e0f58.js";import"./Locale-00425d00.js";import"./isProduction-fab10892.js";import"./index-05542543.js";import"./index.styled-6b6e612e.js";import"./theme-a631c5ab.js";import"./index.styled-7f0b774b.js";import"dayjs";import"./screenSizeContext-b29efdb0.js";import"lodash/throttle";import"./index-fe31b09c.js";import"./index-150d757e.js";import"@mantine/hooks";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-a2e77867.js";import"./useScrollbarSize-3d17e421.js";import"lodash/debounce";import"react-dom";import"./useTranslations-7f736d5f.js";import"./useUniqueId-818c7708.js";import"./index-b5f6d798.js";import"./index.styled-2465841d.js";import"date-fns";import"./index-87ee0d76.js";import"./index-653fcb30.js";import"./types-2bbcf540.js";import"react-day-picker/DayPickerInput";import"innertext";import"react-contenteditable";import"keen-slider/react";import"./index-5a00107b.js";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-6abf9e6a.js";import"./index-c9e0a1b5.js";import"@mantine/carousel";import"@mantine/dates";import"./cookieHelper-e007aa92.js";import"dayjs/plugin/relativeTime";import"./index-9d45815e.js";import"./index-b5e35ec5.js";import"slugify";import"./routing-e4b4ee8f.js";
1
+ export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-cf6feba2.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,U as UserAvatar}from"./index.styled-f34f5ba2.js";export{d as TogetherDataTransforms}from"./dataTransform-e55b0814.js";import"react";import"./index-d7887904.js";import"./tslib.es6-096e3330.js";import"./translationsContext-09bd8a0a.js";import"string-format";import"@mantine/core";import"./index-352d3b93.js";import"./index.styled-3b400a96.js";import"styled-components";import"./utils-7ad4d5e8.js";import"./index-70d1e740.js";import"./gAssets.js";import"./index-030cc7b1.js";import"./Locale-eb5c1404.js";import"./isProduction-ce48b119.js";import"./index-db529e55.js";import"./index.styled-35a637ea.js";import"./theme-8c9da911.js";import"./index.styled-6d1d56fb.js";import"dayjs";import"./screenSizeContext-0691e053.js";import"lodash/throttle";import"./index-864cc721.js";import"./index-171e03d4.js";import"@mantine/hooks";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-273f0079.js";import"./useScrollbarSize-2bea8fa8.js";import"lodash/debounce";import"react-dom";import"./useTranslations-c60222d8.js";import"./useUniqueId-82da9bb3.js";import"./index-6c89cda7.js";import"./index.styled-1c51dd30.js";import"date-fns";import"./index-cd32035c.js";import"./index-7019d03b.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-76ebfd27.js";import"react-contenteditable";import"keen-slider/react";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-af078e75.js";import"./index-d982759f.js";import"@mantine/carousel";import"@mantine/dates";import"./cookieHelper-ba549449.js";import"dayjs/plugin/relativeTime";import"./index-c229fe69.js";import"./index-a336a1db.js";import"slugify";import"./routing-fee735f1.js";