@hhgtech/hhg-components 1.29.411 → 1.29.412-beta-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 (513) hide show
  1. package/build/{InputDate-e4e90f85.js → InputDate-ed79b015.js} +3 -3
  2. package/build/{LastPeriod-74ff4403.js → LastPeriod-42816b8b.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-04839fbc.js → MobileBottomNavigationIcon-8619c39e.js} +3 -3
  4. package/build/{Spinner-b87681f5.js → Spinner-0a0906dc.js} +1 -1
  5. package/build/{WhatsApp-24ce5167.js → WhatsApp-edbf66f7.js} +1 -1
  6. package/build/adapters.js +19 -19
  7. package/build/atoms.js +48 -48
  8. package/build/babyGrowth.js +83 -83
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components/navigationV2/components/atoms/searchInput/index.d.ts +1 -0
  14. package/build/components/navigationV2/index.d.ts +2 -1
  15. package/build/components.js +97 -97
  16. package/build/{constants-5c84ab9f.js → constants-0aaecc73.js} +1 -1
  17. package/build/constants.js +3 -3
  18. package/build/constantsDomainLocales.js +1 -1
  19. package/build/constantsRiskScreener.js +2 -2
  20. package/build/constantsSite.js +2 -2
  21. package/build/{core-bbf77e50.js → core-3c79cf8b.js} +1 -1
  22. package/build/{dataTransform-fe77e544.js → dataTransform-ca295670.js} +1 -1
  23. package/build/ecom.js +4 -4
  24. package/build/{editor-3e0ebcbc.js → editor-678d906b.js} +11 -11
  25. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  26. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  27. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  28. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  29. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  30. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  31. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  32. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  33. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  34. package/build/esm/{InputDate-8e83c671.js → InputDate-0bbec559.js} +3 -3
  35. package/build/esm/{LastPeriod-6f10a30a.js → LastPeriod-3dd9d643.js} +1 -1
  36. package/build/esm/{MobileBottomNavigationIcon-756994f7.js → MobileBottomNavigationIcon-20ec3809.js} +3 -3
  37. package/build/esm/{Spinner-0875f549.js → Spinner-240948a1.js} +1 -1
  38. package/build/esm/{WhatsApp-5572e0e0.js → WhatsApp-1d0093d1.js} +1 -1
  39. package/build/esm/adapters.js +19 -19
  40. package/build/esm/atoms.js +48 -48
  41. package/build/esm/babyGrowth.js +83 -83
  42. package/build/esm/cache.js +2 -2
  43. package/build/esm/care.js +17 -17
  44. package/build/esm/careBookingSearchBar.js +14 -14
  45. package/build/esm/careBookingSearchBarV2.js +15 -15
  46. package/build/esm/components/navigationV2/components/atoms/searchInput/index.d.ts +1 -0
  47. package/build/esm/components/navigationV2/index.d.ts +2 -1
  48. package/build/esm/components.js +97 -97
  49. package/build/esm/{constants-3220826e.js → constants-22bf5acc.js} +1 -1
  50. package/build/esm/constants.js +3 -3
  51. package/build/esm/constantsDomainLocales.js +1 -1
  52. package/build/esm/constantsRiskScreener.js +2 -2
  53. package/build/esm/constantsSite.js +2 -2
  54. package/build/esm/{core-4a625e8e.js → core-6ab12e45.js} +1 -1
  55. package/build/esm/{dataTransform-150a8653.js → dataTransform-387ab1df.js} +1 -1
  56. package/build/esm/ecom.js +4 -4
  57. package/build/esm/{editor-8b7e162c.js → editor-93f4cca9.js} +11 -11
  58. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  59. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  60. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  61. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  62. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  63. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  64. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  65. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  66. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  67. package/build/esm/footer.js +21 -21
  68. package/build/esm/gAssets.js +2 -2
  69. package/build/esm/{healthTools-b5e819d8.js → healthTools-a6938099.js} +1 -1
  70. package/build/esm/healthToolsCardWrapper.js +18 -18
  71. package/build/esm/healthToolsForm.js +33 -33
  72. package/build/esm/hooks.js +13 -13
  73. package/build/esm/i18n.js +2 -2
  74. package/build/esm/i18nV2.js +2 -2
  75. package/build/esm/{index-e502a6b5.js → index-0061ed46.js} +2 -2
  76. package/build/esm/{index-97a7cdc0.js → index-01add604.js} +1 -1
  77. package/build/esm/{index-d5e895ad.js → index-07b00729.js} +16 -16
  78. package/build/esm/{index-d1c22940.js → index-09f17ac2.js} +3 -3
  79. package/build/esm/{index-0f411182.js → index-1293880c.js} +17 -17
  80. package/build/esm/{index-f1fa454f.js → index-18509ee4.js} +16 -16
  81. package/build/esm/{index-2c656823.js → index-193f73db.js} +24 -24
  82. package/build/esm/{index-0f5a1bcf.js → index-24ff1b39.js} +16 -16
  83. package/build/esm/{index-223679b2.js → index-25a90043.js} +2 -2
  84. package/build/esm/{index-c8ed6cc5.js → index-31c505ff.js} +2 -2
  85. package/build/esm/{index-70b78475.js → index-323122ff.js} +2 -2
  86. package/build/esm/{index-9a532d03.js → index-3293b6d7.js} +4 -4
  87. package/build/esm/{index-123576f7.js → index-3a63c163.js} +13 -13
  88. package/build/esm/{index-3d3699e7.js → index-3d6fe6ea.js} +145 -136
  89. package/build/esm/{index-0860bccb.js → index-40eaa481.js} +2 -2
  90. package/build/esm/{index-62fbdf6b.js → index-40ed5b08.js} +10 -10
  91. package/build/esm/{index-d0a80cba.js → index-43b49421.js} +1 -1
  92. package/build/esm/{index-1619d1a5.js → index-457d76c7.js} +3 -3
  93. package/build/esm/{index-d58464d2.js → index-46576e24.js} +2 -2
  94. package/build/esm/{index-0fedc2dc.js → index-49547dd9.js} +6 -6
  95. package/build/esm/{index-34947503.js → index-4e1b366e.js} +2 -2
  96. package/build/esm/{index-a389f82a.js → index-505bf495.js} +3 -3
  97. package/build/esm/{index-44d19256.js → index-552328f5.js} +6 -6
  98. package/build/esm/{index-970e7687.js → index-57832acf.js} +6 -6
  99. package/build/esm/{index-6ff85c8f.js → index-5786325f.js} +2 -2
  100. package/build/esm/{index-b2ed79bd.js → index-651960be.js} +17 -17
  101. package/build/esm/{index-aa16537e.js → index-6c1d5e44.js} +13 -13
  102. package/build/esm/{index-a60848dc.js → index-6e6d1bb0.js} +31 -31
  103. package/build/esm/{index-55ac1c18.js → index-6f3f14b8.js} +2 -2
  104. package/build/esm/{index-449db7b6.js → index-70883c59.js} +5 -5
  105. package/build/esm/{index-379aecb1.js → index-71dd6c95.js} +17 -17
  106. package/build/esm/{index-c39fb9e9.js → index-73be0d60.js} +5 -5
  107. package/build/esm/{index-076307f1.js → index-7bc4f0c5.js} +11 -11
  108. package/build/esm/{index-d6c75838.js → index-7d2dae6f.js} +7 -7
  109. package/build/esm/{index-45f08c05.js → index-7e81d925.js} +15 -15
  110. package/build/esm/{index-48859499.js → index-84262003.js} +106 -106
  111. package/build/esm/{index-2636bf75.js → index-8866edcb.js} +32 -32
  112. package/build/esm/{index-78923559.js → index-98411bb0.js} +6 -6
  113. package/build/esm/{index-e8244d4d.js → index-998bba67.js} +7 -7
  114. package/build/esm/{index-e8dc7545.js → index-9c2fb6cc.js} +2 -2
  115. package/build/esm/{index-0a2a5433.js → index-9fff2952.js} +2 -2
  116. package/build/esm/{index-666fcbe7.js → index-a0e9affe.js} +18 -18
  117. package/build/esm/{index-57967e14.js → index-a2cc229f.js} +1 -1
  118. package/build/esm/{index-55d078f5.js → index-a2d6d225.js} +4 -4
  119. package/build/esm/{index-baf1d5dc.js → index-ac5c3e73.js} +1 -1
  120. package/build/esm/{index-4824b835.js → index-ad67e887.js} +2 -2
  121. package/build/esm/{index-b08c7a4d.js → index-adeaf5df.js} +25 -25
  122. package/build/esm/{index-2a28185d.js → index-ae969513.js} +1 -1
  123. package/build/esm/{index-a71ffc99.js → index-af45a977.js} +18 -18
  124. package/build/esm/{index-4f3486bb.js → index-bc04fec2.js} +6 -6
  125. package/build/esm/{index-49162ec0.js → index-bf147454.js} +1 -1
  126. package/build/esm/{index-6066a12e.js → index-bff29283.js} +1 -1
  127. package/build/esm/{index-5fa8194f.js → index-c9d5f51d.js} +13 -13
  128. package/build/esm/{index-67a0f278.js → index-cbc20386.js} +22 -22
  129. package/build/esm/{index-3bc901ec.js → index-d5e632ad.js} +21 -21
  130. package/build/esm/{index-6df4228a.js → index-d8ae332d.js} +3 -3
  131. package/build/esm/{index-66c3f472.js → index-e0d12d52.js} +2 -2
  132. package/build/esm/{index-8786e237.js → index-e6f48688.js} +16 -16
  133. package/build/esm/{index-5a1dcdb4.js → index-ea97eb49.js} +3 -3
  134. package/build/esm/{index-ccebd981.js → index-eb01d17e.js} +1 -1
  135. package/build/esm/{index-490f65c9.js → index-ee85c770.js} +2 -2
  136. package/build/esm/{index-79d03a1b.js → index-f4c0a637.js} +1 -1
  137. package/build/esm/{index-e195207d.js → index-f7dcf2b7.js} +17 -17
  138. package/build/esm/{index-4de7ed4b.js → index-fa4ece5a.js} +3 -3
  139. package/build/esm/{index-027e2396.js → index-fb80c0d3.js} +13 -13
  140. package/build/esm/index.js +118 -118
  141. package/build/esm/{labelSorting-95cedd6f.js → labelSorting-d32e85e1.js} +4 -4
  142. package/build/esm/lead/LeadGen.helpers.d.ts +2 -2
  143. package/build/esm/lead/LeadGen.type.d.ts +3 -0
  144. package/build/esm/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  145. package/build/esm/lead/LeadGenInline/index.d.ts +2 -0
  146. package/build/esm/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +19 -12
  147. package/build/esm/lead/index.d.ts +5 -1
  148. package/build/esm/lead/layouts/inline.d.ts +3 -2
  149. package/build/esm/lead/layouts/lightbox/index.d.ts +2 -1
  150. package/build/esm/lead/newLeadPopup.d.ts +2 -1
  151. package/build/esm/lead/services/index.d.ts +4 -0
  152. package/build/esm/lead/services/index.type.d.ts +5 -0
  153. package/build/esm/lead/utils.d.ts +18 -0
  154. package/build/esm/lead.css +1 -1
  155. package/build/esm/lead.js +413 -309
  156. package/build/esm/{logoIcon-de126466.js → logoIcon-bf16bc9e.js} +2 -2
  157. package/build/esm/mantine.js +25 -25
  158. package/build/esm/misc/cachedSystem.d.ts +5 -0
  159. package/build/esm/misc.js +17 -17
  160. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  161. package/build/esm/miscGetSocialList.js +8 -8
  162. package/build/esm/miscScreenSizeContext.js +1 -1
  163. package/build/esm/mobileBottomNavigation.js +5 -5
  164. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  165. package/build/esm/molecules.js +74 -74
  166. package/build/esm/moleculesArticleCard.js +6 -6
  167. package/build/esm/moleculesArticleCardV2.js +16 -16
  168. package/build/esm/navigation.js +48 -48
  169. package/build/esm/navigationLogoutPopup.js +9 -9
  170. package/build/esm/navigationProfileButton.js +26 -26
  171. package/build/esm/onboardingV2.js +29 -29
  172. package/build/esm/organisms.js +50 -50
  173. package/build/esm/{post-e1298e96.js → post-a4c5a627.js} +2 -2
  174. package/build/esm/profileNavigation.js +19 -19
  175. package/build/esm/progressBar.js +1 -1
  176. package/build/esm/pwg.js +22 -22
  177. package/build/esm/ssoV2/api/featureFlag.d.ts +2 -1
  178. package/build/esm/ssoV2.js +52 -40
  179. package/build/esm/{store-e75fb3cf.js → store-d6c8b226.js} +3 -3
  180. package/build/esm/subot.js +36 -36
  181. package/build/esm/surveyOrPremiumBanner.js +33 -33
  182. package/build/esm/surveyQuestionCard.js +10 -10
  183. package/build/esm/{surveyThankyouCard-cc8c7962.js → surveyThankyouCard-fe8a9feb.js} +5 -5
  184. package/build/esm/together.js +56 -56
  185. package/build/esm/togetherApiUtils.js +4 -4
  186. package/build/esm/togetherAtoms.js +30 -30
  187. package/build/esm/togetherComponentGlobalContext.js +4 -4
  188. package/build/esm/togetherMolecules.js +51 -51
  189. package/build/esm/togetherMoleculesCardAuthor.js +28 -28
  190. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  191. package/build/esm/togetherMoleculesProfileDetail.js +39 -39
  192. package/build/esm/togetherOrganisms.js +50 -50
  193. package/build/esm/togetherRichTextEditor.js +17 -17
  194. package/build/esm/togetherShareBox.js +10 -10
  195. package/build/esm/{translationsProvider-a5f9639b.js → translationsProvider-e069443f.js} +1 -1
  196. package/build/esm/{treePopoverMenu-81f6bffa.js → treePopoverMenu-bfdf959e.js} +19 -19
  197. package/build/esm/{types-f795d27d.js → types-69c5efb6.js} +2 -2
  198. package/build/esm/types.js +2 -2
  199. package/build/esm/{useCategory-a72bfc82.js → useCategory-f873a41b.js} +5 -5
  200. package/build/esm/{useHealthToolCache-a3fecd60.js → useHealthToolCache-991d03b0.js} +1 -1
  201. package/build/esm/{useMantineLocale-572c08b8.js → useMantineLocale-67d4f2b9.js} +6 -6
  202. package/build/esm/{usePlacesAutocomplete-b4445b4f.js → usePlacesAutocomplete-9317e0ff.js} +1 -1
  203. package/build/esm/{useScreenSize-b88cb8e8.js → useScreenSize-4385d138.js} +2 -2
  204. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  205. package/build/esm/{utils-9fbfea6f.js → utils-4f20ccfb.js} +3 -3
  206. package/build/esm/{utils-90396b9d.js → utils-7af182bc.js} +2 -2
  207. package/build/esm/{utils-d35af81f.js → utils-ad82bf19.js} +5 -5
  208. package/build/esm/{utils-9dc9a220.js → utils-b2e5e5ad.js} +2 -2
  209. package/build/esm/vaccination.js +21 -21
  210. package/build/footer.js +21 -21
  211. package/build/gAssets.js +2 -2
  212. package/build/{healthTools-b2cc182b.js → healthTools-a92bd8b2.js} +1 -1
  213. package/build/healthToolsCardWrapper.js +18 -18
  214. package/build/healthToolsForm.js +33 -33
  215. package/build/hooks.js +13 -13
  216. package/build/i18n.js +2 -2
  217. package/build/i18nV2.js +1 -1
  218. package/build/{index-1008420d.js → index-00ffa650.js} +1 -1
  219. package/build/{index-5a7b040b.js → index-01000f4b.js} +2 -2
  220. package/build/{index-25a66e5f.js → index-05199167.js} +1 -1
  221. package/build/{index-418ba164.js → index-0a71128d.js} +17 -17
  222. package/build/{index-2eab3c59.js → index-0c06baa2.js} +3 -3
  223. package/build/{index-3fc8d95b.js → index-0c1ca66b.js} +24 -24
  224. package/build/{index-a42fcf53.js → index-0e2e9008.js} +16 -16
  225. package/build/{index-e55cedf4.js → index-12cc92e9.js} +1 -1
  226. package/build/{index-df8df3f3.js → index-13cd06ea.js} +2 -2
  227. package/build/{index-077e1cd9.js → index-176486c9.js} +16 -16
  228. package/build/{index-3d352fc3.js → index-19b0b4b8.js} +17 -17
  229. package/build/{index-a3dfd6bd.js → index-213df21d.js} +17 -17
  230. package/build/{index-9de51a83.js → index-256fe4f5.js} +16 -16
  231. package/build/{index-dd0d3d44.js → index-3a2acb2b.js} +3 -3
  232. package/build/{index-517edd90.js → index-3d895c07.js} +18 -18
  233. package/build/{index-d641ed56.js → index-3dddfe93.js} +13 -13
  234. package/build/{index-d0dea1a9.js → index-410b848b.js} +7 -7
  235. package/build/{index-26fcbff2.js → index-514e4159.js} +16 -16
  236. package/build/{index-404d7f7f.js → index-57c64d51.js} +6 -6
  237. package/build/{index-b6626a57.js → index-5a7bdf69.js} +2 -2
  238. package/build/{index-5c6c317d.js → index-5c730c6b.js} +10 -10
  239. package/build/{index-fdfc0480.js → index-5d53ab0d.js} +6 -6
  240. package/build/{index-d1d6e311.js → index-609cb1a5.js} +6 -6
  241. package/build/{index-46af9def.js → index-739a497b.js} +2 -2
  242. package/build/{index-8f2889b3.js → index-768587ff.js} +105 -105
  243. package/build/{index-92ecbcd7.js → index-775b5a8c.js} +2 -2
  244. package/build/{index-3767af08.js → index-7c8d88f3.js} +1 -1
  245. package/build/{index-4edb3958.js → index-83340a9a.js} +2 -2
  246. package/build/{index-edf4e2b3.js → index-871bf383.js} +11 -11
  247. package/build/{index-97d6040f.js → index-8a2f123e.js} +4 -4
  248. package/build/{index-4ef6beb2.js → index-8b43b3c7.js} +3 -3
  249. package/build/{index-5ff1f039.js → index-8cd6aa6b.js} +1 -1
  250. package/build/{index-52857c2e.js → index-8fb6f679.js} +5 -5
  251. package/build/{index-5b7f0734.js → index-996f8d94.js} +2 -2
  252. package/build/{index-3a2005aa.js → index-9c0b2dfe.js} +22 -22
  253. package/build/{index-2f6f1072.js → index-a4ff28b4.js} +6 -6
  254. package/build/{index-fb28307b.js → index-a5edd727.js} +32 -32
  255. package/build/{index-1cc983bc.js → index-aaf7d20f.js} +2 -2
  256. package/build/{index-61054438.js → index-ac11f7ce.js} +18 -18
  257. package/build/{index-10dbeb20.js → index-afafc12f.js} +21 -21
  258. package/build/{index-1d5d83a7.js → index-b41934c6.js} +7 -7
  259. package/build/{index-6b0dfbda.js → index-b421ebe7.js} +13 -13
  260. package/build/{index-e783827f.js → index-bd53408d.js} +3 -3
  261. package/build/{index-eb89f025.js → index-becae264.js} +2 -2
  262. package/build/{index-c75be869.js → index-c5630247.js} +6 -6
  263. package/build/{index-580d1185.js → index-c750e792.js} +1 -1
  264. package/build/{index-37e7e79d.js → index-c957b7d7.js} +13 -13
  265. package/build/{index-e7fe85a8.js → index-c96695aa.js} +15 -15
  266. package/build/{index-f9facafe.js → index-ca3f0ba8.js} +31 -31
  267. package/build/{index-e1c8db4a.js → index-d7fdb813.js} +5 -5
  268. package/build/{index-575b00cb.js → index-d8dbfd8f.js} +25 -25
  269. package/build/{index-bf00c47a.js → index-db76af5d.js} +2 -2
  270. package/build/{index-c19c34f9.js → index-dbb1f91e.js} +1 -1
  271. package/build/{index-4fc88401.js → index-dc5ced87.js} +2 -2
  272. package/build/{index-cfa5a340.js → index-e029c70d.js} +4 -4
  273. package/build/{index-1b64fe74.js → index-e1336821.js} +2 -2
  274. package/build/{index-95c85663.js → index-e787aa67.js} +2 -2
  275. package/build/{index-3147fb59.js → index-e8e77e72.js} +17 -17
  276. package/build/{index-998ca905.js → index-e9125e2f.js} +222 -212
  277. package/build/{index-e367d8db.js → index-ec6df9a6.js} +2 -2
  278. package/build/{index-171ad8f9.js → index-eca3fc01.js} +1 -1
  279. package/build/{index-3b5ae660.js → index-ee0fc7a1.js} +13 -13
  280. package/build/{index-add168a9.js → index-eef792eb.js} +3 -3
  281. package/build/{index-ed198068.js → index-f17a3d3c.js} +1 -1
  282. package/build/{index-d22a4582.js → index-f90805e0.js} +3 -3
  283. package/build/index.js +118 -118
  284. package/build/{labelSorting-ac146fd1.js → labelSorting-ba40954c.js} +4 -4
  285. package/build/lead/LeadGen.helpers.d.ts +2 -2
  286. package/build/lead/LeadGen.type.d.ts +3 -0
  287. package/build/lead/LeadGenInline/LeadGenInline.d.ts +8 -0
  288. package/build/lead/LeadGenInline/index.d.ts +2 -0
  289. package/build/lead/LeadGenSubscriptionBox/LeadGenContext.d.ts +19 -12
  290. package/build/lead/index.d.ts +5 -1
  291. package/build/lead/layouts/inline.d.ts +3 -2
  292. package/build/lead/layouts/lightbox/index.d.ts +2 -1
  293. package/build/lead/newLeadPopup.d.ts +2 -1
  294. package/build/lead/services/index.d.ts +4 -0
  295. package/build/lead/services/index.type.d.ts +5 -0
  296. package/build/lead/utils.d.ts +18 -0
  297. package/build/lead.css +1 -1
  298. package/build/lead.js +413 -307
  299. package/build/{logoIcon-7ed5fe74.js → logoIcon-839ec647.js} +2 -2
  300. package/build/mantine.js +22 -22
  301. package/build/misc/cachedSystem.d.ts +5 -0
  302. package/build/misc.js +17 -17
  303. package/build/miscGetDynamicHealthTool.js +4 -4
  304. package/build/miscGetSocialList.js +8 -8
  305. package/build/miscScreenSizeContext.js +1 -1
  306. package/build/mobileBottomNavigation.js +5 -5
  307. package/build/mobileBottomNavigationIcon.js +5 -5
  308. package/build/molecules.js +74 -74
  309. package/build/moleculesArticleCard.js +6 -6
  310. package/build/moleculesArticleCardV2.js +16 -16
  311. package/build/navigation.js +49 -48
  312. package/build/navigationLogoutPopup.js +9 -9
  313. package/build/navigationProfileButton.js +26 -26
  314. package/build/onboardingV2.js +28 -28
  315. package/build/organisms.js +50 -50
  316. package/build/{post-d25c4a01.js → post-ad9d4cd8.js} +2 -2
  317. package/build/profileNavigation.js +19 -19
  318. package/build/progressBar.js +1 -1
  319. package/build/pwg.js +22 -22
  320. package/build/ssoV2/api/featureFlag.d.ts +2 -1
  321. package/build/ssoV2.js +50 -38
  322. package/build/{store-a297f047.js → store-e15ac771.js} +3 -3
  323. package/build/subot.js +35 -35
  324. package/build/surveyOrPremiumBanner.js +33 -33
  325. package/build/surveyQuestionCard.js +10 -10
  326. package/build/{surveyThankyouCard-139a765c.js → surveyThankyouCard-9fd2e394.js} +5 -5
  327. package/build/together.js +56 -56
  328. package/build/togetherApiUtils.js +4 -4
  329. package/build/togetherAtoms.js +30 -30
  330. package/build/togetherComponentGlobalContext.js +4 -4
  331. package/build/togetherMolecules.js +51 -51
  332. package/build/togetherMoleculesCardAuthor.js +28 -28
  333. package/build/togetherMoleculesPostImagePreview.js +11 -11
  334. package/build/togetherMoleculesProfileDetail.js +39 -39
  335. package/build/togetherOrganisms.js +50 -50
  336. package/build/togetherRichTextEditor.js +17 -17
  337. package/build/togetherShareBox.js +10 -10
  338. package/build/{translationsProvider-0f656d0b.js → translationsProvider-9e02aca0.js} +1 -1
  339. package/build/{treePopoverMenu-72ed51e3.js → treePopoverMenu-3039725f.js} +19 -19
  340. package/build/{types-d8dcb067.js → types-e1d556ba.js} +2 -2
  341. package/build/types.js +2 -2
  342. package/build/{useCategory-d9b732f5.js → useCategory-84daabf6.js} +5 -5
  343. package/build/{useHealthToolCache-e2d64e98.js → useHealthToolCache-dc226c20.js} +1 -1
  344. package/build/{useMantineLocale-ba80f594.js → useMantineLocale-41665618.js} +6 -6
  345. package/build/{usePlacesAutocomplete-3b7b5088.js → usePlacesAutocomplete-1fdd7997.js} +1 -1
  346. package/build/{useScreenSize-12d02c34.js → useScreenSize-903a492c.js} +2 -2
  347. package/build/useTogetherAuthRequiredAction.js +10 -10
  348. package/build/{utils-0a8f7676.js → utils-7ea786dd.js} +3 -3
  349. package/build/{utils-43c8c1cc.js → utils-a3659307.js} +2 -2
  350. package/build/{utils-51f5a5b1.js → utils-c700f985.js} +2 -2
  351. package/build/{utils-850b757b.js → utils-c91e08b4.js} +5 -5
  352. package/build/vaccination.js +21 -21
  353. package/package.json +1 -1
  354. /package/build/{BMI_BOYS.percentile.monthly-0b7d9697.js → BMI_BOYS.percentile.monthly-74992e75.js} +0 -0
  355. /package/build/{BMI_BOYS.percentile.weekly-2cb57ee8.js → BMI_BOYS.percentile.weekly-582ef7a6.js} +0 -0
  356. /package/build/{BMI_BOYS.percentile.yearly-f569a1b2.js → BMI_BOYS.percentile.yearly-460165ca.js} +0 -0
  357. /package/build/{BMI_BOYS.zscore.monthly-a82e1f15.js → BMI_BOYS.zscore.monthly-a01bcf2d.js} +0 -0
  358. /package/build/{BMI_BOYS.zscore.weekly-166db77a.js → BMI_BOYS.zscore.weekly-de430b2a.js} +0 -0
  359. /package/build/{BMI_BOYS.zscore.yearly-4ab9256a.js → BMI_BOYS.zscore.yearly-b0bc4bdf.js} +0 -0
  360. /package/build/{BMI_GIRLS.percentile.monthly-b93b31ee.js → BMI_GIRLS.percentile.monthly-55ae7f36.js} +0 -0
  361. /package/build/{BMI_GIRLS.percentile.weekly-37ca8d0e.js → BMI_GIRLS.percentile.weekly-98c30f99.js} +0 -0
  362. /package/build/{BMI_GIRLS.percentile.yearly-944f186e.js → BMI_GIRLS.percentile.yearly-1b06aacd.js} +0 -0
  363. /package/build/{BMI_GIRLS.zscore.monthly-d59b27cc.js → BMI_GIRLS.zscore.monthly-5ce4888b.js} +0 -0
  364. /package/build/{BMI_GIRLS.zscore.weekly-bfdddc98.js → BMI_GIRLS.zscore.weekly-dddf08f7.js} +0 -0
  365. /package/build/{BMI_GIRLS.zscore.yearly-6db3f48a.js → BMI_GIRLS.zscore.yearly-08731830.js} +0 -0
  366. /package/build/{ChevronDown-e4fab9f7.js → ChevronDown-f9205b1d.js} +0 -0
  367. /package/build/{Close-ee6dddff.js → Close-59b9c491.js} +0 -0
  368. /package/build/{Google-5c0305bc.js → Google-89065f38.js} +0 -0
  369. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-36582288.js → HEAD CIRCUM_BOYS.percentile.monthly-2790e28c.js} +0 -0
  370. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-8fed48ee.js → HEAD CIRCUM_BOYS.percentile.weekly-19ce6a75.js} +0 -0
  371. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-b612f439.js → HEAD CIRCUM_BOYS.percentile.yearly-c98aa498.js} +0 -0
  372. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-2ea4f849.js → HEAD CIRCUM_BOYS.zscore.monthly-352ae196.js} +0 -0
  373. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-c097f1e7.js → HEAD CIRCUM_BOYS.zscore.weekly-2c9ee27d.js} +0 -0
  374. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-ca6d05be.js → HEAD CIRCUM_BOYS.zscore.yearly-e6f6fffb.js} +0 -0
  375. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-8d3ec039.js → HEAD CIRCUM_GIRLS.percentile.monthly-ddba165a.js} +0 -0
  376. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-045364f9.js → HEAD CIRCUM_GIRLS.percentile.weekly-1264b883.js} +0 -0
  377. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-b086a4dc.js → HEAD CIRCUM_GIRLS.percentile.yearly-83ab5bca.js} +0 -0
  378. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-8a5e608e.js → HEAD CIRCUM_GIRLS.zscore.monthly-f8ae4c1e.js} +0 -0
  379. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-72768c0c.js → HEAD CIRCUM_GIRLS.zscore.weekly-4d5e3970.js} +0 -0
  380. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-12a1807a.js → HEAD CIRCUM_GIRLS.zscore.yearly-d5c4400f.js} +0 -0
  381. /package/build/{HEIGHT_BOYS.percentile.monthly-fdb50a6e.js → HEIGHT_BOYS.percentile.monthly-40cfbf9a.js} +0 -0
  382. /package/build/{HEIGHT_BOYS.percentile.weekly-1cdbd7fc.js → HEIGHT_BOYS.percentile.weekly-4cfb9809.js} +0 -0
  383. /package/build/{HEIGHT_BOYS.percentile.yearly-ae60fbe2.js → HEIGHT_BOYS.percentile.yearly-c6c3da07.js} +0 -0
  384. /package/build/{HEIGHT_BOYS.zscore.monthly-416e3b98.js → HEIGHT_BOYS.zscore.monthly-60edad28.js} +0 -0
  385. /package/build/{HEIGHT_BOYS.zscore.weekly-5841ec32.js → HEIGHT_BOYS.zscore.weekly-bc2fbc48.js} +0 -0
  386. /package/build/{HEIGHT_BOYS.zscore.yearly-46fa3807.js → HEIGHT_BOYS.zscore.yearly-86c1dde5.js} +0 -0
  387. /package/build/{HEIGHT_GIRLS.percentile.monthly-a1a09d3c.js → HEIGHT_GIRLS.percentile.monthly-44704c06.js} +0 -0
  388. /package/build/{HEIGHT_GIRLS.percentile.weekly-b415b4fe.js → HEIGHT_GIRLS.percentile.weekly-61ee7bd8.js} +0 -0
  389. /package/build/{HEIGHT_GIRLS.percentile.yearly-bc777d34.js → HEIGHT_GIRLS.percentile.yearly-1befcb61.js} +0 -0
  390. /package/build/{HEIGHT_GIRLS.zscore.monthly-184bce10.js → HEIGHT_GIRLS.zscore.monthly-1de060e1.js} +0 -0
  391. /package/build/{HEIGHT_GIRLS.zscore.weekly-ebf20453.js → HEIGHT_GIRLS.zscore.weekly-41ce21f7.js} +0 -0
  392. /package/build/{HEIGHT_GIRLS.zscore.yearly-5047a3ae.js → HEIGHT_GIRLS.zscore.yearly-0b86ad95.js} +0 -0
  393. /package/build/{Locale-f4ef93df.js → Locale-a20bc2bb.js} +0 -0
  394. /package/build/{Visible-b268617c.js → Visible-00a88ea6.js} +0 -0
  395. /package/build/{WEIGHT_BOYS.percentile.monthly-9ca324fa.js → WEIGHT_BOYS.percentile.monthly-214aacdd.js} +0 -0
  396. /package/build/{WEIGHT_BOYS.percentile.weekly-93441d0d.js → WEIGHT_BOYS.percentile.weekly-36921182.js} +0 -0
  397. /package/build/{WEIGHT_BOYS.percentile.yearly-fde380b1.js → WEIGHT_BOYS.percentile.yearly-1f1bbcfb.js} +0 -0
  398. /package/build/{WEIGHT_BOYS.zscore.monthly-010099f8.js → WEIGHT_BOYS.zscore.monthly-dfdded5b.js} +0 -0
  399. /package/build/{WEIGHT_BOYS.zscore.weekly-8ccbb9f1.js → WEIGHT_BOYS.zscore.weekly-de0c7c94.js} +0 -0
  400. /package/build/{WEIGHT_BOYS.zscore.yearly-e5c4d856.js → WEIGHT_BOYS.zscore.yearly-180c2581.js} +0 -0
  401. /package/build/{WEIGHT_GIRLS.percentile.monthly-0b41640f.js → WEIGHT_GIRLS.percentile.monthly-61aec809.js} +0 -0
  402. /package/build/{WEIGHT_GIRLS.percentile.weekly-5130013e.js → WEIGHT_GIRLS.percentile.weekly-bbd9e34c.js} +0 -0
  403. /package/build/{WEIGHT_GIRLS.percentile.yearly-aaa00b21.js → WEIGHT_GIRLS.percentile.yearly-5f3f741e.js} +0 -0
  404. /package/build/{WEIGHT_GIRLS.zscore.monthly-69dec2bc.js → WEIGHT_GIRLS.zscore.monthly-ebd17dec.js} +0 -0
  405. /package/build/{WEIGHT_GIRLS.zscore.weekly-97cf045f.js → WEIGHT_GIRLS.zscore.weekly-0dd2e885.js} +0 -0
  406. /package/build/{WEIGHT_GIRLS.zscore.yearly-08d28942.js → WEIGHT_GIRLS.zscore.yearly-2bc83e67.js} +0 -0
  407. /package/build/{animation-6926a72d.js → animation-d7bbfd05.js} +0 -0
  408. /package/build/{constants-c93fb1cc.js → constants-0d7afde6.js} +0 -0
  409. /package/build/{constants-54dd8859.js → constants-4ae51090.js} +0 -0
  410. /package/build/{constants-b5b1126d.js → constants-bba20592.js} +0 -0
  411. /package/build/{dataTransform-0d41cf32.js → dataTransform-c6ded749.js} +0 -0
  412. /package/build/esm/{BMI_BOYS.percentile.monthly-1ef2d698.js → BMI_BOYS.percentile.monthly-db18d48a.js} +0 -0
  413. /package/build/esm/{BMI_BOYS.percentile.weekly-2342ee3b.js → BMI_BOYS.percentile.weekly-9125f743.js} +0 -0
  414. /package/build/esm/{BMI_BOYS.percentile.yearly-a4dd3fef.js → BMI_BOYS.percentile.yearly-94192a1b.js} +0 -0
  415. /package/build/esm/{BMI_BOYS.zscore.monthly-93b887a9.js → BMI_BOYS.zscore.monthly-666c6d56.js} +0 -0
  416. /package/build/esm/{BMI_BOYS.zscore.weekly-32c49983.js → BMI_BOYS.zscore.weekly-b9fd6593.js} +0 -0
  417. /package/build/esm/{BMI_BOYS.zscore.yearly-dcf38f34.js → BMI_BOYS.zscore.yearly-6388cef4.js} +0 -0
  418. /package/build/esm/{BMI_GIRLS.percentile.monthly-f8b98abf.js → BMI_GIRLS.percentile.monthly-7effde6f.js} +0 -0
  419. /package/build/esm/{BMI_GIRLS.percentile.weekly-828d89f5.js → BMI_GIRLS.percentile.weekly-f913327d.js} +0 -0
  420. /package/build/esm/{BMI_GIRLS.percentile.yearly-9d2e52a2.js → BMI_GIRLS.percentile.yearly-88a7bdf9.js} +0 -0
  421. /package/build/esm/{BMI_GIRLS.zscore.monthly-af5a213a.js → BMI_GIRLS.zscore.monthly-bec30098.js} +0 -0
  422. /package/build/esm/{BMI_GIRLS.zscore.weekly-57bd1909.js → BMI_GIRLS.zscore.weekly-573384f3.js} +0 -0
  423. /package/build/esm/{BMI_GIRLS.zscore.yearly-187dd659.js → BMI_GIRLS.zscore.yearly-22f3b1f1.js} +0 -0
  424. /package/build/esm/{ChevronDown-ccc75c5d.js → ChevronDown-150a1256.js} +0 -0
  425. /package/build/esm/{Close-132a19cc.js → Close-39dfda08.js} +0 -0
  426. /package/build/esm/{Google-25700cf6.js → Google-b11fe21a.js} +0 -0
  427. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-d93bbf84.js → HEAD CIRCUM_BOYS.percentile.monthly-f614c6fc.js} +0 -0
  428. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-a51a5ef9.js → HEAD CIRCUM_BOYS.percentile.weekly-9eb6bfbe.js} +0 -0
  429. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-517b4d6c.js → HEAD CIRCUM_BOYS.percentile.yearly-e3b8abc0.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-183fdae4.js → HEAD CIRCUM_BOYS.zscore.monthly-f32bfabb.js} +0 -0
  431. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-85bc0542.js → HEAD CIRCUM_BOYS.zscore.weekly-fba22281.js} +0 -0
  432. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-162b5d93.js → HEAD CIRCUM_BOYS.zscore.yearly-f6721740.js} +0 -0
  433. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-c7e02da7.js → HEAD CIRCUM_GIRLS.percentile.monthly-f8725b7c.js} +0 -0
  434. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-a26cb00f.js → HEAD CIRCUM_GIRLS.percentile.weekly-97387772.js} +0 -0
  435. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-c301a540.js → HEAD CIRCUM_GIRLS.percentile.yearly-c2dedbdc.js} +0 -0
  436. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-3d879884.js → HEAD CIRCUM_GIRLS.zscore.monthly-7c689a78.js} +0 -0
  437. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-658da8bd.js → HEAD CIRCUM_GIRLS.zscore.weekly-bc100ec7.js} +0 -0
  438. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-2630e7a1.js → HEAD CIRCUM_GIRLS.zscore.yearly-6113b2c7.js} +0 -0
  439. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-b0aab6b3.js → HEIGHT_BOYS.percentile.monthly-e5678958.js} +0 -0
  440. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-fdb38e5f.js → HEIGHT_BOYS.percentile.weekly-913a0b50.js} +0 -0
  441. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-d14be247.js → HEIGHT_BOYS.percentile.yearly-18af7378.js} +0 -0
  442. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-369d34b9.js → HEIGHT_BOYS.zscore.monthly-8284876a.js} +0 -0
  443. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-91b06662.js → HEIGHT_BOYS.zscore.weekly-6a87c59c.js} +0 -0
  444. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-f3179030.js → HEIGHT_BOYS.zscore.yearly-b48ee328.js} +0 -0
  445. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-a1fbd0a9.js → HEIGHT_GIRLS.percentile.monthly-ebc399f1.js} +0 -0
  446. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-66cec243.js → HEIGHT_GIRLS.percentile.weekly-47580eaa.js} +0 -0
  447. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-b71597b5.js → HEIGHT_GIRLS.percentile.yearly-951d639b.js} +0 -0
  448. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-59df61a8.js → HEIGHT_GIRLS.zscore.monthly-0640f32b.js} +0 -0
  449. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-4c0e1a6b.js → HEIGHT_GIRLS.zscore.weekly-ac6176b9.js} +0 -0
  450. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-9528238a.js → HEIGHT_GIRLS.zscore.yearly-767a1454.js} +0 -0
  451. /package/build/esm/{Locale-ecb80974.js → Locale-7e8c3193.js} +0 -0
  452. /package/build/esm/{Visible-3444dd68.js → Visible-26c970af.js} +0 -0
  453. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b96914b0.js → WEIGHT_BOYS.percentile.monthly-d542e6af.js} +0 -0
  454. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-22de2a7d.js → WEIGHT_BOYS.percentile.weekly-36e32ce3.js} +0 -0
  455. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-b5dbbb3f.js → WEIGHT_BOYS.percentile.yearly-7fb16b1d.js} +0 -0
  456. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-b74a5f43.js → WEIGHT_BOYS.zscore.monthly-adbdfdd1.js} +0 -0
  457. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-88fd2a94.js → WEIGHT_BOYS.zscore.weekly-3f1f6b51.js} +0 -0
  458. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-e20ba6c5.js → WEIGHT_BOYS.zscore.yearly-8d1b094f.js} +0 -0
  459. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-3944b1a7.js → WEIGHT_GIRLS.percentile.monthly-1518c4b2.js} +0 -0
  460. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-2790fcb9.js → WEIGHT_GIRLS.percentile.weekly-4647e8b7.js} +0 -0
  461. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-5c65a85c.js → WEIGHT_GIRLS.percentile.yearly-75c03fa2.js} +0 -0
  462. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-0c8f4f21.js → WEIGHT_GIRLS.zscore.monthly-208c2b04.js} +0 -0
  463. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-f22aa2f3.js → WEIGHT_GIRLS.zscore.weekly-82bd4d43.js} +0 -0
  464. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-3c344cfd.js → WEIGHT_GIRLS.zscore.yearly-e979ffc3.js} +0 -0
  465. /package/build/esm/{animation-24e5f58b.js → animation-9f88ebc3.js} +0 -0
  466. /package/build/esm/{constants-8956c848.js → constants-69692e4e.js} +0 -0
  467. /package/build/esm/{constants-f00dc6f9.js → constants-74cdf592.js} +0 -0
  468. /package/build/esm/{constants-ec5add3a.js → constants-cc8260ef.js} +0 -0
  469. /package/build/esm/{dataTransform-c3f6a587.js → dataTransform-bb7c1b26.js} +0 -0
  470. /package/build/esm/{index-8528d78b.js → index-0fce55ff.js} +0 -0
  471. /package/build/esm/{index-450360f1.js → index-3dd16ecf.js} +0 -0
  472. /package/build/esm/{index-3a5c2863.js → index-4f2dc29a.js} +0 -0
  473. /package/build/esm/{index-50a4cfcb.js → index-93e56e81.js} +0 -0
  474. /package/build/esm/{index-3a01846d.js → index-bd7ec512.js} +0 -0
  475. /package/build/esm/{index-73dcec2a.js → index-d8a842a1.js} +0 -0
  476. /package/build/esm/{index-a0a1eedd.js → index-e07488f1.js} +0 -0
  477. /package/build/esm/{index-f9644665.js → index-e3e99d15.js} +0 -0
  478. /package/build/esm/{index.styles-cc839a9f.js → index.styles-084c59ef.js} +0 -0
  479. /package/build/esm/{localizeNumberFormat-29d40682.js → localizeNumberFormat-f4b6c47a.js} +0 -0
  480. /package/build/esm/{normalizeLink-3a1f7ea5.js → normalizeLink-936d90eb.js} +0 -0
  481. /package/build/esm/{number-2e11be8f.js → number-224a42c3.js} +0 -0
  482. /package/build/esm/{other-4b9f6896.js → other-ecd44617.js} +0 -0
  483. /package/build/esm/{paths-8ba2d170.js → paths-579d0032.js} +0 -0
  484. /package/build/esm/{translationsContext-f88f9c85.js → translationsContext-1f3f9575.js} +0 -0
  485. /package/build/esm/{tslib.es6-666f5038.js → tslib.es6-ab554322.js} +0 -0
  486. /package/build/esm/{types-f0849b58.js → types-2d4d27c5.js} +0 -0
  487. /package/build/esm/{useIsInit-f365ee9e.js → useIsInit-ea8b816c.js} +0 -0
  488. /package/build/esm/{useOutsideClick-45af01df.js → useOutsideClick-c4e5a727.js} +0 -0
  489. /package/build/esm/{useScrollbarSize-86e69b14.js → useScrollbarSize-eca6089a.js} +0 -0
  490. /package/build/esm/{useUniqueId-b491ed22.js → useUniqueId-7d263389.js} +0 -0
  491. /package/build/esm/{utils-ee90d7b0.js → utils-1e5d7b0f.js} +0 -0
  492. /package/build/{index-25d3f9d0.js → index-1c7d1db5.js} +0 -0
  493. /package/build/{index-8764b0c1.js → index-20c4211d.js} +0 -0
  494. /package/build/{index-1e86b50b.js → index-5987ef8d.js} +0 -0
  495. /package/build/{index-043f106d.js → index-76b35a39.js} +0 -0
  496. /package/build/{index-b20fd7fb.js → index-9ec91ab1.js} +0 -0
  497. /package/build/{index-9b6f9005.js → index-d6720486.js} +0 -0
  498. /package/build/{index-91b1d3ac.js → index-e93bb180.js} +0 -0
  499. /package/build/{index-595d0943.js → index-fe50d571.js} +0 -0
  500. /package/build/{index.styles-8385bdd2.js → index.styles-1627ae94.js} +0 -0
  501. /package/build/{localizeNumberFormat-4785b390.js → localizeNumberFormat-2e6de276.js} +0 -0
  502. /package/build/{normalizeLink-db758106.js → normalizeLink-f5a31cb7.js} +0 -0
  503. /package/build/{number-9cddf28f.js → number-df5f349e.js} +0 -0
  504. /package/build/{other-6fa145ba.js → other-0dadd1e0.js} +0 -0
  505. /package/build/{paths-5426a473.js → paths-88b3a03a.js} +0 -0
  506. /package/build/{translationsContext-ce78b682.js → translationsContext-b427e34a.js} +0 -0
  507. /package/build/{tslib.es6-b1e149fb.js → tslib.es6-80cd01ec.js} +0 -0
  508. /package/build/{types-427efcb2.js → types-4dc6d77a.js} +0 -0
  509. /package/build/{useIsInit-ac2852aa.js → useIsInit-048d2d0e.js} +0 -0
  510. /package/build/{useOutsideClick-961ec2ba.js → useOutsideClick-4b24cb4a.js} +0 -0
  511. /package/build/{useScrollbarSize-e2c17612.js → useScrollbarSize-276c45bd.js} +0 -0
  512. /package/build/{useUniqueId-9619ad78.js → useUniqueId-9af8c712.js} +0 -0
  513. /package/build/{utils-3abc945c.js → utils-f6f80ca7.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1,52 +1,52 @@
1
- import { _ as __rest, a as __awaiter } from './tslib.es6-666f5038.js';
2
- import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
1
+ import { a as __awaiter, _ as __rest } from './tslib.es6-ab554322.js';
2
+ import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, memo, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
3
3
  import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, Portal, Transition, Overlay } from '@mantine/core';
