@hhgtech/hhg-components 1.28.67 → 1.28.69

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 (521) hide show
  1. package/build/BMI_BOYS.percentile.monthly-48c9471d.js +688 -0
  2. package/build/BMI_BOYS.percentile.weekly-4965852e.js +182 -0
  3. package/build/BMI_BOYS.percentile.yearly-0f7cc8f4.js +83 -0
  4. package/build/BMI_BOYS.zscore.monthly-5bb8a433.js +440 -0
  5. package/build/BMI_BOYS.zscore.weekly-3d56f80f.js +118 -0
  6. package/build/BMI_BOYS.zscore.yearly-57081f24.js +55 -0
  7. package/build/BMI_GIRLS.percentile.monthly-95859cd9.js +688 -0
  8. package/build/BMI_GIRLS.percentile.weekly-009cf4df.js +182 -0
  9. package/build/BMI_GIRLS.percentile.yearly-4436947b.js +83 -0
  10. package/build/BMI_GIRLS.zscore.monthly-689b4eee.js +440 -0
  11. package/build/BMI_GIRLS.zscore.weekly-dff693df.js +118 -0
  12. package/build/BMI_GIRLS.zscore.yearly-05ef5f4f.js +55 -0
  13. package/build/ChevronDown-275f1ab5.js +29 -0
  14. package/build/HEAD CIRCUM_BOYS.percentile.monthly-55c580a7.js +688 -0
  15. package/build/HEAD CIRCUM_BOYS.percentile.weekly-e30f4a42.js +182 -0
  16. package/build/HEAD CIRCUM_BOYS.percentile.yearly-2378a5f0.js +83 -0
  17. package/build/HEAD CIRCUM_BOYS.zscore.monthly-102d5559.js +440 -0
  18. package/build/HEAD CIRCUM_BOYS.zscore.weekly-7b0f1ba8.js +118 -0
  19. package/build/HEAD CIRCUM_BOYS.zscore.yearly-e9237d31.js +55 -0
  20. package/build/HEAD CIRCUM_GIRLS.percentile.monthly-1ddda8b3.js +688 -0
  21. package/build/HEAD CIRCUM_GIRLS.percentile.weekly-843147ea.js +182 -0
  22. package/build/HEAD CIRCUM_GIRLS.percentile.yearly-9b51c237.js +83 -0
  23. package/build/HEAD CIRCUM_GIRLS.zscore.monthly-3f1b233c.js +440 -0
  24. package/build/HEAD CIRCUM_GIRLS.zscore.weekly-9e14d3fe.js +118 -0
  25. package/build/HEAD CIRCUM_GIRLS.zscore.yearly-d924f5ae.js +55 -0
  26. package/build/HEIGHT_BOYS.percentile.monthly-15538920.js +688 -0
  27. package/build/HEIGHT_BOYS.percentile.weekly-10bd0277.js +182 -0
  28. package/build/HEIGHT_BOYS.percentile.yearly-8e678d38.js +237 -0
  29. package/build/HEIGHT_BOYS.zscore.monthly-2c110da9.js +440 -0
  30. package/build/HEIGHT_BOYS.zscore.weekly-288b7733.js +118 -0
  31. package/build/HEIGHT_BOYS.zscore.yearly-42f6f9f7.js +153 -0
  32. package/build/HEIGHT_GIRLS.percentile.monthly-04abe7d2.js +688 -0
  33. package/build/HEIGHT_GIRLS.percentile.weekly-9653b16c.js +182 -0
  34. package/build/HEIGHT_GIRLS.percentile.yearly-9efacd67.js +237 -0
  35. package/build/HEIGHT_GIRLS.zscore.monthly-c64a97b2.js +440 -0
  36. package/build/HEIGHT_GIRLS.zscore.weekly-3302dd83.js +118 -0
  37. package/build/HEIGHT_GIRLS.zscore.yearly-ebe5114f.js +153 -0
  38. package/build/Subot-5fc40fb5.js +217 -0
  39. package/build/Visible-5c5d57cf.js +29 -0
  40. package/build/WEIGHT_BOYS.percentile.monthly-5e11e7a0.js +688 -0
  41. package/build/WEIGHT_BOYS.percentile.weekly-68ae2578.js +182 -0
  42. package/build/WEIGHT_BOYS.percentile.yearly-030c06a4.js +138 -0
  43. package/build/WEIGHT_BOYS.zscore.monthly-d22c7b57.js +440 -0
  44. package/build/WEIGHT_BOYS.zscore.weekly-d8d901e6.js +118 -0
  45. package/build/WEIGHT_BOYS.zscore.yearly-c311a084.js +90 -0
  46. package/build/WEIGHT_GIRLS.percentile.monthly-5c44f8eb.js +688 -0
  47. package/build/WEIGHT_GIRLS.percentile.weekly-faa98671.js +182 -0
  48. package/build/WEIGHT_GIRLS.percentile.yearly-560b862e.js +138 -0
  49. package/build/WEIGHT_GIRLS.zscore.monthly-5365ba1a.js +440 -0
  50. package/build/WEIGHT_GIRLS.zscore.weekly-0d9dc521.js +118 -0
  51. package/build/WEIGHT_GIRLS.zscore.yearly-5a3c4e43.js +90 -0
  52. package/build/adapters.js +36 -1
  53. package/build/{esm/animation-0340efb3.js → animation-eb4e500b.js} +32 -10
  54. package/build/babyGrowth.js +913 -47
  55. package/build/cache.js +13 -1
  56. package/build/care.js +38 -1
  57. package/build/components/navigationV2/hooks/useNavConfig.d.ts +1 -3
  58. package/build/components.js +186 -1
  59. package/build/constants-8b8bc19f.js +255 -0
  60. package/build/constants-ae18ce18.js +935 -0
  61. package/build/constants.js +43 -1
  62. package/build/cookieHelper-5c9f4bb8.js +43 -0
  63. package/build/core-2aa8d86c.js +51 -0
  64. package/build/dataTransform-089f414c.js +66 -0
  65. package/build/ecom.js +745 -1
  66. package/build/esm/BMI_BOYS.percentile.monthly-de5dce68.js +686 -0
  67. package/build/esm/BMI_BOYS.percentile.weekly-9d3990b6.js +180 -0
  68. package/build/esm/BMI_BOYS.percentile.yearly-98b9114a.js +81 -0
  69. package/build/esm/BMI_BOYS.zscore.monthly-394646f0.js +438 -0
  70. package/build/esm/BMI_BOYS.zscore.weekly-c669ea51.js +116 -0
  71. package/build/esm/BMI_BOYS.zscore.yearly-771ef6b6.js +53 -0
  72. package/build/esm/BMI_GIRLS.percentile.monthly-1ff3d499.js +686 -0
  73. package/build/esm/BMI_GIRLS.percentile.weekly-211d2f27.js +180 -0
  74. package/build/esm/BMI_GIRLS.percentile.yearly-206fdcff.js +81 -0
  75. package/build/esm/BMI_GIRLS.zscore.monthly-b1137e36.js +438 -0
  76. package/build/esm/BMI_GIRLS.zscore.weekly-63ed3cd6.js +116 -0
  77. package/build/esm/BMI_GIRLS.zscore.yearly-221d187c.js +53 -0
  78. package/build/esm/ChevronDown-9a8ece61.js +7 -0
  79. package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-4c37847c.js +686 -0
  80. package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-8f6ea38a.js +180 -0
  81. package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-6c12a99a.js +81 -0
  82. package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-c531b497.js +438 -0
  83. package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-6cafba00.js +116 -0
  84. package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-fe8114a0.js +53 -0
  85. package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-25ce0d36.js +686 -0
  86. package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-5d3f2862.js +180 -0
  87. package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-2b709ca5.js +81 -0
  88. package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-e8617bae.js +438 -0
  89. package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-f3252d67.js +116 -0
  90. package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-5b62d41f.js +53 -0
  91. package/build/esm/HEIGHT_BOYS.percentile.monthly-63d2cf96.js +686 -0
  92. package/build/esm/HEIGHT_BOYS.percentile.weekly-8ea5102d.js +180 -0
  93. package/build/esm/HEIGHT_BOYS.percentile.yearly-8107b77b.js +235 -0
  94. package/build/esm/HEIGHT_BOYS.zscore.monthly-641cdfa3.js +438 -0
  95. package/build/esm/HEIGHT_BOYS.zscore.weekly-86da0362.js +116 -0
  96. package/build/esm/HEIGHT_BOYS.zscore.yearly-060f6e79.js +151 -0
  97. package/build/esm/HEIGHT_GIRLS.percentile.monthly-fb987d37.js +686 -0
  98. package/build/esm/HEIGHT_GIRLS.percentile.weekly-82655dc0.js +180 -0
  99. package/build/esm/HEIGHT_GIRLS.percentile.yearly-a63b8456.js +235 -0
  100. package/build/esm/HEIGHT_GIRLS.zscore.monthly-77d676a3.js +438 -0
  101. package/build/esm/HEIGHT_GIRLS.zscore.weekly-c0387a4e.js +116 -0
  102. package/build/esm/HEIGHT_GIRLS.zscore.yearly-41203c20.js +151 -0
  103. package/build/esm/Subot-3289bd8e.js +212 -0
  104. package/build/esm/Visible-a3d436dd.js +7 -0
  105. package/build/esm/WEIGHT_BOYS.percentile.monthly-50802d8b.js +686 -0
  106. package/build/esm/WEIGHT_BOYS.percentile.weekly-4d72ddd6.js +180 -0
  107. package/build/esm/WEIGHT_BOYS.percentile.yearly-20a29844.js +136 -0
  108. package/build/esm/WEIGHT_BOYS.zscore.monthly-729e6614.js +438 -0
  109. package/build/esm/WEIGHT_BOYS.zscore.weekly-90352f48.js +116 -0
  110. package/build/esm/WEIGHT_BOYS.zscore.yearly-fe1871cc.js +88 -0
  111. package/build/esm/WEIGHT_GIRLS.percentile.monthly-e6afb2e0.js +686 -0
  112. package/build/esm/WEIGHT_GIRLS.percentile.weekly-b66d3016.js +180 -0
  113. package/build/esm/WEIGHT_GIRLS.percentile.yearly-a55622c5.js +136 -0
  114. package/build/esm/WEIGHT_GIRLS.zscore.monthly-2cdcbe75.js +438 -0
  115. package/build/esm/WEIGHT_GIRLS.zscore.weekly-d5be31d5.js +116 -0
  116. package/build/esm/WEIGHT_GIRLS.zscore.yearly-99e8d3a7.js +88 -0
  117. package/build/esm/adapters.js +26 -1
  118. package/build/{animation-d5d9ef32.js → esm/animation-3d5edc39.js} +22 -10
  119. package/build/esm/babyGrowth.js +883 -47
  120. package/build/esm/cache.js +3 -1
  121. package/build/esm/care.js +26 -1
  122. package/build/esm/components/navigationV2/hooks/useNavConfig.d.ts +1 -3
  123. package/build/esm/components.js +88 -1
  124. package/build/esm/constants-2a6d2434.js +932 -0
  125. package/build/esm/constants-b77ffe3d.js +238 -0
  126. package/build/esm/constants.js +4 -1
  127. package/build/esm/cookieHelper-d314282c.js +39 -0
  128. package/build/esm/core-8c73d133.js +47 -0
  129. package/build/esm/dataTransform-8ecfc046.js +56 -0
  130. package/build/esm/ecom.js +737 -1
  131. package/build/esm/footer.js +31 -1
  132. package/build/esm/gAssets.js +5 -1
  133. package/build/esm/getDynamicHealthTool-f4497aa5.js +44 -0
  134. package/build/esm/getSocialList-a5b8462e.js +66 -0
  135. package/build/esm/hooks.js +21 -1
  136. package/build/esm/i18n-values/en-PH.js +600 -1
  137. package/build/esm/i18n-values/hi-IN.js +600 -1
  138. package/build/esm/i18n-values/id-ID.js +600 -1
  139. package/build/esm/i18n-values/km-KH.js +600 -1
  140. package/build/esm/i18n-values/ms-MY.js +602 -1
  141. package/build/esm/i18n-values/my-MM.js +600 -1
  142. package/build/esm/i18n-values/th-TH.js +600 -1
  143. package/build/esm/i18n-values/tl-PH.js +600 -1
  144. package/build/esm/i18n-values/vi-VN.js +607 -1
  145. package/build/esm/i18n-values/vi-VN_MB.js +607 -1
  146. package/build/esm/i18n-values/zh-TW.js +600 -1
  147. package/build/esm/i18n.js +55 -1
  148. package/build/esm/i18nV2.js +18 -1
  149. package/build/esm/index-12fa4985.js +8 -0
  150. package/build/esm/index-1e59f99a.js +152 -0
  151. package/build/esm/index-32e53dac.js +1936 -0
  152. package/build/esm/index-3474401a.js +149 -0
  153. package/build/esm/index-34899aa3.js +17 -0
  154. package/build/esm/index-350e8f5b.js +124 -0
  155. package/build/esm/index-41bf860a.js +151 -0
  156. package/build/esm/index-4aa8e518.js +116 -0
  157. package/build/esm/index-4fe2b03f.js +32 -0
  158. package/build/esm/index-6ea6484e.js +29 -0
  159. package/build/esm/index-717401ee.js +184 -0
  160. package/build/esm/index-7af5242a.js +24 -0
  161. package/build/esm/index-7b8c85cd.js +8302 -0
  162. package/build/esm/index-81f295b7.js +23 -0
  163. package/build/esm/index-8858383e.js +52 -0
  164. package/build/esm/index-8f52dcf3.js +33 -0
  165. package/build/esm/index-9ea7e838.js +33 -0
  166. package/build/esm/index-aabac2aa.js +3241 -0
  167. package/build/esm/index-b9b2c417.js +837 -0
  168. package/build/esm/index-c2da5293.js +12 -0
  169. package/build/esm/index-c56d60db.js +370 -0
  170. package/build/esm/index-c5d7f692.js +24 -0
  171. package/build/esm/index-cc93e010.js +53 -0
  172. package/build/esm/index-d7f046db.js +5 -0
  173. package/build/esm/index-d8177667.js +14 -0
  174. package/build/esm/index-da139dda.js +615 -0
  175. package/build/esm/index-e612be9c.js +905 -0
  176. package/build/esm/index-f3d0592b.js +71 -0
  177. package/build/esm/index.js +190 -1
  178. package/build/{index.styled-0a1fb891.js → esm/index.styled-9c9db9cc.js} +17 -5
  179. package/build/esm/index.styles-5add27c5.js +1303 -0
  180. package/build/esm/isProduction-0ea904dd.js +27 -0
  181. package/build/esm/lead.js +2140 -1
  182. package/build/esm/localizeNumberFormat-2ac3773e.js +23 -0
  183. package/build/esm/mantine.js +113 -1
  184. package/build/esm/misc.js +22 -1
  185. package/build/esm/navigation.js +51 -1
  186. package/build/esm/normalizeLink-d1c9617e.js +12 -0
  187. package/build/esm/number-0c126a39.js +38 -0
  188. package/build/esm/onboardingV2.js +860 -34
  189. package/build/esm/paths-a8204db4.js +14 -0
  190. package/build/esm/pwg.js +208 -7
  191. package/build/esm/routing-2474f896.js +40 -0
  192. package/build/esm/subot.js +4553 -134
  193. package/build/esm/theme-e74db08c.js +186 -0
  194. package/build/esm/together.js +52 -1
  195. package/build/esm/translationsContext-ad3e25de.js +5 -0
  196. package/build/esm/tslib.es6-1b1533a9.js +38 -0
  197. package/build/esm/types-06f00b3d.js +8015 -0
  198. package/build/esm/types-15e34418.js +3432 -0
  199. package/build/esm/types-ba190c26.js +21 -0
  200. package/build/esm/types.js +1 -1
  201. package/build/esm/unifyEnv.js +42 -1
  202. package/build/esm/useCategory-2c87152d.js +292 -0
  203. package/build/esm/useHealthToolCache-29d22ddb.js +17 -0
  204. package/build/esm/useIsInit-8a2fc8e5.js +11 -0
  205. package/build/esm/useOutsideClick-c8a7ff20.js +45 -0
  206. package/build/esm/usePlacesAutocomplete-63e04e8e.js +80 -0
  207. package/build/esm/useScrollbarSize-51ce1374.js +57 -0
  208. package/build/esm/useTranslations-4f1db486.js +26 -0
  209. package/build/esm/useUniqueId-3638402f.js +41 -0
  210. package/build/esm/utils-2c484c05.js +132 -0
  211. package/build/esm/utils-3a2a47d9.js +22 -0
  212. package/build/esm/utils-6d7b88da.js +367 -0
  213. package/build/esm/utils-70718e9c.js +1124 -0
  214. package/build/esm/vaccination.js +868 -40
  215. package/build/footer.js +39 -1
  216. package/build/gAssets.js +14 -1
  217. package/build/getDynamicHealthTool-114a1e27.js +48 -0
  218. package/build/getSocialList-4713441d.js +72 -0
  219. package/build/hooks.js +44 -1
  220. package/build/i18n-values/en-PH.js +611 -1
  221. package/build/i18n-values/hi-IN.js +611 -1
  222. package/build/i18n-values/id-ID.js +611 -1
  223. package/build/i18n-values/km-KH.js +611 -1
  224. package/build/i18n-values/ms-MY.js +613 -1
  225. package/build/i18n-values/my-MM.js +611 -1
  226. package/build/i18n-values/th-TH.js +611 -1
  227. package/build/i18n-values/tl-PH.js +611 -1
  228. package/build/i18n-values/vi-VN.js +618 -1
  229. package/build/i18n-values/vi-VN_MB.js +618 -1
  230. package/build/i18n-values/zh-TW.js +611 -1
  231. package/build/i18n.js +64 -1
  232. package/build/i18nV2.js +26 -1
  233. package/build/index-020e6908.js +39 -0
  234. package/build/index-0da9b2e8.js +59 -0
  235. package/build/index-11468c00.js +157 -0
  236. package/build/index-117448a5.js +133 -0
  237. package/build/index-12c07f71.js +18 -0
  238. package/build/index-1a105e87.js +123 -0
  239. package/build/index-1baaedb0.js +55 -0
  240. package/build/index-32d38318.js +7 -0
  241. package/build/index-38582ee0.js +8373 -0
  242. package/build/index-3e5fc2d6.js +1994 -0
  243. package/build/index-3eef6bed.js +853 -0
  244. package/build/index-4035e658.js +159 -0
  245. package/build/index-488d71ae.js +30 -0
  246. package/build/index-5553f9e1.js +930 -0
  247. package/build/index-5fa68e45.js +380 -0
  248. package/build/index-7b467209.js +39 -0
  249. package/build/index-81cb1142.js +77 -0
  250. package/build/index-84ab5b89.js +38 -0
  251. package/build/index-8a95d709.js +30 -0
  252. package/build/index-9da9f0c3.js +35 -0
  253. package/build/index-af91c83e.js +20 -0
  254. package/build/index-b6aea85e.js +191 -0
  255. package/build/index-bc4f4c33.js +156 -0
  256. package/build/index-c604d6bb.js +624 -0
  257. package/build/index-d330735e.js +30 -0
  258. package/build/index-d8a7efaf.js +14 -0
  259. package/build/index-e2e81fa2.js +23 -0
  260. package/build/index-e3d896b3.js +3261 -0
  261. package/build/index.js +436 -1
  262. package/build/{esm/index.styled-14b65c9e.js → index.styled-5628b3e7.js} +25 -5
  263. package/build/index.styles-b822bf42.js +1342 -0
  264. package/build/isProduction-5ce3a388.js +29 -0
  265. package/build/lead.js +2168 -1
  266. package/build/localizeNumberFormat-f5f50987.js +31 -0
  267. package/build/mantine.js +154 -1
  268. package/build/misc.js +70 -1
  269. package/build/navigation.js +61 -1
  270. package/build/normalizeLink-6f7b85d8.js +15 -0
  271. package/build/number-79fe92e1.js +40 -0
  272. package/build/onboardingV2.js +892 -34
  273. package/build/paths-a5643d9e.js +16 -0
  274. package/build/pwg.js +217 -7
  275. package/build/routing-191a9a00.js +46 -0
  276. package/build/subot.js +4592 -134
  277. package/build/theme-fa910869.js +189 -0
  278. package/build/together.js +112 -1
  279. package/build/translationsContext-950334bf.js +7 -0
  280. package/build/tslib.es6-65e312a5.js +41 -0
  281. package/build/types-0f117a9f.js +8084 -0
  282. package/build/types-1fedb3d1.js +3446 -0
  283. package/build/types-52a4e888.js +24 -0
  284. package/build/types.js +56 -1
  285. package/build/unifyEnv.js +46 -1
  286. package/build/useCategory-cfc702f5.js +299 -0
  287. package/build/useHealthToolCache-43a7014d.js +19 -0
  288. package/build/useIsInit-89535012.js +13 -0
  289. package/build/useOutsideClick-c6813964.js +49 -0
  290. package/build/usePlacesAutocomplete-297de092.js +84 -0
  291. package/build/useScrollbarSize-0fa31aa7.js +64 -0
  292. package/build/useTranslations-e1853417.js +32 -0
  293. package/build/useUniqueId-11369116.js +44 -0
  294. package/build/utils-52113753.js +384 -0
  295. package/build/utils-64bd0c42.js +143 -0
  296. package/build/utils-661411f6.js +1171 -0
  297. package/build/utils-e1513cbc.js +25 -0
  298. package/build/vaccination.js +891 -40
  299. package/package.json +4 -5
  300. package/build/BMI_BOYS.percentile.monthly-c56b0165.js +0 -1
  301. package/build/BMI_BOYS.percentile.weekly-64287e04.js +0 -1
  302. package/build/BMI_BOYS.percentile.yearly-8db65d54.js +0 -1
  303. package/build/BMI_BOYS.zscore.monthly-f12389cd.js +0 -1
  304. package/build/BMI_BOYS.zscore.weekly-fff37a57.js +0 -1
  305. package/build/BMI_BOYS.zscore.yearly-a19b57eb.js +0 -1
  306. package/build/BMI_GIRLS.percentile.monthly-a4b36d7d.js +0 -1
  307. package/build/BMI_GIRLS.percentile.weekly-b6089202.js +0 -1
  308. package/build/BMI_GIRLS.percentile.yearly-0d340818.js +0 -1
  309. package/build/BMI_GIRLS.zscore.monthly-fd5b57c0.js +0 -1
  310. package/build/BMI_GIRLS.zscore.weekly-d4577f50.js +0 -1
  311. package/build/BMI_GIRLS.zscore.yearly-e40b8a7d.js +0 -1
  312. package/build/ChevronDown-602ce39e.js +0 -1
  313. package/build/HEAD CIRCUM_BOYS.percentile.monthly-2e4c5776.js +0 -1
  314. package/build/HEAD CIRCUM_BOYS.percentile.weekly-fc5728a5.js +0 -1
  315. package/build/HEAD CIRCUM_BOYS.percentile.yearly-6bfab277.js +0 -1
  316. package/build/HEAD CIRCUM_BOYS.zscore.monthly-6af7ce44.js +0 -1
  317. package/build/HEAD CIRCUM_BOYS.zscore.weekly-9adb819b.js +0 -1
  318. package/build/HEAD CIRCUM_BOYS.zscore.yearly-9a6cdbcf.js +0 -1
  319. package/build/HEAD CIRCUM_GIRLS.percentile.monthly-e7bfe9c6.js +0 -1
  320. package/build/HEAD CIRCUM_GIRLS.percentile.weekly-9f17e019.js +0 -1
  321. package/build/HEAD CIRCUM_GIRLS.percentile.yearly-8a59f541.js +0 -1
  322. package/build/HEAD CIRCUM_GIRLS.zscore.monthly-b7ddb16c.js +0 -1
  323. package/build/HEAD CIRCUM_GIRLS.zscore.weekly-72701c55.js +0 -1
  324. package/build/HEAD CIRCUM_GIRLS.zscore.yearly-dd94bded.js +0 -1
  325. package/build/HEIGHT_BOYS.percentile.monthly-b890068c.js +0 -1
  326. package/build/HEIGHT_BOYS.percentile.weekly-a1aa5130.js +0 -1
  327. package/build/HEIGHT_BOYS.percentile.yearly-5727d920.js +0 -1
  328. package/build/HEIGHT_BOYS.zscore.monthly-13b70aa6.js +0 -1
  329. package/build/HEIGHT_BOYS.zscore.weekly-3e1d7f23.js +0 -1
  330. package/build/HEIGHT_BOYS.zscore.yearly-a956102d.js +0 -1
  331. package/build/HEIGHT_GIRLS.percentile.monthly-da5ec01b.js +0 -1
  332. package/build/HEIGHT_GIRLS.percentile.weekly-e6205d32.js +0 -1
  333. package/build/HEIGHT_GIRLS.percentile.yearly-caefa502.js +0 -1
  334. package/build/HEIGHT_GIRLS.zscore.monthly-102ba473.js +0 -1
  335. package/build/HEIGHT_GIRLS.zscore.weekly-db4f710b.js +0 -1
  336. package/build/HEIGHT_GIRLS.zscore.yearly-36465920.js +0 -1
  337. package/build/Subot-4751194d.js +0 -1
  338. package/build/Visible-9497c463.js +0 -1
  339. package/build/WEIGHT_BOYS.percentile.monthly-554d0361.js +0 -1
  340. package/build/WEIGHT_BOYS.percentile.weekly-8e5334b8.js +0 -1
  341. package/build/WEIGHT_BOYS.percentile.yearly-536e1ccb.js +0 -1
  342. package/build/WEIGHT_BOYS.zscore.monthly-01eccee1.js +0 -1
  343. package/build/WEIGHT_BOYS.zscore.weekly-ee8f2c6b.js +0 -1
  344. package/build/WEIGHT_BOYS.zscore.yearly-0aea2749.js +0 -1
  345. package/build/WEIGHT_GIRLS.percentile.monthly-7abf9d06.js +0 -1
  346. package/build/WEIGHT_GIRLS.percentile.weekly-f9b6e963.js +0 -1
  347. package/build/WEIGHT_GIRLS.percentile.yearly-254865a5.js +0 -1
  348. package/build/WEIGHT_GIRLS.zscore.monthly-909f7417.js +0 -1
  349. package/build/WEIGHT_GIRLS.zscore.weekly-e62cd084.js +0 -1
  350. package/build/WEIGHT_GIRLS.zscore.yearly-8d6e5405.js +0 -1
  351. package/build/constants-00e06f68.js +0 -108
  352. package/build/constants-51251306.js +0 -1
  353. package/build/cookieHelper-7d519a72.js +0 -1
  354. package/build/core-ba3af3e2.js +0 -1
  355. package/build/dataTransform-1805eae3.js +0 -1
  356. package/build/esm/BMI_BOYS.percentile.monthly-6272f835.js +0 -1
  357. package/build/esm/BMI_BOYS.percentile.weekly-80d18f47.js +0 -1
  358. package/build/esm/BMI_BOYS.percentile.yearly-a7e5b5f6.js +0 -1
  359. package/build/esm/BMI_BOYS.zscore.monthly-d3658f97.js +0 -1
  360. package/build/esm/BMI_BOYS.zscore.weekly-6e6708dc.js +0 -1
  361. package/build/esm/BMI_BOYS.zscore.yearly-b8400c9d.js +0 -1
  362. package/build/esm/BMI_GIRLS.percentile.monthly-98586b46.js +0 -1
  363. package/build/esm/BMI_GIRLS.percentile.weekly-7c1511b0.js +0 -1
  364. package/build/esm/BMI_GIRLS.percentile.yearly-ea667f90.js +0 -1
  365. package/build/esm/BMI_GIRLS.zscore.monthly-3a4fd1a6.js +0 -1
  366. package/build/esm/BMI_GIRLS.zscore.weekly-cc1de097.js +0 -1
  367. package/build/esm/BMI_GIRLS.zscore.yearly-6dd1a364.js +0 -1
  368. package/build/esm/ChevronDown-4e59cac6.js +0 -1
  369. package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-bd0965ae.js +0 -1
  370. package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-db1053f7.js +0 -1
  371. package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-cd38b622.js +0 -1
  372. package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-d7f88a95.js +0 -1
  373. package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-76f7db79.js +0 -1
  374. package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-3ce70f8e.js +0 -1
  375. package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-b2e678ae.js +0 -1
  376. package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-8e2664bb.js +0 -1
  377. package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-f5c075a9.js +0 -1
  378. package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-6f87849e.js +0 -1
  379. package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-48da0aaa.js +0 -1
  380. package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-4eea437b.js +0 -1
  381. package/build/esm/HEIGHT_BOYS.percentile.monthly-d1a8cc8e.js +0 -1
  382. package/build/esm/HEIGHT_BOYS.percentile.weekly-2b6cfe6c.js +0 -1
  383. package/build/esm/HEIGHT_BOYS.percentile.yearly-9e78afc3.js +0 -1
  384. package/build/esm/HEIGHT_BOYS.zscore.monthly-5292d78a.js +0 -1
  385. package/build/esm/HEIGHT_BOYS.zscore.weekly-fbdee645.js +0 -1
  386. package/build/esm/HEIGHT_BOYS.zscore.yearly-c11a8f1b.js +0 -1
  387. package/build/esm/HEIGHT_GIRLS.percentile.monthly-8e11e2dc.js +0 -1
  388. package/build/esm/HEIGHT_GIRLS.percentile.weekly-dc3965cb.js +0 -1
  389. package/build/esm/HEIGHT_GIRLS.percentile.yearly-490f7b4e.js +0 -1
  390. package/build/esm/HEIGHT_GIRLS.zscore.monthly-e3531c32.js +0 -1
  391. package/build/esm/HEIGHT_GIRLS.zscore.weekly-36a16a66.js +0 -1
  392. package/build/esm/HEIGHT_GIRLS.zscore.yearly-61736bba.js +0 -1
  393. package/build/esm/Subot-4642c5bf.js +0 -1
  394. package/build/esm/Visible-ff7d225c.js +0 -1
  395. package/build/esm/WEIGHT_BOYS.percentile.monthly-0cfe7ecd.js +0 -1
  396. package/build/esm/WEIGHT_BOYS.percentile.weekly-89802113.js +0 -1
  397. package/build/esm/WEIGHT_BOYS.percentile.yearly-0eb40972.js +0 -1
  398. package/build/esm/WEIGHT_BOYS.zscore.monthly-7f8c5a15.js +0 -1
  399. package/build/esm/WEIGHT_BOYS.zscore.weekly-3dcfa8ce.js +0 -1
  400. package/build/esm/WEIGHT_BOYS.zscore.yearly-98ce1ea0.js +0 -1
  401. package/build/esm/WEIGHT_GIRLS.percentile.monthly-df98e335.js +0 -1
  402. package/build/esm/WEIGHT_GIRLS.percentile.weekly-63fff42a.js +0 -1
  403. package/build/esm/WEIGHT_GIRLS.percentile.yearly-8db8cdd0.js +0 -1
  404. package/build/esm/WEIGHT_GIRLS.zscore.monthly-15c83c6d.js +0 -1
  405. package/build/esm/WEIGHT_GIRLS.zscore.weekly-747a55ec.js +0 -1
  406. package/build/esm/WEIGHT_GIRLS.zscore.yearly-197dc52d.js +0 -1
  407. package/build/esm/constants-6ecfa77c.js +0 -1
  408. package/build/esm/constants-f7c80032.js +0 -108
  409. package/build/esm/cookieHelper-4f089e3c.js +0 -1
  410. package/build/esm/core-80112758.js +0 -1
  411. package/build/esm/dataTransform-0fa341bb.js +0 -1
  412. package/build/esm/getDynamicHealthTool-a4c9d6dd.js +0 -1
  413. package/build/esm/getSocialList-4e48deba.js +0 -1
  414. package/build/esm/index-13dc1f44.js +0 -1
  415. package/build/esm/index-13e62563.js +0 -137
  416. package/build/esm/index-1e7ad007.js +0 -1
  417. package/build/esm/index-24557f2b.js +0 -1
  418. package/build/esm/index-252cb964.js +0 -1
  419. package/build/esm/index-2e99f941.js +0 -1
  420. package/build/esm/index-3452fed2.js +0 -1
  421. package/build/esm/index-3aff939b.js +0 -1
  422. package/build/esm/index-459e0362.js +0 -1
  423. package/build/esm/index-45dcd965.js +0 -1
  424. package/build/esm/index-486b71cd.js +0 -1
  425. package/build/esm/index-5408f5a4.js +0 -113
  426. package/build/esm/index-5e1af23a.js +0 -1
  427. package/build/esm/index-79ef3a30.js +0 -1
  428. package/build/esm/index-7c77273a.js +0 -1
  429. package/build/esm/index-823fd7c0.js +0 -117
  430. package/build/esm/index-8c77d7e0.js +0 -1
  431. package/build/esm/index-93e5b4f3.js +0 -1
  432. package/build/esm/index-9c7b9011.js +0 -2748
  433. package/build/esm/index-9e5956c2.js +0 -1
  434. package/build/esm/index-a83aad1c.js +0 -375
  435. package/build/esm/index-b7cc3ca2.js +0 -1
  436. package/build/esm/index-bf11f9e9.js +0 -50
  437. package/build/esm/index-ce3d38fd.js +0 -1
  438. package/build/esm/index-d27a0e25.js +0 -1
  439. package/build/esm/index-e21276e3.js +0 -1
  440. package/build/esm/index-f9514788.js +0 -177
  441. package/build/esm/index-fd04ccb7.js +0 -1430
  442. package/build/esm/index.styles-94af560f.js +0 -817
  443. package/build/esm/isProduction-00695d80.js +0 -1
  444. package/build/esm/localizeNumberFormat-8355a44f.js +0 -1
  445. package/build/esm/normalizeLink-1c194268.js +0 -1
  446. package/build/esm/number-1347eb7b.js +0 -1
  447. package/build/esm/paths-749b4b53.js +0 -1
  448. package/build/esm/routing-2b284b30.js +0 -1
  449. package/build/esm/theme-3db3c9a8.js +0 -1
  450. package/build/esm/translationsContext-6d2efd65.js +0 -1
  451. package/build/esm/tslib.es6-266309d1.js +0 -1
  452. package/build/esm/types-6d397125.js +0 -3004
  453. package/build/esm/types-850814a7.js +0 -785
  454. package/build/esm/types-d3da37d2.js +0 -1
  455. package/build/esm/useCategory-f5f74749.js +0 -1
  456. package/build/esm/useHealthToolCache-f1488032.js +0 -1
  457. package/build/esm/useIsInit-9661c5f5.js +0 -1
  458. package/build/esm/useOutsideClick-0704b383.js +0 -1
  459. package/build/esm/usePlacesAutocomplete-0733ec49.js +0 -1
  460. package/build/esm/useScrollbarSize-90b179a5.js +0 -1
  461. package/build/esm/useTranslations-df1b3bb8.js +0 -1
  462. package/build/esm/useUniqueId-03fbaecd.js +0 -1
  463. package/build/esm/utils-3d2e3f0f.js +0 -141
  464. package/build/esm/utils-5b4e60da.js +0 -1
  465. package/build/esm/utils-970ce0c0.js +0 -8
  466. package/build/esm/utils-b87ec473.js +0 -1
  467. package/build/getDynamicHealthTool-31f44ca1.js +0 -1
  468. package/build/getSocialList-29c0a6e8.js +0 -1
  469. package/build/index-1714c81c.js +0 -2748
  470. package/build/index-238813a4.js +0 -375
  471. package/build/index-2438163d.js +0 -1430
  472. package/build/index-29d302f4.js +0 -137
  473. package/build/index-3184ae4e.js +0 -1
  474. package/build/index-34b6bd24.js +0 -1
  475. package/build/index-35192783.js +0 -1
  476. package/build/index-41d684a8.js +0 -50
  477. package/build/index-4a8c8ce6.js +0 -1
  478. package/build/index-58e0d49f.js +0 -1
  479. package/build/index-64d2f812.js +0 -1
  480. package/build/index-85c621a2.js +0 -113
  481. package/build/index-90f4bc02.js +0 -1
  482. package/build/index-9a845847.js +0 -117
  483. package/build/index-9ed509d1.js +0 -1
  484. package/build/index-aa495d24.js +0 -1
  485. package/build/index-ad5cf64d.js +0 -1
  486. package/build/index-b21a1d96.js +0 -1
  487. package/build/index-b320255d.js +0 -1
  488. package/build/index-b9af15da.js +0 -1
  489. package/build/index-bd4b31bf.js +0 -1
  490. package/build/index-bf81cb71.js +0 -1
  491. package/build/index-c3cbb8f3.js +0 -1
  492. package/build/index-d25afe2f.js +0 -1
  493. package/build/index-e7c1ff53.js +0 -177
  494. package/build/index-ed8656f9.js +0 -1
  495. package/build/index-f6217f73.js +0 -1
  496. package/build/index-f7088d57.js +0 -1
  497. package/build/index.styles-2ecb9c85.js +0 -817
  498. package/build/isProduction-28d96804.js +0 -1
  499. package/build/localizeNumberFormat-22b2d7aa.js +0 -1
  500. package/build/normalizeLink-594ccff1.js +0 -1
  501. package/build/number-cf06dcc0.js +0 -1
  502. package/build/paths-ed72ecb8.js +0 -1
  503. package/build/routing-f2edd0d0.js +0 -1
  504. package/build/theme-f2b8aad7.js +0 -1
  505. package/build/translationsContext-4c4c33c4.js +0 -1
  506. package/build/tslib.es6-ceb091fd.js +0 -1
  507. package/build/types-49f0543a.js +0 -785
  508. package/build/types-5b303b71.js +0 -1
  509. package/build/types-bfd12e24.js +0 -3004
  510. package/build/useCategory-94d60dab.js +0 -1
  511. package/build/useHealthToolCache-7307d240.js +0 -1
  512. package/build/useIsInit-c3cf1925.js +0 -1
  513. package/build/useOutsideClick-15fef824.js +0 -1
  514. package/build/usePlacesAutocomplete-6ab0181b.js +0 -1
  515. package/build/useScrollbarSize-ab332673.js +0 -1
  516. package/build/useTranslations-233c68bc.js +0 -1
  517. package/build/useUniqueId-46834e18.js +0 -1
  518. package/build/utils-13ea4f2f.js +0 -8
  519. package/build/utils-45e691a3.js +0 -1
  520. package/build/utils-bee8be92.js +0 -141
  521. package/build/utils-d5766c73.js +0 -1
