@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,1124 @@
1
+ import { _ as __rest, a as __awaiter } from './tslib.es6-1b1533a9.js';
2
+ import React__default, { createContext, useState, useEffect } from 'react';
3
+ import { t as theme } from './theme-e74db08c.js';
4
+ import { g as getCookie } from './cookieHelper-d314282c.js';
5
+ import slugify from 'slugify';
6
+ import './index-e612be9c.js';
7
+ import formatString from 'string-format';
8
+ import { i as isProduction } from './isProduction-0ea904dd.js';
9
+
10
+ const Eye = (_a) => {
11
+ var { size, color: colorInit, useCurrentColor, isActive, activeColor } = _a, rest = __rest(_a, ["size", "color", "useCurrentColor", "isActive", "activeColor"]);
12
+ const color = useCurrentColor
13
+ ? 'currentColor'
14
+ : isActive
15
+ ? activeColor
16
+ : colorInit;
17
+ const props = Object.assign({ width: size, height: size }, rest);
18
+ return (React__default.createElement("svg", Object.assign({ width: size, height: size, viewBox: "0 0 18 18", fill: "none" }, props),
19
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.00183 11.6827C9.85164 11.6827 10.5734 11.3852 11.1672 10.7903C11.7609 10.1955 12.0578 9.4731 12.0578 8.62328C12.0578 7.77346 11.7604 7.05168 11.1655 6.45793C10.5706 5.86418 9.84824 5.56731 8.99841 5.56731C8.1486 5.56731 7.42682 5.86474 6.83307 6.45962C6.23932 7.05451 5.94245 7.77686 5.94245 8.62669C5.94245 9.4765 6.23988 10.1983 6.83476 10.792C7.42965 11.3858 8.152 11.6827 9.00183 11.6827ZM9.00012 10.65C8.43762 10.65 7.9595 10.4531 7.56575 10.0594C7.172 9.66561 6.97512 9.18748 6.97512 8.62498C6.97512 8.06248 7.172 7.58436 7.56575 7.19061C7.9595 6.79686 8.43762 6.59998 9.00012 6.59998C9.56262 6.59998 10.0407 6.79686 10.4345 7.19061C10.8282 7.58436 11.0251 8.06248 11.0251 8.62498C11.0251 9.18748 10.8282 9.66561 10.4345 10.0594C10.0407 10.4531 9.56262 10.65 9.00012 10.65ZM9.00012 13.875C7.42128 13.875 5.9773 13.4538 4.66818 12.6115C3.35904 11.7692 2.31409 10.661 1.53333 9.28699C1.47083 9.1793 1.42515 9.07077 1.3963 8.96139C1.36745 8.85201 1.35303 8.73974 1.35303 8.62461C1.35303 8.50947 1.36745 8.39734 1.3963 8.28821C1.42515 8.17908 1.47083 8.07066 1.53333 7.96298C2.31409 6.58894 3.35904 5.48077 4.66818 4.63847C5.9773 3.79616 7.42128 3.375 9.00012 3.375C10.579 3.375 12.0229 3.79616 13.3321 4.63847C14.6412 5.48077 15.6862 6.58894 16.4669 7.96298C16.5294 8.07066 16.5751 8.17919 16.6039 8.28857C16.6328 8.39796 16.6472 8.51022 16.6472 8.62536C16.6472 8.74049 16.6328 8.85263 16.6039 8.96175C16.5751 9.07089 16.5294 9.1793 16.4669 9.28699C15.6862 10.661 14.6412 11.7692 13.3321 12.6115C12.0229 13.4538 10.579 13.875 9.00012 13.875ZM9.00012 12.75C10.4126 12.75 11.7095 12.3781 12.8907 11.6344C14.072 10.8906 14.9751 9.88748 15.6001 8.62498C14.9751 7.36248 14.072 6.35936 12.8907 5.61561C11.7095 4.87186 10.4126 4.49998 9.00012 4.49998C7.58762 4.49998 6.29075 4.87186 5.1095 5.61561C3.92825 6.35936 3.02512 7.36248 2.40012 8.62498C3.02512 9.88748 3.92825 10.8906 5.1095 11.6344C6.29075 12.3781 7.58762 12.75 9.00012 12.75Z", fill: color })));
20
+ };
21
+ Eye.defaultProps = {
22
+ size: 24,
23
+ color: theme.colors.gray600,
24
+ activeColor: theme.colors.primaryBase,
25
+ };
26
+
27
+ const Share = (_a) => {
28
+ var { size, color, activeColor, isActive, isMarryBaby } = _a, rest = __rest(_a, ["size", "color", "activeColor", "isActive", "isMarryBaby"]);
29
+ return isMarryBaby ? (React__default.createElement("svg", Object.assign({ width: size, height: size, viewBox: "0 0 24 24", fill: "none" }, rest),
30
+ React__default.createElement("path", { d: "M18 8L19 8C20.1046 8 21 8.89543 21 10L21 15.155C21 17.3585 19.4253 19.2551 17.2391 19.6848C15.1006 20.1051 8.89937 20.1051 6.76089 19.6848C4.57467 19.2551 3 17.3585 3 15.155L3 10C3 8.89543 3.89543 8 5 8L6 8", stroke: isActive ? activeColor : color, strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }),
31
+ React__default.createElement("path", { d: "M12 13L12 3M12 3L9.5 5.5M12 3L14.5 5.5", stroke: isActive ? activeColor : color, strokeWidth: "1.33333", strokeLinecap: "round", strokeLinejoin: "round" }))) : (React__default.createElement("svg", Object.assign({ width: size, height: size, fill: "none", viewBox: "0 0 24 24" }, rest),
32
+ React__default.createElement("path", { fill: isActive ? activeColor : color, d: "M19 3c-1.652 0-3 1.348-3 3 0 .46.113.895.3 1.285L12.587 11h-4.77A2.999 2.999 0 005 9c-1.652 0-3 1.348-3 3s1.348 3 3 3c1.3 0 2.402-.84 2.816-2h4.77l3.715 3.715c-.188.39-.301.824-.301 1.285 0 1.652 1.348 3 3 3s3-1.348 3-3-1.348-3-3-3c-.46 0-.895.113-1.285.3l-3.3-3.3 3.3-3.3c.39.187.824.3 1.285.3 1.652 0 3-1.348 3-3s-1.348-3-3-3z" })));
33
+ };
34
+ Share.defaultProps = {
35
+ size: 24,
36
+ color: theme.colors.gray600,
37
+ activeColor: theme.colors.primaryBase,
38
+ isActive: false,
39
+ };
40
+
41
+ const Spinner = (_a) => {
42
+ var { size = 24, color, isMarryBaby } = _a, rest = __rest(_a, ["size", "color", "isMarryBaby"]);
43
+ return (React__default.createElement("svg", Object.assign({ style: {
44
+ display: 'block',
45
+ shapeRendering: 'auto',
46
+ }, width: size, height: size, viewBox: "30 30 40 40", preserveAspectRatio: "xMidYMid" }, rest),
47
+ React__default.createElement("circle", { cx: "50", cy: "50", fill: "none", stroke: color || (isMarryBaby ? '#e85388' : '#91caff'), strokeWidth: "7", r: "16", strokeDasharray: "75.39822368615503 27.132741228718345" },
48
+ React__default.createElement("animateTransform", { attributeName: "transform", type: "rotate", repeatCount: "indefinite", dur: "1.2s", values: "0 50 50;360 50 50", keyTimes: "0;1" }))));
49
+ };
50
+ Spinner.defaultProps = {
51
+ size: 24,
52
+ };
53
+
54
+ const WhatsApp = (_a) => {
55
+ var { size, color: colorInit, useCurrentColor, isActive, activeColor } = _a, rest = __rest(_a, ["size", "color", "useCurrentColor", "isActive", "activeColor"]);
56
+ const color = useCurrentColor
57
+ ? 'currentColor'
58
+ : isActive
59
+ ? activeColor
60
+ : colorInit;
61
+ const props = Object.assign({ width: size, height: size }, rest);
62
+ return (React__default.createElement("svg", Object.assign({ viewBox: "0 0 16 16", fill: "none" }, props),
63
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.00132 0.125C3.65869 0.125 0.12632 3.65737 0.12632 8C0.12632 9.52948 0.558762 10.9952 1.38268 12.2698L0.185496 14.9054C0.0762474 15.1467 0.117216 15.4335 0.290192 15.6337C0.422201 15.7885 0.613386 15.875 0.813675 15.875C0.872851 15.875 0.93658 15.8659 0.995756 15.8522L4.29142 14.9464C5.42943 15.5564 6.70399 15.875 8.00132 15.875C12.344 15.875 15.8763 12.3426 15.8763 8C15.8763 3.65737 12.344 0.125 8.00132 0.125ZM8.00132 14.5003C6.84966 14.5003 5.72076 14.1953 4.72842 13.6172C4.62372 13.5535 4.50081 13.5216 4.38246 13.5216C4.32329 13.5216 4.25956 13.5307 4.20038 13.5444L2.04727 14.1361L2.79836 12.4837C2.8985 12.2607 2.87574 11.9967 2.73008 11.7964C1.92892 10.6857 1.50558 9.37016 1.50558 8C1.50558 4.41756 4.41888 1.49971 8.00587 1.49971C11.5883 1.49971 14.5062 4.41301 14.5062 8C14.5016 11.5824 11.5838 14.5003 8.00132 14.5003Z", fill: color }),
64
+ React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0279 9.17924C10.7002 8.9835 10.2677 8.76045 9.88083 8.91978C9.58494 9.04268 9.39376 9.50699 9.19802 9.74824C9.09788 9.87115 8.97952 9.88936 8.82931 9.83018C7.70951 9.38408 6.85373 8.63755 6.23465 7.60879C6.12996 7.44947 6.14817 7.32202 6.27562 7.17635C6.46226 6.95785 6.69441 6.70749 6.74448 6.41161C6.79455 6.11573 6.65799 5.76978 6.53509 5.50576C6.38032 5.16891 6.20279 4.69095 5.86594 4.49976C5.5564 4.32678 5.14672 4.42238 4.86905 4.64543C4.39108 5.03235 4.16348 5.64232 4.16804 6.24319C4.16804 6.41616 4.1908 6.58459 4.23176 6.75301C4.32736 7.14904 4.51399 7.5223 4.71883 7.87736C4.8736 8.14138 5.04658 8.40084 5.22866 8.65121C5.82497 9.46602 6.5715 10.1716 7.43184 10.6996C7.86428 10.9636 8.32858 11.1958 8.80655 11.3551C9.34369 11.5326 9.8262 11.7193 10.4089 11.61C11.0188 11.4962 11.6197 11.1184 11.861 10.5312C11.9338 10.3582 11.9702 10.1625 11.9292 9.9804C11.8473 9.58892 11.3329 9.36132 11.0279 9.17924Z", fill: color })));
65
+ };
66
+ WhatsApp.defaultProps = {
67
+ size: 24,
68
+ color: theme.colors.gray600,
69
+ activeColor: theme.colors.primaryBase,
70
+ };
71
+
72
+ /*!
73
+ * cookie
74
+ * Copyright(c) 2012-2014 Roman Shtylman
75
+ * Copyright(c) 2015 Douglas Christopher Wilson
76
+ * MIT Licensed
77
+ */
78
+
79
+ /**
80
+ * Module exports.
81
+ * @public
82
+ */
83
+
84
+ var parse_1 = parse;
85
+ var serialize_1 = serialize;
86
+
87
+ /**
88
+ * Module variables.
89
+ * @private
90
+ */
91
+
92
+ var __toString = Object.prototype.toString;
93
+
94
+ /**
95
+ * RegExp to match field-content in RFC 7230 sec 3.2
96
+ *
97
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
98
+ * field-vchar = VCHAR / obs-text
99
+ * obs-text = %x80-FF
100
+ */
101
+
102
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
103
+
104
+ /**
105
+ * Parse a cookie header.
106
+ *
107
+ * Parse the given cookie header string into an object
108
+ * The object has the various cookies as keys(names) => values
109
+ *
110
+ * @param {string} str
111
+ * @param {object} [options]
112
+ * @return {object}
113
+ * @public
114
+ */
115
+
116
+ function parse(str, options) {
117
+ if (typeof str !== 'string') {
118
+ throw new TypeError('argument str must be a string');
119
+ }
120
+
121
+ var obj = {};
122
+ var opt = options || {};
123
+ var dec = opt.decode || decode;
124
+
125
+ var index = 0;
126
+ while (index < str.length) {
127
+ var eqIdx = str.indexOf('=', index);
128
+
129
+ // no more cookie pairs
130
+ if (eqIdx === -1) {
131
+ break
132
+ }
133
+
134
+ var endIdx = str.indexOf(';', index);
135
+
136
+ if (endIdx === -1) {
137
+ endIdx = str.length;
138
+ } else if (endIdx < eqIdx) {
139
+ // backtrack on prior semicolon
140
+ index = str.lastIndexOf(';', eqIdx - 1) + 1;
141
+ continue
142
+ }
143
+
144
+ var key = str.slice(index, eqIdx).trim();
145
+
146
+ // only assign once
147
+ if (undefined === obj[key]) {
148
+ var val = str.slice(eqIdx + 1, endIdx).trim();
149
+
150
+ // quoted values
151
+ if (val.charCodeAt(0) === 0x22) {
152
+ val = val.slice(1, -1);
153
+ }
154
+
155
+ obj[key] = tryDecode(val, dec);
156
+ }
157
+
158
+ index = endIdx + 1;
159
+ }
160
+
161
+ return obj;
162
+ }
163
+
164
+ /**
165
+ * Serialize data into a cookie header.
166
+ *
167
+ * Serialize the a name value pair into a cookie string suitable for
168
+ * http headers. An optional options object specified cookie parameters.
169
+ *
170
+ * serialize('foo', 'bar', { httpOnly: true })
171
+ * => "foo=bar; httpOnly"
172
+ *
173
+ * @param {string} name
174
+ * @param {string} val
175
+ * @param {object} [options]
176
+ * @return {string}
177
+ * @public
178
+ */
179
+
180
+ function serialize(name, val, options) {
181
+ var opt = options || {};
182
+ var enc = opt.encode || encode;
183
+
184
+ if (typeof enc !== 'function') {
185
+ throw new TypeError('option encode is invalid');
186
+ }
187
+
188
+ if (!fieldContentRegExp.test(name)) {
189
+ throw new TypeError('argument name is invalid');
190
+ }
191
+
192
+ var value = enc(val);
193
+
194
+ if (value && !fieldContentRegExp.test(value)) {
195
+ throw new TypeError('argument val is invalid');
196
+ }
197
+
198
+ var str = name + '=' + value;
199
+
200
+ if (null != opt.maxAge) {
201
+ var maxAge = opt.maxAge - 0;
202
+
203
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
204
+ throw new TypeError('option maxAge is invalid')
205
+ }
206
+
207
+ str += '; Max-Age=' + Math.floor(maxAge);
208
+ }
209
+
210
+ if (opt.domain) {
211
+ if (!fieldContentRegExp.test(opt.domain)) {
212
+ throw new TypeError('option domain is invalid');
213
+ }
214
+
215
+ str += '; Domain=' + opt.domain;
216
+ }
217
+
218
+ if (opt.path) {
219
+ if (!fieldContentRegExp.test(opt.path)) {
220
+ throw new TypeError('option path is invalid');
221
+ }
222
+
223
+ str += '; Path=' + opt.path;
224
+ }
225
+
226
+ if (opt.expires) {
227
+ var expires = opt.expires;
228
+
229
+ if (!isDate(expires) || isNaN(expires.valueOf())) {
230
+ throw new TypeError('option expires is invalid');
231
+ }
232
+
233
+ str += '; Expires=' + expires.toUTCString();
234
+ }
235
+
236
+ if (opt.httpOnly) {
237
+ str += '; HttpOnly';
238
+ }
239
+
240
+ if (opt.secure) {
241
+ str += '; Secure';
242
+ }
243
+
244
+ if (opt.priority) {
245
+ var priority = typeof opt.priority === 'string'
246
+ ? opt.priority.toLowerCase()
247
+ : opt.priority;
248
+
249
+ switch (priority) {
250
+ case 'low':
251
+ str += '; Priority=Low';
252
+ break
253
+ case 'medium':
254
+ str += '; Priority=Medium';
255
+ break
256
+ case 'high':
257
+ str += '; Priority=High';
258
+ break
259
+ default:
260
+ throw new TypeError('option priority is invalid')
261
+ }
262
+ }
263
+
264
+ if (opt.sameSite) {
265
+ var sameSite = typeof opt.sameSite === 'string'
266
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
267
+
268
+ switch (sameSite) {
269
+ case true:
270
+ str += '; SameSite=Strict';
271
+ break;
272
+ case 'lax':
273
+ str += '; SameSite=Lax';
274
+ break;
275
+ case 'strict':
276
+ str += '; SameSite=Strict';
277
+ break;
278
+ case 'none':
279
+ str += '; SameSite=None';
280
+ break;
281
+ default:
282
+ throw new TypeError('option sameSite is invalid');
283
+ }
284
+ }
285
+
286
+ return str;
287
+ }
288
+
289
+ /**
290
+ * URL-decode string value. Optimized to skip native call when no %.
291
+ *
292
+ * @param {string} str
293
+ * @returns {string}
294
+ */
295
+
296
+ function decode (str) {
297
+ return str.indexOf('%') !== -1
298
+ ? decodeURIComponent(str)
299
+ : str
300
+ }
301
+
302
+ /**
303
+ * URL-encode value.
304
+ *
305
+ * @param {string} str
306
+ * @returns {string}
307
+ */
308
+
309
+ function encode (val) {
310
+ return encodeURIComponent(val)
311
+ }
312
+
313
+ /**
314
+ * Determine if value is a Date.
315
+ *
316
+ * @param {*} val
317
+ * @private
318
+ */
319
+
320
+ function isDate (val) {
321
+ return __toString.call(val) === '[object Date]' ||
322
+ val instanceof Date
323
+ }
324
+
325
+ /**
326
+ * Try decoding a string using a decoding function.
327
+ *
328
+ * @param {string} str
329
+ * @param {function} decode
330
+ * @private
331
+ */
332
+
333
+ function tryDecode(str, decode) {
334
+ try {
335
+ return decode(str);
336
+ } catch (e) {
337
+ return str;
338
+ }
339
+ }
340
+
341
+ var cookie = {
342
+ parse: parse_1,
343
+ serialize: serialize_1
344
+ };
345
+
346
+ const PATHS = {
347
+ BASE_API_PATH: '/',
348
+ PROFILE: 'profile?website_url={website_url}',
349
+ SEARCH_USER: 'profile/search?website_url={website_url}&name={name}',
350
+ FETCH_PREVIEW: 'fetch/preview?website_url={website_url}',
351
+ FETCH_POST_OR_TOPIC: 'fetch/{slug}?website_url={website_url}&community_slug={communitySlug}',
352
+ POST: {
353
+ LIST: 'post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}',
354
+ DETAIL_BY_ID_OR_SLUG: 'post/{idSlug}?website_url={website_url}',
355
+ CREATE: 'post/create?website_url={website_url}',
356
+ LIKE: 'post/{id}/like?website_url={website_url}',
357
+ DELETE: 'post/{id}/delete?website_url={website_url}',
358
+ REPORT: 'post/{id}/report?website_url={website_url}',
359
+ UPDATE: 'post/{id}/update?website_url={website_url}',
360
+ FOLLOW: 'post/{id}/follow?website_url={website_url}',
361
+ CREATE_ARTICLE_COMMENT: 'article-comment/create?website_url={website_url}',
362
+ },
363
+ COMMENT: {
364
+ LIST: 'comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}',
365
+ CREATE: 'comment/create?website_url={website_url}',
366
+ REPLY: 'comment/reply?website_url={website_url}',
367
+ DELETE: 'comment/{id}/delete?website_url={website_url}',
368
+ LIKE: 'comment/{id}/like?website_url={website_url}',
369
+ UNLIKE: 'comment/{id}/unlike?website_url={website_url}',
370
+ IMAGE_UPLOAD: 'comment/image/upload?website_url={website_url}',
371
+ },
372
+ COMMUNITY: {
373
+ LIST: 'community?website_url={website_url}&page={page}',
374
+ DETAIL_BY_ID_OR_SLUG: 'community/{idSlug}?website_url={website_url}',
375
+ JOIN: 'community/join?website_url={website_url}',
376
+ LEAVE: 'community/leave?website_url={website_url}',
377
+ },
378
+ TOPIC: {
379
+ LIST: 'topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}',
380
+ DETAIL_BY_ID_OR_SLUG: 'topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}',
381
+ HEALTH_TOOLS: 'tools?topic_id={topicId}&website_url={website_url}',
382
+ SUBOTS: 'subots?topic_id={topicId}&website_url={website_url}',
383
+ SUGGESTED_POSTS: 'suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}',
384
+ JOIN: 'topic/join?website_url={website_url}',
385
+ LEAVE: 'topic/leave?website_url={website_url}',
386
+ },
387
+ BOOKMARK: {
388
+ LIST: 'bookmark?user_id={userId}&website_url={website_url}',
389
+ CREATE: 'bookmark/create?website_url={website_url}',
390
+ DELETE: 'bookmark/delete?website_url={website_url}',
391
+ },
392
+ // OLD
393
+ UPLOAD_IMAGE: 'auth/comment/image/upload?website_url={website_url}',
394
+ GET_DUE_DATE_INFO: 'health-tools/due-date-calculator/info',
395
+ USER: {
396
+ DETAIL: 'profile/user/detail?website_url={website_url}&user_id={id}',
397
+ COUNT_TABS: 'profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}',
398
+ LIST_POST: 'profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none',
399
+ LIST_QUESTION_NEED_REPLY: 'questions/no-reply?website_url={website_url}',
400
+ LIST_QUESTION: 'question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}',
401
+ SKIP_QUESTION: 'questions/ignore?website_url={website_url}&question_id={id}',
402
+ LIST_ANSWERS: 'replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}',
403
+ },
404
+ HEALTH_TOOL: {
405
+ CREATE: 'health-profile/{type}/create?website_url={website_url}',
406
+ GET_STATUS: 'health-profile/get-status-for-user?website_url={website_url}',
407
+ },
408
+ };
409
+ const CARE_PATHS = {
410
+ GET_DOCTOR_INFO: 'api/doctors/{doctorId}?site={website_url}',
411
+ GET_HOSPITAL_INFO: 'api/hospital/branch/{hospital_branch_id}?site={website_url}',
412
+ };
413
+ const DISCOVER_PATHS = {
414
+ BASE_API_PATH: '/',
415
+ GET_SEARCH_ARTICLES: 'search?s={keyword}&page={page}',
416
+ // GET_TOP_CATEGORIES: 'categories',
417
+ GET_ALL_CATEGORIES: 'categories?type=all',
418
+ GET_HOMEPAGE_POSTS: 'home/trending-post?type={type}',
419
+ GET_HOMEPAGE_LATEST_POSTS: 'articles?page=1&_islatest=1',
420
+ GET_ARTICLE_DETAIL: 'article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}',
421
+ GET_CATEGORY_DETAIL: 'category/{slug}',
422
+ GET_CATEGORY_OR_ARTICLE_DETAIL: 'fetch/{fullSlug}',
423
+ GET_PREVIEW_ARTICLE: 'fetch/{fullSlug}?preview_nonce={nonce}&preview=true',
424
+ GET_ARTICLE_OF_CATEGORY: 'articles?category_id={categoryId}&page={currentPage}',
425
+ GET_PAGE_STATIC: 'page/{slug}',
426
+ GET_ALL_HEALTH_TOOLS: 'healthtools',
427
+ GET_ALL_MARRYBABY_HEALTH_TOOLS: 'health-tools',
428
+ GET_HEALTH_TOOLS_BY_CATEGORY: 'healthtools?_hasgroup=1',
429
+ GET_AUTHOR: 'author/{slug}',
430
+ GET_ALL_EXPERTS: 'experts',
431
+ GET_ALL_EXPERTS_PAGING: 'experts?page={page}',
432
+ GET_EXPERT: 'expert/{slug}',
433
+ GET_EXPERT_POST: 'expert/article?page={page}',
434
+ POST_ARTICLE_FEEDBACK: 'article/feedback/{id}',
435
+ GET_AZ_DRUGS: 'category/a-z/{category}',
436
+ GET_HOMEPAGE_MEDICAL_REVIEWED: 'home/medical-reviewed',
437
+ GET_ARTICLES_BY_IDS: 'articles?ids={ids}',
438
+ GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS: 'articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}',
439
+ GET_EXPERT_OF_CATEGORY: 'category/expert/?id={id}',
440
+ GET_DUE_DATE_INFO: 'health-tools/due-date-calculator/info',
441
+ GET_DUE_DATE_ALL_WEEKS: 'health-tools/due-date-calculator/all',
442
+ GET_DUE_DATE_SUGGESTED_ARTICLES: 'health-tools/due-date-calculator/result?from_week={from}&to_week={to}',
443
+ GET_PROFILE: 'user/profile',
444
+ GET_ADMIN_PROFILE: 'GET_ADMIN_PROFILE',
445
+ GET_FEATURE: 'feature',
446
+ POST_NEW_FEATURE: 'feature/update',
447
+ CREATE_BOOKMARK: 'bookmark/create',
448
+ DELETE_BOOKMARK: 'bookmark/delete',
449
+ DELETE_ALL_BOOKMARK: 'bookmark/delete-all',
450
+ GET_ALL_BOOKMARK: 'bookmark',
451
+ SSO_USER_PROFILE: 'user',
452
+ SSO_USER_BOOKMARKS: 'user/bookmarks',
453
+ SSO_USER_PASSWORD: 'user/settings/password',
454
+ SSO_USER_EMAIL: 'user/settings/update-email',
455
+ SSO_CLOSE_ACCOUNT: 'user/settings/close-account',
456
+ SSO_HELP: 'user/settings/help',
457
+ GET_HEALTH_TOOL_OVULATION_INFO: 'health-tools/ovulation-calculator/info',
458
+ GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES: 'health-tools/ovulation-calculator/result?method={method}',
459
+ GET_HEALTH_TOOL_BMI_INFO: 'health-tools/bmi-calculator/info',
460
+ GET_HEALTH_TOOL_BMI_RESULT: 'health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}',
461
+ GET_HEALTH_TOOL_BMR_INFO: 'health-tools/bmr-calculator/info',
462
+ GET_HEALTH_TOOL_BMR_RESULT: 'health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}',
463
+ GET_HEALTH_TOOL_PWG_INFO: 'health-tools/preweight-gain-calculator/info',
464
+ GET_HEALTH_TOOL_THR_INFO: 'health-tools/target-heart-rate/info',
465
+ GET_HEALTH_TOOL_BABY_GROWTH_INFO: 'health-tools/baby-growth-tracking/info',
466
+ POST_UPDATE_LOCATION: 'tracking/geo/',
467
+ // SIDIS
468
+ GET_SIDIS_DUE_DATE: 'frontend/tools/due_date',
469
+ GET_SIDIS_OVULATION: 'frontend/tools/ovulation',
470
+ GET_SIDIS_BMI: 'frontend/tools/bmi',
471
+ GET_SIDIS_BMR: 'frontend/tools/bmr',
472
+ POST_LOGOUT: 'user/logout',
473
+ OVULATION_CREATE_EVENT: 'ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}',
474
+ GET_ALL_SPOTLIGHT: 'spotlights?per_page={perPage}&order_by={orderBy}',
475
+ SSO_UPDATE_FIRST_TIME_BOOKMARK: 'bookmark/update-first-time',
476
+ POST_COMMENT_NOTIFICATION: 'comment/notification',
477
+ GET_ABOUT_US_DATA: 'about',
478
+ POST_LEAD_IMPRESSION: 'campaign/{campaignCode}/impression',
479
+ POST_LEAD_POPUP_EXIT: 'campaign/{campaignCode}/popup_exit',
480
+ POST_LEAD_LEAD: 'campaign/{campaignCode}/lead',
481
+ POST_SSO_VERIFY_TOKEN: 'verify-id-token',
482
+ GET_LANDING_PAGE_FIRST_NODE: 'landing_page/bot',
483
+ GET_LANDING_PAGE_NEXT_NODE: 'landing_page/messages',
484
+ POST_LANDING_PAGE_IMPRESSION: 'landing_page/impressions',
485
+ POST_LANDING_PAGE_CLICK: 'landing_page/clicks',
486
+ FETCH_URL_DATA: 'preview',
487
+ GET_SPOTLIGHT_LANDING: 'spotlight/{slug}',
488
+ GET_FOOTER_INFO: 'footer',
489
+ CHECK_SSO_EMAIL: 'member/check-email',
490
+ GET_HOMEPAGE_SITEWIDE_BANNER: 'home/sitewide-banner',
491
+ GET_DYNAMIC_FOOTER: 'menu/footer',
492
+ GET_EXPERTS: 'experts?page={page}&number={perPage}&s={search}',
493
+ GET_EXPERT_BY_ID: 'expert/{id}',
494
+ };
495
+ const ADMIN_PATHS = {
496
+ SEARCH_USER: 'admin/profile/search?website_url={website_url}&name={name}',
497
+ COMMENT: {
498
+ IMAGE_UPLOAD: 'admin/comment/image/upload?website_url={website_url}',
499
+ },
500
+ };
501
+
502
+ const DefaultComponentGlobalContextData = {
503
+ locale: 'vi-VN',
504
+ env: {
505
+ isMarryBaby: false,
506
+ togetherBasePath: '/community',
507
+ },
508
+ router: {
509
+ basePath: '',
510
+ asPath: '/',
511
+ },
512
+ };
513
+ const TogetherComponentGlobalContext = createContext({
514
+ data: DefaultComponentGlobalContextData,
515
+ action: {
516
+ pushNotifications: (s) => s,
517
+ sanitizeFunction: (s) => s,
518
+ },
519
+ formatMessage: () => null,
520
+ });
521
+ let GlobalData = DefaultComponentGlobalContextData;
522
+ const TogetherComponentGlobalContextProvider = ({ locale = 'vi-VN', children, userInfo, router, env = {
523
+ isMarryBaby: false,
524
+ togetherBasePath: '/community',
525
+ }, sanitizeFunction = (s) => s, pushNotifications = () => false, formatMessage, }) => {
526
+ const [togetherUserId, setTogetherUserId] = useState();
527
+ GlobalData = {
528
+ userInfo,
529
+ locale,
530
+ togetherUserId,
531
+ router,
532
+ env,
533
+ };
534
+ useEffect(() => {
535
+ if (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) {
536
+ callApiWithAuth(getApiPath(PATHS.PROFILE, {
537
+ _locale: locale,
538
+ }), 'GET').then((res) => {
539
+ var _a;
540
+ setTogetherUserId((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.id);
541
+ });
542
+ }
543
+ }, [userInfo === null || userInfo === void 0 ? void 0 : userInfo.id]);
544
+ return (React__default.createElement(TogetherComponentGlobalContext.Provider, { value: {
545
+ data: {
546
+ userInfo,
547
+ locale,
548
+ togetherUserId,
549
+ router,
550
+ env,
551
+ },
552
+ action: {
553
+ pushNotifications,
554
+ sanitizeFunction,
555
+ },
556
+ formatMessage,
557
+ } }, children));
558
+ };
559
+
560
+ const POST_DATE_FORMAT = 'dd/MM/yyyy';
561
+ const NORMAL_DATE_FORMAT = 'YYYY-MM-DD';
562
+ const DUE_DATE_FORMAT = 'DD/MM/YYYY';
563
+ const DEFAULT_AVATAR_IMG = `/images/avatar.jpg`;
564
+ const DEFAULT_RESULT_IMG = `/images/default.png`;
565
+ const DEFAULT_IMG = `/images/default-image.jpg`;
566
+ const BMI_LEVELS = [
567
+ 'underweight',
568
+ 'healthy',
569
+ 'overweight',
570
+ 'obese_level_1',
571
+ 'obese_level_2',
572
+ ];
573
+ const BMR_LEVELS = ['low', 'normal', 'high'];
574
+ const CORAL_TOKEN_COOKE = 'coral_together_user_token';
575
+ const HEALTH_TOOL_TYPE = {
576
+ DUE_DATE: 'DUE_DATE',
577
+ BMI: 'BMI',
578
+ BMR: 'BMR',
579
+ OVULATION: 'OVULATION',
580
+ IFRAME: 'IFRAME',
581
+ PWG: 'PWG',
582
+ THR: 'THR',
583
+ BGC: 'BGC',
584
+ };
585
+ const LOCALE_HEALTH_TOOLS = {
586
+ 'id-ID': {
587
+ 'kalkulator-bmi': HEALTH_TOOL_TYPE.BMI,
588
+ 'kebutuhan-kalori': HEALTH_TOOL_TYPE.BMR,
589
+ 'kalkulator-hari-perkiraan-lahir': HEALTH_TOOL_TYPE.DUE_DATE,
590
+ 'kalkulator-masa-subur-2': HEALTH_TOOL_TYPE.OVULATION,
591
+ 'kalkulator-kenaikan-berat-badan-ibu-hamil': HEALTH_TOOL_TYPE.PWG,
592
+ 'kalkulator-detak-jantung-saat-olahraga': HEALTH_TOOL_TYPE.THR,
593
+ },
594
+ 'ms-MY': {
595
+ 'kalkulator-bmi': HEALTH_TOOL_TYPE.BMI,
596
+ 'kalkulator-bmr': HEALTH_TOOL_TYPE.BMR,
597
+ 'kalkulator-tarikh-bersalin': HEALTH_TOOL_TYPE.DUE_DATE,
598
+ 'kalkulator-kesuburan': HEALTH_TOOL_TYPE.OVULATION,
599
+ 'kalkulator-tambah-berat-badan-hamil': HEALTH_TOOL_TYPE.PWG,
600
+ 'target-heart-rate-calculator': HEALTH_TOOL_TYPE.THR,
601
+ },
602
+ 'vi-VN': {
603
+ 'cach-tinh-chi-so-bmi': HEALTH_TOOL_TYPE.BMI,
604
+ 'tinh-chi-so-bmr': HEALTH_TOOL_TYPE.BMR,
605
+ 'cong-cu-tinh-ngay-du-sinh': HEALTH_TOOL_TYPE.DUE_DATE,
606
+ 'tinh-ngay-rung-trung': HEALTH_TOOL_TYPE.OVULATION,
607
+ 'cong-cu-tinh-can-nang-khi-mang-thai': HEALTH_TOOL_TYPE.PWG,
608
+ 'cong-cu-do-nhip-tim': HEALTH_TOOL_TYPE.THR,
609
+ },
610
+ 'zh-TW': {
611
+ 'bmi-calculator': HEALTH_TOOL_TYPE.BMI,
612
+ 'bmr-calculator': HEALTH_TOOL_TYPE.BMR,
613
+ 'due-date-calculator': HEALTH_TOOL_TYPE.DUE_DATE,
614
+ 'ovulation-calculator': HEALTH_TOOL_TYPE.OVULATION,
615
+ 'pregnancy-weight-gain-calculator': HEALTH_TOOL_TYPE.PWG,
616
+ 'target-heart-rate-calculator': HEALTH_TOOL_TYPE.THR,
617
+ },
618
+ 'en-PH': {
619
+ 'bmi-calculator': HEALTH_TOOL_TYPE.BMI,
620
+ 'bmr-calculator': HEALTH_TOOL_TYPE.BMR,
621
+ 'due-date-calculator': HEALTH_TOOL_TYPE.DUE_DATE,
622
+ 'ovulation-calculator': HEALTH_TOOL_TYPE.OVULATION,
623
+ 'pregnancy-weight-gain-calculator': HEALTH_TOOL_TYPE.PWG,
624
+ 'target-heart-rate-calculator': HEALTH_TOOL_TYPE.THR,
625
+ },
626
+ 'th-TH': {
627
+ 'เครื่องคำนวณหา-ค่าดัชนี': HEALTH_TOOL_TYPE.BMI,
628
+ 'เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr': HEALTH_TOOL_TYPE.BMR,
629
+ เครื่องมือคำนวณกำหนดคลอด: HEALTH_TOOL_TYPE.DUE_DATE,
630
+ 'เครื่องคำนวณการตกไข่-ovulation-calculat': HEALTH_TOOL_TYPE.OVULATION,
631
+ เครื่องคำนวณน้ำหนักตัว: HEALTH_TOOL_TYPE.PWG,
632
+ เครื่องวัดอัตราการเต้น: HEALTH_TOOL_TYPE.THR,
633
+ },
634
+ 'hi-IN': {
635
+ 'bmi-calculator-en': HEALTH_TOOL_TYPE.BMI,
636
+ 'bmi-calculator': HEALTH_TOOL_TYPE.BMI,
637
+ 'bmr-calculator': HEALTH_TOOL_TYPE.BMR,
638
+ 'delivery-date-calculator': HEALTH_TOOL_TYPE.DUE_DATE,
639
+ 'ovulation-calculator': HEALTH_TOOL_TYPE.OVULATION,
640
+ 'pregnancy-weight-gain-calculator': HEALTH_TOOL_TYPE.PWG,
641
+ 'target-heart-rate-calculator': HEALTH_TOOL_TYPE.THR,
642
+ },
643
+ 'km-KH': {
644
+ 'គណនា-bmi': HEALTH_TOOL_TYPE.BMI,
645
+ 'គណនា-bmr': HEALTH_TOOL_TYPE.BMR,
646
+ គណនាថ្ងៃសម្រាលកូន: HEALTH_TOOL_TYPE.DUE_DATE,
647
+ គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់: HEALTH_TOOL_TYPE.OVULATION,
648
+ គណនាទម្ងន់ស្ត្រីពពោះ: HEALTH_TOOL_TYPE.PWG,
649
+ គណនារកចង្វាក់បេះដូងល្អ: HEALTH_TOOL_TYPE.THR,
650
+ },
651
+ 'my-MM': {
652
+ 'bmi-calculator': HEALTH_TOOL_TYPE.BMI,
653
+ 'bmr-calculator': HEALTH_TOOL_TYPE.BMR,
654
+ 'due-date-calendar': HEALTH_TOOL_TYPE.DUE_DATE,
655
+ 'ovulation-calculator': HEALTH_TOOL_TYPE.OVULATION,
656
+ 'pregnaancy-weight-calculator': HEALTH_TOOL_TYPE.PWG,
657
+ 'target-heartrate': HEALTH_TOOL_TYPE.THR,
658
+ 'pregnancy-weight-calculator': HEALTH_TOOL_TYPE.PWG,
659
+ 'target-heart-rate': HEALTH_TOOL_TYPE.THR,
660
+ },
661
+ };
662
+ const BEARER_TOKEN_COOKIE = 'hhg_user_token';
663
+ const TOGETHER_DISCLAIMER_COOKIE = 'hhg_together_disclaimer';
664
+ const BEARER_ADMIN_TOKEN_COOKIE = 'together_admin_token';
665
+ const Z_INDEX = {
666
+ adBlock: 48,
667
+ articleAdContainer: 47,
668
+ headerContainerHome: 99,
669
+ headerContainerPopup: 200,
670
+ headerContainerPopupSUbLevel: 300,
671
+ menuSearchInputPopup: 5,
672
+ menuSearchInputDisplayIcon: 6,
673
+ menuSearchPopup: 200,
674
+ };
675
+ const BmrActiveLevels = [
676
+ {
677
+ value: 'sedentary',
678
+ icon: 'bmr-sedentary',
679
+ //'/images/toolsBMRSedentary.svg',
680
+ name: 'bmr.activeLevel.sedentary',
681
+ description: 'bmr.activeLevel.sedentary.description',
682
+ },
683
+ {
684
+ value: 'lightly-active',
685
+ icon: 'bmr-light',
686
+ // icon: '/images/toolsBMRLightlyActive.svg',
687
+ name: 'bmr.activeLevel.lightlyActive',
688
+ description: 'bmr.activeLevel.lightlyActive.description',
689
+ },
690
+ {
691
+ value: 'moderately-active',
692
+ icon: 'bmr-moderately',
693
+ // icon: '/images/toolsBMRModeratelyActive.svg',
694
+ name: 'bmr.activeLevel.moderatelyActive',
695
+ description: 'bmr.activeLevel.moderatelyActive.description',
696
+ },
697
+ {
698
+ value: 'intensely-active',
699
+ icon: 'bmr-intensively',
700
+ // icon: '/images/toolsBMRIntenselyActive.svg',
701
+ name: 'bmr.activeLevel.intenselyActive',
702
+ description: 'bmr.activeLevel.intenselyActive.description',
703
+ },
704
+ {
705
+ value: 'extremely-active',
706
+ icon: 'bmr-extremely',
707
+ // icon: '/images/toolsBMRExtremelyActive.svg',
708
+ name: 'bmr.activeLevel.extremelyActive',
709
+ description: 'bmr.activeLevel.extremelyActive.description',
710
+ },
711
+ ];
712
+ const LEAD_CAMPAIGN_CODE = 'lmoct7xfr5sv4fv';
713
+ const LEAD_TOKEN_COOKIE = 'hhg-id';
714
+ const GA_TOKEN_COOKIE = '_ga';
715
+ const GOOGLE_CALENDAR_AUTH_CLIENT_ID = '1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com';
716
+ const FIND_CARE_IFRAME_URL = 'https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu';
717
+ const REPORT_REASON_MAP = {
718
+ report_scam: {
719
+ label: 'morePopover.report.scam',
720
+ reportReasonText: 'morePopover.report.scam',
721
+ },
722
+ report_sex: {
723
+ label: 'morePopover.report.sex',
724
+ reportReasonText: 'morePopover.report.sex',
725
+ },
726
+ report_offensive: {
727
+ label: 'morePopover.report.offensive',
728
+ reportReasonText: 'morePopover.report.offensive',
729
+ },
730
+ report_violence: {
731
+ label: 'morePopover.report.violence',
732
+ reportReasonText: 'morePopover.report.violence',
733
+ },
734
+ report_prohibited: {
735
+ label: 'morePopover.report.prohibited',
736
+ reportReasonText: 'morePopover.report.prohibited',
737
+ },
738
+ report_spam: {
739
+ label: 'morePopover.report.spam',
740
+ reportReasonText: 'morePopover.report.spam',
741
+ },
742
+ report_falseNews: {
743
+ label: 'morePopover.report.falseNews',
744
+ reportReasonText: 'morePopover.report.falseNews',
745
+ },
746
+ report_other: {
747
+ label: 'morePopover.report.other',
748
+ reportReasonText: 'morePopover.report.other',
749
+ },
750
+ };
751
+ const MB_SOCIAL_LINKS = {
752
+ LINKEDIN: 'https://www.linkedin.com/company/hello-health-group/',
753
+ FACEBOOK: 'https://www.facebook.com/marry.baby.vn',
754
+ INSTAGRAM: 'https://www.instagram.com/marrybaby.vn/',
755
+ TWITTER: '',
756
+ YOUTUBE: 'https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg',
757
+ ZALO: 'http://zalo.me/806483414530291942',
758
+ };
759
+ const INTERNAL_ROLES = ['admin', 'moderator', 'local-admin'];
760
+ const EXTERNAL_ROLES = [
761
+ 'ambassador',
762
+ 'expert',
763
+ 'sponsor',
764
+ 'guide',
765
+ 'influencer',
766
+ ];
767
+ const INTERNAL_PROFILE_ROLES = ['moderator', 'local-admin'];
768
+ const EXTERNAL_PROFILE_ROLES = ['expert', 'ambassador', 'sponsor'];
769
+ const RoleDataMap = {
770
+ moderator: {
771
+ text: 'Moderator',
772
+ fid: 'cardAuthor.moderator',
773
+ background: '#fe921d',
774
+ },
775
+ admin: {
776
+ text: 'Admin',
777
+ fid: 'cardAuthor.admin',
778
+ background: '#2b62cd',
779
+ },
780
+ 'local-admin': {
781
+ text: 'Local admin',
782
+ fid: 'cardAuthor.localAdmin',
783
+ background: '#2b62cd',
784
+ },
785
+ expert: {
786
+ text: 'Expert',
787
+ fid: 'cardAuthor.expert',
788
+ background: '#ff6f4d',
789
+ },
790
+ sponsor: {
791
+ text: 'Sponsor',
792
+ fid: 'cardAuthor.sponsor',
793
+ background: '#00c7e6',
794
+ },
795
+ ambassador: {
796
+ text: 'Ambassador',
797
+ fid: 'cardAuthor.ambassador',
798
+ background: '#00CB8A',
799
+ },
800
+ };
801
+ const MAX_IMAGE_UPLOADS = 20;
802
+ const LOCALISED_SLUGS = {
803
+ 'en-PH': {
804
+ ALL: 'all',
805
+ HOSPITAL: 'hospital',
806
+ SERVICE: 'service',
807
+ DOCTOR: 'doctor',
808
+ SEARCH: 'search',
809
+ SPECIALTIES: 'specialties',
810
+ CURRENT: 'current-location',
811
+ },
812
+ 'vi-VN': {
813
+ ALL: 'tat-ca',
814
+ HOSPITAL: 'benh-vien',
815
+ SERVICE: 'dich-vu',
816
+ DOCTOR: 'bac-si',
817
+ SEARCH: 'tim-kiem',
818
+ SPECIALTIES: 'chuyen-khoa',
819
+ CURRENT: 'vi-tri-hien-tai',
820
+ },
821
+ 'id-ID': {
822
+ ALL: 'semua',
823
+ HOSPITAL: 'rumah-sakit',
824
+ SERVICE: 'layanan',
825
+ DOCTOR: 'dokter',
826
+ SEARCH: 'cari',
827
+ SPECIALTIES: 'spesialisasi',
828
+ CURRENT: 'posisi-saya-saat-ini',
829
+ },
830
+ };
831
+
832
+ var constants = /*#__PURE__*/Object.freeze({
833
+ __proto__: null,
834
+ POST_DATE_FORMAT: POST_DATE_FORMAT,
835
+ NORMAL_DATE_FORMAT: NORMAL_DATE_FORMAT,
836
+ DUE_DATE_FORMAT: DUE_DATE_FORMAT,
837
+ DEFAULT_AVATAR_IMG: DEFAULT_AVATAR_IMG,
838
+ DEFAULT_RESULT_IMG: DEFAULT_RESULT_IMG,
839
+ DEFAULT_IMG: DEFAULT_IMG,
840
+ BMI_LEVELS: BMI_LEVELS,
841
+ BMR_LEVELS: BMR_LEVELS,
842
+ CORAL_TOKEN_COOKE: CORAL_TOKEN_COOKE,
843
+ HEALTH_TOOL_TYPE: HEALTH_TOOL_TYPE,
844
+ LOCALE_HEALTH_TOOLS: LOCALE_HEALTH_TOOLS,
845
+ BEARER_TOKEN_COOKIE: BEARER_TOKEN_COOKIE,
846
+ TOGETHER_DISCLAIMER_COOKIE: TOGETHER_DISCLAIMER_COOKIE,
847
+ BEARER_ADMIN_TOKEN_COOKIE: BEARER_ADMIN_TOKEN_COOKIE,
848
+ Z_INDEX: Z_INDEX,
849
+ BmrActiveLevels: BmrActiveLevels,
850
+ LEAD_CAMPAIGN_CODE: LEAD_CAMPAIGN_CODE,
851
+ LEAD_TOKEN_COOKIE: LEAD_TOKEN_COOKIE,
852
+ GA_TOKEN_COOKIE: GA_TOKEN_COOKIE,
853
+ GOOGLE_CALENDAR_AUTH_CLIENT_ID: GOOGLE_CALENDAR_AUTH_CLIENT_ID,
854
+ FIND_CARE_IFRAME_URL: FIND_CARE_IFRAME_URL,
855
+ REPORT_REASON_MAP: REPORT_REASON_MAP,
856
+ MB_SOCIAL_LINKS: MB_SOCIAL_LINKS,
857
+ INTERNAL_ROLES: INTERNAL_ROLES,
858
+ EXTERNAL_ROLES: EXTERNAL_ROLES,
859
+ INTERNAL_PROFILE_ROLES: INTERNAL_PROFILE_ROLES,
860
+ EXTERNAL_PROFILE_ROLES: EXTERNAL_PROFILE_ROLES,
861
+ RoleDataMap: RoleDataMap,
862
+ MAX_IMAGE_UPLOADS: MAX_IMAGE_UPLOADS,
863
+ LOCALISED_SLUGS: LOCALISED_SLUGS
864
+ });
865
+
866
+ // import { DISCOVER_PATHS, PATHS } from './paths'
867
+ // let _apolloClient:ApolloClient<NormalizedCacheObject>
868
+ const domainLocales = {
869
+ 'vi-VN': 'hellobacsi.com',
870
+ 'id-ID': 'hellosehat.com',
871
+ 'ms-MY': 'hellodoktor.com',
872
+ 'km-KH': 'hellokrupet.com',
873
+ 'en-PH': 'hellodoctor.com.ph',
874
+ 'th-TH': 'hellokhunmor.com',
875
+ 'my-MM': 'hellosayarwon.com',
876
+ 'zh-TW': 'helloyishi.com.tw',
877
+ 'hi-IN': 'helloswasthya.com',
878
+ };
879
+ const domainLocalesMarryBaby = {
880
+ 'vi-VN': 'marrybaby.vn',
881
+ };
882
+ const locale = (process.env.NEXT_PUBLIC_DEPLOY_LOCALE ||
883
+ 'vi-VN');
884
+ const getWebsiteUrlApi = (locale) => {
885
+ const { env: { isMarryBaby }, } = GlobalData;
886
+ return `https://${isMarryBaby ? domainLocalesMarryBaby[locale] : domainLocales[locale]}`;
887
+ };
888
+ const cleanFormatString = (url) => {
889
+ const qIndex = url.indexOf('?');
890
+ if (qIndex >= 0) {
891
+ return (url.slice(0, qIndex + 1) +
892
+ url
893
+ .slice(qIndex + 1)
894
+ .replace(/[^=&]+=(&|$)/g, '')
895
+ .replace(/&$/, ''));
896
+ }
897
+ return url;
898
+ };
899
+ const getCurrentBaseUrl = (locale) => {
900
+ const { env: { isMarryBaby }, } = GlobalData;
901
+ if (typeof window !== 'undefined')
902
+ return window.location.origin;
903
+ const isStaging = process.env.NEXT_PUBLIC_DEPLOY_ENV === 'staging';
904
+ const isDev = process.env.NEXT_PUBLIC_DEPLOY_ENV === 'development';
905
+ return isDev
906
+ ? 'http://localhost:3000'
907
+ : `https://${isStaging
908
+ ? isMarryBaby
909
+ ? 'fe.'
910
+ : 'discover.'
911
+ : isMarryBaby
912
+ ? 'www.'
913
+ : ''}${domainLocales[locale]}`;
914
+ };
915
+ const getApiPath = (path, params, query, baseUrl) => {
916
+ let queryString = '';
917
+ if (query) {
918
+ queryString = Object.keys(query)
919
+ .map((key) => key + '=' + query[key])
920
+ .join('&');
921
+ }
922
+ const { togetherBaseApiUrl = '' } = (GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.env) || {};
923
+ let formattedPath = formatString(path, Object.assign(Object.assign({}, ((params === null || params === void 0 ? void 0 : params._locale)
924
+ ? {
925
+ website_url: getWebsiteUrlApi(String(params._locale)),
926
+ }
927
+ : {})), params));
928
+ formattedPath += `${formattedPath.includes('?') ? '&' : '?'}${queryString}`;
929
+ const baseApiUrl = baseUrl ? baseUrl : togetherBaseApiUrl;
930
+ return baseApiUrl + 'api/v1/' + cleanFormatString(formattedPath);
931
+ };
932
+ const getDiscoverApiPath = (path, params, useProOnDev) => {
933
+ const { discoverBaseApiUrl = '', discoverBaseProdApiUrl = '' } = (GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.env) || {};
934
+ const basePath = !isProduction && useProOnDev ? discoverBaseProdApiUrl : discoverBaseApiUrl;
935
+ return (basePath +
936
+ 'wp-json/api/' +
937
+ cleanFormatString(formatString(path, Object.assign({}, params))));
938
+ };
939
+ const getMarryBabyApiPath = (path, params, useProOnDev) => {
940
+ const { marryBabyApiUrl = '', marryBabyProdApiUrl = '' } = (GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.env) || {};
941
+ const basePath = useProOnDev && !isProduction ? marryBabyProdApiUrl : marryBabyApiUrl;
942
+ return (basePath +
943
+ 'wp-json/api/' +
944
+ cleanFormatString(formatString(path, Object.assign({}, params))));
945
+ };
946
+ const getCarePath = (path, params) => {
947
+ const { careBaseApiUrl = '' } = (GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.env) || {};
948
+ return ((careBaseApiUrl || 'https://service-health-care.hellohealthgroup.com/') +
949
+ cleanFormatString(formatString(path, Object.assign({}, params))));
950
+ };
951
+ const getPremiumApiPath = (path, params) => {
952
+ const { premiumBaseApiUrl = '' } = (GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.env) || {};
953
+ return ((premiumBaseApiUrl ||
954
+ 'https://premium-content-stag.hellohealthgroup.com/') +
955
+ cleanFormatString(formatString(path, Object.assign({}, params))));
956
+ };
957
+ const getSsoApiPath = (path, params) => {
958
+ const { publicSSO = '' } = (GlobalData === null || GlobalData === void 0 ? void 0 : GlobalData.env) || {};
959
+ return ((publicSSO || 'https://staging-id.hellobacsi.com/') +
960
+ 'api/' +
961
+ cleanFormatString(formatString(path, Object.assign({}, params))));
962
+ };
963
+ const fixedEncodeURI = (str) => {
964
+ return encodeURI(str).replace(/%5B/g, '[').replace(/%5D/g, ']');
965
+ };
966
+ const convertApiOptionsToRequestInit = (opts) => {
967
+ if (opts === null || opts === void 0 ? void 0 : opts.data) {
968
+ if (opts.data instanceof FormData) {
969
+ opts.body = opts.data;
970
+ }
971
+ else if (typeof opts.data === 'object') {
972
+ opts.body = JSON.stringify(opts.data);
973
+ }
974
+ delete opts.data;
975
+ }
976
+ return opts;
977
+ };
978
+ const callApi = (url, method, options, skipEncodeURI = false) => __awaiter(void 0, void 0, void 0, function* () {
979
+ var _a, _b, _c;
980
+ try {
981
+ const res = yield fetch(skipEncodeURI ? url : fixedEncodeURI(url), Object.assign(Object.assign({ method }, convertApiOptionsToRequestInit(options)), { headers: Object.assign({}, options === null || options === void 0 ? void 0 : options.headers) })).then((r) => r.json());
982
+ if (res)
983
+ return res;
984
+ }
985
+ catch (err) {
986
+ console.log(err);
987
+ console.log({
988
+ url,
989
+ status: (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.status,
990
+ statusText: (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.statusText,
991
+ });
992
+ // Sentry.captureException(err)
993
+ return ((_c = err === null || err === void 0 ? void 0 : err.response) === null || _c === void 0 ? void 0 : _c.data) || null;
994
+ }
995
+ return null;
996
+ });
997
+ const callApiWithOptionalAuth = (urlData, method = 'GET', options, reqCookie) => __awaiter(void 0, void 0, void 0, function* () {
998
+ var _d, _e, _f, _g, _h, _j;
999
+ try {
1000
+ const url = typeof urlData === 'string' ? urlData : urlData.url;
1001
+ const backupUrl = typeof urlData === 'string' ? urlData : urlData.backupUrl;
1002
+ const parsedCookie = cookie.parse(reqCookie || '');
1003
+ const token = parsedCookie[BEARER_TOKEN_COOKIE];
1004
+ const cookie$1 = token || getCookie(BEARER_TOKEN_COOKIE);
1005
+ if (cookie$1 && cookie$1.length) {
1006
+ try {
1007
+ const res = yield fetch(url, Object.assign(Object.assign({ method }, convertApiOptionsToRequestInit(options)), { headers: Object.assign({ Authorization: 'Bearer ' + cookie$1 }, options === null || options === void 0 ? void 0 : options.headers) })).then((r) => r.json());
1008
+ if ((_d = res === null || res === void 0 ? void 0 : res.messages) === null || _d === void 0 ? void 0 : _d.find((m) => (m === null || m === void 0 ? void 0 : m.toLowerCase()) === 'Unauthenticated')) {
1009
+ return callApi(backupUrl || url, method, options);
1010
+ }
1011
+ if (res)
1012
+ return res;
1013
+ }
1014
+ catch (err) {
1015
+ console.log({
1016
+ status: (_e = err === null || err === void 0 ? void 0 : err.response) === null || _e === void 0 ? void 0 : _e.status,
1017
+ statusText: (_f = err === null || err === void 0 ? void 0 : err.response) === null || _f === void 0 ? void 0 : _f.statusText,
1018
+ });
1019
+ // Fallback noauth call
1020
+ return callApi(backupUrl || url, method, options);
1021
+ }
1022
+ }
1023
+ else {
1024
+ return callApi(backupUrl || url, method, options);
1025
+ }
1026
+ }
1027
+ catch (err) {
1028
+ console.log({
1029
+ status: (_g = err === null || err === void 0 ? void 0 : err.response) === null || _g === void 0 ? void 0 : _g.status,
1030
+ statusText: (_h = err === null || err === void 0 ? void 0 : err.response) === null || _h === void 0 ? void 0 : _h.statusText,
1031
+ });
1032
+ // Sentry.captureException(err)
1033
+ return ((_j = err === null || err === void 0 ? void 0 : err.response) === null || _j === void 0 ? void 0 : _j.data) || null;
1034
+ }
1035
+ return null;
1036
+ });
1037
+ const callApiWithAuth = (url, method, options, reqCookie) => __awaiter(void 0, void 0, void 0, function* () {
1038
+ try {
1039
+ const parsedCookie = cookie.parse(reqCookie || '');
1040
+ const token = parsedCookie[BEARER_TOKEN_COOKIE];
1041
+ const cookie$1 = token || getCookie(BEARER_TOKEN_COOKIE);
1042
+ if (cookie$1 && cookie$1.length) {
1043
+ const res = yield fetch(url, Object.assign(Object.assign({ method }, convertApiOptionsToRequestInit(options)), { headers: Object.assign({ Authorization: 'Bearer ' + cookie$1 }, options === null || options === void 0 ? void 0 : options.headers) })).then((r) => r.json());
1044
+ if (res)
1045
+ return res;
1046
+ }
1047
+ }
1048
+ catch (err) {
1049
+ // Sentry.captureException(err)
1050
+ return null;
1051
+ }
1052
+ return null;
1053
+ });
1054
+ const callApiWithAdminAuth = (url, method, options, reqCookie) => __awaiter(void 0, void 0, void 0, function* () {
1055
+ try {
1056
+ const parsedCookie = cookie.parse(reqCookie || '');
1057
+ const token = parsedCookie[BEARER_ADMIN_TOKEN_COOKIE];
1058
+ const cookie$1 = token || getCookie(BEARER_ADMIN_TOKEN_COOKIE);
1059
+ if (cookie$1 && cookie$1.length) {
1060
+ const res = yield fetch(url, Object.assign(Object.assign({ method }, convertApiOptionsToRequestInit(options)), { headers: Object.assign({ Authorization: 'Bearer ' + cookie$1 }, options === null || options === void 0 ? void 0 : options.headers) })).then((r) => r.json());
1061
+ if (res)
1062
+ return res;
1063
+ }
1064
+ }
1065
+ catch (err) {
1066
+ // Sentry.captureException(err)
1067
+ return null;
1068
+ }
1069
+ return null;
1070
+ });
1071
+ function updateQueryStringParameter(uri, key, value) {
1072
+ const re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');
1073
+ const separator = uri.indexOf('?') !== -1 ? '&' : '?';
1074
+ if (uri.match(re)) {
1075
+ return uri.replace(re, '$1' + key + '=' + value + '$2');
1076
+ }
1077
+ else {
1078
+ return uri + separator + key + '=' + value;
1079
+ }
1080
+ }
1081
+ const getUrlToSSOWithReturnUrl = (url, params) => {
1082
+ const { publicSSO } = GlobalData.env;
1083
+ const originalRedirectUrl = url || window.location.href;
1084
+ // const redirectUrl = new URL(originalRedirectUrl)
1085
+ if (params) {
1086
+ Object.keys(params).map((k) => {
1087
+ updateQueryStringParameter(originalRedirectUrl, k, params[k]);
1088
+ });
1089
+ }
1090
+ updateQueryStringParameter(originalRedirectUrl, 'source', 'communities');
1091
+ return publicSSO
1092
+ ? `${publicSSO}?returnUrl=${encodeURIComponent(originalRedirectUrl.toString())}`
1093
+ : originalRedirectUrl;
1094
+ };
1095
+ const getUrlToSignUp = (url, params, togetherBasePath = '/community') => {
1096
+ const currentLocation = url || (typeof window !== 'undefined' ? window.location.href : '/');
1097
+ let origin = typeof window !== 'undefined' ? window.location.origin : '';
1098
+ if (!origin) {
1099
+ if (url && (url.startsWith('http://') || url.startsWith('https://'))) {
1100
+ origin = url.split('/').slice(0, 3).join('/');
1101
+ }
1102
+ }
1103
+ const onBoardingUrl = `${origin}${togetherBasePath}/on-boarding?return=${encodeURIComponent(currentLocation)}`;
1104
+ return getUrlToSSOWithReturnUrl(onBoardingUrl, params);
1105
+ };
1106
+ const slugifiedNameWithId = (name, id, slug, _locale) => {
1107
+ if (slug && id) {
1108
+ return `${slug}-${id}`;
1109
+ }
1110
+ return `${slugify(name || '', {
1111
+ lower: true,
1112
+ locale: _locale || locale,
1113
+ })}-${id}`;
1114
+ };
1115
+ const getCareDoctorUrl = ({ name, id, locale, }) => {
1116
+ var _a;
1117
+ return `/care/${(_a = LOCALISED_SLUGS[locale || 'vi-VN']) === null || _a === void 0 ? void 0 : _a.DOCTOR}/${slugifiedNameWithId(name, id)}`;
1118
+ };
1119
+ const getCareHospitalUrl = ({ name, id, slug, locale, }) => {
1120
+ var _a;
1121
+ return `/care/${(_a = LOCALISED_SLUGS[locale || 'vi-VN']) === null || _a === void 0 ? void 0 : _a.HOSPITAL}/${slugifiedNameWithId(name, id, slug)}`;
1122
+ };
1123
+
1124
+ export { ADMIN_PATHS as A, BEARER_TOKEN_COOKIE as B, CARE_PATHS as C, DefaultComponentGlobalContextData as D, Eye as E, GlobalData as G, HEALTH_TOOL_TYPE as H, LEAD_TOKEN_COOKIE as L, MAX_IMAGE_UPLOADS as M, PATHS as P, REPORT_REASON_MAP as R, Share as S, TogetherComponentGlobalContext as T, WhatsApp as W, Z_INDEX as Z, TogetherComponentGlobalContextProvider as a, callApi as b, constants as c, getApiPath as d, DEFAULT_IMG as e, getCurrentBaseUrl as f, getUrlToSignUp as g, getCarePath as h, domainLocales as i, getCareHospitalUrl as j, getCareDoctorUrl as k, getDiscoverApiPath as l, DISCOVER_PATHS as m, callApiWithAdminAuth as n, callApiWithAuth as o, DEFAULT_AVATAR_IMG as p, getMarryBabyApiPath as q, callApiWithOptionalAuth as r, DUE_DATE_FORMAT as s, getPremiumApiPath as t, getWebsiteUrlApi as u, getSsoApiPath as v, Spinner as w, domainLocalesMarryBaby as x, cookie as y, locale as z };