4
4
  import debounce from 'lodash/debounce';
5
5
  import { createFormContext, useForm } from '@mantine/form';
6
6
  import dayjs from 'dayjs';
7
- import { B as BEARER_TOKEN_COOKIE } from './index-55d078f5.js';
7
+ import { B as BEARER_TOKEN_COOKIE } from './index-a2d6d225.js';
8
8
  import { getCookie, setCookie } from './miscCookieHelper.js';
9
- import { u as useTranslations } from './index-baf1d5dc.js';
10
- import { T as TranslationsContext } from './translationsContext-f88f9c85.js';
11
- import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-ee90d7b0.js';
12
- import { T as Text } from './index-34947503.js';
13
- import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-076307f1.js';
14
- import { D as DatePicker } from './index-0fedc2dc.js';
15
- import { B as Button } from './index-2a28185d.js';
16
- import './index.styles-cc839a9f.js';
9
+ import { u as useTranslations } from './index-ac5c3e73.js';
10
+ import { T as TranslationsContext } from './translationsContext-1f3f9575.js';
11
+ import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-1e5d7b0f.js';
12
+ import { T as Text } from './index-4e1b366e.js';
13
+ import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-7bc4f0c5.js';
14
+ import { D as DatePicker } from './index-49547dd9.js';
15
+ import { B as Button } from './index-ae969513.js';
16
+ import './index.styles-084c59ef.js';
17
17
  import { useIntersection, useClickOutside } from '@mantine/hooks';