@@ -0,0 +1,837 @@
1
+ import React__default, { useContext, useState } from 'react';
2
+ import { M as MediaQueries } from './utils-2c484c05.js';
3
+ import styled from 'styled-components';
4
+ import { t as theme } from './theme-e74db08c.js';
5
+ import { _ as __rest } from './tslib.es6-1b1533a9.js';
6
+ import { T as TogetherComponentGlobalContext } from './utils-70718e9c.js';
7
+
8
+ const StyledPopup = styled.div `
9
+ position: fixed;
10
+ left: 50%;
11
+
12
+ padding: 0 16px 32px;
13
+ background-color: ${theme.colors.white};
14
+ border-radius: ${theme.borderRadius};
15
+ box-shadow: 0px 4px 8px ${theme.colors.gray200};
16
+ transform: translate(-50%, -50%);
17
+ transition: all 0.5s ease-in-out;
18
+ visibility: hidden;
19
+
20
+ &[data-open='true'] {
21
+ z-index: 400;
22
+ top: 50%;
23
+ opacity: 1;
24
+ visibility: visible;
25
+ }
26
+
27
+ &[data-open='false'] {
28
+ top: -50%;
29
+ }
30
+
31
+ &[data-type='lead'] {
32
+ width: 332px;
33
+ height: 460px;
34
+
35
+ div {
36
+ top: -15px;
37
+ right: -15px;
38
+ }
39
+ }
40
+
41
+ &[data-type='form'] {
42
+ width: 496px;
43
+ height: 548px;
44
+ ${MediaQueries.mbDown} {
45
+ width: 340px;
46
+ }
47
+ }
48
+
49
+ &[data-type='confirm'] {
50
+ ${MediaQueries.mbDown} {
51
+ width: calc(100% - 32px);
52
+ }
53
+ ${MediaQueries.mbUp} {
54
+ width: 100%;
55
+ max-width: 407px;
56
+ }
57
+ }
58
+
59
+ .popup-content {
60
+ position: relative;
61
+ z-index: 111;
62
+ height: 100%;
63
+ padding: 16px;
64
+ }
65
+
66
+ .close-button {
67
+ position: absolute;
68
+ top: 16px;
69
+ right: 0;
70
+ cursor: pointer;
71
+
72
+ img {
73
+ width: 100%;
74
+ height: 100%;
75
+ border-radius: 50%;
76
+ }
77
+ }
78
+ `;
79
+ const StyledPopupWrapper = styled.div `
80
+ position: fixed;
81
+ z-index: 110;
82
+ top: 0;
83
+ left: 0;
84
+ width: 100%;
85
+ height: 100%;
86
+ align-items: center;
87
+ background: rgba(38, 38, 38, 0.3);
88
+
89
+ &[data-open='false'] {
90
+ display: none;
91
+ }
92
+ `;
93
+
94
+ const Popup = ({ type = 'lead', closeIcon, isOpen = true, onClose, children, className = '', enableAnimation = true, }) => {
95
+ return (React__default.createElement(React__default.Fragment, null,
96
+ React__default.createElement(StyledPopup, { "data-open": isOpen, "data-type": type, "data-animation": enableAnimation },
97
+ React__default.createElement("div", { className: `${className || ''} popup-content` },
98
+ !!closeIcon && (React__default.createElement("div", { className: "close-button", onClick: onClose }, closeIcon)),
99
+ children)),
100
+ React__default.createElement(StyledPopupWrapper, { "data-open": isOpen, onClick: onClose })));
101
+ };
102
+
103
+ const formatAuthor = (author) => {
104
+ if (!author)
105
+ return {};
106
+ return {
107
+ displayName: author.display_name || null,
108
+ avatar: author.avatar || null,
109
+ thumbnailAvatar: author.avatar_thumbnail || null,
110
+ profileUrl: author.profile_url || null,
111
+ description: author.description || null,
112
+ metaTag: author.meta_tag || '',
113
+ specialty: author.specialty || '',
114
+ organisation: author.organisation || '',
115
+ };
116
+ };
117
+ const formatArticleExpert = (expert) => {
118
+ if (!expert)
119
+ return {};
120
+ return {
121
+ id: expert.ID || null,
122
+ name: expert.name || null,
123
+ specialty: expert.specialty || null,
124
+ avatar: expert.avatar || null,
125
+ permalink: expert.permalink || null,
126
+ thumbnailAvatar: expert.avatar_thumbnail || null,
127
+ };
128
+ };
129
+ const formatSpotlightsSummary = (spotlight) => {
130
+ if (typeof spotlight === 'undefined' || !spotlight)
131
+ return null;
132
+ return {
133
+ id: spotlight.ID,
134
+ name: spotlight.name,
135
+ permalink: spotlight.permalink,
136
+ image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image) || '',
137
+ imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
138
+ imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
139
+ // desktopBanner: spotlight?.desktop_banner || '',
140
+ // mobileBanner: spotlight?.mobile_banner || '',
141
+ startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
142
+ endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
143
+ };
144
+ };
145
+ const formatArticleSubscriptionBanner = (banner) => {
146
+ if (!banner)
147
+ return {};
148
+ const { button_text, button_url, status, banner_desktop, banner_mobile } = banner, rest = __rest(banner, ["button_text", "button_url", "status", "banner_desktop", "banner_mobile"]);
149
+ return Object.assign({ buttonText: button_text || '', buttonUrl: button_url || '', status: Boolean(status), bannerDesktop: banner_desktop || '', bannerMobile: banner_mobile || '' }, rest);
150
+ };
151
+ const TRANSLATE_LANGUAGES = {
152
+ EN: 'English',
153
+ FIL: 'Filipino',
154
+ };
155
+ const formatTranslateOptions = (translate) => {
156
+ if (typeof translate === 'undefined' || Object.keys(translate).length < 2)
157
+ return [];
158
+ return Object.keys(translate).map((languageKey) => ({
159
+ label: languageKey.toUpperCase() in TRANSLATE_LANGUAGES
160
+ ? TRANSLATE_LANGUAGES[languageKey.toUpperCase()]
161
+ : languageKey.toUpperCase(),
162
+ value: translate[languageKey].slice(-1) === '/'
163
+ ? translate[languageKey]
164
+ : `${translate[languageKey]}/`,
165
+ }));
166
+ };
167
+ const formatArticle = (article) => {
168
+ var _a, _b, _c, _d;
169
+ if (!article)
170
+ return {};
171
+ return {
172
+ id: article.ID,
173
+ postName: article.post_name,
174
+ sponsor: article.sponsor ? formatSponsor(article.sponsor) : null,
175
+ isSponsored: article.is_sponsored || null,
176
+ isPremium: article.is_premium || false,
177
+ postTitle: article.post_title || '',
178
+ postModified: article.post_modified || '',
179
+ postDate: article.post_date || '',
180
+ modifiedTime: article.modified_time || '',
181
+ permalink: article.permalink || '',
182
+ featureImage: article.image || null,
183
+ featureImageMobile: article.image_medium || null,
184
+ featureImageMobileXs: article.image_thumbnail || null,
185
+ author: formatAuthor(article.author),
186
+ reviewer: article.reviewed_by
187
+ ? formatAuthor(article.reviewed_by) || null
188
+ : null,
189
+ articleReviewed: (article === null || article === void 0 ? void 0 : article.reviewed)
190
+ ? Object.assign(Object.assign({}, article === null || article === void 0 ? void 0 : article.reviewed), { author: formatUserProfile((_a = article === null || article === void 0 ? void 0 : article.reviewed) === null || _a === void 0 ? void 0 : _a.author), editor: formatUserProfile((_b = article === null || article === void 0 ? void 0 : article.reviewed) === null || _b === void 0 ? void 0 : _b.editor), expert: formatUserProfile((_c = article === null || article === void 0 ? void 0 : article.reviewed) === null || _c === void 0 ? void 0 : _c.expert), fact_check: formatUserProfile((_d = article === null || article === void 0 ? void 0 : article.reviewed) === null || _d === void 0 ? void 0 : _d.fact_check) }) : null,
191
+ category: formatCategory(article.category),
192
+ postContent: article.post_content || null,
193
+ keyTakeaways: article.key_takeaways || null,
194
+ categories: (article.categories || []).map(formatCategory),
195
+ sources: article.sources || null,
196
+ description: article.description || null,
197
+ excerpt: article.excerpt || null,
198
+ expert: formatArticleExpert(article.expert),
199
+ metaTag: article.meta_tag || null,
200
+ spotlight: formatSpotlightsSummary(article === null || article === void 0 ? void 0 : article.spotlight),
201
+ affiliate_message: article.affiliate_message || null,
202
+ turnOffComment: !!article.turn_off_comment,
203
+ hasAffiliate: !!article.is_affiliate,
204
+ // faqs: (article.faqs || []).map(formatArticleFaqs),
205
+ translateOptions: formatTranslateOptions(article.translate),
206
+ jumpingLink: article.jumping_link || [],
207
+ pregnancy: (article === null || article === void 0 ? void 0 : article.pregnancy) || false,
208
+ pregnancyWeek: (article === null || article === void 0 ? void 0 : article.week_pregnancy) || 1,
209
+ primaryCategory: formatCategory(article.primary_category),
210
+ turnOffIvsPlayer: !!article.turn_off_ivs_player,
211
+ turnOffArticleVoice: !!article.turn_off_article_voice,
212
+ enableAudio: !!article.enable_audio,
213
+ // breadcrumb: (article.breadcrumb || [])?.map(formatBreadcrumb) || [],
214
+ label: (article === null || article === void 0 ? void 0 : article.label) || '',
215
+ editLast: formatAuthor(article.edit_last),
216
+ subscriptionBanner: formatArticleSubscriptionBanner(article.subscription_banner),
217
+ };
218
+ };
219
+ const formatUserProfile = (user) => {
220
+ if (typeof user === 'undefined' || !user)
221
+ return null;
222
+ return Object.assign(Object.assign({}, user), { profile_url: (user === null || user === void 0 ? void 0 : user.slug)
223
+ ? ['expert', 'medical'].includes((user === null || user === void 0 ? void 0 : user.role) || '')
224
+ ? `/expert/${user === null || user === void 0 ? void 0 : user.slug}`
225
+ : `/author/${user === null || user === void 0 ? void 0 : user.slug}`
226
+ : user.profile_url });
227
+ };
228
+ const formatBMIResult = (data) => {
229
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
230
+ if (!data || !data.status)
231
+ return {};
232
+ return {
233
+ status: data === null || data === void 0 ? void 0 : data.status,
234
+ comparison: (_a = data === null || data === void 0 ? void 0 : data.comparison) !== null && _a !== void 0 ? _a : '',
235
+ assessmentData: [
236
+ {
237
+ tab: 'tools.condition',
238
+ content: (_b = data === null || data === void 0 ? void 0 : data.condition) !== null && _b !== void 0 ? _b : '',
239
+ },
240
+ {
241
+ tab: 'tools.risks',
242
+ content: (_c = data === null || data === void 0 ? void 0 : data.risk) !== null && _c !== void 0 ? _c : '',
243
+ },
244
+ {
245
+ tab: 'tools.suggestion',
246
+ content: (_d = data === null || data === void 0 ? void 0 : data.suggestion) !== null && _d !== void 0 ? _d : '',
247
+ },
248
+ ],
249
+ chartData: ((_e = data === null || data === void 0 ? void 0 : data.chart_data) === null || _e === void 0 ? void 0 : _e.length) > 0 ? data === null || data === void 0 ? void 0 : data.chart_data : [],
250
+ disclaimer: (_f = data === null || data === void 0 ? void 0 : data.disclaimer) !== null && _f !== void 0 ? _f : '',
251
+ illustrator: (_g = data === null || data === void 0 ? void 0 : data.illustrator) !== null && _g !== void 0 ? _g : '',
252
+ faqs: (_h = data === null || data === void 0 ? void 0 : data.faqs) !== null && _h !== void 0 ? _h : [],
253
+ suggestedArticlesLink: (_j = data === null || data === void 0 ? void 0 : data.suggested_articles_link) !== null && _j !== void 0 ? _j : '',
254
+ // suggestedArticles: data?.suggested_articles?.map(formatArticle) ?? [],
255
+ };
256
+ };
257
+ const formatSponsor = (sponsor) => {
258
+ if (!sponsor)
259
+ return {};
260
+ return {
261
+ title: sponsor.title,
262
+ logo: sponsor.logo,
263
+ link: sponsor.link,
264
+ };
265
+ };
266
+ const formatReviewedCategory = (data) => {
267
+ return {
268
+ postTitle: data.post_title,
269
+ permalink: data.permalink,
270
+ };
271
+ };
272
+ const formatCategory = (category) => {
273
+ var _a, _b;
274
+ if (!category)
275
+ return {};
276
+ return {
277
+ termId: category.term_id || null,
278
+ sponsor: category.sponsor ? formatSponsor(category.sponsor) : null,
279
+ isSponsored: category.is_sponsored || null,
280
+ categoryName: category.cat_name || null,
281
+ name: category.name || null,
282
+ iconUrl: category.icon || '',
283
+ slugName: category.category_nicename || null,
284
+ description: category.description || null,
285
+ featureImage: category.image || null,
286
+ displayName: category.name || null,
287
+ parent: category.parent || null,
288
+ permalink: category.permalink || null,
289
+ slug: category.slug || null,
290
+ childCates: ((_a = category.child_cates) === null || _a === void 0 ? void 0 : _a.map((childCate) => {
291
+ return formatCategory(childCate);
292
+ })) || [],
293
+ colorFeatureImage: category.color_feature_image || null,
294
+ imageColor: category.image_color || null,
295
+ textColor: category.text_color || null,
296
+ catParent: ((_b = category.cat_parent) === null || _b === void 0 ? void 0 : _b.name)
297
+ ? {
298
+ name: category.cat_parent.name,
299
+ permalink: category.cat_parent.permalink,
300
+ }
301
+ : {},
302
+ metaTag: category.meta_tag || '',
303
+ reviewedBy: category.reviewed_by
304
+ ? formatReviewedCategory(category.reviewed_by)
305
+ : null,
306
+ reviewedDate: category.reviewed_date || '',
307
+ faqs: category.faqs
308
+ ? category.faqs.map((faq) => formatFaqsCategory(faq))
309
+ : null,
310
+ };
311
+ };
312
+ const formatCategoryApi = (category) => {
313
+ if (!category)
314
+ return {};
315
+ return {
316
+ categoryInfo: formatCategory(category.data.category) || null,
317
+ explainersPosts: (category.data.explainers_posts || []).map(formatArticle),
318
+ subCategories: (category.data.sub_categories || []).map(formatCategory),
319
+ };
320
+ };
321
+ const formatFaqsCategory = (data) => {
322
+ return {
323
+ title: data.title,
324
+ content: data.content,
325
+ };
326
+ };
327
+ const formatHealthTool = (healthTool) => {
328
+ if (!healthTool)
329
+ return {};
330
+ return {
331
+ icon: healthTool.icon,
332
+ link: healthTool.link.startsWith('http')
333
+ ? healthTool.link
334
+ : '/health-tools' + healthTool.link,
335
+ subtitle: healthTool.subtitle,
336
+ title: healthTool.title,
337
+ };
338
+ };
339
+ const formatHealthToolTypeCategory = (category) => {
340
+ var _a, _b;
341
+ if (!category)
342
+ return {};
343
+ return {
344
+ termId: (category === null || category === void 0 ? void 0 : category.term_id) || 0,
345
+ name: (category === null || category === void 0 ? void 0 : category.name) || '',
346
+ healthTools: (_b = (_a = category === null || category === void 0 ? void 0 : category.health_tools) === null || _a === void 0 ? void 0 : _a.map((tool) => formatHealthTool(tool))) !== null && _b !== void 0 ? _b : [],
347
+ };
348
+ };
349
+ const formatCommunity = (community) => {
350
+ if (!community)
351
+ return {};
352
+ return {
353
+ topicCount: community.topics_count || 0,
354
+ postCount: community.posts_count || 0,
355
+ memberCount: community.members_count || 0,
356
+ thumbnail: community.thumbnail || '',
357
+ coverImage: community.cover_image || '',
358
+ mobileCoverImage: community.mobile_cover_image || '',
359
+ name: community.name || '',
360
+ description: community.description || '',
361
+ slug: community.slug || '',
362
+ id: community.id || 0,
363
+ joined: Boolean(community.joined),
364
+ isActive: community.is_active !== null && typeof community.is_active !== 'undefined'
365
+ ? Boolean(community.is_active)
366
+ : true,
367
+ mappedCategoryId: community.mapped_category_id || 0,
368
+ discoverCategory: community.discover_category
369
+ ? {
370
+ categoryId: community.discover_category.category_id || 0,
371
+ name: community.discover_category.name || '',
372
+ }
373
+ : null,
374
+ isHidden: Boolean(community.is_hidden),
375
+ };
376
+ };
377
+ const formatTopic = (topic) => {
378
+ var _a, _b, _c, _d;
379
+ if (!topic)
380
+ return {};
381
+ return {
382
+ id: topic.id || 0,
383
+ name: topic.name || '',
384
+ image: topic.thumbnail || '',
385
+ slug: topic.slug || '',
386
+ url: '/' + ((_a = topic.community) === null || _a === void 0 ? void 0 : _a.slug) + '/' + (topic === null || topic === void 0 ? void 0 : topic.slug) || '',
387
+ description: topic.description || '',
388
+ joined: topic.joined || false,
389
+ postCount: topic.count_posts || 0,
390
+ memberCount: topic.count_members || 0,
391
+ communityId: String((_b = topic.community) === null || _b === void 0 ? void 0 : _b.id),
392
+ communitySlug: (_c = topic.community) === null || _c === void 0 ? void 0 : _c.slug,
393
+ communityName: (_d = topic.community) === null || _d === void 0 ? void 0 : _d.name,
394
+ order: topic.order || 0,
395
+ isActive: topic.is_active !== null && typeof topic.is_active !== 'undefined'
396
+ ? Boolean(topic.is_active)
397
+ : true,
398
+ mappedCategoryId: topic.mapped_category_id || 0,
399
+ discoverCategory: topic.discover_category
400
+ ? {
401
+ categoryId: topic.discover_category.category_id || 0,
402
+ name: topic.discover_category.name || '',
403
+ }
404
+ : null,
405
+ isHidden: Boolean(topic.is_hidden),
406
+ };
407
+ };
408
+ const formatExpertAnswer = (data) => {
409
+ if (!data)
410
+ return {};
411
+ return {
412
+ answer: data === null || data === void 0 ? void 0 : data.answer.map(formatComment),
413
+ expert: data === null || data === void 0 ? void 0 : data.expert,
414
+ };
415
+ };
416
+ const formatPost = (post) => {
417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
418
+ if (!post)
419
+ return {};
420
+ return {
421
+ id: post.id,
422
+ topics: ((_a = post.topics) === null || _a === void 0 ? void 0 : _a.map((topic) => {
423
+ var _a, _b, _c, _d;
424
+ return ({
425
+ id: topic.id || 0,
426
+ name: topic.name || '',
427
+ slug: topic.slug || '',
428
+ url: '/' + ((_a = post.community) === null || _a === void 0 ? void 0 : _a.slug) + '/' + topic.slug,
429
+ communityId: String((_b = post.community) === null || _b === void 0 ? void 0 : _b.id),
430
+ communitySlug: ((_c = post.community) === null || _c === void 0 ? void 0 : _c.slug) || '',
431
+ communityName: ((_d = post.community) === null || _d === void 0 ? void 0 : _d.name) || '',
432
+ isHidden: Boolean(topic.is_hidden),
433
+ isActive: true,
434
+ });
435
+ })) || [],
436
+ community: {
437
+ id: ((_b = post.community) === null || _b === void 0 ? void 0 : _b.id) || 0,
438
+ name: ((_c = post.community) === null || _c === void 0 ? void 0 : _c.name) || '',
439
+ slug: ((_d = post.community) === null || _d === void 0 ? void 0 : _d.slug) || '',
440
+ isActive: true,
441
+ isHidden: Boolean((_e = post.community) === null || _e === void 0 ? void 0 : _e.is_hidden),
442
+ },
443
+ slug: post.slug || '',
444
+ author: {
445
+ id: ((_f = post.user) === null || _f === void 0 ? void 0 : _f.id) || 0,
446
+ username: ((_g = post.user) === null || _g === void 0 ? void 0 : _g.user_name) || '',
447
+ email: ((_h = post.user) === null || _h === void 0 ? void 0 : _h.email) || '',
448
+ name: ((_j = post.user) === null || _j === void 0 ? void 0 : _j.name) || '',
449
+ avatar: ((_k = post.user) === null || _k === void 0 ? void 0 : _k.avatar) || '',
450
+ role: ((_l = post.user) === null || _l === void 0 ? void 0 : _l.role)
451
+ ? (_o = (_m = post.user) === null || _m === void 0 ? void 0 : _m.role) === null || _o === void 0 ? void 0 : _o.toLowerCase()
452
+ : '',
453
+ type: ((_p = post.user) === null || _p === void 0 ? void 0 : _p.type) || '',
454
+ partnerId: ((_q = post.user) === null || _q === void 0 ? void 0 : _q.partner_id) ? String((_r = post.user) === null || _r === void 0 ? void 0 : _r.partner_id) : '',
455
+ title: ((_s = post.user) === null || _s === void 0 ? void 0 : _s.title) || '',
456
+ doctorId: ((_t = post.user) === null || _t === void 0 ? void 0 : _t.doctor_id) ? String((_u = post.user) === null || _u === void 0 ? void 0 : _u.doctor_id) : '',
457
+ hospitalId: ((_v = post.user) === null || _v === void 0 ? void 0 : _v.hospital_id) ? String((_w = post.user) === null || _w === void 0 ? void 0 : _w.hospital_id) : '',
458
+ },
459
+ previewUrl: {
460
+ title: post.preview_title || '',
461
+ url: post.preview_link || '',
462
+ image: post.preview_image || '',
463
+ description: post.preview_description || '',
464
+ },
465
+ createdAt: post.created_at || '',
466
+ scheduleDateTime: post.schedule_datetime || '',
467
+ photos: post.images || [],
468
+ description: post.description || '',
469
+ commentsCount: post.comments_count || 0,
470
+ likesCount: post.likes_count || 0,
471
+ title: post.name || '',
472
+ isPin: !!post.is_pin,
473
+ pinDate: post.pin_date || '',
474
+ liked: post.liked || false,
475
+ bookmarked: Boolean(post.bookmarked) || false,
476
+ mentions: post.mentions || [],
477
+ commented: Boolean(post.commented) || false,
478
+ introUrl: post.intro_url || '',
479
+ bannerImage: post.banner_image || '',
480
+ isAnonymous: post.is_anonymous ? 1 : 0,
481
+ isAskDoctor: post.is_question ? 1 : 0,
482
+ expertAnswer: formatExpertAnswer(post === null || post === void 0 ? void 0 : post.expert_answer),
483
+ createdTime: post.created_time || '',
484
+ isMinigame: post.event_type === 'mini_game',
485
+ eventStart: post.event_start,
486
+ eventEnd: post.event_end,
487
+ // authorExpertId: post.author_expert_id ? String(post.author_expert_id) : '',
488
+ };
489
+ };
490
+ const formatPostPagination = (pagination) => {
491
+ if (!pagination)
492
+ return {};
493
+ return {
494
+ currentPage: pagination.current || 0,
495
+ lastPage: pagination.last || 0,
496
+ total: pagination.total_items || 0,
497
+ };
498
+ };
499
+ const formatNotification = (notification) => {
500
+ var _a, _b, _c;
501
+ if (!notification)
502
+ return {};
503
+ return {
504
+ time: notification.created_at,
505
+ content: notification.content,
506
+ postId: String(notification.post_id),
507
+ fromUser: {
508
+ name: (_a = notification.from_user) === null || _a === void 0 ? void 0 : _a.name,
509
+ id: (_b = notification.from_user) === null || _b === void 0 ? void 0 : _b.id,
510
+ avatar: (_c = notification.from_user) === null || _c === void 0 ? void 0 : _c.avatar,
511
+ },
512
+ toUserId: String(notification.to_user_id),
513
+ postSlug: notification.post_slug || '',
514
+ communitySlug: notification.community_slug || '',
515
+ };
516
+ };
517
+ const formatSpotlightsList = (spotligts) => {
518
+ if (!spotligts)
519
+ return [];
520
+ return spotligts.map((spotlight) => ({
521
+ id: spotlight.ID,
522
+ name: spotlight.name,
523
+ permalink: spotlight.permalink,
524
+ image: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.small_banner) || (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image),
525
+ imageMedium: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_medium) || null,
526
+ imageThumbnail: (spotlight === null || spotlight === void 0 ? void 0 : spotlight.image_thumbnail) || null,
527
+ startDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.start_date,
528
+ endDate: spotlight === null || spotlight === void 0 ? void 0 : spotlight.end_date,
529
+ }));
530
+ };
531
+ const formatOvulationInfo = (data) => {
532
+ if (!data)
533
+ return {};
534
+ return {
535
+ disclaimer: data.disclaimer,
536
+ featuredImage: data.featured_image,
537
+ info: data.informations || [],
538
+ reviewedBy: data.reviewed_by
539
+ ? {
540
+ id: data.reviewed_by.ID,
541
+ permalink: data.reviewed_by.permalink,
542
+ name: data.reviewed_by.name,
543
+ postTitle: data.reviewed_by.post_title,
544
+ }
545
+ : null,
546
+ reviewedDate: data.reviewed_date,
547
+ };
548
+ };
549
+ const formatSuggestedArticle = (data) => {
550
+ if (!data)
551
+ return {};
552
+ return {
553
+ postId: data.post_id || null,
554
+ categoryId: data.category_id || null,
555
+ postUrl: data.post_url || null,
556
+ postReviewed: data.post_reviewed || null,
557
+ postPageviews: data.post_pageviews || null,
558
+ postRank: data.post_rank || null,
559
+ isPin: data.is_pin || null,
560
+ frequency: data.frequency || null,
561
+ topic: data.topic || null,
562
+ };
563
+ };
564
+ const formatTopicHealthTool = (data) => {
565
+ if (!data)
566
+ return {};
567
+ return {
568
+ id: data.tool_id || null,
569
+ topicFrequency: data.frequency || null,
570
+ topicId: data.topic_id || null,
571
+ topicName: data.topic_name || null,
572
+ isPinned: !!data.is_pin || null,
573
+ toolLink: data.tool_link || '',
574
+ };
575
+ };
576
+ const formatComment = (data) => {
577
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
578
+ if (!data)
579
+ return {};
580
+ return {
581
+ content: data.content,
582
+ countLikes: data.likes_count,
583
+ countReplies: data.replies_count,
584
+ createdAt: data.created_at,
585
+ createdTime: data.created_time,
586
+ id: String(data.id),
587
+ images: data.image || [],
588
+ link: data.link || null,
589
+ replies: data.replies && data.replies.length > 0
590
+ ? data.replies.map(formatComment)
591
+ : [],
592
+ author: {
593
+ id: ((_a = data.user) === null || _a === void 0 ? void 0 : _a.id) || 0,
594
+ username: ((_b = data.user) === null || _b === void 0 ? void 0 : _b.user_name) || '',
595
+ name: ((_c = data.user) === null || _c === void 0 ? void 0 : _c.name) || '',
596
+ role: ((_d = data.user) === null || _d === void 0 ? void 0 : _d.role)
597
+ ? (_f = (_e = data.user) === null || _e === void 0 ? void 0 : _e.role) === null || _f === void 0 ? void 0 : _f.toLowerCase()
598
+ : '',
599
+ avatar: ((_g = data.user) === null || _g === void 0 ? void 0 : _g.avatar) || '',
600
+ type: ((_h = data.user) === null || _h === void 0 ? void 0 : _h.type) || '',
601
+ email: ((_j = data.user) === null || _j === void 0 ? void 0 : _j.email) || '',
602
+ partnerId: ((_k = data.user) === null || _k === void 0 ? void 0 : _k.partner_id) ? String((_l = data.user) === null || _l === void 0 ? void 0 : _l.partner_id) : '',
603
+ title: ((_m = data.user) === null || _m === void 0 ? void 0 : _m.title) || '',
604
+ doctorId: ((_o = data.user) === null || _o === void 0 ? void 0 : _o.doctor_id) ? String((_p = data.user) === null || _p === void 0 ? void 0 : _p.doctor_id) : '',
605
+ hospitalId: ((_q = data.user) === null || _q === void 0 ? void 0 : _q.hospital_id) ? String((_r = data.user) === null || _r === void 0 ? void 0 : _r.hospital_id) : '',
606
+ },
607
+ liked: !!data.liked,
608
+ mentionedUser: data.mentioned
609
+ ? {
610
+ id: ((_s = data.mentioned) === null || _s === void 0 ? void 0 : _s.id) || 0,
611
+ username: ((_t = data.mentioned) === null || _t === void 0 ? void 0 : _t.user_name) || '',
612
+ name: ((_u = data.mentioned) === null || _u === void 0 ? void 0 : _u.name) || '',
613
+ role: ((_v = data.mentioned) === null || _v === void 0 ? void 0 : _v.role)
614
+ ? (_x = (_w = data.mentioned) === null || _w === void 0 ? void 0 : _w.role) === null || _x === void 0 ? void 0 : _x.toLowerCase()
615
+ : '',
616
+ avatar: ((_y = data.mentioned) === null || _y === void 0 ? void 0 : _y.avatar) || '',
617
+ type: ((_z = data.mentioned) === null || _z === void 0 ? void 0 : _z.type) || '',
618
+ email: ((_0 = data.mentioned) === null || _0 === void 0 ? void 0 : _0.email) || '',
619
+ partnerId: ((_1 = data.mentioned) === null || _1 === void 0 ? void 0 : _1.partner_id)
620
+ ? String((_2 = data.mentioned) === null || _2 === void 0 ? void 0 : _2.partner_id)
621
+ : '',
622
+ doctorId: ((_3 = data.mentioned) === null || _3 === void 0 ? void 0 : _3.doctor_id)
623
+ ? String((_4 = data.mentioned) === null || _4 === void 0 ? void 0 : _4.doctor_id)
624
+ : '',
625
+ hospitalId: ((_5 = data.mentioned) === null || _5 === void 0 ? void 0 : _5.hospital_id)
626
+ ? String((_6 = data.mentioned) === null || _6 === void 0 ? void 0 : _6.hospital_id)
627
+ : '',
628
+ title: ((_7 = data.mentioned) === null || _7 === void 0 ? void 0 : _7.title) || '',
629
+ }
630
+ : null,
631
+ mentions: data.mentions || [],
632
+ isSensitive: data.is_sensitive || 0,
633
+ userReadComment: data.user_read_comment,
634
+ source: data.source || [],
635
+ isVerify: data.is_verify || 0,
636
+ isOppose: data.is_oppose || 0,
637
+ userVerify: data.user_verify || {},
638
+ categorySlug: data.categories || '',
639
+ isAnonymous: Boolean(Number(data.is_anonymous || 0)),
640
+ };
641
+ };
642
+ const formatReportedPostToPostDetail = (data) => {
643
+ if (!data)
644
+ return {};
645
+ return {
646
+ name: data.title,
647
+ description: data.description,
648
+ images: data.images,
649
+ likes_count: data.count_likes,
650
+ comments_count: data.count_comments,
651
+ topics: [],
652
+ // created_at:
653
+ // created_date?: string
654
+ // preview_image:
655
+ slug: data.post_slug,
656
+ id: data.post_id,
657
+ is_pin: data.is_pin,
658
+ pin_date: '',
659
+ post_type: data.post_type,
660
+ schedule_datetime: data.schedule_datetime,
661
+ is_active: data.is_active,
662
+ preview_title: data.preview_title || '',
663
+ preview_image: data.preview_image || '',
664
+ preview_description: data.preview_description || '',
665
+ preview_link: data.preview_link || '',
666
+ user: data.user,
667
+ created_at: '',
668
+ created_time: '',
669
+ community: {
670
+ id: data.community_id,
671
+ name: data.community_name,
672
+ slug: data.community_slug,
673
+ description: '',
674
+ },
675
+ };
676
+ };
677
+ const formatTopicSubot = (data) => {
678
+ if (!data)
679
+ return {};
680
+ return {
681
+ chatBotId: data.subot_id,
682
+ isPinned: data.is_pin,
683
+ topicId: data.topic_id,
684
+ topicFrequency: data.frequency,
685
+ };
686
+ };
687
+ const formatSiteWideBanner = (sitewide_banner, type) => {
688
+ if (typeof sitewide_banner === 'undefined' || !sitewide_banner)
689
+ return null;
690
+ return {
691
+ content: (sitewide_banner === null || sitewide_banner === void 0 ? void 0 : sitewide_banner.content) || '',
692
+ icon: (sitewide_banner === null || sitewide_banner === void 0 ? void 0 : sitewide_banner.icon) || '',
693
+ type: type || 'other',
694
+ };
695
+ };
696
+ const formatPWGContent = (data) => {
697
+ if (!data)
698
+ return {};
699
+ return {
700
+ disclaimer: data.disclaimer,
701
+ info: data.info || [],
702
+ reviewedBy: data.reviewed_by ? formatUserProfile(data.reviewed_by) : null,
703
+ reviewedDate: data.reviewed_date,
704
+ metaTag: data.meta_tag,
705
+ };
706
+ };
707
+ const formatUserProfileUrl = (user) => {
708
+ if (typeof user === 'undefined' || !user)
709
+ return '';
710
+ return (user === null || user === void 0 ? void 0 : user.turn_off_profile)
711
+ ? ''
712
+ : (user === null || user === void 0 ? void 0 : user.slug)
713
+ ? ['expert', 'medical'].includes((user === null || user === void 0 ? void 0 : user.role) || '')
714
+ ? `/expert/${user === null || user === void 0 ? void 0 : user.slug}`
715
+ : `/author/${user === null || user === void 0 ? void 0 : user.slug}`
716
+ : (user === null || user === void 0 ? void 0 : user.profile_url) || (user === null || user === void 0 ? void 0 : user.permalink) || '#';
717
+ };
718
+ const formatTHRContent = (data) => {
719
+ if (!data)
720
+ return {};
721
+ return {
722
+ disclaimer: data.disclaimer,
723
+ info: data.info || [],
724
+ reviewedBy: data.reviewed_by ? formatUserProfile(data.reviewed_by) : null,
725
+ reviewedDate: data.reviewed_date,
726
+ metaTag: data.meta_tag,
727
+ };
728
+ };
729
+ const formatBabyGrowthContent = (data) => {
730
+ var _a, _b, _c;
731
+ if (!data || !data.information)
732
+ return {};
733
+ return {
734
+ information: (_a = data.information.map((info) => ({
735
+ title: info.title,
736
+ description: info.description,
737
+ }))) !== null && _a !== void 0 ? _a : [],
738
+ reviewBy: {
739
+ reviewer: ((_b = data.reviewed_by) === null || _b === void 0 ? void 0 : _b.display_name) || ((_c = data.reviewed_by) === null || _c === void 0 ? void 0 : _c.name) || '',
740
+ date: data.reviewed_date || '',
741
+ link: formatUserProfileUrl(data === null || data === void 0 ? void 0 : data.reviewed_by),
742
+ },
743
+ metaTag: data.meta_tag || '',
744
+ title: data.title || '',
745
+ description: data.description || '',
746
+ disclaimer: data.disclaimer || '',
747
+ is_sponsored: data.is_sponsored || false,
748
+ sponsor: data.sponsor,
749
+ featuredImage: data.featured_image || '',
750
+ };
751
+ };
752
+
753
+ var dataTransform = /*#__PURE__*/Object.freeze({
754
+ __proto__: null,
755
+ formatAuthor: formatAuthor,
756
+ formatArticleExpert: formatArticleExpert,
757
+ formatSpotlightsSummary: formatSpotlightsSummary,
758
+ TRANSLATE_LANGUAGES: TRANSLATE_LANGUAGES,
759
+ formatTranslateOptions: formatTranslateOptions,
760
+ formatArticle: formatArticle,
761
+ formatUserProfile: formatUserProfile,
762
+ formatBMIResult: formatBMIResult,
763
+ formatSponsor: formatSponsor,
764
+ formatReviewedCategory: formatReviewedCategory,
765
+ formatCategory: formatCategory,
766
+ formatCategoryApi: formatCategoryApi,
767
+ formatFaqsCategory: formatFaqsCategory,
768
+ formatHealthTool: formatHealthTool,
769
+ formatHealthToolTypeCategory: formatHealthToolTypeCategory,
770
+ formatCommunity: formatCommunity,
771
+ formatTopic: formatTopic,
772
+ formatExpertAnswer: formatExpertAnswer,
773
+ formatPost: formatPost,
774
+ formatPostPagination: formatPostPagination,
775
+ formatNotification: formatNotification,
776
+ formatSpotlightsList: formatSpotlightsList,
777
+ formatOvulationInfo: formatOvulationInfo,
778
+ formatSuggestedArticle: formatSuggestedArticle,
779
+ formatTopicHealthTool: formatTopicHealthTool,
780
+ formatComment: formatComment,
781
+ formatReportedPostToPostDetail: formatReportedPostToPostDetail,
782
+ formatTopicSubot: formatTopicSubot,
783
+ formatSiteWideBanner: formatSiteWideBanner,
784
+ formatPWGContent: formatPWGContent,
785
+ formatUserProfileUrl: formatUserProfileUrl,
786
+ formatTHRContent: formatTHRContent,
787
+ formatBabyGrowthContent: formatBabyGrowthContent
788
+ });
789
+
790
+ const StyledUserAvatar = styled.div `
791
+ width: ${(props) => props.size || 40}px;
792
+ height: ${(props) => props.size || 40}px;
793
+ flex-shrink: 0;
794
+ cursor: pointer;
795
+
796
+ img {
797
+ border-radius: 50%;
798
+ }
799
+
800
+ .avatar {
801
+ width: 100%;
802
+ height: 100%;
803
+ object-fit: cover;
804
+ }
805
+
806
+ .avatar-default {
807
+ display: flex;
808
+ align-items: center;
809
+ justify-content: center;
810
+ background-color: ${theme.colors.secondaryBase};
811
+ border-radius: 50%;
812
+ color: white;
813
+ font-size: 1em;
814
+ font-weight: bold;
815
+ line-height: 1;
816
+ }
817
+
818
+ &[data-is-marrybaby='true'] {
819
+ .avatar-default {
820
+ background-color: ${theme.mbColors.pink};
821
+ }
822
+ }
823
+ `;
824
+
825
+ const UserAvatar = (_a) => {
826
+ var { className, isMarryBaby: isMarryBabyProp, style, avatar, username, size } = _a, rest = __rest(_a, ["className", "isMarryBaby", "style", "avatar", "username", "size"]);
827
+ const { data: { env: { isMarryBaby: isMarryBabyContext }, }, } = useContext(TogetherComponentGlobalContext);
828
+ const isMarryBaby = typeof isMarryBabyProp === 'boolean' ? isMarryBabyProp : isMarryBabyContext;
829
+ const [tempAvatar, setTempAvatar] = useState(false);
830
+ return (React__default.createElement(StyledUserAvatar, Object.assign({ "data-is-marrybaby": isMarryBaby, className: className, style: style, size: size }, rest), avatar && !tempAvatar ? (React__default.createElement("img", { loading: "lazy", src: avatar, className: `avatar`, alt: "avatar", onError: () => {
831
+ // e.currentTarget.onerror = null
832
+ if (!tempAvatar)
833
+ setTempAvatar(true);
834
+ } })) : (React__default.createElement("div", { className: "avatar avatar-default" }, username && (username === null || username === void 0 ? void 0 : username.length) > 0 ? username[0].toUpperCase() : 'A'))));
835
+ };
836
+
837
+ export { Popup as P, UserAvatar as U, formatPost as a, formatComment as b, formatCommunity as c, dataTransform as d, formatArticle as e, formatTopic as f, formatCategory as g, formatUserProfileUrl as h };