@hhgtech/hhg-components 1.29.81 → 1.29.83

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 (422) hide show
  1. package/build/LastPeriod-79a8acbe.js +29 -0
  2. package/build/Locale-0b86b849.js +15 -0
  3. package/build/{WhatsApp-82018096.js → WhatsApp-19ca0437.js} +1 -1
  4. package/build/adapters.js +22 -17
  5. package/build/atoms.js +59 -51
  6. package/build/babyGrowth.js +169 -162
  7. package/build/cache.js +3 -3
  8. package/build/care.js +22 -17
  9. package/build/components.js +146 -117
  10. package/build/{constants-3a475a22.js → constants-79d3ff1b.js} +4 -4
  11. package/build/constants-e85d7085.js +18 -0
  12. package/build/constants.js +17 -13
  13. package/build/constantsDomainLocales.js +34 -0
  14. package/build/{isProduction-aa963bf9.js → constantsIsProduction.js} +2 -0
  15. package/build/constantsRiskScreener.js +21 -0
  16. package/build/constantsSite.js +134 -0
  17. package/build/{core-9e44ee99.js → core-9f7c0442.js} +4 -4
  18. package/build/dataTransform-1e0514ef.js +13 -0
  19. package/build/{dataTransform-6b4d7a4e.js → dataTransform-265f1b67.js} +1 -106
  20. package/build/ecom.js +10 -6
  21. package/build/embeddedHeathToolCards_babyGrowth.js +64 -0
  22. package/build/embeddedHeathToolCards_babyPoop.js +57 -0
  23. package/build/embeddedHeathToolCards_babyVaccine.js +64 -0
  24. package/build/embeddedHeathToolCards_bmi_bmi.js +70 -0
  25. package/build/embeddedHeathToolCards_bmrBmr.js +70 -0
  26. package/build/embeddedHeathToolCards_dueDate_dueDate.js +65 -0
  27. package/build/embeddedHeathToolCards_helpers.js +11 -0
  28. package/build/embeddedHeathToolCards_ovulation_ovulation.js +64 -0
  29. package/build/embeddedHeathToolCards_pwg_pwg.js +70 -0
  30. package/build/embeddedHeathToolCards_targetHeartRate.js +73 -0
  31. package/build/esm/LastPeriod-62287ef2.js +23 -0
  32. package/build/esm/Locale-c6a90240.js +15 -0
  33. package/build/esm/{WhatsApp-7d3732e2.js → WhatsApp-2e6d1d02.js} +1 -1
  34. package/build/esm/adapters.js +22 -17
  35. package/build/esm/atoms.js +53 -45
  36. package/build/esm/babyGrowth.js +87 -81
  37. package/build/esm/cache.js +3 -3
  38. package/build/esm/care.js +22 -17
  39. package/build/esm/components.js +106 -77
  40. package/build/esm/constants-a5d70cf5.js +16 -0
  41. package/build/esm/{constants-ebf80e5f.js → constants-e930bc7b.js} +2 -2
  42. package/build/esm/constants.js +7 -3
  43. package/build/esm/constantsDomainLocales.js +29 -0
  44. package/build/esm/{isProduction-5684a28c.js → constantsIsProduction.js} +1 -1
  45. package/build/esm/constantsRiskScreener.js +17 -0
  46. package/build/esm/constantsSite.js +129 -0
  47. package/build/esm/{core-c72e0ff5.js → core-36290fcb.js} +2 -2
  48. package/build/esm/dataTransform-14587328.js +11 -0
  49. package/build/esm/{dataTransform-3e8e25ba.js → dataTransform-8852461c.js} +2 -101
  50. package/build/esm/ecom.js +9 -5
  51. package/build/esm/embeddedHeathToolCards_babyGrowth.js +56 -0
  52. package/build/esm/embeddedHeathToolCards_babyPoop.js +49 -0
  53. package/build/esm/embeddedHeathToolCards_babyVaccine.js +56 -0
  54. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +62 -0
  55. package/build/esm/embeddedHeathToolCards_bmrBmr.js +62 -0
  56. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +57 -0
  57. package/build/esm/embeddedHeathToolCards_helpers.js +7 -0
  58. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +56 -0
  59. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +62 -0
  60. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +65 -0
  61. package/build/esm/{fixedBottomAdBlock-13ed4a34.js → fixedBottomAdBlock-26b94f6b.js} +35 -410
  62. package/build/esm/footer.js +23 -18
  63. package/build/esm/gAssets.js +4 -5
  64. package/build/esm/healthToolsCardWrapper.js +33 -0
  65. package/build/esm/healthToolsForm.js +39 -25
  66. package/build/esm/hooks.js +21 -17
  67. package/build/esm/i18n.js +2 -2
  68. package/build/esm/i18nV2.js +2 -2
  69. package/build/esm/{index-cdac57da.js → index-03050142.js} +1 -1
  70. package/build/esm/{index-21eac858.js → index-03d7200e.js} +12 -10
  71. package/build/esm/index-21524e86.js +249 -0
  72. package/build/esm/{index-16514f4d.js → index-288b564e.js} +3 -3
  73. package/build/esm/index-3060c2dc.js +174 -0
  74. package/build/esm/index-3288f45c.js +490 -0
  75. package/build/esm/{index-42ad7763.js → index-343e5b65.js} +2 -2
  76. package/build/esm/{index-76d20d3f.js → index-345e507e.js} +3 -3
  77. package/build/esm/{index-e3787b20.js → index-38ced379.js} +3 -15
  78. package/build/esm/{index-bef3c9bd.js → index-39aa0c9f.js} +9 -168
  79. package/build/esm/index-39f24b49.js +1351 -0
  80. package/build/esm/{index-f27edf45.js → index-3e2f70fe.js} +11 -11
  81. package/build/esm/{index-d218b94e.js → index-3e3904ec.js} +2 -2
  82. package/build/esm/{index-8952ceac.js → index-40b6555d.js} +4 -4
  83. package/build/esm/{index-703205e3.js → index-41a809d7.js} +3 -3
  84. package/build/esm/index-4d06fffe.js +25 -0
  85. package/build/esm/{index-e104ad21.js → index-506563f6.js} +8 -8
  86. package/build/esm/{index-c1af3a8e.js → index-5369d2e2.js} +15 -13
  87. package/build/esm/index-6125d991.js +370 -0
  88. package/build/esm/index-64dff9b0.js +233 -0
  89. package/build/esm/index-6dd92895.js +791 -0
  90. package/build/esm/{index-e26514ee.js → index-7720a710.js} +4 -4
  91. package/build/esm/{index-c200bff6.js → index-7a1552e9.js} +2 -2
  92. package/build/esm/index-7c678785.js +259 -0
  93. package/build/esm/{index-780a08de.js → index-88c06a7e.js} +2 -2
  94. package/build/esm/{index-cb4afb33.js → index-90d58b18.js} +7 -6
  95. package/build/esm/{index-598ab51b.js → index-96a5f239.js} +6 -5
  96. package/build/esm/index-9a8df805.js +147 -0
  97. package/build/esm/{index-9f1899f2.js → index-9aee96f2.js} +5 -4
  98. package/build/esm/index-a1658f07.js +60 -0
  99. package/build/esm/{constants-6bdb97a8.js → index-a1d2c38b.js} +6 -21
  100. package/build/esm/{index-7e756cb8.js → index-a51336b9.js} +11 -11
  101. package/build/esm/{index-29d04985.js → index-a57a5338.js} +2 -2
  102. package/build/esm/{index-996f7caf.js → index-a7f10a58.js} +4 -4
  103. package/build/esm/index-b123bf27.js +18 -0
  104. package/build/esm/{index-7cbe2a10.js → index-b1e1f9b4.js} +13 -12
  105. package/build/esm/{index-b1bb27aa.js → index-b2ea5cc7.js} +11 -45
  106. package/build/esm/{index-376bee14.js → index-b5019321.js} +7 -7
  107. package/build/esm/{index-78255d6c.js → index-b9c4dfcb.js} +2 -2
  108. package/build/esm/{index-d6201fa4.js → index-bb53d99f.js} +2 -2
  109. package/build/esm/{index-2b9213cf.js → index-bdc3bd61.js} +1 -1
  110. package/build/esm/{index-88ad2ca3.js → index-c41ef517.js} +23 -19
  111. package/build/esm/{index-2774583d.js → index-d462b2bd.js} +35 -31
  112. package/build/esm/{index-cf6beac8.js → index-d5bcc5cc.js} +1 -1
  113. package/build/esm/{index-38f50764.js → index-d9555b0b.js} +17 -260
  114. package/build/esm/{index-1ecbcf21.js → index-e0f8a206.js} +6 -5
  115. package/build/esm/{types-2580132c.js → index-e6b9c7d8.js} +563 -3517
  116. package/build/esm/index-e9d85fda.js +91 -0
  117. package/build/esm/{index-73301602.js → index-f0184ea4.js} +2 -2
  118. package/build/esm/{index-69248434.js → index-f1025cea.js} +3 -3
  119. package/build/esm/index-f3903d13.js +101 -0
  120. package/build/esm/{index-1da2ca0b.js → index-f93799fc.js} +2 -2
  121. package/build/esm/{index-87a2ea8c.js → index-fa83ce20.js} +2 -2
  122. package/build/esm/index-fb8f8203.js +140 -0
  123. package/build/esm/index.js +119 -82
  124. package/build/esm/interfaces/constants/domainLocales.d.ts +25 -0
  125. package/build/esm/interfaces/constants/index.d.ts +1 -25
  126. package/build/esm/labelSorting-e7fa8826.js +47 -0
  127. package/build/esm/lead.js +26 -21
  128. package/build/esm/{logoIcon-d93bc56e.js → logoIcon-b0ce60d0.js} +2 -2
  129. package/build/esm/mantine.js +28 -23
  130. package/build/esm/misc.js +27 -21
  131. package/build/esm/{cookieHelper-73ce3871.js → miscCookieHelper.js} +1 -1
  132. package/build/esm/{defaultClassWrapper-31caf23b.js → miscDefaultClassWrapper.js} +1 -1
  133. package/build/esm/{getDynamicHealthTool-7681e43a.js → miscGetDynamicHealthTool.js} +13 -5
  134. package/build/esm/{getSocialList-e8142513.js → miscGetSocialList.js} +16 -6
  135. package/build/esm/{dataTransform-6c032113.js → miscScreenSizeContext.js} +2 -12
  136. package/build/esm/{theme-f18c2351.js → miscTheme.js} +1 -1
  137. package/build/esm/molecules.js +84 -57
  138. package/build/esm/navigation.js +44 -37
  139. package/build/esm/onboardingV2.js +30 -25
  140. package/build/esm/organisms.js +48 -41
  141. package/build/esm/other-9b439f19.js +102 -0
  142. package/build/esm/pwg.js +25 -20
  143. package/build/esm/{routing-bebdc8b7.js → routing-f2e46f96.js} +3 -2
  144. package/build/esm/subot.js +35 -29
  145. package/build/esm/surveyOrPremiumBanner.js +34 -28
  146. package/build/esm/surveyQuestionCard.js +11 -10
  147. package/build/esm/{surveyThankyouCard-bf6080eb.js → surveyThankyouCard-9d482ef8.js} +6 -6
  148. package/build/esm/together/togetherComponentGlobalContext.d.ts +1 -2
  149. package/build/esm/together.js +58 -42
  150. package/build/esm/togetherApiPaths.js +165 -0
  151. package/build/esm/togetherApiUtils.js +10 -0
  152. package/build/esm/togetherAtoms.js +47 -0
  153. package/build/esm/togetherComponentGlobalContext.js +10 -0
  154. package/build/esm/togetherMolecules.js +60 -0
  155. package/build/esm/togetherOrganisms.js +64 -0
  156. package/build/esm/treePopoverMenu-890070aa.js +334 -0
  157. package/build/esm/types-7d3a4df2.js +5 -0
  158. package/build/esm/{types-be952df2.js → types-e21a244d.js} +14 -13
  159. package/build/esm/types.js +2 -1
  160. package/build/esm/{useCategory-8f109eb7.js → useCategory-45ce6ea8.js} +6 -5
  161. package/build/esm/{useHealthToolCache-d97dfa00.js → useHealthToolCache-fe7dc697.js} +2 -2
  162. package/build/esm/{useMantineLocale-4fb67342.js → useMantineLocale-faa72172.js} +5 -3
  163. package/build/esm/{usePlacesAutocomplete-fe2e4cbe.js → usePlacesAutocomplete-81624098.js} +1 -1
  164. package/build/esm/useTogetherAuthRequiredAction.js +58 -0
  165. package/build/esm/{useTranslations-fbf6a6ab.js → useTranslations-ba901edf.js} +1 -1
  166. package/build/{utils-524bda7c.js → esm/utils-40533779.js} +1 -114
  167. package/build/esm/{utils-d5a0b58f.js → utils-c730ad5d.js} +16 -163
  168. package/build/esm/{utils-cef111b6.js → utils-dbc80293.js} +2 -1
  169. package/build/esm/vaccination.js +23 -18
  170. package/build/{fixedBottomAdBlock-0d4379d1.js → fixedBottomAdBlock-026650fb.js} +155 -540
  171. package/build/footer.js +23 -18
  172. package/build/gAssets.js +4 -5
  173. package/build/healthToolsCardWrapper.js +41 -0
  174. package/build/healthToolsForm.js +45 -31
  175. package/build/hooks.js +21 -17
  176. package/build/i18n.js +1 -1
  177. package/build/i18nV2.js +1 -1
  178. package/build/{index-d34cd464.js → index-036fe55d.js} +4 -4
  179. package/build/index-03da3dbb.js +1364 -0
  180. package/build/{index-7da7b531.js → index-1950777d.js} +7 -7
  181. package/build/index-1fe1ec7e.js +180 -0
  182. package/build/{index-264eeddd.js → index-251187e5.js} +2 -2
  183. package/build/{index-dba2e361.js → index-2ce6cc83.js} +2 -2
  184. package/build/{index-aa818139.js → index-3129e975.js} +6 -6
  185. package/build/{index-c2900d8c.js → index-323d2766.js} +2 -2
  186. package/build/{index-6c27b627.js → index-325d93fc.js} +120 -116
  187. package/build/{index-7c1dc717.js → index-34b1babf.js} +19 -18
  188. package/build/{index-06fa8444.js → index-385f27fb.js} +4 -4
  189. package/build/index-3db01ab3.js +146 -0
  190. package/build/{index-bef2bc73.js → index-48ef94cb.js} +11 -11
  191. package/build/{index-ee964d3c.js → index-4b98362e.js} +6 -6
  192. package/build/index-4c18e4ba.js +97 -0
  193. package/build/{index-77a2b9ee.js → index-4ef9be86.js} +9 -9
  194. package/build/index-5fdde636.js +256 -0
  195. package/build/{index-a86ea1b6.js → index-617bff8c.js} +33 -197
  196. package/build/{index-fe7345fa.js → index-66e789cf.js} +4 -4
  197. package/build/index-6b23104e.js +108 -0
  198. package/build/{index-3dcb9bc6.js → index-6bcde89a.js} +6 -6
  199. package/build/{index-dd1392e3.js → index-6daafc7b.js} +12 -12
  200. package/build/{index-1efa7d84.js → index-6e7aede8.js} +5 -5
  201. package/build/index-6e85bdbb.js +239 -0
  202. package/build/{index-d5b4089d.js → index-70a7d73e.js} +12 -49
  203. package/build/{index-f6575703.js → index-72b989a7.js} +3 -3
  204. package/build/index-72e5dba6.js +153 -0
  205. package/build/{constants-dd16fb4d.js → index-769ecf0d.js} +8 -24
  206. package/build/index-7b98097c.js +25 -0
  207. package/build/{index-838b0f95.js → index-7e89d856.js} +18 -17
  208. package/build/{index-73cde644.js → index-7efbe5e3.js} +9 -9
  209. package/build/{index-a7de42d1.js → index-8cb3f562.js} +1 -1
  210. package/build/{index-c225ef22.js → index-92a816de.js} +25 -24
  211. package/build/{index-b773bc3d.js → index-99ddd1a4.js} +6 -5
  212. package/build/{index-6acb08c0.js → index-a0659d79.js} +14 -14
  213. package/build/{index-def9867a.js → index-a8c1c011.js} +11 -11
  214. package/build/index-aef8a50c.js +267 -0
  215. package/build/{index-247a9eb2.js → index-b76dcc89.js} +81 -77
  216. package/build/index-b99e7941.js +32 -0
  217. package/build/index-bd0008c0.js +805 -0
  218. package/build/{index-dcbd8bf3.js → index-bd37f7ea.js} +9 -9
  219. package/build/index-be727078.js +66 -0
  220. package/build/{index-f28c47ce.js → index-cb1c7190.js} +11 -11
  221. package/build/{index-f1f4fbb9.js → index-cb4ea8c9.js} +26 -24
  222. package/build/index-d71aec74.js +377 -0
  223. package/build/{index-df5cd44b.js → index-d91f52cc.js} +3 -15
  224. package/build/{index-f10efb61.js → index-db6d4daf.js} +33 -33
  225. package/build/{index-05f106c2.js → index-df9447b3.js} +41 -39
  226. package/build/index-e239d386.js +499 -0
  227. package/build/{index-4af08ec2.js → index-eddf350b.js} +2 -2
  228. package/build/{index-6bc3f8c3.js → index-eeb7220e.js} +8 -7
  229. package/build/{types-6c5643a2.js → index-f5956cd0.js} +749 -3709
  230. package/build/index-fbfa2310.js +320 -0
  231. package/build/{index-cb0544e5.js → index-fe74a1a3.js} +59 -59
  232. package/build/index.js +228 -191
  233. package/build/interfaces/constants/domainLocales.d.ts +25 -0
  234. package/build/interfaces/constants/index.d.ts +1 -25
  235. package/build/labelSorting-1905fd49.js +53 -0
  236. package/build/lead.js +43 -38
  237. package/build/{logoIcon-ee9a5501.js → logoIcon-d9adf505.js} +2 -2
  238. package/build/mantine.js +28 -23
  239. package/build/misc.js +39 -33
  240. package/build/{cookieHelper-17491ce8.js → miscCookieHelper.js} +2 -0
  241. package/build/{defaultClassWrapper-e87ca8ef.js → miscDefaultClassWrapper.js} +2 -0
  242. package/build/{getDynamicHealthTool-2a92e1a5.js → miscGetDynamicHealthTool.js} +14 -4
  243. package/build/{getSocialList-97e7bcc1.js → miscGetSocialList.js} +46 -34
  244. package/build/{dataTransform-c1701cbd.js → miscScreenSizeContext.js} +3 -12
  245. package/build/{theme-e4f7f487.js → miscTheme.js} +2 -0
  246. package/build/molecules.js +106 -79
  247. package/build/navigation.js +44 -37
  248. package/build/onboardingV2.js +40 -35
  249. package/build/organisms.js +48 -41
  250. package/build/other-0edcc417.js +104 -0
  251. package/build/pwg.js +60 -55
  252. package/build/{routing-f6d54205.js → routing-54391665.js} +10 -9
  253. package/build/subot.js +175 -169
  254. package/build/surveyOrPremiumBanner.js +34 -28
  255. package/build/surveyQuestionCard.js +11 -10
  256. package/build/{surveyThankyouCard-ead6b355.js → surveyThankyouCard-c7e94445.js} +25 -25
  257. package/build/together/togetherComponentGlobalContext.d.ts +1 -2
  258. package/build/together.js +106 -90
  259. package/build/togetherApiPaths.js +173 -0
  260. package/build/togetherApiUtils.js +40 -0
  261. package/build/togetherAtoms.js +61 -0
  262. package/build/togetherComponentGlobalContext.js +24 -0
  263. package/build/togetherMolecules.js +93 -0
  264. package/build/togetherOrganisms.js +78 -0
  265. package/build/treePopoverMenu-dbb4b61e.js +345 -0
  266. package/build/types-87a48532.js +7 -0
  267. package/build/{types-4ba4268f.js → types-ce7323a0.js} +88 -87
  268. package/build/types.js +6 -5
  269. package/build/{useCategory-e2c91f59.js → useCategory-04ea2a70.js} +18 -17
  270. package/build/{useHealthToolCache-2a53367b.js → useHealthToolCache-9d59f009.js} +4 -4
  271. package/build/{useMantineLocale-a4f0c61d.js → useMantineLocale-f9195d27.js} +26 -24
  272. package/build/{usePlacesAutocomplete-c76d0caf.js → usePlacesAutocomplete-8360abe0.js} +1 -1
  273. package/build/useTogetherAuthRequiredAction.js +68 -0
  274. package/build/{useTranslations-200168a3.js → useTranslations-80687df4.js} +1 -1
  275. package/build/{utils-af695515.js → utils-4849ab04.js} +11 -10
  276. package/build/{esm/utils-f8761b9d.js → utils-928b4701.js} +11 -101
  277. package/build/{utils-95d9832e.js → utils-e4d5701e.js} +26 -172
  278. package/build/vaccination.js +72 -67
  279. package/package.json +1 -1
  280. package/build/esm/index-6ac73f00.js +0 -1114
  281. package/build/index-058b3c0f.js +0 -1127
  282. package/build/index-3d0d22b3.js +0 -565
  283. /package/build/{BMI_BOYS.percentile.monthly-71fb1c9f.js → BMI_BOYS.percentile.monthly-5ba0659a.js} +0 -0
  284. /package/build/{BMI_BOYS.percentile.weekly-b2b344a7.js → BMI_BOYS.percentile.weekly-879f7a42.js} +0 -0
  285. /package/build/{BMI_BOYS.percentile.yearly-031ddade.js → BMI_BOYS.percentile.yearly-e4c37a27.js} +0 -0
  286. /package/build/{BMI_BOYS.zscore.monthly-bb1f9962.js → BMI_BOYS.zscore.monthly-fa3d3237.js} +0 -0
  287. /package/build/{BMI_BOYS.zscore.weekly-d6198d53.js → BMI_BOYS.zscore.weekly-71226efa.js} +0 -0
  288. /package/build/{BMI_BOYS.zscore.yearly-48255337.js → BMI_BOYS.zscore.yearly-92a2f05e.js} +0 -0
  289. /package/build/{BMI_GIRLS.percentile.monthly-e3e284ee.js → BMI_GIRLS.percentile.monthly-cd39f35d.js} +0 -0
  290. /package/build/{BMI_GIRLS.percentile.weekly-9f2d3977.js → BMI_GIRLS.percentile.weekly-5cb19fda.js} +0 -0
  291. /package/build/{BMI_GIRLS.percentile.yearly-c79f34ce.js → BMI_GIRLS.percentile.yearly-b80f3d32.js} +0 -0
  292. /package/build/{BMI_GIRLS.zscore.monthly-11092df0.js → BMI_GIRLS.zscore.monthly-89248182.js} +0 -0
  293. /package/build/{BMI_GIRLS.zscore.weekly-5c375d2b.js → BMI_GIRLS.zscore.weekly-609c3c1f.js} +0 -0
  294. /package/build/{BMI_GIRLS.zscore.yearly-adbba8e3.js → BMI_GIRLS.zscore.yearly-f4587218.js} +0 -0
  295. /package/build/{ChevronDown-f7e25d61.js → ChevronDown-dfb97861.js} +0 -0
  296. /package/build/{Close-36b0da99.js → Close-6296f986.js} +0 -0
  297. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-163b99ad.js → HEAD CIRCUM_BOYS.percentile.monthly-a7e17d51.js} +0 -0
  298. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-c9882014.js → HEAD CIRCUM_BOYS.percentile.weekly-688e7e30.js} +0 -0
  299. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-9d2bc91e.js → HEAD CIRCUM_BOYS.percentile.yearly-5e1b6296.js} +0 -0
  300. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1d2a215c.js → HEAD CIRCUM_BOYS.zscore.monthly-e66bc7d4.js} +0 -0
  301. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-1f139c91.js → HEAD CIRCUM_BOYS.zscore.weekly-f1221399.js} +0 -0
  302. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-ba15501b.js → HEAD CIRCUM_BOYS.zscore.yearly-c3dea838.js} +0 -0
  303. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-a546201a.js → HEAD CIRCUM_GIRLS.percentile.monthly-df5b45d4.js} +0 -0
  304. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-66cd5a7e.js → HEAD CIRCUM_GIRLS.percentile.weekly-6c4e803a.js} +0 -0
  305. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9db3c653.js → HEAD CIRCUM_GIRLS.percentile.yearly-05ac380c.js} +0 -0
  306. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-0405e2cb.js → HEAD CIRCUM_GIRLS.zscore.monthly-8418b138.js} +0 -0
  307. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b2cc3ad2.js → HEAD CIRCUM_GIRLS.zscore.weekly-02c9e21d.js} +0 -0
  308. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-3115f993.js → HEAD CIRCUM_GIRLS.zscore.yearly-656652b6.js} +0 -0
  309. /package/build/{HEIGHT_BOYS.percentile.monthly-35138a98.js → HEIGHT_BOYS.percentile.monthly-9b3ca406.js} +0 -0
  310. /package/build/{HEIGHT_BOYS.percentile.weekly-0216c35b.js → HEIGHT_BOYS.percentile.weekly-add16dbe.js} +0 -0
  311. /package/build/{HEIGHT_BOYS.percentile.yearly-f698e45d.js → HEIGHT_BOYS.percentile.yearly-a338c8a8.js} +0 -0
  312. /package/build/{HEIGHT_BOYS.zscore.monthly-01195728.js → HEIGHT_BOYS.zscore.monthly-7caebf2d.js} +0 -0
  313. /package/build/{HEIGHT_BOYS.zscore.weekly-993e9cf2.js → HEIGHT_BOYS.zscore.weekly-5962317e.js} +0 -0
  314. /package/build/{HEIGHT_BOYS.zscore.yearly-fee3ed69.js → HEIGHT_BOYS.zscore.yearly-b1576fab.js} +0 -0
  315. /package/build/{HEIGHT_GIRLS.percentile.monthly-27b2474a.js → HEIGHT_GIRLS.percentile.monthly-937209f6.js} +0 -0
  316. /package/build/{HEIGHT_GIRLS.percentile.weekly-77bff236.js → HEIGHT_GIRLS.percentile.weekly-c571a906.js} +0 -0
  317. /package/build/{HEIGHT_GIRLS.percentile.yearly-6200a720.js → HEIGHT_GIRLS.percentile.yearly-e78281ec.js} +0 -0
  318. /package/build/{HEIGHT_GIRLS.zscore.monthly-94978e64.js → HEIGHT_GIRLS.zscore.monthly-e5212600.js} +0 -0
  319. /package/build/{HEIGHT_GIRLS.zscore.weekly-7951beb1.js → HEIGHT_GIRLS.zscore.weekly-3c269af1.js} +0 -0
  320. /package/build/{HEIGHT_GIRLS.zscore.yearly-c2eca714.js → HEIGHT_GIRLS.zscore.yearly-449bc93d.js} +0 -0
  321. /package/build/{Visible-eee51ba6.js → Visible-16859c31.js} +0 -0
  322. /package/build/{WEIGHT_BOYS.percentile.monthly-6a6f901b.js → WEIGHT_BOYS.percentile.monthly-85da0f0a.js} +0 -0
  323. /package/build/{WEIGHT_BOYS.percentile.weekly-737fb867.js → WEIGHT_BOYS.percentile.weekly-9229beac.js} +0 -0
  324. /package/build/{WEIGHT_BOYS.percentile.yearly-7772b5e5.js → WEIGHT_BOYS.percentile.yearly-e8a3c476.js} +0 -0
  325. /package/build/{WEIGHT_BOYS.zscore.monthly-8db2e7d6.js → WEIGHT_BOYS.zscore.monthly-20bef361.js} +0 -0
  326. /package/build/{WEIGHT_BOYS.zscore.weekly-ddd37c1a.js → WEIGHT_BOYS.zscore.weekly-0ec853d0.js} +0 -0
  327. /package/build/{WEIGHT_BOYS.zscore.yearly-332a8f7b.js → WEIGHT_BOYS.zscore.yearly-fccc526c.js} +0 -0
  328. /package/build/{WEIGHT_GIRLS.percentile.monthly-3edad688.js → WEIGHT_GIRLS.percentile.monthly-e7c89bed.js} +0 -0
  329. /package/build/{WEIGHT_GIRLS.percentile.weekly-f113a82a.js → WEIGHT_GIRLS.percentile.weekly-2510046f.js} +0 -0
  330. /package/build/{WEIGHT_GIRLS.percentile.yearly-95afbeaf.js → WEIGHT_GIRLS.percentile.yearly-5046e02b.js} +0 -0
  331. /package/build/{WEIGHT_GIRLS.zscore.monthly-d27c4bd4.js → WEIGHT_GIRLS.zscore.monthly-e6077126.js} +0 -0
  332. /package/build/{WEIGHT_GIRLS.zscore.weekly-2b113519.js → WEIGHT_GIRLS.zscore.weekly-1a145215.js} +0 -0
  333. /package/build/{WEIGHT_GIRLS.zscore.yearly-c82b04db.js → WEIGHT_GIRLS.zscore.yearly-31e42fc2.js} +0 -0
  334. /package/build/{animation-e1375a3b.js → animation-f64d3491.js} +0 -0
  335. /package/build/{cart-67147d06.js → cart-1cbf9c06.js} +0 -0
  336. /package/build/{constants-513a9a41.js → constants-1953275e.js} +0 -0
  337. /package/build/{constants-936f45e9.js → constants-2aeb65f2.js} +0 -0
  338. /package/build/{doctor-17b525f8.js → doctor-10ee1543.js} +0 -0
  339. /package/build/esm/{BMI_BOYS.percentile.monthly-7c9d4923.js → BMI_BOYS.percentile.monthly-44bf9bca.js} +0 -0
  340. /package/build/esm/{BMI_BOYS.percentile.weekly-c410294a.js → BMI_BOYS.percentile.weekly-14f8edd2.js} +0 -0
  341. /package/build/esm/{BMI_BOYS.percentile.yearly-695a4fe2.js → BMI_BOYS.percentile.yearly-609a4150.js} +0 -0
  342. /package/build/esm/{BMI_BOYS.zscore.monthly-9fb9f281.js → BMI_BOYS.zscore.monthly-5f7b2488.js} +0 -0
  343. /package/build/esm/{BMI_BOYS.zscore.weekly-d2109e4b.js → BMI_BOYS.zscore.weekly-79b9ae06.js} +0 -0
  344. /package/build/esm/{BMI_BOYS.zscore.yearly-bfa5361b.js → BMI_BOYS.zscore.yearly-08133388.js} +0 -0
  345. /package/build/esm/{BMI_GIRLS.percentile.monthly-f5f60596.js → BMI_GIRLS.percentile.monthly-20e00636.js} +0 -0
  346. /package/build/esm/{BMI_GIRLS.percentile.weekly-26e4e864.js → BMI_GIRLS.percentile.weekly-033dda0b.js} +0 -0
  347. /package/build/esm/{BMI_GIRLS.percentile.yearly-5a2b297d.js → BMI_GIRLS.percentile.yearly-d66fbb80.js} +0 -0
  348. /package/build/esm/{BMI_GIRLS.zscore.monthly-4e80bed5.js → BMI_GIRLS.zscore.monthly-fec8e639.js} +0 -0
  349. /package/build/esm/{BMI_GIRLS.zscore.weekly-03b79f0b.js → BMI_GIRLS.zscore.weekly-7cd36dc2.js} +0 -0
  350. /package/build/esm/{BMI_GIRLS.zscore.yearly-822ed949.js → BMI_GIRLS.zscore.yearly-9729495b.js} +0 -0
  351. /package/build/esm/{ChevronDown-74267eb8.js → ChevronDown-b58f1e76.js} +0 -0
  352. /package/build/esm/{Close-372aa467.js → Close-0390b2a2.js} +0 -0
  353. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-21b04c4c.js → HEAD CIRCUM_BOYS.percentile.monthly-6aa62326.js} +0 -0
  354. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-049a9d97.js → HEAD CIRCUM_BOYS.percentile.weekly-dccbec56.js} +0 -0
  355. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-a4bbbaba.js → HEAD CIRCUM_BOYS.percentile.yearly-153e0846.js} +0 -0
  356. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-7cb348c6.js → HEAD CIRCUM_BOYS.zscore.monthly-3fe46c5e.js} +0 -0
  357. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-678a1a52.js → HEAD CIRCUM_BOYS.zscore.weekly-81fa76e0.js} +0 -0
  358. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-db81b17e.js → HEAD CIRCUM_BOYS.zscore.yearly-a5955c3a.js} +0 -0
  359. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-cee33cd5.js → HEAD CIRCUM_GIRLS.percentile.monthly-16afd7d8.js} +0 -0
  360. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-2cec19c3.js → HEAD CIRCUM_GIRLS.percentile.weekly-b0258df8.js} +0 -0
  361. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-5949e664.js → HEAD CIRCUM_GIRLS.percentile.yearly-fbe848aa.js} +0 -0
  362. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-7c2bffab.js → HEAD CIRCUM_GIRLS.zscore.monthly-7cb222f7.js} +0 -0
  363. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-356dd00a.js → HEAD CIRCUM_GIRLS.zscore.weekly-786f37d5.js} +0 -0
  364. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e7b62215.js → HEAD CIRCUM_GIRLS.zscore.yearly-546970dc.js} +0 -0
  365. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-359c4335.js → HEIGHT_BOYS.percentile.monthly-3fe8dd70.js} +0 -0
  366. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-a4d4acd3.js → HEIGHT_BOYS.percentile.weekly-8ff515f0.js} +0 -0
  367. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-ec9a7f9b.js → HEIGHT_BOYS.percentile.yearly-2ed73e3c.js} +0 -0
  368. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-12331258.js → HEIGHT_BOYS.zscore.monthly-f18a337e.js} +0 -0
  369. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-172054d3.js → HEIGHT_BOYS.zscore.weekly-d06e0e09.js} +0 -0
  370. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-bb47a3be.js → HEIGHT_BOYS.zscore.yearly-e500b2d1.js} +0 -0
  371. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-c93c0b34.js → HEIGHT_GIRLS.percentile.monthly-2eb2700e.js} +0 -0
  372. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-f1f83097.js → HEIGHT_GIRLS.percentile.weekly-2f205b6e.js} +0 -0
  373. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ccee4e55.js → HEIGHT_GIRLS.percentile.yearly-0d54472f.js} +0 -0
  374. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-caf5410c.js → HEIGHT_GIRLS.zscore.monthly-d1846835.js} +0 -0
  375. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-b1e28b0e.js → HEIGHT_GIRLS.zscore.weekly-b9036bc9.js} +0 -0
  376. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-c3af35d3.js → HEIGHT_GIRLS.zscore.yearly-8dcf6e2d.js} +0 -0
  377. /package/build/esm/{Visible-3f9d7dca.js → Visible-76b05e8e.js} +0 -0
  378. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-8a4647df.js → WEIGHT_BOYS.percentile.monthly-85f7b978.js} +0 -0
  379. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-a2a6adf1.js → WEIGHT_BOYS.percentile.weekly-7c206abd.js} +0 -0
  380. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-073df8b7.js → WEIGHT_BOYS.percentile.yearly-52c0957d.js} +0 -0
  381. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-bb9e73d2.js → WEIGHT_BOYS.zscore.monthly-f48a971e.js} +0 -0
  382. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-ef32ce7a.js → WEIGHT_BOYS.zscore.weekly-6355c54f.js} +0 -0
  383. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-6cc77688.js → WEIGHT_BOYS.zscore.yearly-bdb0459b.js} +0 -0
  384. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a4b518bc.js → WEIGHT_GIRLS.percentile.monthly-a3b768e9.js} +0 -0
  385. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-dcedaebb.js → WEIGHT_GIRLS.percentile.weekly-715f5009.js} +0 -0
  386. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-9e66577e.js → WEIGHT_GIRLS.percentile.yearly-c3a04a7d.js} +0 -0
  387. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-c07cb81f.js → WEIGHT_GIRLS.zscore.monthly-ea7be69d.js} +0 -0
  388. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-9c5c3e8e.js → WEIGHT_GIRLS.zscore.weekly-8b92b792.js} +0 -0
  389. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-e99ce511.js → WEIGHT_GIRLS.zscore.yearly-8a06cbf9.js} +0 -0
  390. /package/build/esm/{animation-0b2299dc.js → animation-b6d252e4.js} +0 -0
  391. /package/build/esm/{cart-f961dadc.js → cart-043dfe5c.js} +0 -0
  392. /package/build/esm/{constants-71d9f33b.js → constants-697503a2.js} +0 -0
  393. /package/build/esm/{constants-f77fc231.js → constants-b3779c5e.js} +0 -0
  394. /package/build/esm/{doctor-8a07ca44.js → doctor-9f166022.js} +0 -0
  395. /package/build/esm/{index-b65a8764.js → index-36764891.js} +0 -0
  396. /package/build/esm/{index-3078acec.js → index-44870130.js} +0 -0
  397. /package/build/esm/{index-782fed08.js → index-77dc8ed1.js} +0 -0
  398. /package/build/esm/{index-c3264b34.js → index-ee5dec8f.js} +0 -0
  399. /package/build/esm/{localizeNumberFormat-42ae8d89.js → localizeNumberFormat-4dd1fd7a.js} +0 -0
  400. /package/build/esm/{normalizeLink-d6f57223.js → normalizeLink-243e6342.js} +0 -0
  401. /package/build/esm/{number-13f075cf.js → number-129aedb0.js} +0 -0
  402. /package/build/esm/{paths-49a813e7.js → paths-67ad72a7.js} +0 -0
  403. /package/build/esm/{translationsContext-f3d1a7bd.js → translationsContext-68168ff3.js} +0 -0
  404. /package/build/esm/{tslib.es6-761239c7.js → tslib.es6-2d738692.js} +0 -0
  405. /package/build/esm/{useIsInit-ee864235.js → useIsInit-6be72906.js} +0 -0
  406. /package/build/esm/{useOutsideClick-7451aa57.js → useOutsideClick-fd3849ea.js} +0 -0
  407. /package/build/esm/{useScrollbarSize-84bb5b47.js → useScrollbarSize-77534d1d.js} +0 -0
  408. /package/build/esm/{useUniqueId-c23213b6.js → useUniqueId-e84c90ce.js} +0 -0
  409. /package/build/{index-bba97c2e.js → index-0168f1a0.js} +0 -0
  410. /package/build/{index-e0bf03ac.js → index-053ed018.js} +0 -0
  411. /package/build/{index-97ebd7e1.js → index-90e7e427.js} +0 -0
  412. /package/build/{index-ba3797bb.js → index-a73d7cb3.js} +0 -0
  413. /package/build/{localizeNumberFormat-90d4f9d5.js → localizeNumberFormat-8ab6a41e.js} +0 -0
  414. /package/build/{normalizeLink-451ae6d8.js → normalizeLink-07c90859.js} +0 -0
  415. /package/build/{number-c2338382.js → number-5605662c.js} +0 -0
  416. /package/build/{paths-e0bbfce7.js → paths-6b0114f1.js} +0 -0
  417. /package/build/{translationsContext-39528d2f.js → translationsContext-ade0df93.js} +0 -0
  418. /package/build/{tslib.es6-7e140b89.js → tslib.es6-d6fa4ee6.js} +0 -0
  419. /package/build/{useIsInit-38cec0c4.js → useIsInit-08580a12.js} +0 -0
  420. /package/build/{useOutsideClick-e579e1ac.js → useOutsideClick-960bf73b.js} +0 -0
  421. /package/build/{useScrollbarSize-5a8be010.js → useScrollbarSize-49049c18.js} +0 -0
  422. /package/build/{useUniqueId-8929fe5f.js → useUniqueId-3c52a5c5.js} +0 -0