18
- import './useMantineLocale-572c08b8.js';
19
- import { C as COMMON_DATE_TRANSLATE_KEY } from './index-79d03a1b.js';
20
- import './index-73dcec2a.js';
21
- import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-d58464d2.js';
22
- import './other-4b9f6896.js';
23
- import './index-d1c22940.js';
24
- import { M as MAPPED_LOCALE } from './utils-90396b9d.js';
18
+ import './useMantineLocale-67d4f2b9.js';
19
+ import { C as COMMON_DATE_TRANSLATE_KEY } from './index-f4c0a637.js';
20
+ import './index-d8a842a1.js';
21
+ import { L as LOCALE_SPECS, Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-46576e24.js';
22
+ import './other-ecd44617.js';
23
+ import './index-09f17ac2.js';
24
+ import { M as MAPPED_LOCALE } from './utils-7af182bc.js';
25
25
  import { DateInput } from '@mantine/dates';
26
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-b4445b4f.js';
27
- import { H as Heading$1 } from './index-e8dc7545.js';
28
- import { t as translationsMap$1 } from './translationsProvider-a5f9639b.js';
29
- import { L as LOCALE } from './Locale-ecb80974.js';
26
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-9317e0ff.js';
27
+ import { H as Heading$1 } from './index-9c2fb6cc.js';
28
+ import { t as translationsMap$1 } from './translationsProvider-e069443f.js';
29
+ import { L as LOCALE } from './Locale-7e8c3193.js';
30
30
  import { v1 } from 'uuid';
31
31
  import { domainLocales } from './constantsDomainLocales.js';
32
32
  import { parsePhoneNumber } from 'react-phone-number-input';
33
33
  import styled from '@emotion/styled';
34
34
  import { theme } from './miscTheme.js';
35
35
  import { css } from '@emotion/react';
36
- import { T as TogetherComponentGlobalContext } from './utils-9fbfea6f.js';
37
- import { i as isVideo } from './index-8528d78b.js';
38
- import { u as useScreenSize } from './useScreenSize-b88cb8e8.js';
36
+ import { T as TogetherComponentGlobalContext } from './utils-4f20ccfb.js';
37
+ import { i as isVideo } from './index-0fce55ff.js';
38
+ import { u as useScreenSize } from './useScreenSize-4385d138.js';
39
39
  import { motion } from 'framer-motion';
40
40
  import { createPortal } from 'react-dom';
41
- import { I as InputDate } from './InputDate-8e83c671.js';
42
- import { D as DrawerComponent } from './index-c8ed6cc5.js';
43
- import { C as Close } from './Close-132a19cc.js';
41
+ import { I as InputDate } from './InputDate-0bbec559.js';
42
+ import { D as DrawerComponent } from './index-31c505ff.js';
43
+ import { C as Close } from './Close-39dfda08.js';
44
44
  import './constantsIsProduction.js';
45
- import './normalizeLink-3a1f7ea5.js';
45
+ import './normalizeLink-936d90eb.js';
46
46
  import '@hhgtech/icons/other';
47
47
  import '@mantine/carousel';
48
48
  import 'classnames';
49
- import './useUniqueId-b491ed22.js';
49
+ import './useUniqueId-7d263389.js';
50
50
  import './constantsSite.js';
51
51
  import '@hhgtech/icons/core';
52
52
  import '@mantine/notifications';
@@ -64,11 +64,11 @@ import './i18n-values/vi-VN.js';
64
64
  import './i18n-values/vi-VN_MB.js';
65
65
  import './i18n-values/zh-SG.js';
66
66
  import './i18n-values/zh-TW.js';
67
- import './index-3a01846d.js';
67
+ import './index-bd7ec512.js';
68
68
  import 'slugify';
69
69
  import 'string-format';
70
70
  import './togetherApiPaths.js';
71
- import './constants-8956c848.js';
71
+ import './constants-69692e4e.js';
72
72
  import 'vaul';
73
73
 
74
74
  const LeadGenComponentContext = createContext({});
@@ -121,33 +121,6 @@ const LEADGEN_BLOCK_INPUT = [
121
121
  LEADGEN_BLOCK.CheckboxBlock,
122
122
  LEADGEN_BLOCK.TncBlock,
123
123
  ];
124
- const leadGenFieldNamePhone = (listBlockAdded) => {
125
- return listBlockAdded
126
- .filter(({ name }) => [
127
- LEADGEN_BLOCK.PhoneBlock,
128
- LEADGEN_BLOCK.PhoneOtpBlock,
129
- LEADGEN_BLOCK.WhatsappOtpBlock,
130
- LEADGEN_BLOCK.ZaloOtpBlock,
131
- ].includes(name))
132
- .map(({ data }) => data.value);
133
- };
134
- const leadGenFieldRequired = (blocks) => {
135
- if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
136
- return [];
137
- }
138
- return blocks
139
- .map(({ data, name, id }) => {
140
- const { required, value } = data;
141
- if (name === LEADGEN_BLOCK.TncBlock && id && required) {
142
- return `TNC-${id}`;
143
- }
144
- if (required) {
145
- return value;
146
- }
147
- return;
148
- })
149
- .filter(Boolean);
150
- };
151
124
  const SSO_MAP_LEAD = ['name', 'email', 'birthday', 'phone', 'gender'];
152
125
  const LEAD_LOCALE_DATA$1 = {
153
126
  'vi-VN': {
@@ -230,6 +203,33 @@ const mappingSSOToLead = (userInfoProps) => {
230
203
  return;
231
204
  }
232
205
  };
206
+ const leadGenFieldNamePhone = (listBlockAdded) => {
207
+ return listBlockAdded
208
+ .filter(({ name }) => [
209
+ LEADGEN_BLOCK.PhoneBlock,
210
+ LEADGEN_BLOCK.PhoneOtpBlock,
211
+ LEADGEN_BLOCK.WhatsappOtpBlock,
212
+ LEADGEN_BLOCK.ZaloOtpBlock,
213
+ ].includes(name))
214
+ .map(({ data }) => data.value);
215
+ };
216
+ const leadGenFieldRequired = (blocks) => {
217
+ if (!(blocks === null || blocks === void 0 ? void 0 : blocks.length)) {
218
+ return [];
219
+ }
220
+ return blocks
221
+ .map(({ data, name, id }) => {
222
+ const { required, value } = data;
223
+ if (name === LEADGEN_BLOCK.TncBlock && id && required) {
224
+ return `TNC-${id}`;
225
+ }
226
+ if (required) {
227
+ return value;
228
+ }
229
+ return;
230
+ })
231
+ .filter(Boolean);
232
+ };
233
233
  const formatCampaignDetail = (campaign) => {
234
234
  if (!campaign) {
235
235
  return {};
@@ -376,6 +376,55 @@ const formatLeadGenFormValue = (values = {}, blocks) => {
376
376
  return newValues;
377
377
  };
378
378
 
379
+ const TIMEOUT = 30 * 60 * 1000;
380
+ const WAITING_FIRST_RESP = 'waitingTheFirstResponse';
381
+ const CachedSystem = {
382
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
383
+ cached: {},
384
+ clearCached: (prefix) => {
385
+ console.log(CachedSystem.cached);
386
+ Object.keys(CachedSystem.cached)
387
+ .filter((k) => k.startsWith(prefix))
388
+ .forEach((key) => {
389
+ console.log(key);
390
+ CachedSystem.cached[key] = undefined;
391
+ });
392
+ },
393
+ withCached: (key, fnResponse, timeout = TIMEOUT) => __awaiter(void 0, void 0, void 0, function* () {
394
+ if (CachedSystem.cached[key] === WAITING_FIRST_RESP) {
395
+ return new Promise((resolve) => {
396
+ const startDate = new Date().getTime();
397
+ const intervalId = setInterval(() => {
398
+ const currentDate = new Date().getTime();
399
+ if (currentDate - startDate > 3000) {
400
+ clearInterval(intervalId);
401
+ }
402
+ if (typeof CachedSystem.cached[key] === 'object') {
403
+ resolve(CachedSystem.cached[key]);
404
+ clearInterval(intervalId);
405
+ }
406
+ }, 100);
407
+ });
408
+ }
409
+ if (typeof CachedSystem.cached[key] === 'object') {
410
+ return CachedSystem.cached[key];
411
+ }
412
+ CachedSystem.cached[key] = 'waitingTheFirstResponse';
413
+ try {
414
+ const result = yield fnResponse();
415
+ CachedSystem.cached[key] = result;
416
+ setTimeout(() => {
417
+ CachedSystem.cached[key] = undefined;
418
+ }, timeout);
419
+ return result;
420
+ }
421
+ catch (err) {
422
+ CachedSystem.cached[key] = undefined;
423
+ return Promise.reject(err);
424
+ }
425
+ }),
426
+ };
427
+
379
428
  class Store {
380
429
  constructor() {
381
430
  this.apiSsoUrl = 'https://staging-id.hellobacsi.com/';
@@ -385,6 +434,8 @@ class Store {
385
434
  }
386
435
  const leadStore = new Store();
387
436
 
437
+ const LEADGEN_CACHE_KEY = 'LeadGen_';
438
+ const LEADGEN_CACHE_TIME = 5 * 60 * 1000; // 5 minutes
388
439
  const METHOD = {
389
440
  GET: 'get',
390
441
  POST: 'POST',
@@ -571,7 +622,24 @@ const trackingSubscription = (data) => {
571
622
  data,
572
623
  });
573
624
  };
625
+ function getCampaigns({ url: urlProps, siteId, apiLeadUrl, }) {
626
+ let url = urlProps || '';
627
+ if (typeof window !== 'undefined') {
628
+ const { location } = window;
629
+ url = url || location.href.toLowerCase();
630
+ }
631
+ const ga_client_id = getCookie('_ga') || null;
632
+ const AS_PATH = `${apiLeadUrl || leadStore.apiLeadUrl}api/campaign/${siteId}`;
633
+ return CachedSystem.withCached(LEADGEN_CACHE_KEY + AS_PATH, () => fetch(AS_PATH, {
634
+ method: 'POST',
635
+ headers: { 'Content-Type': 'application/json' },
636
+ body: JSON.stringify({ url, ga_client_id }),
637
+ })
638
+ .then((res) => res.json())
639
+ .then(({ _data }) => (_data === null || _data === void 0 ? void 0 : _data.campaigns) || []), LEADGEN_CACHE_TIME);
640
+ }
574
641
  const Service = {
642
+ getCampaigns,
575
643
  campaignGetById,
576
644
  getCampaignByCode,
577
645
  getSubscriptionBoxInfo,
@@ -1624,12 +1692,6 @@ const getTranslations = (locale) => {
1624
1692
  return translationsMap['en-PH'];
1625
1693
  };
1626
1694
 
1627
- const LeadGenTranslationProvider = (props) => {
1628
- const { locale, children } = props;
1629
- const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
1630
- return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
1631
- };
1632
-
1633
1695
  // import mockLeadData from './mockLeadData'
1634
1696
  const listCampaignScheduled = [];
1635
1697
  const listCampaignScheduledToActivated = [];
@@ -1805,167 +1867,163 @@ function clearPassiveEvent() {
1805
1867
  LEAD_SCROLL_EVENT = null;
1806
1868
  }
1807
1869
  }
1808
- function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
1809
- // clear previous passive event, check for new condition
1810
- clearPassiveEvent();
1811
- const leadCurrentUrl = DEBUG_URL ||
1812
- ('https://' +
1813
- location.hostname +
1814
- location.pathname +
1815
- location.search).toLowerCase();
1816
- fetch(leadApi + 'api/campaign/' + leadSiteId, {
1817
- method: 'POST',
1818
- headers: {
1819
- 'Content-Type': 'application/json',
1820
- },
1821
- body: JSON.stringify({
1822
- url: leadCurrentUrl,
1823
- ga_client_id: getCookie('_ga') || null,
1824
- }),
1825
- })
1826
- .then((response) => {
1827
- return response.json();
1828
- // return mockLeadData || response.json()
1829
- })
1830
- .then((data) => {
1831
- var _a, _b, _c, _d;
1832
- LeadLog('List campagin: ', data);
1833
- LEAD_RESET_VAR();
1834
- if (data._status == 1) {
1835
- const campaigns = (((_b = (_a = data._data) === null || _a === void 0 ? void 0 : _a.campaigns) === null || _b === void 0 ? void 0 : _b.filter(filterFnCampaign)) || []).filter(fillterApprearanceTimeCampaign);
1836
- if (!getCookie('hhg-id')) {
1837
- setCookie('hhg-id', v1(), {
1838
- domain: '.' + leadDomain,
1839
- path: '/',
1840
- });
1841
- LeadLog('😍 Set HHG ID cookie');
1842
- }
1843
- // getCookie('hhg-id')
1844
- // TODO: HP-534 Filter desktop
1845
- let campaignsDevice = [];
1846
- if (isMobile()) {
1847
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1870
+ function getCurrentCampaign({ campaigns, leadDomain, leadCurrentUrl, }) {
1871
+ if (!getCookie('hhg-id')) {
1872
+ setCookie('hhg-id', v1(), { domain: `.${leadDomain}`, path: '/' });
1873
+ LeadLog('😍 Set HHG ID cookie');
1874
+ }
1875
+ // TODO: HP-534 Filter desktop
1876
+ let campaignsDevice = [];
1877
+ if (isMobile()) {
1878
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.MOBILE));
1879
+ }
1880
+ else {
1881
+ campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1882
+ }
1883
+ LeadLog(`👓 campaignsDevice`, campaignsDevice);
1884
+ LeadLog('--listCampaignScheduled', listCampaignScheduled);
1885
+ LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1886
+ LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1887
+ LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1888
+ LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1889
+ LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1890
+ // Check links
1891
+ let listLinksObj = campaignsDevice
1892
+ .map((i, index) => i.targets
1893
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1894
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1895
+ .flat(1);
1896
+ // Check list link match current href
1897
+ listLinksObj = listLinksObj.filter((i) => {
1898
+ var _a;
1899
+ const target = new URL(String(i.target).toLowerCase());
1900
+ if (i.option == 'exact_match')
1901
+ // FOR TEST LOCAL:
1902
+ // return Boolean(location.pathname === target.pathname)
1903
+ return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1904
+ if (i.option == 'start_with') {
1905
+ // FOR TEST LOCAL:
1906
+ // if (location.pathname.includes(target.pathname)) {
1907
+ if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1908
+ const listExcluding = i.sub_target
1909
+ .filter((i) => i.option == 'excluding')
1910
+ .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1911
+ return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1848
1912
  }
1849
1913
  else {
1850
- campaignsDevice = campaigns.filter((c) => c.device_types.some((d) => d.id == LEAD_DEVICE_TYPE.DESKTOP));
1851
- }
1852
- LeadLog(`👓 campaignsDevice`, campaignsDevice);
1853
- LeadLog('--listCampaignScheduled', listCampaignScheduled);
1854
- LeadLog('--listCampaignScheduledToActivated', listCampaignScheduledToActivated);
1855
- LeadLog('--listCampaignActiveButExpired', listCampaignActiveButExpired);
1856
- LeadLog('--listCampaignExcludeSonsored', listCampaignExcludeSonsored);
1857
- LeadLog('--listCampaignDifferentSponsor', listCampaignDifferentSponsor);
1858
- LeadLog('--listCampaignNotDisplayInRangeOfTime', listCampaignNotDisplayInRangeOfTime);
1859
- // Check links
1860
- let listLinksObj = campaignsDevice
1861
- .map((i, index) => i.targets
1862
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.LINKS)
1863
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1864
- .flat(1);
1865
- // Check list link match current href
1866
- listLinksObj = listLinksObj.filter((i) => {
1867
- var _a;
1868
- const target = new URL(String(i.target).toLowerCase());
1869
- if (i.option == 'exact_match')
1870
- // FOR TEST LOCAL:
1871
- // return Boolean(location.pathname === target.pathname)
1872
- return Boolean(leadCurrentUrl === ((_a = target.href) === null || _a === void 0 ? void 0 : _a.toLowerCase()));
1873
- if (i.option == 'start_with') {
1874
- // FOR TEST LOCAL:
1875
- // if (location.pathname.includes(target.pathname)) {
1876
- if (leadCurrentUrl.includes(String(i.target).toLowerCase())) {
1877
- const listExcluding = i.sub_target
1878
- .filter((i) => i.option == 'excluding')
1879
- .map((i) => { var _a; return (_a = i.value) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
1880
- return !listExcluding.includes(leadCurrentUrl.split('?')[0]);
1881
- }
1882
- else {
1883
- return false;
1884
- }
1885
- }
1886
- });
1887
- // Check tags
1888
- const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1889
- const listTags = listMetaTag.map((i) => i.content);
1890
- let listCampaignHasTag = [];
1891
- let listTagsObj = [];
1892
- if (listTags && listTags.length) {
1893
- listCampaignHasTag = campaignsDevice
1894
- .map((i, index) => i.targets
1895
- .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1896
- .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1897
- .flat(1);
1898
- listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1914
+ return false;
1899
1915
  }
1900
- const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1901
- const cookieKeys = document.cookie
1902
- .split('; ')
1903
- .map((i) => i.split('=')[0]);
1904
- const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1905
- LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1906
- const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1907
- LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1908
- const listCampaignSubmitedClosed = [
1909
- ...listCampaignCodeSubmited,
1910
- ...listCampaignCodeClosed,
1911
- ];
1912
- const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1913
- const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1914
- return !hasSubmited;
1915
- });
1916
- const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1917
- // .sort(
1918
- // (a, b) =>
1919
- // (listCampaignValid[a.campaignIndex]?.score || 0) -
1920
- // (listCampaignValid[b.campaignIndex]?.score || 0),
1921
- // )
1922
- LeadLog('--listCampaignValid : ', listCampaignValid);
1923
- if (listCampaignValid && listCampaignValid.length) {
1924
- const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1925
- LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1926
- const { rules } = CAMPAIGN_SHOW;
1927
- // CHECK RULE TRIGGER POPUP
1928
- const timeoutRule = Number((_c = rules.find((i) => i.rule == 'time')) === null || _c === void 0 ? void 0 : _c.value);
1929
- LeadLog(`timeoutRule`, timeoutRule);
1930
- const scrollRule = Number((_d = rules.find((i) => i.rule == 'scroll')) === null || _d === void 0 ? void 0 : _d.value);
1931
- LeadLog(`scrollRule`, scrollRule);
1932
- let impressionAction = 'TIME';
1933
- if (Number.isInteger(timeoutRule)) {
1934
- impressionAction = 'TIME';
1935
- LeadLog(' SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1936
- timeoutRef = setTimeout(() => {
1937
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1938
- }, timeoutRule * 1000);
1939
- }
1940
- if (Number.isInteger(scrollRule)) {
1941
- impressionAction = 'SCROLL';
1942
- LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1943
- const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1944
- document.querySelector('body');
1945
- const pct = $p.getBoundingClientRect().top;
1946
- const pb = $p.offsetHeight;
1947
- LeadLog(`👓 Element check scroll: `, $p);
1948
- LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1949
- const wt = window.pageYOffset || document.documentElement.scrollTop;
1950
- let percent = 0;
1951
- if (wt >= pct) {
1952
- percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1953
- }
1954
- LeadLog('---Scroll', percent, scrollRule);
1955
- // TODO: CHECK FOOTER HEIGHT
1956
- if (percent >= scrollRule) {
1957
- window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1958
- onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1959
- }
1960
- };
1961
- window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
1962
- passive: true,
1963
- });
1964
- }
1916
+ }
1917
+ });
1918
+ // Check tags
1919
+ const listMetaTag = Array.from(document.getElementsByTagName('META')).filter((i) => i.getAttribute('property') == 'article:tag');
1920
+ const listTags = listMetaTag.map((i) => i.content);
1921
+ let listCampaignHasTag = [];
1922
+ let listTagsObj = [];
1923
+ if (listTags && listTags.length) {
1924
+ listCampaignHasTag = campaignsDevice
1925
+ .map((i, index) => i.targets
1926
+ .filter((i) => i.type == CAMPAIGN_TARGET_TYPE.TAGS)
1927
+ .map((i) => (Object.assign(Object.assign({}, i), { campaignIndex: index }))))
1928
+ .flat(1);
1929
+ listTagsObj = listCampaignHasTag.filter((i) => listTags.includes(i.target));
1930
+ }
1931
+ const listCampaginsMatch = [...listLinksObj, ...listTagsObj];
1932
+ const cookieKeys = document.cookie.split('; ').map((i) => i.split('=')[0]);
1933
+ const listCampaignCodeSubmited = cookieKeys.filter((i) => i.includes('lead_submited'));
1934
+ LeadLog(`--listCampaignCodeSubmited`, listCampaignCodeSubmited);
1935
+ const listCampaignCodeClosed = cookieKeys.filter((i) => i.includes('lead_closed'));
1936
+ LeadLog(`--listCampaignCodeClosed`, listCampaignCodeClosed);
1937
+ const listCampaignSubmitedClosed = [
1938
+ ...listCampaignCodeSubmited,
1939
+ ...listCampaignCodeClosed,
1940
+ ];
1941
+ const listCampaignNoSubmitedClosed = listCampaginsMatch.filter((i) => {
1942
+ const hasSubmited = listCampaignSubmitedClosed.some((k) => k.includes(campaignsDevice[i.campaignIndex].code));
1943
+ return !hasSubmited;
1944
+ });
1945
+ const listCampaignValid = getShuffleArray(listCampaignNoSubmitedClosed);
1946
+ // .sort(
1947
+ // (a, b) =>
1948
+ // (listCampaignValid[a.campaignIndex]?.score || 0) -
1949
+ // (listCampaignValid[b.campaignIndex]?.score || 0),
1950
+ // )
1951
+ LeadLog('--listCampaignValid : ', listCampaignValid);
1952
+ if (listCampaignValid && listCampaignValid.length) {
1953
+ const CAMPAIGN_SHOW = campaignsDevice[listCampaignValid[0].campaignIndex];
1954
+ return CAMPAIGN_SHOW;
1955
+ }
1956
+ else {
1957
+ LeadLog('🚧 No lead campaigns on current URL, tags');
1958
+ return null;
1959
+ }
1960
+ }
1961
+ function addEventShowCurrentCampaign({ campaign: CAMPAIGN_SHOW, onShowPopup, }) {
1962
+ var _a, _b;
1963
+ LeadLog(`CAMPAIGN_SHOW`, CAMPAIGN_SHOW);
1964
+ const { rules } = CAMPAIGN_SHOW;
1965
+ // CHECK RULE TRIGGER POPUP
1966
+ const timeoutRule = Number((_a = rules.find((i) => i.rule == 'time')) === null || _a === void 0 ? void 0 : _a.value);
1967
+ LeadLog(`timeoutRule`, timeoutRule);
1968
+ const scrollRule = Number((_b = rules.find((i) => i.rule == 'scroll')) === null || _b === void 0 ? void 0 : _b.value);
1969
+ LeadLog(`scrollRule`, scrollRule);
1970
+ let impressionAction = 'TIME';
1971
+ if (Number.isInteger(timeoutRule)) {
1972
+ impressionAction = 'TIME';
1973
+ LeadLog('✨ SHOW AWESOME POPUP AFTER: ', timeoutRule, ' seconds');
1974
+ timeoutRef = setTimeout(() => {
1975
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1976
+ }, timeoutRule * 1000);
1977
+ return { campaign: CAMPAIGN_SHOW, action: impressionAction };
1978
+ }
1979
+ if (Number.isInteger(scrollRule)) {
1980
+ impressionAction = 'SCROLL';
1981
+ LeadLog('✨ SHOW AWESOME AFTER: SCROLL', scrollRule, ' %');
1982
+ const $p = document.querySelector(`[data-url="${location.pathname}"]`) ||
1983
+ document.querySelector('body');
1984
+ const pct = $p.getBoundingClientRect().top;
1985
+ const pb = $p.offsetHeight;
1986
+ LeadLog(`👓 Element check scroll: `, $p);
1987
+ LEAD_SCROLL_EVENT = function leadScollCheckHandler() {
1988
+ const wt = window.pageYOffset || document.documentElement.scrollTop;
1989
+ let percent = 0;
1990
+ if (wt >= pct) {
1991
+ percent = Math.round(((wt - pct) / (pb - innerHeight)) * 100);
1965
1992
  }
1966
- else {
1967
- LeadLog('🚧 No lead campaigns on current URL, tags');
1993
+ LeadLog('---Scroll', percent, scrollRule);
1994
+ // TODO: CHECK FOOTER HEIGHT
1995
+ if (percent >= scrollRule) {
1996
+ window.removeEventListener('scroll', LEAD_SCROLL_EVENT);
1997
+ onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup(CAMPAIGN_SHOW, impressionAction);
1968
1998
  }
1999
+ };
2000
+ window.addEventListener('scroll', LEAD_SCROLL_EVENT, {
2001
+ passive: true,
2002
+ });
2003
+ }
2004
+ }
2005
+ function checkShowPopup({ leadApi, leadSiteId, leadDomain, onShowPopup, DEBUG_URL, }) {
2006
+ // clear previous passive event, check for new condition
2007
+ clearPassiveEvent();
2008
+ const leadCurrentUrl = DEBUG_URL;
2009
+ Service.getCampaigns({
2010
+ url: DEBUG_URL,
2011
+ siteId: leadSiteId,
2012
+ apiLeadUrl: leadApi,
2013
+ })
2014
+ .then((campRes) => {
2015
+ LeadLog('List campagin: ', campRes);
2016
+ LEAD_RESET_VAR();
2017
+ const campaigns = (campRes || [])
2018
+ .filter(filterFnCampaign)
2019
+ .filter(fillterApprearanceTimeCampaign);
2020
+ const campaign = getCurrentCampaign({
2021
+ campaigns,
2022
+ leadCurrentUrl,
2023
+ leadDomain,
2024
+ });
2025
+ if (campaign) {
2026
+ addEventShowCurrentCampaign({ campaign, onShowPopup });
1969
2027
  }
1970
2028
  })
1971
2029
  .catch((err) => {
@@ -1982,31 +2040,71 @@ const LeadLog = (...params) => {
1982
2040
  }
1983
2041
  };
1984
2042
 
2043
+ const LeadGenInlineWithoutMemo = (props) => {
2044
+ const [campaign, setCampaign] = useState();
2045
+ const { forceCampaign, apiUrl, apiLeadUrl, siteId, siteDomain, DEBUG_URL } = props;
2046
+ useEffect(() => {
2047
+ if (forceCampaign) {
2048
+ setCampaign(forceCampaign);
2049
+ return;
2050
+ }
2051
+ (() => __awaiter(void 0, void 0, void 0, function* () {
2052
+ const campaign = yield leadGenInlineGetCampaign({
2053
+ siteId,
2054
+ siteDomain,
2055
+ apiLeadUrl: apiUrl || apiLeadUrl || '',
2056
+ url: DEBUG_URL,
2057
+ });
2058
+ if (campaign) {
2059
+ setCampaign(campaign);
2060
+ }
2061
+ }))();
2062
+ }, [forceCampaign, DEBUG_URL, apiUrl, apiLeadUrl, siteId, siteDomain]);
2063
+ if (!campaign || !(campaign === null || campaign === void 0 ? void 0 : campaign.id)) {
2064
+ return null;
2065
+ }
2066
+ return (React__default.createElement(LeadGen, Object.assign({}, props, { forceCampaign: campaign, apiUrl: apiUrl || apiLeadUrl, flatComponent: true })));
2067
+ };
2068
+ const LeadGenInline = memo(LeadGenInlineWithoutMemo);
2069
+ function leadGenInlineGetCampaign(props) {
2070
+ return __awaiter(this, void 0, void 0, function* () {
2071
+ const { url, apiLeadUrl, siteId, siteDomain } = props;
2072
+ const campaigns = yield Service.getCampaigns({ url, apiLeadUrl, siteId });
2073
+ const campaignsInline = campaigns.filter(({ extra_fields }) => {
2074
+ const { currentLayout } = extra_fields || {};
2075
+ return currentLayout.includes('Inline');
2076
+ });
2077
+ return getCurrentCampaign({
2078
+ campaigns: campaignsInline,
2079
+ leadCurrentUrl: url,
2080
+ leadDomain: siteDomain,
2081
+ });
2082
+ });
2083
+ }
2084
+
2085
+ const LeadGenTranslationProvider = (props) => {
2086
+ const { locale, children } = props;
2087
+ const translationContextValue = useMemo(() => ({ locale, values: getTranslations(locale) }), [locale]);
2088
+ return (React__default.createElement(TranslationsContext.Provider, { value: translationContextValue }, children));
2089
+ };
2090
+
1985
2091
  const LeadGenContext = createContext({
1986
- submit(value) {
2092
+ onSubmit(value) {
1987
2093
  /** Init for FAKING function */
1988
2094
  LeadLog('** LeadGen Submit : ', value);
1989
2095
  return Promise.reject(value);
1990
2096
  },
1991
- submitSubscriptionBox(value) {
1992
- /** Init for FAKING function */
1993
- LeadLog('** LeadGen SubmitSubscriptionBox : ', value);
1994
- return Promise.reject(value);
1995
- },
1996
- impression(type) {
2097
+ onImpression(value) {
1997
2098
  /** Init for FAKING function */
1998
- LeadLog('** LeadGen Impression : ', type);
2099
+ LeadLog('** LeadGen Impression : ', value);
1999
2100
  return Promise.reject();
2000
2101
  },
2001
- /** For Subscription Box */
2002
- subscriptionIcon: '',
2003
- subscriptionTitle: '',
2004
- subscriptionPhoneType: '',
2005
2102
  });
2006
2103
  const LeadGenContextProvider = (props) => {
2007
- const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, articleId = 1, categoryId = 1, siteDomain: site_domain, children, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "articleId", "categoryId", "siteDomain", "children", "userInfo"]);
2104
+ const { campaign_code: campaignCodeProps, apiSsoUrl, apiLeadUrl, apiSubotUrl, locale: localeProps, forceCampaign: forceCampaignProps, extraValues, siteId, siteDomain, DEBUG_URL = '', children, articleId, categoryId, userInfo } = props, restProps = __rest(props, ["campaign_code", "apiSsoUrl", "apiLeadUrl", "apiSubotUrl", "locale", "forceCampaign", "extraValues", "siteId", "siteDomain", "DEBUG_URL", "children", "articleId", "categoryId", "userInfo"]);
2008
2105
  const { t } = useTranslations();
2009
- const [forceCampaign, setForceCampaign] = useState(forceCampaignProps);
2106
+ const [rawForceCampaign, setRawForceCampaign] = useState(forceCampaignProps);
2107
+ const [forceCampaign, setForceCampaign] = useState(() => formatCampaignDetail(forceCampaignProps));
2010
2108
  const [subscriptionInfo, setSubscriptionInfo] = useState({
2011
2109
  subscriptionIcon: '',
2012
2110
  subscriptionTitle: '',
@@ -2016,98 +2114,65 @@ const LeadGenContextProvider = (props) => {
2016
2114
  const locale = useMemo(() => {
2017
2115
  return localeProps || LOCALE['PhilippinesEnglish'];
2018
2116
  }, [localeProps]);
2019
- const { url, campaign_id, cookie_id, ga_client_id, category_id, article_id, article_title, category_name, } = useMemo(() => ({
2020
- url: location.href.toLowerCase() || '',
2021
- cookie_id: getCookie('hhg-id') || null,
2022
- ga_client_id: getCookie('_ga'),
2023
- campaign_id: forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2024
- campaign_code: campaignCodeProps || (forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.code),
2025
- category_id: categoryId,
2026
- article_id: articleId,
2027
- article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2028
- category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2029
- }), [
2030
- campaignCodeProps,
2031
- articleId,
2032
- categoryId,
2033
- forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.id,
2034
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2035
- extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2036
- ]);
2037
- // const fetchCampaign = useCallback(
2038
- // (campaign_code: string) => {
2039
- // Service.getCampaignByCode(campaign_code).then((res) => {
2040
- // const { _data } = res || {}
2041
- // const { campaigns } = _data || {}
2042
- // LeadLog('** LeadGen Campaign : ', campaigns)
2043
- // setForceCampaign(formatCampaignDetail(campaigns))
2044
- // })
2045
- // },
2046
- // [campaignCodeProps],
2047
- // )
2048
2117
  // TODO : Update form for LeadGen
2049
- const submit = useCallback((data) => {
2118
+ const onSubmit = useCallback((data) => {
2050
2119
  return Service.postSubscriptionBoxLead({ data });
2120
+ }, [forceCampaign === null || forceCampaign === void 0 ? void 0 : forceCampaign.blocks]);
2121
+ const onImpression = useCallback((value) => {
2122
+ //
2123
+ console.log('** RYAN LeadGenContext.tsx 188 value : ', value);
2124
+ return Promise.resolve('dfdfdf');
2051
2125
  }, []);
2052
2126
  const submitSubscriptionBox = useCallback((value) => {
2053
2127
  const data = Object.assign(Object.assign(Object.assign(Object.assign({}, value), {
2054
2128
  // campaign_id,
2055
- site_domain, url: (value === null || value === void 0 ? void 0 : value.url) || url, cookie_id, ga_client_id: (value === null || value === void 0 ? void 0 : value.ga_client_id) || ga_client_id }), extraValues), { article_id,
2056
- category_id,
2057
- article_title });
2129
+ site_domain: siteDomain, url: (value === null || value === void 0 ? void 0 : value.url) || location.href.toLowerCase() || '', cookie_id: getCookie('hhg-id') || null, ga_client_id: getCookie('_ga') }), extraValues), { article_id: articleId, category_id: categoryId, article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '' });
2058
2130
  return Service.postSubscriptionBoxLead({ data });
2059
2131
  }, [
2060
2132
  extraValues,
2061
- site_domain,
2062
- campaign_id,
2063
- article_id,
2064
- article_title,
2065
- category_id,
2066
- url,
2067
- cookie_id,
2068
- ga_client_id,
2133
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title,
2134
+ siteDomain,
2135
+ articleId,
2136
+ categoryId,
2069
2137
  ]);
2070
- const impression = useCallback((type) => {
2071
- const gaCookie = getCookie('_ga') || null;
2138
+ const impressionSubscriptionBox = useCallback((type) => {
2072
2139
  const impression = {
2073
2140
  subscription_title: subscriptionInfo.subscriptionTitle,
2074
2141
  name: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || '',
2075
2142
  area_code: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '',
2076
2143
  phone_number: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) || '',
2077
- site_domain: domainLocales[locale],
2144
+ site_domain: siteDomain,
2078
2145
  url: location.href.toLowerCase(),
2079
2146
  cookie_id: getCookie('hhg-id'),
2080
- ga_client_id: gaCookie,
2081
- article_title,
2082
- article_id,
2083
- category_id,
2084
- category_name,
2147
+ ga_client_id: getCookie('_ga') || null,
2148
+ article_title: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.article_title) || document.title || '',
2149
+ article_id: articleId,
2150
+ category_id: categoryId,
2151
+ category_name: (extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name) || '',
2085
2152
  type,
2086
2153
  };
2087
2154
  return Service.trackingSubscription(impression);
2088
2155
  }, [
2089
- campaign_id,
2090
- url,
2091
- article_title,
2092
- cookie_id,
2093
- ga_client_id,
2156
+ articleId,
2094
2157
  categoryId,
2095
- article_id,
2096
2158
  subscriptionInfo.subscriptionTitle,
2159
+ extraValues === null || extraValues === void 0 ? void 0 : extraValues.category_name,
2097
2160
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.name,
2098
2161
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code,
2099
2162
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
2100
2163
  ]);
2101
2164
  useEffect(() => {
2165
+ /** Force Campaign */
2102
2166
  if (forceCampaignProps) {
2103
2167
  setForceCampaign(formatCampaignDetail(forceCampaignProps));
2168
+ setRawForceCampaign(forceCampaignProps);
2104
2169
  return;
2105
2170
  }
2106
2171
  /** For Subscription Box */
2107
2172
  if (categoryId) {
2108
2173
  Service.getSubscriptionBoxInfo({
2109
2174
  category: categoryId,
2110
- site: site_domain,
2175
+ site: siteDomain,
2111
2176
  slug: location === null || location === void 0 ? void 0 : location.pathname,
2112
2177
  }).then((res) => {
2113
2178
  const { _data } = res || {};
@@ -2240,10 +2305,39 @@ const LeadGenContextProvider = (props) => {
2240
2305
  });
2241
2306
  return;
2242
2307
  }
2243
- // if (campaignCodeProps) {
2244
- // fetchCampaign(campaignCodeProps)
2308
+ if (campaignCodeProps) {
2309
+ Service.getCampaignByCode(campaignCodeProps).then((res) => {
2310
+ const { _data } = res || {};
2311
+ const { campaigns } = _data || {};
2312
+ LeadLog('** LeadGen Campaign : ', campaigns);
2313
+ setForceCampaign(formatCampaignDetail(campaigns));
2314
+ setRawForceCampaign(campaigns);
2315
+ });
2316
+ return;
2317
+ }
2318
+ // /** For LeadGen */
2319
+ // if (!leadStore.campaigns?.length) {
2320
+ // checkShowPopup({
2321
+ // leadApi: apiLeadUrl,
2322
+ // leadDomain: siteDomain,
2323
+ // leadSiteId: siteId,
2324
+ // onShowPopup(campaign: any, action: string) {
2325
+ // console.log('** RYAN LeadGenContext.tsx 421 action : ', action)
2326
+ // setForceCampaign(formatCampaignDetail(campaign))
2327
+ // setRawForceCampaign(campaign)
2328
+ // },
2329
+ // DEBUG_URL,
2330
+ // })
2245
2331
  // }
2246
- }, [forceCampaignProps, campaignCodeProps, categoryId]);
2332
+ }, [
2333
+ forceCampaignProps,
2334
+ campaignCodeProps,
2335
+ categoryId,
2336
+ siteId,
2337
+ siteDomain,
2338
+ apiLeadUrl,
2339
+ DEBUG_URL,
2340
+ ]);
2247
2341
  useEffect(() => {
2248
2342
  leadStore.apiSsoUrl = apiSsoUrl;
2249
2343
  leadStore.apiLeadUrl = apiLeadUrl;
@@ -2256,10 +2350,14 @@ const LeadGenContextProvider = (props) => {
2256
2350
  apiLeadUrl,
2257
2351
  apiSubotUrl, locale: localeProps, extraValues,
2258
2352
  articleId,
2259
- categoryId, siteDomain: site_domain, forceCampaign,
2260
- submit,
2353
+ categoryId,
2354
+ siteDomain,
2355
+ forceCampaign,
2356
+ rawForceCampaign,
2357
+ onSubmit,
2358
+ onImpression,
2261
2359
  submitSubscriptionBox,
2262
- impression }) },
2360
+ impressionSubscriptionBox }) },
2263
2361
  React__default.createElement(LeadGenTranslationProvider, { locale: locale }, children)));
2264
2362
  };
2265
2363
  const useLeadGenContext = () => {
@@ -3296,7 +3394,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3296
3394
  const { image, extra_fields, id: campaign_id, bot_id: campaign_subot_id = [], ThankYouBlock, } = forceCampaign || {};
3297
3395
  const { textBlocks, listBlockAdded, actionBlocks } = extra_fields || {};
3298
3396
  const { submitBlock } = actionBlocks || {};
3299
- const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impression, } = useLeadGenContext();
3397
+ const { apiLeadUrl, subscriptionIcon, subscriptionTitle, subscriptionPhoneType, submitSubscriptionBox, onFinish, impressionSubscriptionBox, } = useLeadGenContext();
3300
3398
  const { t } = useTranslations();
3301
3399
  const { action: { pushNotifications }, } = useContext(TogetherComponentGlobalContext);
3302
3400
  const [loading, setLoading] = useState(false);
@@ -3356,7 +3454,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3356
3454
  const reqValues = Object.assign(Object.assign({}, newValues), ssoValues);
3357
3455
  const [res] = yield Promise.all([
3358
3456
  submitSubscriptionBox(reqValues),
3359
- impression('submit_form'),
3457
+ impressionSubscriptionBox('submit_form'),
3360
3458
  ]);
3361
3459
  const { _data } = res || {};
3362
3460
  const { model } = _data || {};
@@ -3402,7 +3500,7 @@ const LeadGenSubscriptionBoxWithoutMemo = ({ locale, userInfo, forceCampaign, ca
3402
3500
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.uid,
3403
3501
  userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone,
3404
3502
  ]);
3405
- return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impression('impression') },
3503
+ return (React__default.createElement(ImpressionTrackingWrapper, { dependency: categoryId, onImpression: () => impressionSubscriptionBox('impression') },
3406
3504
  React__default.createElement(StyledLeadGenSubscriptionBox, { "data-phone-type": subscriptionPhoneType, "data-type": "subscription_box_A" },
3407
3505
  showThankyou && (React__default.createElement(LeadGenThankYou, { image: Object.assign(Object.assign({}, thankyouImage), { src: thankyouImage.src || `${apiLeadUrl}admin/img/thanksyou.png` }), title: thankyouTitle, description: thankyouDescription, button: thankyouButton })),
3408
3506
  !showThankyou && (React__default.createElement(LeadGenSubscriptionBoxA, { loading: loading, image: subscriptionIcon || image, title: subscription_title, submitText: (_c = submitBlock === null || submitBlock === void 0 ? void 0 : submitBlock.data) === null || _c === void 0 ? void 0 : _c.value, blocks: listBlockAdded, locale: locale, form: form, rules: validateObj, onFinish: middlewareOnSubmit })))));
@@ -4136,7 +4234,7 @@ const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkN
4136
4234
  React__default.createElement(Button, { className: `lead-modal__btn ${LEAD_CLASS}`, color: primaryColor }, linkText)))))));