@@ -0,0 +1,1364 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-d6fa4ee6.js');
4
+ var React = require('react');
5
+ var index$5 = require('./index-323d2766.js');
6
+ var index$2 = require('./index-eddf350b.js');
7
+ var useTranslations = require('./useTranslations-80687df4.js');
8
+ var innertext = require('innertext');
9
+ var index = require('./index-f5956cd0.js');
10
+ var index$1 = require('./index-6e7aede8.js');
11
+ var constants = require('./constants-1953275e.js');
12
+ var togetherApiPaths = require('./togetherApiPaths.js');
13
+ var togetherComponentGlobalContext = require('./utils-e4d5701e.js');
14
+ var useTogetherAuthRequiredAction = require('./useTogetherAuthRequiredAction.js');
15
+ var treePopoverMenu = require('./treePopoverMenu-dbb4b61e.js');
16
+ var styled = require('@emotion/styled');
17
+ var utils = require('./utils-928b4701.js');
18
+ var miscTheme = require('./miscTheme.js');
19
+ var dataTransform = require('./dataTransform-265f1b67.js');
20
+ var index$7 = require('./index-e239d386.js');
21
+ var index$6 = require('./index-7b98097c.js');
22
+ require('./index-617bff8c.js');
23
+ var core$1 = require('@hhgtech/icons/core');
24
+ var other = require('@hhgtech/icons/other');
25
+ var core = require('@mantine/core');
26
+ var index$4 = require('./index-6daafc7b.js');
27
+ var index$3 = require('./index-036fe55d.js');
28
+ var routing = require('./routing-54391665.js');
29
+ var constantsDomainLocales = require('./constantsDomainLocales.js');
30
+
31
+ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
32
+
33
+ var React__default = /*#__PURE__*/_interopDefault(React);
34
+ var innertext__default = /*#__PURE__*/_interopDefault(innertext);
35
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
36
+
37
+ var img$8 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%233E3F58' d='M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2'/%3e%3c/svg%3e";
38
+ var MBMoreSolid = img$8;
39
+
40
+ var img$7 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23595959'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";
41
+ var IconBookmarkFill = img$7;
42
+
43
+ var img$6 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";
44
+ var IconBookmark = img$6;
45
+
46
+ var img$5 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='none'%3e%3ccircle cx='1.583' cy='6.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 6.417)'/%3e%3ccircle cx='1.583' cy='1.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 1.417)'/%3e%3ccircle cx='1.583' cy='11.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 11.417)'/%3e%3c/svg%3e";
47
+ var IconKebab = img$5;
48
+
49
+ var img$4 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 5.333a2 2 0 1 0 0-4 2 2 0 0 0 0 4M4 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4M12 14.667a2 2 0 1 0 0-4 2 2 0 0 0 0 4M5.727 9.007l4.553 2.653M10.273 4.34 5.727 6.993'/%3e%3c/svg%3e";
50
+ var IconShareOnMedia = img$4;
51
+
52
+ var img$3 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M7.17 3.236H2.995a1.193 1.193 0 0 0-1.193 1.192v8.35a1.193 1.193 0 0 0 1.193 1.192h8.35a1.193 1.193 0 0 0 1.192-1.192V8.603'/%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M11.643 2.341a1.265 1.265 0 0 1 1.789 1.79L7.766 9.795l-2.385.596.596-2.385z'/%3e%3c/svg%3e";
53
+ var IconTabEdit = img$3;
54
+
55
+ var img$2 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M2 4h12'/%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.334 1.334 0 0 1 1.334 1.334V4m2 0v9.333a1.334 1.334 0 0 1-1.334 1.334H4.667a1.334 1.334 0 0 1-1.334-1.334V4zM6.667 7.333v4M9.333 7.333v4'/%3e%3c/svg%3e";
56
+ var IconTrashBin = img$2;
57
+
58
+ // import IconBellOff from '../../../assets/svg/icon-bell-off.svg'
59
+ // import IconBellOn from '../../../assets/svg/icon-bell-on.svg'
60
+ const CardPostPopoverMore = ({ authorEmail, onDeletePost, shareUrl, post, className = '', popoverClassName = '', onBookmark, onRemoveBookmark, onEditPost, }) => {
61
+ const { data: { locale, userInfo, togetherUserId, env: { isMarryBaby }, }, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
62
+ const { t } = useTranslations.useTranslations();
63
+ // const [localHasNoti, setLocalHasNoti] = useState(false)
64
+ const [loading, setLoading] = React.useState(false);
65
+ const [isOpenLeavePopup, setIsOpenLeavePopup] = React.useState(false);
66
+ const [isOpenSharePopup, setIsOpenSharePopup] = React.useState(false);
67
+ const { authActionWrapper } = useTogetherAuthRequiredAction.useTogetherAuthRequiredAction();
68
+ const isAuthor = authorEmail && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && authorEmail === String(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email);
69
+ return (React__default["default"].createElement("div", { className: className, onClick: (e) => {
70
+ e.preventDefault();
71
+ e.stopPropagation();
72
+ } },
73
+ isOpenSharePopup && (React__default["default"].createElement(index.SharePopup, { url: shareUrl, text: post === null || post === void 0 ? void 0 : post.title, onClose: () => setIsOpenSharePopup(false) })),
74
+ isOpenLeavePopup && (React__default["default"].createElement(index.PopupDanger, { thumbnail: index$1.CommonGAssets.getAssetPath('trash-bin.svg'), isThumbnailIcon: true, title: t('popup.deletePost.title'), description: t('popup.deletePost.description'), acceptText: t('popup.deletePost.accept'), cancelText: t('popup.deletePost.cancel'), onAccept: () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
75
+ if (!(post === null || post === void 0 ? void 0 : post.id) || loading)
76
+ return;
77
+ setLoading(true);
78
+ try {
79
+ const res = yield index.deletePost({
80
+ id: post.id,
81
+ locale,
82
+ });
83
+ if ((res === null || res === void 0 ? void 0 : res.status) === 1)
84
+ onDeletePost === null || onDeletePost === void 0 ? void 0 : onDeletePost();
85
+ }
86
+ catch (_a) { }
87
+ setLoading(false);
88
+ }), onClose: () => setIsOpenLeavePopup(false) })),
89
+ React__default["default"].createElement(treePopoverMenu.TreePopoverMenu, { className: popoverClassName, toggleButtonContent: React__default["default"].createElement("img", { src: isMarryBaby ? MBMoreSolid : IconKebab, loading: "lazy" }), position: "bottom", align: "end", buttonProps: {
90
+ isLoading: loading,
91
+ }, data: isAuthor
92
+ ? {
93
+ isShowheader: false,
94
+ type: 'list',
95
+ list: [
96
+ {
97
+ icon: IconShareOnMedia,
98
+ label: t('morePopover.share'),
99
+ onClick: () => setIsOpenSharePopup(true),
100
+ },
101
+ {
102
+ icon: IconTabEdit,
103
+ label: t('actionPopover.edit'),
104
+ onClick: onEditPost,
105
+ },
106
+ {
107
+ icon: IconTrashBin,
108
+ label: t('actionPopover.delete'),
109
+ onClick: () => {
110
+ authActionWrapper(() => setIsOpenLeavePopup(true));
111
+ },
112
+ },
113
+ ],
114
+ }
115
+ : {
116
+ isShowheader: false,
117
+ type: 'list',
118
+ list: [
119
+ {
120
+ icon: IconShareOnMedia,
121
+ label: t('morePopover.share'),
122
+ onClick: () => setIsOpenSharePopup(true),
123
+ },
124
+ {
125
+ icon: !!(post === null || post === void 0 ? void 0 : post.bookmarked) ? IconBookmarkFill : IconBookmark,
126
+ label: !!(post === null || post === void 0 ? void 0 : post.bookmarked)
127
+ ? t('morePopover.unsavePost')
128
+ : t('morePopover.savePost'),
129
+ onClick: () => {
130
+ authActionWrapper(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
131
+ if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) || !(post === null || post === void 0 ? void 0 : post.id))
132
+ return;
133
+ if (post === null || post === void 0 ? void 0 : post.bookmarked) {
134
+ const res = yield togetherComponentGlobalContext.callApiWithAuth(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.BOOKMARK.DELETE, {
135
+ _locale: locale,
136
+ }), 'DELETE', {
137
+ data: {
138
+ post_id: String(post.id),
139
+ },
140
+ });
141
+ if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
142
+ pushNotifications({
143
+ title: '',
144
+ message: 'Removed saved post',
145
+ type: 'success',
146
+ displayIcon: IconBookmark,
147
+ });
148
+ onRemoveBookmark && onRemoveBookmark();
149
+ }
150
+ else {
151
+ pushNotifications({
152
+ title: '',
153
+ message: 'Remove failed',
154
+ type: 'danger',
155
+ displayIcon: IconBookmark,
156
+ });
157
+ }
158
+ }
159
+ else {
160
+ const res = yield togetherComponentGlobalContext.callApiWithAuth(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.BOOKMARK.CREATE, {
161
+ _locale: locale,
162
+ }), 'POST', {
163
+ data: {
164
+ user_id: togetherUserId || userInfo.id,
165
+ post_id: post.id,
166
+ },
167
+ });
168
+ if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
169
+ pushNotifications({
170
+ title: '',
171
+ message: 'Post saved',
172
+ type: 'success',
173
+ displayIcon: IconBookmarkFill,
174
+ });
175
+ onBookmark && onBookmark();
176
+ }
177
+ else {
178
+ pushNotifications({
179
+ title: '',
180
+ message: 'Post saved failed',
181
+ type: 'danger',
182
+ displayIcon: IconBookmark,
183
+ });
184
+ }
185
+ }
186
+ }));
187
+ },
188
+ },
189
+ // {
190
+ // icon: togetherBasePath + '/svg/icon-bell-on.svg',
191
+ // label: !localHasNoti
192
+ // ? t( 'morePopover.turnOnNotifications' })
193
+ // : t( 'morePopover.turnOffNotifications' }),
194
+ // onClick: () => {
195
+ // authActionWrapper(async () => {
196
+ // if (!post?.id || loading) return
197
+ // setLoading(true)
198
+ // try {
199
+ // const res = await followUnfollowPost({
200
+ // id: post?.id,
201
+ // locale,
202
+ // })
203
+ // if (res?.status === 1) {
204
+ // pushNotifications({
205
+ // message: !localHasNoti
206
+ // ? 'Notification on'
207
+ // : 'Notification off',
208
+ // type: !localHasNoti ? 'success' : 'danger',
209
+ // displayIcon: !localHasNoti ? IconBellOn : IconBellOff,
210
+ // })
211
+ // setLocalHasNoti((v) => !v)
212
+ // }
213
+ // } catch {}
214
+ // setLoading(false)
215
+ // })
216
+ // },
217
+ // },
218
+ {
219
+ icon: index.IconAlertCircle,
220
+ label: t('morePopover.report'),
221
+ subTree: {
222
+ title: t('morePopover.report.title'),
223
+ description: t('morePopover.report.description'),
224
+ isShowheader: true,
225
+ type: 'list',
226
+ list: Object.keys(constants.REPORT_REASON_MAP)
227
+ .map((k) => ({
228
+ label: constants.REPORT_REASON_MAP[k].label,
229
+ reason: constants.REPORT_REASON_MAP[k].reportReasonText,
230
+ reasonValue: k,
231
+ }))
232
+ .map((item) => ({
233
+ label: t(item.label),
234
+ subTree: {
235
+ title: t('morePopover.reportSubmit.title'),
236
+ description: t('morePopover.reportSubmit.description'),
237
+ isShowheader: true,
238
+ type: 'jsx',
239
+ jsxRenderer: (setShow) => (React__default["default"].createElement(index.SubmitReportForm, { reason: item.reasonValue, reasonText: t(item.reason), postId: post === null || post === void 0 ? void 0 : post.id, onClose: () => setShow && setShow(false) })),
240
+ },
241
+ })),
242
+ },
243
+ },
244
+ ],
245
+ } })));
246
+ };
247
+
248
+ const StyledCardPost$1 = styled__default["default"].div `
249
+ position: relative;
250
+ margin-bottom: 24px;
251
+ background: white;
252
+ border-radius: ${miscTheme.theme.borderRadius};
253
+
254
+ a {
255
+ text-decoration: none;
256
+ }
257
+
258
+ ${utils.MediaQueries.mbDown} {
259
+ margin-bottom: 8px;
260
+ }
261
+ &.flat-top {
262
+ border-top-left-radius: 0;
263
+ border-top-right-radius: 0;
264
+ }
265
+
266
+ .post-pin {
267
+ padding: 0.5rem 1rem;
268
+ border-radius: ${miscTheme.theme.borderRadius} 6px 0 0;
269
+ }
270
+ .post-author {
271
+ display: flex;
272
+ align-items: center;
273
+ justify-content: space-between;
274
+ &.comment {
275
+ padding-right: 2.6rem;
276
+ }
277
+ .author-avatar-wrapper {
278
+ width: 40px;
279
+ height: 40px;
280
+ font-size: 20px;
281
+ ${utils.MediaQueries.mbDown} {
282
+ width: 32px;
283
+ height: 32px;
284
+ font-size: 16px;
285
+ }
286
+ }
287
+ }
288
+ .post-content-link-wrapper {
289
+ color: inherit;
290
+ cursor: pointer;
291
+ .post-content-title {
292
+ padding: 1rem 1rem 0;
293
+ word-break: break-word;
294
+ }
295
+ }
296
+ .social-preview-wrapper.has-image {
297
+ margin-bottom: 5px;
298
+ }
299
+ .social-preview-wrapper,
300
+ .image-preview-wrapper,
301
+ .link-preview-wrapper {
302
+ width: 100%;
303
+ &[data-is-reply='true'] {
304
+ padding-right: 1rem;
305
+ padding-left: 1rem;
306
+ }
307
+ }
308
+ .post-topics {
309
+ padding: 0 1rem;
310
+ }
311
+
312
+ .post-reaction {
313
+ background: none;
314
+ border-radius: 0 0 6px 6px;
315
+ &.hide-top-border {
316
+ ::before {
317
+ display: none;
318
+ }
319
+ }
320
+ }
321
+ .most-engaging-wrapper {
322
+ padding: 1rem;
323
+ cursor: pointer;
324
+ .author-avatar-wrapper {
325
+ width: 2rem;
326
+ height: 2rem;
327
+ font-size: 1rem;
328
+ }
329
+ .see-more-comments {
330
+ width: 100%;
331
+ padding: 12px 0 0;
332
+ text-align: unset;
333
+ }
334
+ }
335
+ &[data-most-engaging='true'] {
336
+ border: none;
337
+ ${utils.MediaQueries.mbDown} {
338
+ margin: 1rem;
339
+ border: 1px solid #e4e8ec;
340
+ }
341
+ }
342
+ .top-divider {
343
+ border-color: #e4e8ec;
344
+ }
345
+ .popover {
346
+ .popover-menu__btn {
347
+ display: flex;
348
+ width: 1.5rem;
349
+ height: 1rem;
350
+ align-items: center;
351
+ justify-content: center;
352
+ padding: 0;
353
+ background: transparent;
354
+
355
+ &:hover {
356
+ background-color: transparent;
357
+ }
358
+ }
359
+ .popover-menu__content {
360
+ &.--position-bottom {
361
+ &.--align-end {
362
+ &::before {
363
+ right: 12.5px;
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+
370
+ &[data-is-marrybaby='true'] {
371
+ border: 1px solid #f3f3f3;
372
+ border-radius: 1rem;
373
+ /* shadow */
374
+
375
+ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08);
376
+ .image-preview-wrapper,
377
+ .link-preview-wrapper {
378
+ padding-right: 1rem;
379
+ padding-left: 1rem;
380
+ }
381
+ .popover {
382
+ .popover-menu__btn {
383
+ width: 24px;
384
+ height: 24px;
385
+ ${utils.MediaQueries.mbDown} {
386
+ width: 18px;
387
+ height: 18px;
388
+ }
389
+ }
390
+ .popover-menu__content {
391
+ &.--position-bottom {
392
+ &.--align-end {
393
+ &::before {
394
+ right: 1rem;
395
+ }
396
+ width: 350px;
397
+ ${utils.MediaQueries.mbDown} {
398
+ max-width: calc(320px - 2rem);
399
+ }
400
+ }
401
+ }
402
+ }
403
+ }
404
+ .most-engaging-wrapper {
405
+ position: relative;
406
+ padding: 0;
407
+ &::before {
408
+ position: absolute;
409
+ z-index: 5;
410
+ top: 0;
411
+ left: 50%;
412
+ width: calc(100% - 2rem);
413
+ height: 1px;
414
+ background: #f3f3f3;
415
+ content: ' ';
416
+ transform: translateX(-50%);
417
+ }
418
+ }
419
+ ${utils.MediaQueries.mbDown} {
420
+ margin-bottom: 12px;
421
+ }
422
+ }
423
+ `;
424
+
425
+ var img$1 = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23a)'%3e%3cpath d='M2 4.008h12m-8.667 0V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008zm-6 3.334v4m2.666-4v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
426
+ var IconDelete = img$1;
427
+
428
+ const CardReplyPopover = ({ onDeleteComment, commentId, className = '', popoverClassName = '', }) => {
429
+ const { data: { env: { isMarryBaby }, locale, }, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
430
+ const { t } = useTranslations.useTranslations();
431
+ const [isOpenLeavePopup, setIsOpenLeavePopup] = React.useState(false);
432
+ const { authActionWrapper } = useTogetherAuthRequiredAction.useTogetherAuthRequiredAction();
433
+ return (React__default["default"].createElement("div", { className: className, onClick: (e) => {
434
+ e.preventDefault();
435
+ e.stopPropagation();
436
+ } },
437
+ isOpenLeavePopup && (React__default["default"].createElement(index.PopupDanger, { thumbnail: IconDelete, isThumbnailIcon: true, title: t('popup.deleteComment.title'), description: t('popup.deleteComment.description'), acceptText: t('popup.deletePost.accept'), cancelText: t('popup.deletePost.cancel'), onAccept: () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
438
+ var _a;
439
+ if (!commentId)
440
+ return;
441
+ const res = yield index.deleteComment({ id: commentId, locale });
442
+ if ((res === null || res === void 0 ? void 0 : res.status) === 1) {
443
+ onDeleteComment && onDeleteComment();
444
+ pushNotifications({
445
+ title: '',
446
+ message: t('notification.success'),
447
+ type: 'success',
448
+ });
449
+ }
450
+ else {
451
+ pushNotifications({
452
+ title: '',
453
+ message: ((_a = res === null || res === void 0 ? void 0 : res.messages) === null || _a === void 0 ? void 0 : _a[0]) || t('notification.failure'),
454
+ type: 'danger',
455
+ });
456
+ }
457
+ }), onClose: () => setIsOpenLeavePopup(false) })),
458
+ React__default["default"].createElement(treePopoverMenu.TreePopoverMenu, { position: "bottom", align: "end", data: {
459
+ isShowheader: false,
460
+ type: 'list',
461
+ list: [
462
+ // {
463
+ // icon: _href('/svg/icon-share-on-media.svg'),
464
+ // label: f({ id: 'morePopover.share' }),
465
+ // subTree: {
466
+ // title: f({ id: 'morePopover.shareOn' }),
467
+ // isShowheader: true,
468
+ // type: 'jsx',
469
+ // jsxType: TreeJSXType.share,
470
+ // data: {
471
+ // shareUrl: shareUrl,
472
+ // shareTitle: shareTitle,
473
+ // },
474
+ // },
475
+ // },
476
+ // {
477
+ // icon: _href('/svg/icon-tab-edit-2.svg'),
478
+ // label: f({ id: 'actionPopover.edit' }),
479
+ // onClick: onEditPost,
480
+ // },
481
+ {
482
+ icon: IconTrashBin,
483
+ label: t('actionPopover.delete'),
484
+ onClick: () => {
485
+ authActionWrapper(() => {
486
+ setIsOpenLeavePopup(true);
487
+ });
488
+ },
489
+ },
490
+ ],
491
+ }, className: popoverClassName, toggleButtonContent: React__default["default"].createElement("img", { src: isMarryBaby ? MBMoreSolid : IconKebab, loading: "lazy" }), buttonProps: {
492
+ // isLoading: loading,
493
+ } })));
494
+ };
495
+
496
+ const StyledContainer$1 = styled__default["default"].div `
497
+ .add-link {
498
+ color: ${miscTheme.theme.colors.primaryBase};
499
+ }
500
+ `;
501
+ const StyledAlertTag = styled__default["default"].div `
502
+ margin: 16px 0;
503
+ background: ${miscTheme.theme.colors.yellow50};
504
+ padding: 5px 10px;
505
+ border-radius: 2px;
506
+
507
+ .icon {
508
+ display: inline-block;
509
+ vertical-align: middle;
510
+ margin-right: 6px;
511
+ }
512
+ `;
513
+ const StyledSourceItemWrapper = styled__default["default"].div `
514
+ display: flex;
515
+ align-items: center;
516
+ gap: 8px;
517
+ `;
518
+ const StyledListItems$1 = styled__default["default"].div `
519
+ padding: 8px 16px;
520
+ `;
521
+ const StyledInputWrapper = styled__default["default"].div `
522
+ margin-bottom: 12px;
523
+ width: 100%;
524
+ `;
525
+
526
+ const StyledContainer = styled__default["default"].div ``;
527
+ const StyledHeader = styled__default["default"].div `
528
+ margin-bottom: 16px;
529
+ `;
530
+ const StyledListItems = styled__default["default"].div `
531
+ display: flex;
532
+ flex-wrap: wrap;
533
+ row-gap: 16px;
534
+ ${utils.MediaQueries.tdUp} {
535
+ align-items: center;
536
+ column-gap: 24px;
537
+ }
538
+ `;
539
+ const StyledItem$1 = styled__default["default"].a `
540
+ display: flex;
541
+ align-items: center;
542
+ gap: 16px;
543
+ ${utils.MediaQueries.mbDown} {
544
+ width: 100%;
545
+ justify-content: space-between;
546
+ }
547
+ `;
548
+ const StyledItemInfo = styled__default["default"].div `
549
+ display: flex;
550
+ align-items: center;
551
+ gap: 16px;
552
+ `;
553
+ const StyledThumb = styled__default["default"].div `
554
+ border-radius: ${miscTheme.theme.borderRadius};
555
+ overflow: hidden;
556
+ width: 48px;
557
+ height: 48px;
558
+ img {
559
+ object-fit: cover;
560
+ width: 100%;
561
+ height: 100%;
562
+ }
563
+ `;
564
+
565
+ const RecommentCategories = ({ categories }) => {
566
+ const { t } = useTranslations.useTranslations();
567
+ const { data: { locale, env: { isMarryBaby }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
568
+ const url = routing.getCurrentBaseUrl(locale, isMarryBaby);
569
+ return (React__default["default"].createElement(StyledContainer, null,
570
+ React__default["default"].createElement(StyledHeader, null,
571
+ React__default["default"].createElement(index$2.Heading, { tag: "h6", as: "h5" }, t('cardReply.recommentCategories.heading'))),
572
+ React__default["default"].createElement(StyledListItems, null, categories.map((i) => (React__default["default"].createElement(StyledItem$1, { href: url + i.permalink, key: String(i.termId), target: "_blank" },
573
+ React__default["default"].createElement(StyledItemInfo, null,
574
+ React__default["default"].createElement(StyledThumb, null,
575
+ React__default["default"].createElement("img", { src: i.featureImage ||
576
+ index$1.CommonGAssets.getAssetPath(isMarryBaby ? 'mb-logo.svg' : '/logo/logomark.png'), alt: i.displayName, loading: "lazy" })),
577
+ React__default["default"].createElement(index$3.Text, { size: "s3", weight: "bold" }, i.displayName)),
578
+ React__default["default"].createElement(other.ArrowRight, { size: 20, color: miscTheme.theme.colors.gray400 })))))));
579
+ };
580
+
581
+ const StyledItem = styled__default["default"].a `
582
+ padding: 12px 0;
583
+ display: flex;
584
+ flex-direction: column;
585
+ gap: 8px;
586
+ border-top: 1px solid ${miscTheme.theme.colors.neutral100};
587
+ text-decoration: none;
588
+
589
+ &:first-child {
590
+ border-top: 0;
591
+ }
592
+ `;
593
+
594
+ const SourceItem = ({ postTitle, articleReviewed, modifiedTime, href, }) => {
595
+ const { t } = useTranslations.useTranslations();
596
+ const getDetail = (() => {
597
+ const { expert, editor, is_author } = articleReviewed;
598
+ if (expert) {
599
+ const result = {
600
+ name: expert.display_name,
601
+ role: 'expert',
602
+ avatar: expert.avatar,
603
+ };
604
+ if (is_author) {
605
+ return Object.assign({ title: t('articleAuthor.title.written-by') }, result);
606
+ }
607
+ else {
608
+ if (expert.role === 'expert') {
609
+ // Is Expert
610
+ return Object.assign({ title: t('articleAuthor.title.expert') }, result);
611
+ }
612
+ else {
613
+ // Is medical
614
+ return Object.assign({ title: t('articleAuthor.title.medical') }, result);
615
+ }
616
+ }
617
+ }
618
+ else if (editor) {
619
+ return {
620
+ title: t('articleAuthor.title.fact-check'),
621
+ name: editor.display_name,
622
+ avatar: editor.avatar,
623
+ };
624
+ }
625
+ })();
626
+ return (React__default["default"].createElement(StyledItem, { href: href, title: postTitle, target: "_blank" },
627
+ React__default["default"].createElement(index$3.Text, { size: "s3", as: "h5", weight: "bold" }, postTitle),
628
+ React__default["default"].createElement("div", null,
629
+ React__default["default"].createElement(index.CardAuthor, { avatar: getDetail === null || getDetail === void 0 ? void 0 : getDetail.avatar, avatarProps: {
630
+ size: 32,
631
+ }, name: getDetail === null || getDetail === void 0 ? void 0 : getDetail.name, role: getDetail === null || getDetail === void 0 ? void 0 : getDetail.role, hideBackground: true },
632
+ React__default["default"].createElement(index.CardAuthor.SubTextRow, null,
633
+ React__default["default"].createElement(index.CardAuthor.SubText, null, getDetail === null || getDetail === void 0 ? void 0 :
634
+ getDetail.title,
635
+ ' ',
636
+ React__default["default"].createElement("span", { style: { color: miscTheme.theme.colors.gray800 } }, getDetail === null || getDetail === void 0 ? void 0 : getDetail.name)),
637
+ React__default["default"].createElement(index.CardAuthor.SubDivider, null),
638
+ React__default["default"].createElement(index.CardAuthor.SubText, null, modifiedTime))))));
639
+ };
640
+
641
+ var styles$1 = {"accordion":"CnNZq8D","header":"F4mmgSy","heading":"_8jLruY3","headingIcon":"FE8w-fe","panel":"Yd2a9Nj","chevron":"A7QrQ7A"};
642
+
643
+ const SourceList = (_a) => {
644
+ var { listUrl: listUrlInit, hideSourceList, categorySlug, editMode, collapseSource, onListChange, isMarryBaby } = _a, rest = tslib_es6.__rest(_a, ["listUrl", "hideSourceList", "categorySlug", "editMode", "collapseSource", "onListChange", "isMarryBaby"]);
645
+ const { t } = useTranslations.useTranslations();
646
+ const [listUrl, setListUrl] = React.useState(listUrlInit || []);
647
+ const [data, setData] = React.useState([]);
648
+ const [categories, setCategories] = React.useState([]);
649
+ const [loading, setLoading] = React.useState(false);
650
+ React.useEffect(() => {
651
+ !hideSourceList &&
652
+ (() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
653
+ setLoading(true);
654
+ const listPaths = listUrl.map((i) => {
655
+ const url = new URL(i);
656
+ const pathArr = String(url.pathname)
657
+ .split('/')
658
+ .filter((i) => i != '');
659
+ const origin = url.origin;
660
+ const isMarrySite = origin.search('marrybaby.vn') !== -1;
661
+ return {
662
+ isMarrySite,
663
+ path: pathArr[pathArr.length - 1],
664
+ href: i,
665
+ };
666
+ });
667
+ const listApi = [
668
+ ...listPaths.map((i) => togetherComponentGlobalContext.callApi(i.isMarrySite
669
+ ? togetherComponentGlobalContext.getMarryBabyApiPath(togetherApiPaths.DISCOVER_PATHS.GET_PREVIEW_ARTICLE, {
670
+ fullSlug: i.path,
671
+ }, true)
672
+ : togetherComponentGlobalContext.getDiscoverApiPath(togetherApiPaths.DISCOVER_PATHS.GET_PREVIEW_ARTICLE, {
673
+ fullSlug: i.path,
674
+ }, true), 'GET')),
675
+ ];
676
+ const res = yield Promise.all(listApi);
677
+ setData(res
678
+ .map((i, index) => {
679
+ var _a, _b;
680
+ return ((_a = i === null || i === void 0 ? void 0 : i.data) === null || _a === void 0 ? void 0 : _a.post) && Object.assign(Object.assign({}, dataTransform.formatArticle((_b = i === null || i === void 0 ? void 0 : i.data) === null || _b === void 0 ? void 0 : _b.post)), { href: listPaths[index].href });
681
+ })
682
+ .filter(Boolean));
683
+ setLoading(false);
684
+ }))();
685
+ }, []);
686
+ React.useEffect(() => {
687
+ !hideSourceList &&
688
+ (data === null || data === void 0 ? void 0 : data.length) === 0 &&
689
+ categorySlug &&
690
+ (() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
691
+ var _a;
692
+ const res = yield togetherComponentGlobalContext.callApi(isMarryBaby
693
+ ? togetherComponentGlobalContext.getMarryBabyApiPath(togetherApiPaths.DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL, {
694
+ fullSlug: categorySlug,
695
+ }, true)
696
+ : togetherComponentGlobalContext.getDiscoverApiPath(togetherApiPaths.DISCOVER_PATHS.GET_CATEGORY_OR_ARTICLE_DETAIL, {
697
+ fullSlug: categorySlug,
698
+ }, true), 'GET');
699
+ (res === null || res === void 0 ? void 0 : res.data) && setCategories([dataTransform.formatCategory((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.category)]);
700
+ }))();
701
+ }, [data]);
702
+ const handleRemoveItem = (idx) => {
703
+ setListUrl((old) => {
704
+ const tmp = [...old];
705
+ tmp.splice(idx, 1);
706
+ return tmp;
707
+ });
708
+ setData((old) => {
709
+ const tmp = [...old];
710
+ tmp.splice(idx, 1);
711
+ return tmp;
712
+ });
713
+ };
714
+ React.useEffect(() => {
715
+ onListChange === null || onListChange === void 0 ? void 0 : onListChange(listUrl);
716
+ }, [listUrl]);
717
+ return (React__default["default"].createElement("div", Object.assign({}, rest),
718
+ !editMode && (React__default["default"].createElement(StyledAlertTag, null,
719
+ React__default["default"].createElement("img", { className: "icon", src: index$1.CommonGAssets.getAssetPath('warning.svg'), alt: "warning", style: { marginBottom: '3px', width: '18px' }, loading: "lazy" }),
720
+ React__default["default"].createElement(index$3.Text, { size: "s3", as: "span", dangerouslySetInnerHTML: {
721
+ __html: t('cardReply.disclaimer'),
722
+ } }))),
723
+ !hideSourceList ? (loading ? (React__default["default"].createElement(index.Loading, null)) : data.length > 0 || editMode ? (React__default["default"].createElement(StyledContainer$1, null,
724
+ React__default["default"].createElement(core.Accordion, { defaultValue: !collapseSource && 'accordion', styles: {
725
+ control: {
726
+ borderRadius: 'inherit',
727
+ '&[aria-expanded="false"]': {
728
+ borderBottom: 0,
729
+ },
730
+ },
731
+ chevron: {
732
+ width: '32px',
733
+ height: '32px',
734
+ },
735
+ content: {
736
+ padding: 0,
737
+ borderBottom: 0,
738
+ borderTop: `1px solid ${miscTheme.theme.colors.neutral100}`,
739
+ },
740
+ item: {
741
+ marginBottom: '16px',
742
+ borderTopLeftRadius: '8px',
743
+ borderTopRightRadius: '8px',
744
+ border: `1px solid ${miscTheme.theme.colors.neutral100}`,
745
+ borderBottomLeftRadius: '8px',
746
+ borderBottomRightRadius: '8px',
747
+ '&[data-active]': {
748
+ borderBottomLeftRadius: 0,
749
+ borderBottomRightRadius: 0,
750
+ },
751
+ },
752
+ }, chevron: React__default["default"].createElement("div", { className: styles$1.chevron },
753
+ React__default["default"].createElement(other.ArrowDown, { color: miscTheme.theme.colors.gray600, size: 20 })) },
754
+ React__default["default"].createElement(core.Accordion.Item, { value: "accordion" },
755
+ React__default["default"].createElement(core.Accordion.Control, null,
756
+ React__default["default"].createElement("div", { className: styles$1.header },
757
+ React__default["default"].createElement(index$2.Heading, { as: "h4", tag: "h6" }, t('cardReply.source')))),
758
+ React__default["default"].createElement(core.Accordion.Panel, null,
759
+ React__default["default"].createElement(StyledListItems$1, null,
760
+ (data || []).map((i, idx) => (React__default["default"].createElement(StyledSourceItemWrapper, { key: String(idx) },
761
+ typeof i === 'object' ? (React__default["default"].createElement(SourceItem, Object.assign({}, i))) : (React__default["default"].createElement(StyledInputWrapper, null,
762
+ React__default["default"].createElement(index$4.Input, { style: { width: '100%' }, name: "source-list", value: i || '', size: "sm", onChange: (v) => {
763
+ setListUrl((old) => {
764
+ const tmp = [...old];
765
+ tmp[idx] = v;
766
+ return tmp;
767
+ });
768
+ setData((old) => {
769
+ const tmp = [...old];
770
+ tmp[idx] = v;
771
+ return tmp;
772
+ });
773
+ } }))),
774
+ editMode && (React__default["default"].createElement(index$5.Button, { size: "md", color: "transparent", icon: React__default["default"].createElement(other.Trash, null), onClick: () => handleRemoveItem(idx) }))))),
775
+ editMode && (React__default["default"].createElement(index$5.Button, { className: "add-link", color: "transparent", size: "md", icon: React__default["default"].createElement(core$1.Plus, { color: miscTheme.theme.colors.primaryBase, size: 18 }), onClick: () => {
776
+ setListUrl((old) => [...old, '']);
777
+ setData((old) => [...old, '']);
778
+ } }, "Add source")))))))) : (React__default["default"].createElement(RecommentCategories, { categories: categories }))) : null));
779
+ };
780
+
781
+ const StyledCardPost = styled__default["default"].div `
782
+ position: relative;
783
+ margin-bottom: 0;
784
+ background: white;
785
+ border-radius: ${miscTheme.theme.borderRadius};
786
+
787
+ .verify-tag {
788
+ margin-top: 12px;
789
+ }
790
+
791
+ .post-author {
792
+ &.with-popover {
793
+ padding-right: 2.6rem;
794
+ }
795
+ .author-avatar-wrapper {
796
+ width: 40px;
797
+ height: 40px;
798
+ font-size: 20px;
799
+ ${utils.MediaQueries.mbDown} {
800
+ width: 32px;
801
+ height: 32px;
802
+ font-size: 16px;
803
+ }
804
+ }
805
+ }
806
+ .image-preview-wrapper,
807
+ .link-preview-wrapper {
808
+ width: 100%;
809
+ &[data-is-reply='true'] {
810
+ padding-right: 1rem;
811
+ padding-left: 1rem;
812
+ }
813
+ }
814
+ .post-reaction {
815
+ background: none;
816
+ border-radius: 0 0 6px 6px;
817
+ }
818
+ &[data-is-reply='true'] {
819
+ > .post-author .author-avatar-wrapper {
820
+ width: 20px;
821
+ height: 20px;
822
+ font-size: 10px;
823
+ }
824
+ }
825
+ &[data-is-reply='false'] {
826
+ border: 1px solid #e4e8ec;
827
+ }
828
+ .expert-wrapper {
829
+ width: 100%;
830
+ }
831
+ &[data-has-booking='true'] {
832
+ display: grid;
833
+ .post-author {
834
+ background-color: ${miscTheme.theme.colors.primary50};
835
+ }
836
+ .btn-wrapper {
837
+ padding: 0 16px;
838
+ .btn-booking {
839
+ width: 100%;
840
+ margin: 12px 0;
841
+ }
842
+ }
843
+ }
844
+
845
+ .comment-reply-wrapper {
846
+ padding: 0 1rem;
847
+ .more-cmt {
848
+ .chevron-right {
849
+ height: 1rem;
850
+ width: 1rem;
851
+ vertical-align: middle;
852
+ }
853
+ }
854
+ }
855
+ .top-divider {
856
+ border-color: #e4e8ec;
857
+ }
858
+ .popover {
859
+ position: absolute;
860
+ top: 1.5rem;
861
+ right: 1rem;
862
+ .popover-menu__btn {
863
+ display: flex;
864
+ width: 1rem;
865
+ height: 1rem;
866
+ align-items: center;
867
+ justify-content: center;
868
+ padding: 0;
869
+ background: transparent;
870
+
871
+ &:hover {
872
+ background-color: transparent;
873
+ }
874
+
875
+ .popover-menu__content {
876
+ &.--position-bottom {
877
+ &.--align-end {
878
+ &::before {
879
+ right: 12.5px;
880
+ }
881
+ }
882
+ }
883
+ }
884
+ }
885
+ }
886
+
887
+ &[data-is-marrybaby='true'] {
888
+ &[data-is-reply='false'] {
889
+ border: none;
890
+ }
891
+ .image-preview-wrapper,
892
+ .link-preview-wrapper {
893
+ padding-right: 1rem;
894
+ padding-left: 1rem;
895
+ }
896
+ .popover {
897
+ .popover-menu__btn {
898
+ width: 24px;
899
+ height: 24px;
900
+ }
901
+ }
902
+
903
+ margin-left: 56px;
904
+ ${utils.MediaQueries.mbDown} {
905
+ margin-left: 40px;
906
+ }
907
+ > .post-author {
908
+ margin-left: -56px;
909
+ ${utils.MediaQueries.mbDown} {
910
+ margin-left: -40px;
911
+ }
912
+ .author-info {
913
+ align-items: center;
914
+ display: flex;
915
+ align-items: center;
916
+ .author-info-top {
917
+ width: 100%;
918
+ }
919
+ .author-info-text-wrapper {
920
+ justify-content: space-between;
921
+ }
922
+ }
923
+ .author-avatar-wrapper {
924
+ width: 40px;
925
+ height: 40px;
926
+ font-size: 20px;
927
+ ${utils.MediaQueries.mbDown} {
928
+ width: 24px;
929
+ height: 24px;
930
+ font-size: 12px;
931
+ }
932
+ }
933
+ }
934
+ &[data-is-reply] {
935
+ > .post-author {
936
+ .author-avatar-wrapper {
937
+ width: 40px;
938
+ height: 40px;
939
+ font-size: 20px;
940
+ ${utils.MediaQueries.mbDown} {
941
+ width: 24px;
942
+ height: 24px;
943
+ font-size: 12px;
944
+ }
945
+ }
946
+ }
947
+ }
948
+
949
+ .comment-reply-wrapper {
950
+ padding-right: 0;
951
+ padding-left: 0;
952
+ }
953
+ .post-reaction {
954
+ &::after {
955
+ position: absolute;
956
+ bottom: 0;
957
+ left: 50%;
958
+ width: calc(100% - 2rem);
959
+ height: 1px;
960
+ background: #f3f3f3;
961
+ content: ' ';
962
+ transform: translateX(-50%);
963
+ }
964
+ }
965
+ .post-content-wrapper {
966
+ padding-top: 0;
967
+ padding-bottom: 0;
968
+ ${utils.MediaQueries.mbDown} {
969
+ padding-left: 0.5rem;
970
+ }
971
+ }
972
+
973
+ ${utils.MediaQueries.mbDown} {
974
+ margin-bottom: 12px;
975
+ }
976
+ }
977
+ `;
978
+ const StyledSourceList = styled__default["default"](SourceList) `
979
+ margin-top: 12px;
980
+ padding: 0.5rem 1rem 1rem;
981
+ `;
982
+
983
+ var styles = {"button":"-dzIuHr"};
984
+
985
+ const VerifiedTag = ({ userId, avatar, name, role, title, className, }) => {
986
+ const { t } = useTranslations.useTranslations();
987
+ const [openPopup, setOpenPopup] = React.useState(false);
988
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
989
+ React__default["default"].createElement(index$5.Button, { className: `${styles.button} ${className}`, color: "success", size: "xs", onClick: () => setOpenPopup(true), style: {
990
+ padding: '5px 8px',
991
+ marginBottom: '12px',
992
+ borderRadius: '4px',
993
+ } },
994
+ React__default["default"].createElement("span", { className: "text" },
995
+ React__default["default"].createElement(other.Endorse, { isSolid: true, size: 18, color: miscTheme.theme.colors.green800, className: "icon" }),
996
+ t('cardReply.verifyBy', {
997
+ name: `${name || ''}`,
998
+ }))),
999
+ React__default["default"].createElement(index.ProfileDetailModal, { open: openPopup, onClose: () => setOpenPopup(false), profileModalProps: { zIndex: 1000 } },
1000
+ React__default["default"].createElement(index.ProfileDetail, { authorProps: {
1001
+ userId,
1002
+ avatar: avatar,
1003
+ name,
1004
+ role,
1005
+ title,
1006
+ }, hideQuestionTab: true }))));
1007
+ };
1008
+
1009
+ var img = "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e";
1010
+ var ChevronRightActive = img;
1011
+
1012
+ const COMMENT_LIMIT = 4;
1013
+ const CardReply = ({ className, style, comment: CommentProps, type = 'comment', level = 0, replyingId, onPostCommentSuccess, post, onDeleteComment, refetchComment, hasQuickBookingEnable, handleMakeAppointment, cardAuthorProps, maxChars = 600, disableShortenContent, }) => {
1014
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1015
+ const { data: { locale, userInfo, env: { isMarryBaby }, }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
1016
+ const { t } = useTranslations.useTranslations();
1017
+ const [comment, setComment] = React.useState(CommentProps || null);
1018
+ const { id, countLikes, content, replies = [], images = [], author, liked, link, mentionedUser, mentions, } = comment;
1019
+ const { text, replyingTo } = index.decodeCommentBody(content);
1020
+ const { authActionWrapper } = useTogetherAuthRequiredAction.useTogetherAuthRequiredAction({
1021
+ _joinCommunityIds: [(_a = post === null || post === void 0 ? void 0 : post.community) === null || _a === void 0 ? void 0 : _a.id],
1022
+ _joinTopicIds: (_b = post === null || post === void 0 ? void 0 : post.topics) === null || _b === void 0 ? void 0 : _b.map((t) => t.id),
1023
+ });
1024
+ const [maxRepliesShow, setMaxRepliesShow] = React.useState(COMMENT_LIMIT);
1025
+ const isCommented = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id)
1026
+ ? replies === null || replies === void 0 ? void 0 : replies.some((c) => c.author.id === userInfo.id)
1027
+ : false;
1028
+ const addNewReply = (comment) => {
1029
+ setComment((old) => {
1030
+ // somehow this set state run twice
1031
+ // => we need to check unique comment id before add to array
1032
+ if (!old.replies.find((c) => c.id === comment.id)) {
1033
+ old.replies.unshift(comment);
1034
+ const newComment = Object.assign(Object.assign({}, old), { replies: old.replies.slice(), countReplies: old.countReplies + 1 });
1035
+ refetchComment && refetchComment(newComment);
1036
+ return newComment;
1037
+ }
1038
+ return old;
1039
+ });
1040
+ };
1041
+ const [showInputComment, setShowInputComment] = React.useState(false);
1042
+ const sortedReplies = React.useMemo(() => {
1043
+ if (type !== 'comment' || !replies || replies.length == 0)
1044
+ return replies;
1045
+ return replies.sort((a, b) => {
1046
+ const timeA = new Date(a.createdAt).getTime();
1047
+ const timeB = new Date(b.createdAt).getTime();
1048
+ if (timeA > timeB)
1049
+ return -1;
1050
+ if (timeA < timeB)
1051
+ return 1;
1052
+ return 0;
1053
+ });
1054
+ }, [type, replies]);
1055
+ const mergeCountReplies = (replies === null || replies === void 0 ? void 0 : replies.length) || 0;
1056
+ const hasPopover = String(author === null || author === void 0 ? void 0 : author.email) &&
1057
+ (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) &&
1058
+ String(author === null || author === void 0 ? void 0 : author.email) === String(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email);
1059
+ // const isAnonymousOfCurAuthor =
1060
+ // post?.isAnonymous && post?.author?.username === author?.username
1061
+ // const name = isAnonymousOfCurAuthor
1062
+ // ? t('cardPost.anonymous')
1063
+ // : author?.name || author?.username || ''
1064
+ // const avatar = isAnonymousOfCurAuthor ? DEFAULT_AVATAR_IMG : author?.avatar
1065
+ // const username = isAnonymousOfCurAuthor
1066
+ // ? t('cardPost.anonymous')
1067
+ // : author?.username || author?.name || ''
1068
+ const name = (author === null || author === void 0 ? void 0 : author.name) || (author === null || author === void 0 ? void 0 : author.username) || '';
1069
+ const username = (author === null || author === void 0 ? void 0 : author.username) || (author === null || author === void 0 ? void 0 : author.name) || '';
1070
+ const avatar = author === null || author === void 0 ? void 0 : author.avatar;
1071
+ const authorRole = (post === null || post === void 0 ? void 0 : post.isAnonymous) ? undefined : author === null || author === void 0 ? void 0 : author.role;
1072
+ const listMentions = [
1073
+ ...((post === null || post === void 0 ? void 0 : post.isAnonymous)
1074
+ ? [
1075
+ {
1076
+ id: ((_c = post === null || post === void 0 ? void 0 : post.author) === null || _c === void 0 ? void 0 : _c.id) || 0,
1077
+ name: t('cardPost.anonymous'),
1078
+ },
1079
+ ]
1080
+ : []),
1081
+ ...(mentions || []),
1082
+ ];
1083
+ const [hospitalInfo, setHospitalInfo] = React.useState(null);
1084
+ const [doctorInfo, setDoctorInfo] = React.useState(null);
1085
+ React.useEffect(() => {
1086
+ if (author === null || author === void 0 ? void 0 : author.hospitalId) {
1087
+ const fetchHospitalDetail = (hospitalId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1088
+ var _a;
1089
+ const response = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getCarePath(togetherApiPaths.CARE_PATHS.GET_HOSPITAL_INFO, {
1090
+ hospital_branch_id: hospitalId,
1091
+ website_url: constantsDomainLocales.domainLocales[locale],
1092
+ }), 'get');
1093
+ if ((_a = response === null || response === void 0 ? void 0 : response._data) === null || _a === void 0 ? void 0 : _a.branch) {
1094
+ setHospitalInfo(response === null || response === void 0 ? void 0 : response._data.branch);
1095
+ }
1096
+ });
1097
+ fetchHospitalDetail(author.hospitalId);
1098
+ }
1099
+ if (author === null || author === void 0 ? void 0 : author.doctorId) {
1100
+ const fetchDoctorDetail = (doctorId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1101
+ var _b;
1102
+ const response = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getCarePath(togetherApiPaths.CARE_PATHS.GET_DOCTOR_INFO, {
1103
+ doctorId: doctorId,
1104
+ website_url: constantsDomainLocales.domainLocales[locale],
1105
+ }), 'get');
1106
+ if ((_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.doctor) {
1107
+ setDoctorInfo(response === null || response === void 0 ? void 0 : response._data.doctor);
1108
+ }
1109
+ });
1110
+ fetchDoctorDetail(author.doctorId);
1111
+ }
1112
+ }, [author.hospitalId, author.doctorId]);
1113
+ const isDoctorAvailable = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_outpatient) || (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_telemedicine);
1114
+ const isHospitalAvailable = ((hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_service) ||
1115
+ (hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_doctor)) > 0;
1116
+ const hasQuickBooking = hasQuickBookingEnable && (isDoctorAvailable || isHospitalAvailable);
1117
+ const isChatbotAuthor = ((_d = comment === null || comment === void 0 ? void 0 : comment.author) === null || _d === void 0 ? void 0 : _d.type) === 'chatbot';
1118
+ return (React__default["default"].createElement(useTogetherAuthRequiredAction.TogetherAuthConfigContextProvider, { defaultParams: {
1119
+ _joinCommunityIds: [(_e = post === null || post === void 0 ? void 0 : post.community) === null || _e === void 0 ? void 0 : _e.id],
1120
+ _joinTopicIds: (_f = post === null || post === void 0 ? void 0 : post.topics) === null || _f === void 0 ? void 0 : _f.map((t) => t.id),
1121
+ } },
1122
+ React__default["default"].createElement(StyledCardPost, { className: className, style: style, "data-is-reply": !!level, "data-is-marrybaby": isMarryBaby, "data-has-booking": hasQuickBooking },
1123
+ type === 'reply' && React__default["default"].createElement(index$6.Divider, { className: "top-divider", type: "solid" }),
1124
+ React__default["default"].createElement("div", { style: { padding: '16px 16px 0' } },
1125
+ React__default["default"].createElement(index.CardAuthor, Object.assign({ avatar: avatar, name: name, username: username, timeText: post === null || post === void 0 ? void 0 : post.createdTime, community: post === null || post === void 0 ? void 0 : post.community,
1126
+ // miniIcon="./svg/icon-tag.svg"
1127
+ // authorLabelType={getAuthorLabelFromRoles(author?.role || [])}
1128
+ className: `post-author ${hasPopover ? 'with-popover' : ''}`, type: type, userId: author === null || author === void 0 ? void 0 : author.id, role: authorRole, expertId: author === null || author === void 0 ? void 0 : author.partnerId, title: author === null || author === void 0 ? void 0 : author.title, doctorId: author === null || author === void 0 ? void 0 : author.doctorId, hospitalId: author === null || author === void 0 ? void 0 : author.hospitalId, hasQuickBooking: hasQuickBooking, handleMakeAppointment: handleMakeAppointment, isAnonymous: (comment === null || comment === void 0 ? void 0 : comment.isAnonymous) ||
1129
+ (Boolean(post === null || post === void 0 ? void 0 : post.isAnonymous) &&
1130
+ ((_g = post === null || post === void 0 ? void 0 : post.author) === null || _g === void 0 ? void 0 : _g.username) === (author === null || author === void 0 ? void 0 : author.username)), hideBackground: isChatbotAuthor, userType: author === null || author === void 0 ? void 0 : author.type }, cardAuthorProps)),
1131
+ Boolean(comment === null || comment === void 0 ? void 0 : comment.isVerify) && !Boolean(comment === null || comment === void 0 ? void 0 : comment.isOppose) && (React__default["default"].createElement(VerifiedTag, { title: (_h = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _h === void 0 ? void 0 : _h.title, name: (_j = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _j === void 0 ? void 0 : _j.name, userId: (_k = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _k === void 0 ? void 0 : _k.id, role: (_l = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _l === void 0 ? void 0 : _l.role, avatar: (_m = comment === null || comment === void 0 ? void 0 : comment.userVerify) === null || _m === void 0 ? void 0 : _m.avatar, className: "verify-tag" }))),
1132
+ React__default["default"].createElement(index.PostContent, { className: "post-content-wrapper", replyingTo: replyingTo, mentionedUser: mentionedUser, description: text, mentions: listMentions, maxChars: maxChars, disableShortenContent: disableShortenContent }),
1133
+ React__default["default"].createElement("span", null),
1134
+ React__default["default"].createElement("span", null),
1135
+ images && images.length > 0 ? (React__default["default"].createElement("div", { key: "image-preview", className: "image-preview-wrapper", "data-is-reply": true },
1136
+ React__default["default"].createElement(index.PostImagePreview, { images: images, authorName: author === null || author === void 0 ? void 0 : author.username }))) : null,
1137
+ (!images || images.length === 0) && link ? (React__default["default"].createElement("div", { key: "link-preview", className: "link-preview-wrapper", "data-is-reply": true },
1138
+ React__default["default"].createElement(index$7.CardLink, { url: link }))) : null,
1139
+ type !== 'most-engaging' ? (React__default["default"].createElement(React__default["default"].Fragment, null,
1140
+ isChatbotAuthor && (React__default["default"].createElement(StyledSourceList, { listUrl: comment === null || comment === void 0 ? void 0 : comment.source, categorySlug: comment === null || comment === void 0 ? void 0 : comment.categorySlug })),
1141
+ React__default["default"].createElement(treePopoverMenu.CardReactions, { type: treePopoverMenu.CardReactionType.reply, loveCount: countLikes, replyCount: mergeCountReplies, className: "post-reaction", liked: liked, isReplied: isCommented, hideCommentIcon: type === 'reply' || isChatbotAuthor, hasShare: false, onCommentClick: () => authActionWrapper(() => setShowInputComment((v) => !v)), onCommentCountClick: () => authActionWrapper(() => {
1142
+ setShowInputComment(true);
1143
+ }), onLikeClick: () => authActionWrapper(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1144
+ if (id) {
1145
+ const res = yield index.likeUnlikeComment({
1146
+ commentId: id,
1147
+ setLike: !liked,
1148
+ locale,
1149
+ });
1150
+ if (res.status === 1) {
1151
+ setComment((old) => {
1152
+ return Object.assign(Object.assign({}, old), { liked: !liked, countLikes: old.countLikes + (!liked ? 1 : -1) });
1153
+ });
1154
+ }
1155
+ }
1156
+ })) }),
1157
+ showInputComment && (React__default["default"].createElement(index.InputCommentBar, { replyingId: replyingId || comment.id, replyToName: name, isReply: true, onClose: () => setShowInputComment(false), onPostSuccess: (comment) => {
1158
+ if (type === 'reply') {
1159
+ onPostCommentSuccess && onPostCommentSuccess(comment);
1160
+ }
1161
+ else {
1162
+ addNewReply(comment);
1163
+ }
1164
+ }, post: post, replyingUser: author })),
1165
+ type === 'comment' && replies && replies.length > 0 ? (React__default["default"].createElement("div", { className: "comment-reply-wrapper" }, (_o = sortedReplies === null || sortedReplies === void 0 ? void 0 : sortedReplies.slice(0, maxRepliesShow)) === null || _o === void 0 ? void 0 :
1166
+ _o.map((reply) => (React__default["default"].createElement(CardReply, { key: reply.id, comment: reply, type: "reply", className: "comment-reply-item", level: level + 1, replyingId: id, onPostCommentSuccess: addNewReply, post: post, onDeleteComment: () => {
1167
+ setComment((old) => {
1168
+ return Object.assign(Object.assign({}, old), { replies: old.replies.filter((r) => r.id !== reply.id), countReplies: old.countReplies - 1 });
1169
+ });
1170
+ }, handleMakeAppointment: handleMakeAppointment, hasQuickBookingEnable: hasQuickBookingEnable }))),
1171
+ mergeCountReplies > maxRepliesShow && (React__default["default"].createElement(React__default["default"].Fragment, null,
1172
+ React__default["default"].createElement(index$6.Divider, { className: "top-divider", type: "solid" }),
1173
+ React__default["default"].createElement(index$5.Button, { className: "more-cmt", size: "lg", color: "ghost", onClick: () => setMaxRepliesShow((m) => m + COMMENT_LIMIT) },
1174
+ t('comment.seeMoreReplies', {
1175
+ count: mergeCountReplies - maxRepliesShow,
1176
+ }),
1177
+ React__default["default"].createElement("img", { className: "chevron-right", src: ChevronRightActive, loading: "lazy" })))))) : null)) : null,
1178
+ hasPopover && (React__default["default"].createElement(CardReplyPopover, { onDeleteComment: onDeleteComment, className: "popover", commentId: comment.id })))));
1179
+ };
1180
+
1181
+ const getMostEngagingComment = (postId, locale) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1182
+ var _a, _b, _c;
1183
+ const commentsRes = yield togetherComponentGlobalContext.callApiWithOptionalAuth(togetherComponentGlobalContext.getApiPath(togetherApiPaths.PATHS.COMMENT.LIST, {
1184
+ postId: postId,
1185
+ _locale: locale,
1186
+ sort: 'popularity',
1187
+ perPage: 1,
1188
+ withoutReply: 1,
1189
+ }), 'GET');
1190
+ return (_c = (_b = (_a = commentsRes === null || commentsRes === void 0 ? void 0 : commentsRes.data) === null || _a === void 0 ? void 0 : _a.comments) === null || _b === void 0 ? void 0 : _b.map(dataTransform.formatComment)) === null || _c === void 0 ? void 0 : _c[0];
1191
+ });
1192
+ const CardPost = ({ className, style, hideViewMoreComment, showMostEngaging, onCommentClick, onCommentCountClick, onMostEngagingCommentClick, onPostCommentSuccess: onPostCommentSuccessProp, disableCardLink, disableShortenContent, onDeletePost, onEditPost, post: postProp, mostEngagingComment: mostEngagingCommentProp, onDeleteComment: onDeleteCommentProp, showInputComment: propsShowInputComment, InlineCommentsComponent, hasQuickBookingEnable, handleMakeAppointment, cardAuthorProps, }) => {
1193
+ const [post, setPost] = React.useState(postProp);
1194
+ const [isOpenSharePopup, setIsOpenSharePopup] = React.useState(false);
1195
+ const [mostEngagingComment, setMostEngagingComment] = React.useState(mostEngagingCommentProp);
1196
+ const { community, topics, author, slug, isPin, liked, photos, mentions, title, description, previewUrl, likesCount, commentsCount, id, commented, } = post;
1197
+ const { data: { locale, env: { isMarryBaby, togetherBasePath }, }, action: { pushNotifications }, } = React.useContext(togetherComponentGlobalContext.TogetherComponentGlobalContext);
1198
+ const { t } = useTranslations.useTranslations();
1199
+ const [showInputComment, setShowInputComment] = React.useState(propsShowInputComment);
1200
+ const postRelativeHref = `${togetherBasePath}/${(community === null || community === void 0 ? void 0 : community.slug) || '_'}/${slug || ''}`;
1201
+ const postHref = `${togetherComponentGlobalContext.getCurrentBaseUrl(locale)}${postRelativeHref}`;
1202
+ const { authActionWrapper } = useTogetherAuthRequiredAction.useTogetherAuthRequiredAction((community === null || community === void 0 ? void 0 : community.slug)
1203
+ ? {
1204
+ _joinCommunityIds: [community.id],
1205
+ _joinTopicIds: topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id),
1206
+ // _location: postHref,
1207
+ }
1208
+ : undefined);
1209
+ const [isLikeLoading, setIsLikeLoading] = React.useState(false);
1210
+ React.useEffect(() => {
1211
+ setShowInputComment(propsShowInputComment);
1212
+ }, [propsShowInputComment]);
1213
+ const name = (author === null || author === void 0 ? void 0 : author.name) || (author === null || author === void 0 ? void 0 : author.username) || '';
1214
+ const username = (author === null || author === void 0 ? void 0 : author.username) || (author === null || author === void 0 ? void 0 : author.name) || '';
1215
+ const avatar = author === null || author === void 0 ? void 0 : author.avatar;
1216
+ const authorRole = (post === null || post === void 0 ? void 0 : post.isAnonymous) ? undefined : author === null || author === void 0 ? void 0 : author.role;
1217
+ const [hospitalInfo, setHospitalInfo] = React.useState(null);
1218
+ const [doctorInfo, setDoctorInfo] = React.useState(null);
1219
+ React.useEffect(() => {
1220
+ if (author === null || author === void 0 ? void 0 : author.hospitalId) {
1221
+ const fetchHospitalDetail = (hospitalId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1222
+ var _a;
1223
+ const response = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getCarePath(togetherApiPaths.CARE_PATHS.GET_HOSPITAL_INFO, {
1224
+ hospital_branch_id: hospitalId,
1225
+ website_url: togetherComponentGlobalContext.domainLocales[locale],
1226
+ }), 'get');
1227
+ if ((_a = response === null || response === void 0 ? void 0 : response._data) === null || _a === void 0 ? void 0 : _a.branch) {
1228
+ setHospitalInfo(response === null || response === void 0 ? void 0 : response._data.branch);
1229
+ }
1230
+ });
1231
+ fetchHospitalDetail(author.hospitalId);
1232
+ }
1233
+ if (author === null || author === void 0 ? void 0 : author.doctorId) {
1234
+ const fetchDoctorDetail = (doctorId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1235
+ var _b;
1236
+ const response = yield togetherComponentGlobalContext.callApi(togetherComponentGlobalContext.getCarePath(togetherApiPaths.CARE_PATHS.GET_DOCTOR_INFO, {
1237
+ doctorId: doctorId,
1238
+ website_url: togetherComponentGlobalContext.domainLocales[locale],
1239
+ }), 'get');
1240
+ if ((_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.doctor) {
1241
+ setDoctorInfo(response === null || response === void 0 ? void 0 : response._data.doctor);
1242
+ }
1243
+ });
1244
+ fetchDoctorDetail(author.doctorId);
1245
+ }
1246
+ }, [author.hospitalId, author.doctorId]);
1247
+ const isDoctorAvailable = (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_outpatient) || (doctorInfo === null || doctorInfo === void 0 ? void 0 : doctorInfo.valid_telemedicine);
1248
+ const isHospitalAvailable = ((hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_service) ||
1249
+ (hospitalInfo === null || hospitalInfo === void 0 ? void 0 : hospitalInfo.total_available_doctor)) > 0;
1250
+ const hasQuickBooking = hasQuickBookingEnable && (isDoctorAvailable || isHospitalAvailable);
1251
+ React.useEffect(() => {
1252
+ (() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1253
+ if (id &&
1254
+ commentsCount &&
1255
+ showMostEngaging &&
1256
+ !(mostEngagingCommentProp === null || mostEngagingCommentProp === void 0 ? void 0 : mostEngagingCommentProp.id)) {
1257
+ const comment = yield getMostEngagingComment(id, locale);
1258
+ setMostEngagingComment(comment);
1259
+ }
1260
+ }))();
1261
+ }, [id, locale, commentsCount, showMostEngaging, mostEngagingCommentProp === null || mostEngagingCommentProp === void 0 ? void 0 : mostEngagingCommentProp.id]);
1262
+ React.useEffect(() => {
1263
+ setMostEngagingComment(mostEngagingCommentProp);
1264
+ }, [mostEngagingCommentProp === null || mostEngagingCommentProp === void 0 ? void 0 : mostEngagingCommentProp.id]);
1265
+ const onPostCommentSuccess = (comment) => {
1266
+ if (commentsCount === 0 && !(mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id)) {
1267
+ setMostEngagingComment(comment);
1268
+ }
1269
+ setPost((p) => (Object.assign(Object.assign({}, p), { commentsCount: p.commentsCount + 1, commented: true })));
1270
+ onPostCommentSuccessProp && onPostCommentSuccessProp(comment);
1271
+ };
1272
+ const onDeleteComment = (comment) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1273
+ if (commentsCount > 1 &&
1274
+ (mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id) &&
1275
+ (mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id) === (comment === null || comment === void 0 ? void 0 : comment.id)) {
1276
+ const newMostEngaging = yield getMostEngagingComment(id, locale);
1277
+ setMostEngagingComment(newMostEngaging);
1278
+ }
1279
+ setPost((p) => (Object.assign(Object.assign({}, p), { commentsCount: p.commentsCount - 1 })));
1280
+ onDeleteCommentProp && onDeleteCommentProp(comment);
1281
+ });
1282
+ return (React__default["default"].createElement(useTogetherAuthRequiredAction.TogetherAuthConfigContextProvider, { defaultParams: (community === null || community === void 0 ? void 0 : community.slug)
1283
+ ? {
1284
+ _joinCommunityIds: [community.id],
1285
+ _joinTopicIds: topics === null || topics === void 0 ? void 0 : topics.map((t) => t.id),
1286
+ // _location: postHref,
1287
+ }
1288
+ : undefined },
1289
+ isOpenSharePopup && (React__default["default"].createElement(index.SharePopup, { url: postHref, avatar: constants.DEFAULT_IMG, text: title, onClose: () => setIsOpenSharePopup(false) })),
1290
+ React__default["default"].createElement(StyledCardPost$1, { className: className, style: style, "data-is-marrybaby": isMarryBaby },
1291
+ isPin ? React__default["default"].createElement(treePopoverMenu.LabelPin, { className: "post-pin" }) : null,
1292
+ React__default["default"].createElement("div", { style: { position: 'relative', padding: '1rem 1rem 0' } },
1293
+ React__default["default"].createElement(index.CardAuthor, Object.assign({ avatar: avatar, name: name, username: username, url: disableCardLink ? undefined : postRelativeHref, community: community,
1294
+ // miniIcon="./svg/icon-tag.svg"
1295
+ timeText: post === null || post === void 0 ? void 0 : post.createdTime, className: "post-author", role: authorRole, userId: author === null || author === void 0 ? void 0 : author.id, expertId: author === null || author === void 0 ? void 0 : author.partnerId, doctorId: author === null || author === void 0 ? void 0 : author.doctorId, hospitalId: author === null || author === void 0 ? void 0 : author.hospitalId, title: author === null || author === void 0 ? void 0 : author.title, hasQuickBooking: hasQuickBooking, handleMakeAppointment: handleMakeAppointment, "data-testid": "name", isAnonymous: !!(post === null || post === void 0 ? void 0 : post.isAnonymous), extendEle: React__default["default"].createElement(CardPostPopoverMore, { authorEmail: String(author === null || author === void 0 ? void 0 : author.email), onDeletePost: onDeletePost, shareUrl: postHref, post: post, className: "popover", onEditPost: onEditPost }) }, cardAuthorProps))),
1296
+ React__default["default"].createElement("a", { href: disableCardLink ? undefined : postRelativeHref, className: "post-content-link-wrapper" },
1297
+ title && (React__default["default"].createElement(index$2.Heading, { className: "post-content-title", as: "h2", tag: "h5", fontWeight: "bold", "data-testid": "Title of the Post" }, innertext__default["default"](title))),
1298
+ React__default["default"].createElement(index.PostContent, { className: "post-content-wrapper", description: description, disableShortenContent: disableShortenContent, mentions: mentions, "data-testid": "Content of the Post" })),
1299
+ React__default["default"].createElement("span", null),
1300
+ React__default["default"].createElement("span", null),
1301
+ React__default["default"].createElement("div", { key: "tag-topic" }, topics && topics.length > 0 ? (React__default["default"].createElement(treePopoverMenu.TagTopic, { topics: topics, className: "post-topics" })) : null),
1302
+ React__default["default"].createElement("div", { key: "social-preview" }, (post === null || post === void 0 ? void 0 : post.introUrl) ? (React__default["default"].createElement("div", { className: `social-preview-wrapper ${!!(photos === null || photos === void 0 ? void 0 : photos.length) ? 'has-image' : ''}` },
1303
+ React__default["default"].createElement(index.SocialLinkPreview, { url: post.introUrl, image: post.bannerImage }))) : null),
1304
+ React__default["default"].createElement("div", { key: "image-preview" }, !!(photos === null || photos === void 0 ? void 0 : photos.length) ? (React__default["default"].createElement("div", { className: "image-preview-wrapper" },
1305
+ React__default["default"].createElement(index.PostImagePreview, { images: photos, authorName: author === null || author === void 0 ? void 0 : author.name }))) : null),
1306
+ React__default["default"].createElement("div", { key: "link-preview" }, !(post === null || post === void 0 ? void 0 : post.introUrl) && !(photos === null || photos === void 0 ? void 0 : photos.length) && (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url) ? (React__default["default"].createElement("div", { className: "link-preview-wrapper" },
1307
+ React__default["default"].createElement(index$7.CardLink, { title: previewUrl.title, url: previewUrl.url, image: previewUrl.image }))) : null),
1308
+ React__default["default"].createElement(treePopoverMenu.CardReactions, { isMarryBaby: isMarryBaby, type: treePopoverMenu.CardReactionType.post, loveCount: likesCount, replyCount: commentsCount, className: `post-reaction ${(photos === null || photos === void 0 ? void 0 : photos.length) || (previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl.url) ? 'hide-top-border' : ''}`, liked: isLikeLoading ? !liked : liked, isReplied: commented, onCommentClick: () => authActionWrapper(() => {
1309
+ onCommentClick ? onCommentClick() : setShowInputComment((v) => !v);
1310
+ }), onCommentCountClick: () => {
1311
+ authActionWrapper(() => {
1312
+ isMarryBaby
1313
+ ? setShowInputComment(true)
1314
+ : onCommentCountClick
1315
+ ? onCommentCountClick()
1316
+ : !disableCardLink && (window.location.href = postRelativeHref);
1317
+ });
1318
+ }, onShareClick: () => {
1319
+ setIsOpenSharePopup(true);
1320
+ }, onLikeClick: () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
1321
+ if (!id || isLikeLoading)
1322
+ return;
1323
+ setIsLikeLoading(true);
1324
+ try {
1325
+ const res = yield index.likeUnlikePost({
1326
+ id,
1327
+ locale,
1328
+ });
1329
+ if ((res === null || res === void 0 ? void 0 : res.status) !== 1) {
1330
+ pushNotifications(index.getDefaultFailNoti(t));
1331
+ }
1332
+ else {
1333
+ setPost((p) => (Object.assign(Object.assign({}, p), { likesCount: (p.likesCount || 0) + (!p.liked ? 1 : -1), liked: !p.liked })));
1334
+ }
1335
+ }
1336
+ catch (_a) {
1337
+ pushNotifications(index.getDefaultFailNoti(t));
1338
+ }
1339
+ setIsLikeLoading(false);
1340
+ }), showingMostEngaging: !!(showMostEngaging && (mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id)) }),
1341
+ showInputComment && (React__default["default"].createElement(index.InputCommentBar, { isMainCmt: !propsShowInputComment, onClose: () => setShowInputComment(false), onPostSuccess: onPostCommentSuccess, post: post })),
1342
+ showMostEngaging && (mostEngagingComment === null || mostEngagingComment === void 0 ? void 0 : mostEngagingComment.id) ? (React__default["default"].createElement("div", { className: "most-engaging-wrapper", onClick: (e) => {
1343
+ if (onMostEngagingCommentClick) {
1344
+ e.stopPropagation();
1345
+ onMostEngagingCommentClick();
1346
+ }
1347
+ else
1348
+ window.location.href = postRelativeHref;
1349
+ } },
1350
+ React__default["default"].createElement(CardReply, { hasQuickBookingEnable: hasQuickBookingEnable, handleMakeAppointment: handleMakeAppointment, comment: mostEngagingComment, post: post, onDeleteComment: () => {
1351
+ onDeleteComment && onDeleteComment(mostEngagingComment);
1352
+ }, className: "most-engaging-comment", type: "most-engaging", key: mostEngagingComment.id, cardAuthorProps: cardAuthorProps }),
1353
+ commentsCount > 1 && !hideViewMoreComment && (React__default["default"].createElement(index$5.Button, { className: "see-more-comments", color: "ghost", size: "md" }, t('comment.seeMoreComments', {
1354
+ count: commentsCount - 1,
1355
+ }))))) : null,
1356
+ InlineCommentsComponent)));
1357
+ };
1358
+
1359
+ exports.CardPost = CardPost;
1360
+ exports.CardPostPopoverMore = CardPostPopoverMore;
1361
+ exports.CardReply = CardReply;
1362
+ exports.CardReplyPopover = CardReplyPopover;
1363
+ exports.SourceList = SourceList;
1364
+ exports.VerifiedTag = VerifiedTag;