4137
4235
  };
4138
4236
 
4139
- const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4237
+ const InlineLayout = ({ flatComponent, content, inlinePosition, doImpression, }) => {
4140
4238
  const target = useMemo(() => {
4141
4239
  if (!inlinePosition)
4142
4240
  return null;
@@ -4241,6 +4339,9 @@ const InlineLayout = ({ content, inlinePosition, doImpression, }) => {
4241
4339
  }
4242
4340
  }
4243
4341
  }, [inlinePosition]);
4342
+ if (!!flatComponent) {
4343
+ return (React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content));
4344
+ }
4244
4345
  if (!inlinePosition || !target)
4245
4346
  return null;
4246
4347
  return createPortal(React__default.createElement(ImpressionTrackingWrapper, { onImpression: () => __awaiter(void 0, void 0, void 0, function* () { return yield doImpression(); }) }, content), target);
@@ -4787,7 +4888,10 @@ const StyledFormContainer = styled.div `
4787
4888
  .leadgen-form_body {
4788
4889
  flex: 1;
4789
4890
  min-height: 0;
4790
- overflow: auto;
4891
+ ${MediaQueries.mbUp} {
4892
+ overflow: auto;
4893
+ }
4894
+
4791
4895
  &::-webkit-scrollbar {
4792
4896
  width: 6px;
4793
4897
  height: 6px;
@@ -5010,7 +5114,7 @@ const LEADGEN_SHOW_HEADER = [
5010
5114
  ];
5011
5115
  // const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39', 'u0adw7hw8kw7t89']
5012
5116
  const CAMPAGE_CODE_LIST_APPLY_NEW_UI = ['ri3lkoxcetjoj39'];
5013
- const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
5117
+ const LightboxLayout = ({ flatComponent, popupId, extraFields, onClose: onCloseProp, onOtherSubmit, imageMobile, imageDesktop, imageOverlayMobile, imageOverlayDesktop, imageBackground, currentLayout, title, onSubmit, onUnmount, doImpression, showThankyou, campaignId, campaignCode, campaign_subot_id, locale, showEmpty, setShowEmpty, userInfo, action, }) => {
5014
5118
  var _a, _b;
5015
5119
  const { primaryColor } = useContext(LeadGenContext$1);
5016
5120
  const { isMobile } = useScreenSize();
@@ -5410,7 +5514,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
5410
5514
  return React__default.createElement(SideBarLayout, { content: PopupContainer });
5411
5515
  }
5412
5516
  else if (isInline) {
5413
- return (React__default.createElement(InlineLayout, { action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5517
+ return (React__default.createElement(InlineLayout, { flatComponent: flatComponent, action: action, content: PopupContainer, campaignCode: campaignCode, inlinePosition: extraFields.popupInlinePosition, doImpression: handleDoImpression }));
5414
5518
  }
5415
5519
  return null;
5416
5520
  };
@@ -5503,7 +5607,7 @@ function getCategoryLevel(t = 'Xin chao {{category_2}} extra') {
5503
5607
  return null;
5504
5608
  }
5505
5609
  }
5506
- const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5610
+ const NewLeadPopup = ({ flatComponent, campaign, action, onSubmit, onClose, onUnmount, doImpression, showThankyou, locale, showEmpty, setShowEmpty, userInfo, }) => {
5507
5611
  var _a, _b;
5508
5612
  const { apiUrl, siteDomain } = useContext(LeadGenContext$1);
5509
5613
  const { extra_fields, image, image_desktop, code, image_background, image_overlay_mobile, image_overlay_desktop, } = campaign || {};
@@ -5606,7 +5710,7 @@ const NewLeadPopup = ({ campaign, action, onSubmit, onClose, onUnmount, doImpres
5606
5710
  currentLayout == 'Fullscreen' ||
5607
5711
  currentLayout == 'Sidebar' ||
5608
5712
  currentLayout == 'Slider') {
5609
- return (React__default.createElement(LightboxLayout, { popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
5713
+ return (React__default.createElement(LightboxLayout, { flatComponent: flatComponent, popupId: popupIdRef.current, extraFields: extra_fields, onClose: onClose, onOtherSubmit: onOtherSubmit, onUnmount: onUnmount, doImpression: doImpression, imageMobile: image, imageDesktop: image_desktop, imageBackground: image_background, currentLayout: currentLayout, title: titleText, onSubmit: (params) => onSubmit(params, categoryLevel, categoryData), key: currentLayout, imageOverlayDesktop: image_overlay_desktop, imageOverlayMobile: image_overlay_mobile, showThankyou: showThankyou, campaignId: campaign.id, campaignCode: campaign.code, campaign_subot_id: campaign.bot_id || [], locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo, action: action }));
5610
5714
  }
5611
5715
  else if (currentLayout.includes('Skin')) {
5612
5716
  return (React__default.createElement(SkinLayout, { popupId: popupIdRef.current, link: actionBlocks.linkButtonBlock.data.url, linkNewTab: !!actionBlocks.linkButtonBlock.data.newtab, linkText: actionBlocks.linkButtonBlock.data.value, onClose: onClose, onOtherSubmit: onOtherSubmit, imageMobile: image, imageDesktop: image_desktop, currentLayout: currentLayout }));
@@ -5698,7 +5802,7 @@ const formatTrackingData = (params) => {
5698
5802
  };
5699
5803
 
5700
5804
  // mount css
5701
- const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, }) => {
5805
+ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor, apiSubotUrl, DEBUG_URL, forceCampaign, children, extraPayloadValues = [], excludeExitRulesHandler, userInfo, onClose: onCloseProps, onSubmit: onSubmitProps, flatComponent, }) => {
5702
5806
  var _a, _b;
5703
5807
  const scrollEventHandlerRef = useRef();
5704
5808
  const leadStartTimeRef = useRef(Date.now());
@@ -6037,7 +6141,7 @@ const _LeadGen = ({ apiUrl: apiUrlProp, siteDomain, siteId, locale, primaryColor
6037
6141
  !!currentLayout &&
6038
6142
  !currentLayout.includes('Inline') &&
6039
6143
  !currentLayout.includes('Sidebar') && (React__default.createElement(Overlay, { color: "#000", opacity: 0.6, center: true, zIndex: 400, pos: 'fixed', onClick: () => onClose() })),
6040
- React__default.createElement(NewLeadPopup, { campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
6144
+ React__default.createElement(NewLeadPopup, { flatComponent: flatComponent, campaign: showCampaign, action: action, onSubmit: onSubmit, onClose: onClose, onUnmount: onUnmount, doImpression: doImpression, showThankyou: showThankyou, locale: locale, showEmpty: showEmpty, setShowEmpty: setShowEmpty, userInfo: userInfo })))));
6041
6145
  })))))));
6042
6146
  };
6043
6147
  const LeadGen = _LeadGen;
@@ -6048,4 +6152,4 @@ LeadGen.Thankyou = Thankyou;
6048
6152
  LeadGen.OtpForm = OtpBlock$1;
6049
6153
  LeadGen.Close = Close;
6050
6154
 
6051
- export { LeadGen, LeadGenSubscriptionBox };
6155
+ export { LeadGen, LeadGenInline, LeadGenSubscriptionBox, leadGenInlineGetCampaign };