@hhgtech/hhg-components 1.28.44 → 1.28.46

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 (316) hide show
  1. package/README.md +5 -0
  2. package/build/animation-1e9aff6a.js +81 -0
  3. package/build/babyGrowth.js +24 -24
  4. package/build/cache.js +1 -1
  5. package/build/care.js +1 -1
  6. package/build/components.js +1 -1
  7. package/build/{constants-53ed67a1.js → constants-28db3174.js} +1 -1
  8. package/build/{constants-1b55e92a.js → constants-627c575a.js} +2 -2
  9. package/build/constants.js +1 -1
  10. package/build/{core-7ce3a7ec.js → core-19b328be.js} +1 -1
  11. package/build/dataTransform-308ec1d0.js +1 -0
  12. package/build/ecom.js +1 -1
  13. package/build/esm/animation-03daa77e.js +81 -0
  14. package/build/esm/babyGrowth.js +38 -38
  15. package/build/esm/cache.js +1 -1
  16. package/build/esm/care.js +1 -1
  17. package/build/esm/components.js +1 -1
  18. package/build/esm/{constants-63c68cb5.js → constants-414e0341.js} +1 -1
  19. package/build/esm/{constants-3923407c.js → constants-e35c5696.js} +2 -2
  20. package/build/esm/constants.js +1 -1
  21. package/build/esm/{core-9bf4e218.js → core-091d7f79.js} +1 -1
  22. package/build/esm/dataTransform-6f1823e1.js +1 -0
  23. package/build/esm/ecom.js +1 -1
  24. package/build/esm/footer.js +1 -1
  25. package/build/esm/gAssets.js +1 -1
  26. package/build/esm/getDynamicHealthTool-37333454.js +1 -0
  27. package/build/esm/{getSocialList-4cd36db5.js → getSocialList-a6c965a8.js} +1 -1
  28. package/build/esm/hooks.js +1 -1
  29. package/build/esm/i18n.js +1 -1
  30. package/build/esm/i18nV2.js +1 -1
  31. package/build/esm/{index-cf5e3a41.js → index-1bf1317e.js} +9 -9
  32. package/build/esm/{index-4bcf944f.js → index-34cf1092.js} +1 -1
  33. package/build/esm/{index-c011f60e.js → index-3d2b9817.js} +1 -1
  34. package/build/esm/index-3e89f917.js +1 -0
  35. package/build/esm/{index-d2d4296b.js → index-4786b57c.js} +1 -1
  36. package/build/esm/{index-c55d9a53.js → index-49c2a65e.js} +1 -1
  37. package/build/esm/index-5cacbac8.js +1 -0
  38. package/build/esm/index-638a744e.js +1 -0
  39. package/build/esm/index-73532662.js +1 -0
  40. package/build/esm/{index-219d0267.js → index-7b8714ba.js} +1 -1
  41. package/build/esm/index-865973f4.js +375 -0
  42. package/build/esm/index-92506b05.js +1 -0
  43. package/build/esm/{index-bc7b446c.js → index-9e5a2805.js} +5 -5
  44. package/build/esm/index-a0bcdf6a.js +1 -0
  45. package/build/esm/index-bb8dc02f.js +1 -0
  46. package/build/esm/{index-49f5f7fe.js → index-bcca5543.js} +1 -1
  47. package/build/esm/index-c1cb45b2.js +1 -0
  48. package/build/esm/index-cb13973d.js +50 -0
  49. package/build/esm/index-cc5ea46f.js +137 -0
  50. package/build/esm/index-d18cfff8.js +2748 -0
  51. package/build/esm/index-d6dac1a0.js +177 -0
  52. package/build/esm/index-f21deeb6.js +1430 -0
  53. package/build/esm/index-fd0e0617.js +1 -0
  54. package/build/esm/index.js +1 -1
  55. package/build/esm/{index.styled-93aedd4f.js → index.styled-b876c90a.js} +3 -3
  56. package/build/esm/index.styles-00233f7a.js +839 -0
  57. package/build/esm/lead.js +1 -1
  58. package/build/esm/mantine.js +1 -1
  59. package/build/esm/misc.js +1 -1
  60. package/build/esm/navigation.js +1 -1
  61. package/build/esm/onboardingV2.js +34 -34
  62. package/build/esm/pwg.js +5 -5
  63. package/build/esm/{routing-eb0f44e6.js → routing-5b211351.js} +1 -1
  64. package/build/esm/subot.js +124 -124
  65. package/build/esm/together.js +1 -1
  66. package/build/esm/types-21b8927e.js +3004 -0
  67. package/build/esm/{types-432589c8.js → types-242705e6.js} +10 -10
  68. package/build/esm/types.js +1 -1
  69. package/build/esm/useCategory-2e217da0.js +1 -0
  70. package/build/esm/useHealthToolCache-011e34e2.js +1 -0
  71. package/build/esm/{usePlacesAutocomplete-db537374.js → usePlacesAutocomplete-ed4983f5.js} +1 -1
  72. package/build/esm/{useTranslations-154c6e71.js → useTranslations-80f9bf98.js} +1 -1
  73. package/build/esm/{utils-283a240e.js → utils-19ad9237.js} +2 -2
  74. package/build/esm/utils-39fb1c8c.js +7 -0
  75. package/build/esm/utils-3f639011.js +1 -0
  76. package/build/esm/{utils-e247d963.js → utils-d4e0e9b5.js} +1 -1
  77. package/build/esm/vaccination.js +40 -40
  78. package/build/footer.js +1 -1
  79. package/build/gAssets.js +1 -1
  80. package/build/getDynamicHealthTool-3e4543ff.js +1 -0
  81. package/build/{getSocialList-2ef855cd.js → getSocialList-196c323b.js} +1 -1
  82. package/build/hooks.js +1 -1
  83. package/build/i18n.js +1 -1
  84. package/build/i18nV2.js +1 -1
  85. package/build/index-065c9097.js +1 -0
  86. package/build/index-07dff904.js +1 -0
  87. package/build/index-0c7093ea.js +50 -0
  88. package/build/{index-cc5c10b5.js → index-0f6355d4.js} +1 -1
  89. package/build/index-19e259ce.js +1 -0
  90. package/build/index-2420eee5.js +1430 -0
  91. package/build/index-425f3390.js +1 -0
  92. package/build/index-43df25b1.js +1 -0
  93. package/build/{index-a4fbcb10.js → index-4a8b5e48.js} +1 -1
  94. package/build/index-4c4d7568.js +137 -0
  95. package/build/{index-a1855a8c.js → index-4de92198.js} +4 -4
  96. package/build/{index-f97ad29a.js → index-5385e211.js} +1 -1
  97. package/build/{index-4ec0c769.js → index-6f8ff7df.js} +1 -1
  98. package/build/index-7154350f.js +375 -0
  99. package/build/{index-1cce3d61.js → index-8a21ecb2.js} +1 -1
  100. package/build/index-8e6644eb.js +1 -0
  101. package/build/{index-90bb6947.js → index-9003442e.js} +1 -1
  102. package/build/{index-c68ec57c.js → index-96dd78ba.js} +3 -3
  103. package/build/index-beef0ff7.js +1 -0
  104. package/build/index-cbbe3154.js +2748 -0
  105. package/build/{index-15ae0fb6.js → index-d27a3f5f.js} +1 -1
  106. package/build/{index-895087de.js → index-e13a4f9a.js} +1 -1
  107. package/build/index-ff74de8e.js +177 -0
  108. package/build/index.js +1 -1
  109. package/build/{index.styled-7556937e.js → index.styled-a45b7854.js} +1 -1
  110. package/build/index.styles-ce607f17.js +839 -0
  111. package/build/lead.js +1 -1
  112. package/build/mantine.js +1 -1
  113. package/build/misc.js +1 -1
  114. package/build/navigation.js +1 -1
  115. package/build/onboardingV2.js +34 -34
  116. package/build/pwg.js +2 -2
  117. package/build/{routing-b6fbe4e9.js → routing-46446fba.js} +1 -1
  118. package/build/subot.js +123 -123
  119. package/build/together.js +1 -1
  120. package/build/types-d2335814.js +3004 -0
  121. package/build/{types-2b75bb53.js → types-e54d8d93.js} +10 -10
  122. package/build/types.js +1 -1
  123. package/build/useCategory-c99469f2.js +1 -0
  124. package/build/useHealthToolCache-dc437f4f.js +1 -0
  125. package/build/{usePlacesAutocomplete-f182b9d8.js → usePlacesAutocomplete-55e04a25.js} +1 -1
  126. package/build/{useTranslations-f081b85d.js → useTranslations-b435b717.js} +1 -1
  127. package/build/utils-469dda3f.js +1 -0
  128. package/build/{utils-bdaf775c.js → utils-83803365.js} +2 -2
  129. package/build/{utils-9a23430c.js → utils-9778a239.js} +1 -1
  130. package/build/utils-c18ec2df.js +1 -0
  131. package/build/vaccination.js +33 -33
  132. package/package.json +10 -3
  133. package/build/dataTransform-777dc7c3.js +0 -1
  134. package/build/esm/dataTransform-0f753a8d.js +0 -1
  135. package/build/esm/getDynamicHealthTool-bf5ae45e.js +0 -1
  136. package/build/esm/index-063cc1f8.js +0 -1
  137. package/build/esm/index-13896a1f.js +0 -1
  138. package/build/esm/index-1d02f620.js +0 -1
  139. package/build/esm/index-43771efb.js +0 -1
  140. package/build/esm/index-48f2acf5.js +0 -1
  141. package/build/esm/index-5beb9325.js +0 -1
  142. package/build/esm/index-67cf9fd6.js +0 -177
  143. package/build/esm/index-6dd55943.js +0 -3122
  144. package/build/esm/index-7b051fad.js +0 -1
  145. package/build/esm/index-8d0e1fc9.js +0 -1
  146. package/build/esm/index-b4e3cda1.js +0 -1
  147. package/build/esm/index-cd27c1f3.js +0 -1
  148. package/build/esm/index-d2fd18b2.js +0 -1
  149. package/build/esm/index-e9845176.js +0 -1
  150. package/build/esm/index-edff5128.js +0 -1
  151. package/build/esm/index.styled-6f2497bf.js +0 -1430
  152. package/build/esm/index.styled-a1372cbc.js +0 -3140
  153. package/build/esm/index.styled-aa903af8.js +0 -50
  154. package/build/esm/index.styles-968498ec.js +0 -846
  155. package/build/esm/screenSizeContext-96560239.js +0 -81
  156. package/build/esm/types-a2185681.js +0 -1
  157. package/build/esm/useCategory-89c67c7a.js +0 -1
  158. package/build/esm/useHealthToolCache-b4214f5b.js +0 -1
  159. package/build/esm/useRafState-60be12a5.js +0 -1
  160. package/build/getDynamicHealthTool-88abb9f6.js +0 -1
  161. package/build/index-08fdac64.js +0 -1
  162. package/build/index-22b73910.js +0 -1
  163. package/build/index-2a9e9db0.js +0 -1
  164. package/build/index-6cbdbb0f.js +0 -1
  165. package/build/index-90651331.js +0 -1
  166. package/build/index-9bec53cb.js +0 -177
  167. package/build/index-aa35fe57.js +0 -3122
  168. package/build/index-b30908be.js +0 -1
  169. package/build/index-c45fd3c9.js +0 -1
  170. package/build/index-c97e51b3.js +0 -1
  171. package/build/index-cff12c7f.js +0 -1
  172. package/build/index-d75cc027.js +0 -1
  173. package/build/index-f3d26f67.js +0 -1
  174. package/build/index.styled-49e95638.js +0 -3140
  175. package/build/index.styled-a3496699.js +0 -1430
  176. package/build/index.styled-a3cec606.js +0 -50
  177. package/build/index.styles-8637f663.js +0 -846
  178. package/build/screenSizeContext-0242fe70.js +0 -81
  179. package/build/types-ff669f4e.js +0 -1
  180. package/build/useCategory-99b3ce3f.js +0 -1
  181. package/build/useHealthToolCache-194e52e1.js +0 -1
  182. package/build/useRafState-eb46223d.js +0 -1
  183. /package/build/{BMI_BOYS.percentile.monthly-4bdcde00.js → BMI_BOYS.percentile.monthly-0eb54c7c.js} +0 -0
  184. /package/build/{BMI_BOYS.percentile.weekly-1155ea68.js → BMI_BOYS.percentile.weekly-b7bde0b1.js} +0 -0
  185. /package/build/{BMI_BOYS.percentile.yearly-7c76df92.js → BMI_BOYS.percentile.yearly-2aa9ad44.js} +0 -0
  186. /package/build/{BMI_BOYS.zscore.monthly-181d5ae3.js → BMI_BOYS.zscore.monthly-97389f6d.js} +0 -0
  187. /package/build/{BMI_BOYS.zscore.weekly-0cf8df2f.js → BMI_BOYS.zscore.weekly-bc5a17ee.js} +0 -0
  188. /package/build/{BMI_BOYS.zscore.yearly-102965ca.js → BMI_BOYS.zscore.yearly-95e1abf3.js} +0 -0
  189. /package/build/{BMI_GIRLS.percentile.monthly-2cf6d311.js → BMI_GIRLS.percentile.monthly-8a628c8b.js} +0 -0
  190. /package/build/{BMI_GIRLS.percentile.weekly-5b6d4586.js → BMI_GIRLS.percentile.weekly-c3423d0b.js} +0 -0
  191. /package/build/{BMI_GIRLS.percentile.yearly-3509e0f0.js → BMI_GIRLS.percentile.yearly-30c05aa5.js} +0 -0
  192. /package/build/{BMI_GIRLS.zscore.monthly-dbe09d64.js → BMI_GIRLS.zscore.monthly-e81868f9.js} +0 -0
  193. /package/build/{BMI_GIRLS.zscore.weekly-727a462b.js → BMI_GIRLS.zscore.weekly-98365971.js} +0 -0
  194. /package/build/{BMI_GIRLS.zscore.yearly-9aa1baa4.js → BMI_GIRLS.zscore.yearly-34dac101.js} +0 -0
  195. /package/build/{ChevronDown-09646e34.js → ChevronDown-77fab19e.js} +0 -0
  196. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-67f49877.js → HEAD CIRCUM_BOYS.percentile.monthly-f49c4a46.js} +0 -0
  197. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-b7cdc6c2.js → HEAD CIRCUM_BOYS.percentile.weekly-72afd132.js} +0 -0
  198. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-679ce89e.js → HEAD CIRCUM_BOYS.percentile.yearly-ab0deda0.js} +0 -0
  199. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-ac11764c.js → HEAD CIRCUM_BOYS.zscore.monthly-fbd5f8c4.js} +0 -0
  200. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-6794e1f8.js → HEAD CIRCUM_BOYS.zscore.weekly-87f840f6.js} +0 -0
  201. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-abd78ce6.js → HEAD CIRCUM_BOYS.zscore.yearly-9a7dd00c.js} +0 -0
  202. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-770aee60.js → HEAD CIRCUM_GIRLS.percentile.monthly-679b8839.js} +0 -0
  203. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-7b02ba8f.js → HEAD CIRCUM_GIRLS.percentile.weekly-b4e20015.js} +0 -0
  204. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-7271e0f4.js → HEAD CIRCUM_GIRLS.percentile.yearly-9cd60765.js} +0 -0
  205. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-d849260b.js → HEAD CIRCUM_GIRLS.zscore.monthly-ab6de2c6.js} +0 -0
  206. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b1e4bdb4.js → HEAD CIRCUM_GIRLS.zscore.weekly-7d38c523.js} +0 -0
  207. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-fe67e62b.js → HEAD CIRCUM_GIRLS.zscore.yearly-eb9d57e8.js} +0 -0
  208. /package/build/{HEIGHT_BOYS.percentile.monthly-a9b28e03.js → HEIGHT_BOYS.percentile.monthly-41de847f.js} +0 -0
  209. /package/build/{HEIGHT_BOYS.percentile.weekly-d256f904.js → HEIGHT_BOYS.percentile.weekly-62b868f0.js} +0 -0
  210. /package/build/{HEIGHT_BOYS.percentile.yearly-d0d7870c.js → HEIGHT_BOYS.percentile.yearly-e2c7bb82.js} +0 -0
  211. /package/build/{HEIGHT_BOYS.zscore.monthly-1f6d8b3b.js → HEIGHT_BOYS.zscore.monthly-5d6cc9db.js} +0 -0
  212. /package/build/{HEIGHT_BOYS.zscore.weekly-ca971d85.js → HEIGHT_BOYS.zscore.weekly-d7b99302.js} +0 -0
  213. /package/build/{HEIGHT_BOYS.zscore.yearly-0f6350a9.js → HEIGHT_BOYS.zscore.yearly-e5699025.js} +0 -0
  214. /package/build/{HEIGHT_GIRLS.percentile.monthly-515bf89a.js → HEIGHT_GIRLS.percentile.monthly-bac0286d.js} +0 -0
  215. /package/build/{HEIGHT_GIRLS.percentile.weekly-c9e09302.js → HEIGHT_GIRLS.percentile.weekly-6999925f.js} +0 -0
  216. /package/build/{HEIGHT_GIRLS.percentile.yearly-aeba297a.js → HEIGHT_GIRLS.percentile.yearly-ebfa2c19.js} +0 -0
  217. /package/build/{HEIGHT_GIRLS.zscore.monthly-b580279d.js → HEIGHT_GIRLS.zscore.monthly-39be4dd2.js} +0 -0
  218. /package/build/{HEIGHT_GIRLS.zscore.weekly-a957ddaf.js → HEIGHT_GIRLS.zscore.weekly-207cf2f5.js} +0 -0
  219. /package/build/{HEIGHT_GIRLS.zscore.yearly-5931c772.js → HEIGHT_GIRLS.zscore.yearly-265aafc2.js} +0 -0
  220. /package/build/{Subot-f5c59f1e.js → Subot-54546cbb.js} +0 -0
  221. /package/build/{Visible-b951d667.js → Visible-27b623f0.js} +0 -0
  222. /package/build/{WEIGHT_BOYS.percentile.monthly-03059aba.js → WEIGHT_BOYS.percentile.monthly-9ca3a316.js} +0 -0
  223. /package/build/{WEIGHT_BOYS.percentile.weekly-003a1949.js → WEIGHT_BOYS.percentile.weekly-7e51fb9b.js} +0 -0
  224. /package/build/{WEIGHT_BOYS.percentile.yearly-edb57cf2.js → WEIGHT_BOYS.percentile.yearly-b47c5be9.js} +0 -0
  225. /package/build/{WEIGHT_BOYS.zscore.monthly-7bdf338c.js → WEIGHT_BOYS.zscore.monthly-6d59370f.js} +0 -0
  226. /package/build/{WEIGHT_BOYS.zscore.weekly-e5476fd1.js → WEIGHT_BOYS.zscore.weekly-38beac02.js} +0 -0
  227. /package/build/{WEIGHT_BOYS.zscore.yearly-c7fa6d7e.js → WEIGHT_BOYS.zscore.yearly-1f4013a7.js} +0 -0
  228. /package/build/{WEIGHT_GIRLS.percentile.monthly-06c20697.js → WEIGHT_GIRLS.percentile.monthly-c9144c22.js} +0 -0
  229. /package/build/{WEIGHT_GIRLS.percentile.weekly-a7169e9c.js → WEIGHT_GIRLS.percentile.weekly-5455b91e.js} +0 -0
  230. /package/build/{WEIGHT_GIRLS.percentile.yearly-51c606c5.js → WEIGHT_GIRLS.percentile.yearly-03c736dd.js} +0 -0
  231. /package/build/{WEIGHT_GIRLS.zscore.monthly-f2ffff35.js → WEIGHT_GIRLS.zscore.monthly-415a66a8.js} +0 -0
  232. /package/build/{WEIGHT_GIRLS.zscore.weekly-dab69627.js → WEIGHT_GIRLS.zscore.weekly-1e23361d.js} +0 -0
  233. /package/build/{WEIGHT_GIRLS.zscore.yearly-f10ce018.js → WEIGHT_GIRLS.zscore.yearly-8db29178.js} +0 -0
  234. /package/build/{cookieHelper-16601856.js → cookieHelper-59a64e32.js} +0 -0
  235. /package/build/esm/{BMI_BOYS.percentile.monthly-f262473c.js → BMI_BOYS.percentile.monthly-57e884f8.js} +0 -0
  236. /package/build/esm/{BMI_BOYS.percentile.weekly-f5b94d14.js → BMI_BOYS.percentile.weekly-b2c63459.js} +0 -0
  237. /package/build/esm/{BMI_BOYS.percentile.yearly-7ec74edd.js → BMI_BOYS.percentile.yearly-8ca90fac.js} +0 -0
  238. /package/build/esm/{BMI_BOYS.zscore.monthly-a4ac044c.js → BMI_BOYS.zscore.monthly-b493d2f9.js} +0 -0
  239. /package/build/esm/{BMI_BOYS.zscore.weekly-b7953339.js → BMI_BOYS.zscore.weekly-62ae4fbc.js} +0 -0
  240. /package/build/esm/{BMI_BOYS.zscore.yearly-8d5a5f2d.js → BMI_BOYS.zscore.yearly-e2aad569.js} +0 -0
  241. /package/build/esm/{BMI_GIRLS.percentile.monthly-3b21e9f6.js → BMI_GIRLS.percentile.monthly-7f8de0c2.js} +0 -0
  242. /package/build/esm/{BMI_GIRLS.percentile.weekly-8a72ee76.js → BMI_GIRLS.percentile.weekly-6e0b116a.js} +0 -0
  243. /package/build/esm/{BMI_GIRLS.percentile.yearly-629770c3.js → BMI_GIRLS.percentile.yearly-4a395636.js} +0 -0
  244. /package/build/esm/{BMI_GIRLS.zscore.monthly-565f420c.js → BMI_GIRLS.zscore.monthly-be973fb7.js} +0 -0
  245. /package/build/esm/{BMI_GIRLS.zscore.weekly-e4afc98b.js → BMI_GIRLS.zscore.weekly-c19aae0e.js} +0 -0
  246. /package/build/esm/{BMI_GIRLS.zscore.yearly-b35d87f5.js → BMI_GIRLS.zscore.yearly-7bf54eb9.js} +0 -0
  247. /package/build/esm/{ChevronDown-a01c53f7.js → ChevronDown-b9b5a352.js} +0 -0
  248. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-6a8bb7ee.js → HEAD CIRCUM_BOYS.percentile.monthly-6e42d726.js} +0 -0
  249. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-82951ccd.js → HEAD CIRCUM_BOYS.percentile.weekly-8999c4bf.js} +0 -0
  250. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-9eef9698.js → HEAD CIRCUM_BOYS.percentile.yearly-b5760636.js} +0 -0
  251. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a3391bc3.js → HEAD CIRCUM_BOYS.zscore.monthly-fe30f273.js} +0 -0
  252. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-f733d920.js → HEAD CIRCUM_BOYS.zscore.weekly-17145cf6.js} +0 -0
  253. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-2146715a.js → HEAD CIRCUM_BOYS.zscore.yearly-0d813a98.js} +0 -0
  254. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-9952f63b.js → HEAD CIRCUM_GIRLS.percentile.monthly-ae35f7b2.js} +0 -0
  255. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-a79e4cb3.js → HEAD CIRCUM_GIRLS.percentile.weekly-430e5931.js} +0 -0
  256. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-5793bddc.js → HEAD CIRCUM_GIRLS.percentile.yearly-ce5d85d6.js} +0 -0
  257. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-9cf0d7e7.js → HEAD CIRCUM_GIRLS.zscore.monthly-b304dc6c.js} +0 -0
  258. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-554b1c54.js → HEAD CIRCUM_GIRLS.zscore.weekly-de588d96.js} +0 -0
  259. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-92513492.js → HEAD CIRCUM_GIRLS.zscore.yearly-44e77264.js} +0 -0
  260. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-dde47a57.js → HEIGHT_BOYS.percentile.monthly-e574a87c.js} +0 -0
  261. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-26a48f0b.js → HEIGHT_BOYS.percentile.weekly-49bc6c02.js} +0 -0
  262. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-7f453bec.js → HEIGHT_BOYS.percentile.yearly-99cf7774.js} +0 -0
  263. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-ef1cb387.js → HEIGHT_BOYS.zscore.monthly-63c3566b.js} +0 -0
  264. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-97fa211a.js → HEIGHT_BOYS.zscore.weekly-a7eff90c.js} +0 -0
  265. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-3e3bde63.js → HEIGHT_BOYS.zscore.yearly-b06dea5e.js} +0 -0
  266. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-30be483f.js → HEIGHT_GIRLS.percentile.monthly-b154ae1d.js} +0 -0
  267. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-7379a593.js → HEIGHT_GIRLS.percentile.weekly-a3dd221b.js} +0 -0
  268. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-478368ef.js → HEIGHT_GIRLS.percentile.yearly-c1a93361.js} +0 -0
  269. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-3a72a7a6.js → HEIGHT_GIRLS.zscore.monthly-47b24f91.js} +0 -0
  270. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-b6c34b3a.js → HEIGHT_GIRLS.zscore.weekly-f3cd351a.js} +0 -0
  271. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-76e796e8.js → HEIGHT_GIRLS.zscore.yearly-f6e9bb0c.js} +0 -0
  272. /package/build/esm/{Subot-dac02b43.js → Subot-0c45fa4c.js} +0 -0
  273. /package/build/esm/{Visible-47f22dfd.js → Visible-3eb21335.js} +0 -0
  274. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-687b7b12.js → WEIGHT_BOYS.percentile.monthly-87900c96.js} +0 -0
  275. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-8af24869.js → WEIGHT_BOYS.percentile.weekly-6fb93a78.js} +0 -0
  276. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-284c0509.js → WEIGHT_BOYS.percentile.yearly-ccca0fe8.js} +0 -0
  277. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-3e998d39.js → WEIGHT_BOYS.zscore.monthly-35d466dc.js} +0 -0
  278. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-e6a34c52.js → WEIGHT_BOYS.zscore.weekly-d74d6ff5.js} +0 -0
  279. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-78b9aee1.js → WEIGHT_BOYS.zscore.yearly-2c068e1e.js} +0 -0
  280. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a09b44e8.js → WEIGHT_GIRLS.percentile.monthly-1ee7e829.js} +0 -0
  281. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-feee61f9.js → WEIGHT_GIRLS.percentile.weekly-ab30775b.js} +0 -0
  282. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-63bc5a30.js → WEIGHT_GIRLS.percentile.yearly-893b6771.js} +0 -0
  283. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-eb53f818.js → WEIGHT_GIRLS.zscore.monthly-c37f1d39.js} +0 -0
  284. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-d393998a.js → WEIGHT_GIRLS.zscore.weekly-3a1449f6.js} +0 -0
  285. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-7a32a9cc.js → WEIGHT_GIRLS.zscore.yearly-aa00837d.js} +0 -0
  286. /package/build/esm/{cookieHelper-55e30d0f.js → cookieHelper-cbd9f06e.js} +0 -0
  287. /package/build/esm/{index-07063e55.js → index-7d682662.js} +0 -0
  288. /package/build/esm/{index-3d838a6b.js → index-c9bdb9a2.js} +0 -0
  289. /package/build/esm/{index-f30ca662.js → index-fb029176.js} +0 -0
  290. /package/build/esm/{isProduction-d1491481.js → isProduction-cfb9150a.js} +0 -0
  291. /package/build/esm/{localizeNumberFormat-6df9f051.js → localizeNumberFormat-213a73b8.js} +0 -0
  292. /package/build/esm/{normalizeLink-38377186.js → normalizeLink-cc25681e.js} +0 -0
  293. /package/build/esm/{number-161e80f5.js → number-dd894856.js} +0 -0
  294. /package/build/esm/{paths-25ba6851.js → paths-2d37bc61.js} +0 -0
  295. /package/build/esm/{theme-0bf733e5.js → theme-9f017335.js} +0 -0
  296. /package/build/esm/{translationsContext-2928d817.js → translationsContext-9fc8f894.js} +0 -0
  297. /package/build/esm/{tslib.es6-ed0fd94c.js → tslib.es6-cabcb8ea.js} +0 -0
  298. /package/build/esm/{types-b8a4b227.js → types-2d28585d.js} +0 -0
  299. /package/build/esm/{useIsInit-cb7d2978.js → useIsInit-81de6d8b.js} +0 -0
  300. /package/build/esm/{useOutsideClick-f603145b.js → useOutsideClick-e1437a3f.js} +0 -0
  301. /package/build/esm/{useScrollbarSize-258e8689.js → useScrollbarSize-6ecc2f5a.js} +0 -0
  302. /package/build/{index-aa2246a9.js → index-21c825aa.js} +0 -0
  303. /package/build/{index-c11ba2de.js → index-4b719c83.js} +0 -0
  304. /package/build/{index-8f6f3262.js → index-7005321e.js} +0 -0
  305. /package/build/{isProduction-60ee72ee.js → isProduction-426652cc.js} +0 -0
  306. /package/build/{localizeNumberFormat-3a99a4d3.js → localizeNumberFormat-5389239f.js} +0 -0
  307. /package/build/{normalizeLink-e9909bca.js → normalizeLink-ef4fc463.js} +0 -0
  308. /package/build/{number-991a82e8.js → number-f6e8e1a9.js} +0 -0
  309. /package/build/{paths-090390a0.js → paths-b1c94851.js} +0 -0
  310. /package/build/{theme-1a96d62c.js → theme-98a7bede.js} +0 -0
  311. /package/build/{translationsContext-d6a9ac72.js → translationsContext-6c5fb248.js} +0 -0
  312. /package/build/{tslib.es6-5195a8c8.js → tslib.es6-d46558cb.js} +0 -0
  313. /package/build/{types-e5a9bebd.js → types-032556e4.js} +0 -0
  314. /package/build/{useIsInit-ff0abff5.js → useIsInit-8386673c.js} +0 -0
  315. /package/build/{useOutsideClick-357f47d1.js → useOutsideClick-5544e570.js} +0 -0
  316. /package/build/{useScrollbarSize-560f763b.js → useScrollbarSize-d4ccc356.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback as a,useMemo as o,useEffect as n,useRef as s,useReducer as l}from"react";import{u as r}from"./useTranslations-154c6e71.js";import c from"lodash/debounce";import{I as d,e as p,f as u,M as h,g,C as m}from"./constants-3923407c.js";import{I as C}from"./index-d2d4296b.js";import b,{createGlobalStyle as y}from"styled-components";import{T as f,I as v}from"./index-48f2acf5.js";import{t as x}from"./theme-0bf733e5.js";import S from"lodash/shuffle";import{a as E}from"./useOutsideClick-f603145b.js";import{M as w}from"./screenSizeContext-96560239.js";import"dayjs";import{U as L,d as k}from"./index-49f5f7fe.js";import"./isProduction-d1491481.js";import"./Subot-dac02b43.js";import"./index-c011f60e.js";import O from"react-loading-skeleton";import{P as j}from"./paths-25ba6851.js";import{Skeleton as I,Input as $,Divider as F,Tabs as M,Flex as R,Button as T}from"@mantine/core";import{g as P,s as N,d as A}from"./cookieHelper-55e30d0f.js";import{C as B}from"./index-f30ca662.js";import{C as D}from"./ChevronDown-a01c53f7.js";import V from"string-format";function K(){const[e,t]=i((()=>{if("undefined"==typeof window)return"unset";if(P(L))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=i((()=>{if("undefined"==typeof window)return null;const e=P(L);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=a((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};N(L,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{A(L),t("denied")}))}),[]);return o((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}const z=b.div``,_=b.div`
1
+ import{a as e}from"./tslib.es6-cabcb8ea.js";import t,{useState as i,useCallback as a,useMemo as o,useEffect as n,useRef as s,useReducer as l}from"react";import{u as r}from"./useTranslations-80f9bf98.js";import c from"lodash/debounce";import{I as d,a as p,f as u,M as h,g,C as m}from"./constants-e35c5696.js";import{I as C}from"./index-4786b57c.js";import b,{createGlobalStyle as y}from"styled-components";import{T as f,I as v}from"./index-fd0e0617.js";import{t as x}from"./theme-9f017335.js";import S from"lodash/shuffle";import{a as E}from"./useOutsideClick-e1437a3f.js";import{M as w}from"./utils-3f639011.js";import L from"react-loading-skeleton";import{P as k}from"./paths-2d37bc61.js";import{Skeleton as O,Input as j,Divider as I,Tabs as $,Flex as F,Button as M}from"@mantine/core";import{U as R,d as T}from"./index-bcca5543.js";import{g as P,s as N,d as A}from"./cookieHelper-cbd9f06e.js";import{C as B}from"./index-fb029176.js";import{C as D}from"./ChevronDown-b9b5a352.js";import V from"string-format";function K(){const[e,t]=i((()=>{if("undefined"==typeof window)return"unset";if(P(R))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[n,s]=i((()=>{if("undefined"==typeof window)return null;const e=P(R);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=a((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};N(R,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{A(R),t("denied")}))}),[]);return o((()=>({geoLocationPermission:e,geoLocationCoordinates:n,requestGeoLocation:l})),[e,n])}const z=b.div``,_=b.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -120,7 +120,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
120
120
  &[data-is-denied='true'] {
121
121
  cursor: not-allowed;
122
122
  }
123
- `,oe=b((({count:e,className:i})=>t.createElement(t.Fragment,null,[...Array(e)].map(((e,a)=>t.createElement(J,{className:i,key:a},t.createElement(O,{count:1,height:32}),t.createElement(O,{count:1,height:24})))))))`
123
+ `,oe=b((({count:e,className:i})=>t.createElement(t.Fragment,null,[...Array(e)].map(((e,a)=>t.createElement(J,{className:i,key:a},t.createElement(L,{count:1,height:32}),t.createElement(L,{count:1,height:24})))))))`
124
124
  &:first-child {
125
125
  padding-top: 18px;
126
126
  }
@@ -324,7 +324,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
324
324
  `,at=b.div`
325
325
  display: grid;
326
326
  place-items: center;
327
- `,ot={doctors:({width:e,height:i})=>t.createElement("svg",{width:e||32,height:i||32,viewBox:"0 0 32 32",fill:"none"},t.createElement("g",{clipPath:"url(#clip0_14712_400114)"},t.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),t.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_14712_400114"},t.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:i})=>t.createElement("svg",{width:e||30,height:i||30,viewBox:"0 0 30 30",fill:"none"},t.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),t.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},nt=({type:e,item:i,imageUrl:a,className:n,onClickItem:s})=>{const l=o((()=>{const i=ot[e]||q;return t.createElement(i,{width:32,height:"services"===e?32:24})}),[e]);return t.createElement(Je,{onClick:()=>s&&s(i),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(i)},tabIndex:0,role:"button",className:n},t.createElement(tt,null,"hospitals"===e?t.createElement(it,{width:"12",height:"16",viewBox:"0 0 12 16"},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):t.createElement(Xe,{type:e},a?t.createElement("img",{src:a,width:32,height:"services"===e?32:24,loading:"lazy"}):l)),t.createElement(et,{color:x.colors.gray800,size:"p3"},i.name))},st=({type:e,data:a,state:n,dispatch:s,itemsToShow:l,itemsToShowDesktop:c,isMobile:d,isLoading:u,keyword:h,isNavResultItem:g})=>{const[m,C]=i(!1),{t:b,locale:y}=r(),{selectedLocation:v,searchKeywords:S}=n,E=o((()=>p[y]),[y]),w="ms-MY"===y,L=o((()=>({doctors:{name:b("booking.searchPopup.doctors"),icon:t.createElement(Ke,null),slug:E.DOCTOR},services:{name:b("booking.searchPopup.services"),icon:t.createElement(ze,null),slug:E.SERVICE},hospitals:{name:b("booking.searchPopup.hospitals"),icon:t.createElement(_e,null),slug:E.HOSPITAL},specialties:{name:b("booking.searchPopup.specialties"),icon:t.createElement(He,null),slug:E.SPECIALTIES}})),[e,E]),k=o((()=>L[e].slug),[L]),j=d?l:c;function I(t){let i="";switch(e){case"specialties":i=`/${v.slug}/${L.doctors.slug}/${t.slug}`;break;case"services":i=`/${v.slug}/${k}/${t.slug}`;break;case"doctors":case"hospitals":i=`/${k}/${t.slug}-${t.id}`}i&&s({type:je.SelectSearchResult,payload:{name:t.name,url:i}})}function $(i){return t.createElement(nt,{key:i.id,item:i,type:e,imageUrl:i.logo||i.avatar||i.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return t.createElement("section",null,t.createElement(Ge,null,t.createElement(Ze,null,L[e].icon,t.createElement(Ye,null,L[e].name)),(h.trim().length<=ke[y]||w)&&t.createElement(Ue,{onClick:function(){let t="";switch(e){case"specialties":t=`/${k}`;break;case"services":case"doctors":case"hospitals":t=`/${v.slug}/${k}`}t&&s({type:je.NavigateTo,payload:t})}},t.createElement(f,{size:"p3",color:x.colors.primaryBase},b("booking.searchPopup.seeAll")))),(u||a&&a.length>0)&&t.createElement(We,null,t.createElement(Qe,null,u&&Array(2).fill(void 0).map(((i,a)=>t.createElement(Je,{key:e+"loading"+a},t.createElement(tt,null,t.createElement(at,null,t.createElement(O,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),t.createElement(O,{width:120,height:24})))),!u&&a&&a.length>0&&a.slice(0,j).map($)),t.createElement(Qe,{isShown:m,isMore:!0},a.slice(j,-1).map($)),"specialties"===e&&j<a.length&&!u&&t.createElement("button",{onClick:()=>C(!m)},t.createElement(qe,{size:"p3",color:x.colors.primaryBase},b(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<a.length||w)&&!u&&h.trim().length>ke[y]&&t.createElement("button",{onClick:function(){const{slug:t}=L[e],i=`/${v.slug}/${t}?q=${S}`;s({type:je.NavigateTo,payload:i})}},t.createElement(qe,{size:"p3",color:x.colors.primaryBase},b(`booking.searchPopup.searchIn.${e}`,{name:h})))),!u&&0===(null==a?void 0:a.length)&&t.createElement(We,null,t.createElement(f,{size:"sm",color:x.colors.gray400},b("booking.searchBar.noResults"))))},lt=b.section`
327
+ `,ot={doctors:({width:e,height:i})=>t.createElement("svg",{width:e||32,height:i||32,viewBox:"0 0 32 32",fill:"none"},t.createElement("g",{clipPath:"url(#clip0_14712_400114)"},t.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),t.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_14712_400114"},t.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:i})=>t.createElement("svg",{width:e||30,height:i||30,viewBox:"0 0 30 30",fill:"none"},t.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),t.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},nt=({type:e,item:i,imageUrl:a,className:n,onClickItem:s})=>{const l=o((()=>{const i=ot[e]||q;return t.createElement(i,{width:32,height:"services"===e?32:24})}),[e]);return t.createElement(Je,{onClick:()=>s&&s(i),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(i)},tabIndex:0,role:"button",className:n},t.createElement(tt,null,"hospitals"===e?t.createElement(it,{width:"12",height:"16",viewBox:"0 0 12 16"},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):t.createElement(Xe,{type:e},a?t.createElement("img",{src:a,width:32,height:"services"===e?32:24,loading:"lazy"}):l)),t.createElement(et,{color:x.colors.gray800,size:"p3"},i.name))},st=({type:e,data:a,state:n,dispatch:s,itemsToShow:l,itemsToShowDesktop:c,isMobile:d,isLoading:u,keyword:h,isNavResultItem:g})=>{const[m,C]=i(!1),{t:b,locale:y}=r(),{selectedLocation:v,searchKeywords:S}=n,E=o((()=>p[y]),[y]),w="ms-MY"===y,k=o((()=>({doctors:{name:b("booking.searchPopup.doctors"),icon:t.createElement(Ke,null),slug:E.DOCTOR},services:{name:b("booking.searchPopup.services"),icon:t.createElement(ze,null),slug:E.SERVICE},hospitals:{name:b("booking.searchPopup.hospitals"),icon:t.createElement(_e,null),slug:E.HOSPITAL},specialties:{name:b("booking.searchPopup.specialties"),icon:t.createElement(He,null),slug:E.SPECIALTIES}})),[e,E]),O=o((()=>k[e].slug),[k]),j=d?l:c;function I(t){let i="";switch(e){case"specialties":i=`/${v.slug}/${k.doctors.slug}/${t.slug}`;break;case"services":i=`/${v.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":i=`/${O}/${t.slug}-${t.id}`}i&&s({type:je.SelectSearchResult,payload:{name:t.name,url:i}})}function $(i){return t.createElement(nt,{key:i.id,item:i,type:e,imageUrl:i.logo||i.avatar||i.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return t.createElement("section",null,t.createElement(Ge,null,t.createElement(Ze,null,k[e].icon,t.createElement(Ye,null,k[e].name)),(h.trim().length<=ke[y]||w)&&t.createElement(Ue,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${v.slug}/${O}`}t&&s({type:je.NavigateTo,payload:t})}},t.createElement(f,{size:"p3",color:x.colors.primaryBase},b("booking.searchPopup.seeAll")))),(u||a&&a.length>0)&&t.createElement(We,null,t.createElement(Qe,null,u&&Array(2).fill(void 0).map(((i,a)=>t.createElement(Je,{key:e+"loading"+a},t.createElement(tt,null,t.createElement(at,null,t.createElement(L,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),t.createElement(L,{width:120,height:24})))),!u&&a&&a.length>0&&a.slice(0,j).map($)),t.createElement(Qe,{isShown:m,isMore:!0},a.slice(j,-1).map($)),"specialties"===e&&j<a.length&&!u&&t.createElement("button",{onClick:()=>C(!m)},t.createElement(qe,{size:"p3",color:x.colors.primaryBase},b(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<a.length||w)&&!u&&h.trim().length>ke[y]&&t.createElement("button",{onClick:function(){const{slug:t}=k[e],i=`/${v.slug}/${t}?q=${S}`;s({type:je.NavigateTo,payload:i})}},t.createElement(qe,{size:"p3",color:x.colors.primaryBase},b(`booking.searchPopup.searchIn.${e}`,{name:h})))),!u&&0===(null==a?void 0:a.length)&&t.createElement(We,null,t.createElement(f,{size:"sm",color:x.colors.gray400},b("booking.searchBar.noResults"))))},lt=b.section`
328
328
  background-color: white;
329
329
  border-radius: 4px;
330
330
  position: absolute;
@@ -336,7 +336,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
336
336
  0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
337
337
  0px 0px 1px rgba(0, 0, 0, 0.04);
338
338
  }
339
- `,rt=({data:e,state:i,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>t.createElement(lt,null,e&&e.map((e=>l&&l.includes(e.type)?t.createElement(t.Fragment,null):t.createElement(st,{type:e.type,state:i,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:o,isLoading:n,keyword:s,isNavResultItem:r})))),ct=(e,t,i)=>V(e,Object.assign(Object.assign({},t),{domain:k[i||"en-PH"]}));const dt=({isMobile:h,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:y="",careFrontDomain:f="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:S,gaTrackingLocationSearch:E,autoCompleteDisabled:w=!1,inputSearchPlaceholder:L="",isOptionAllLocation:k=!1,hideResults:O=[],isNavResultItem:I=!0,routerPush:$,onGeoLocationPermissionChange:F,onSearch:M,onChangeLocation:R})=>{const{t:T,locale:P}=r(),N=s(null),A=s(null),[B,D]=i(void 0),[V,Z]=i(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=K(),[q,J]=l($e,Oe,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:h,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:y,initialSelectedCity:b||null,selectedLocation:b||e.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||e.searchLocationKeywords,autoCompleteDisabled:w,inputSearchPlaceholder:L,locale:P}))),{navigateTo:X,focused:ee,isLoadingCities:te,cities:ie,searchKeywords:ae,geoLocationPermission:oe,selectedLocation:se,initialSelectedCity:le,defaultCity:re,searchResults:ce,isLoadingSearchResults:de,isMobileModalOpened:pe,inputSearchPlaceholder:ue}=q,{fetchCitiesByLocation:he,fetchCitiesByKeyword:ge,fetchSearchResults:me}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const o=a((function(a,o={}){const n=`${t}${a}`;return e({type:je.FetchCitiesStart}),fetch(ct(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:je.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:a((function({coordinates:t}){let a={};const n={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[o(j.GET_CITY_BY_IP,Object.assign(Object.assign({},a),n))];return"zh-TW"===i&&s.push(o(j.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:je.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:a((function(t){return o(j.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:je.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:a((function(a,o){const n=`${t}${j.GET_SEARCH_V2}`;e({type:je.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:je.FetchSearchResultsFinish});l.id===u?r||(c=s.id):c=l.id===d?"":l.id;const p=(null==r?void 0:r.lat)||"",h=(null==r?void 0:r.lng)||"";return fetch(ct(n,{domain:t,searchType:"global",keyword:a.trim().length>ke[i]?a.trim():"",city:c===u?"":c,lat:p,lng:h},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:je.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:je.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),Ce=o((()=>{var e;return{id:u,name:T("booking.searchBar.currentLocation"),slug:null===(e=p[P])||void 0===e?void 0:e.CURRENT}}),[T,P]),be=o((()=>c(ge,400)),[ge]),ye=o((()=>c(me,400)),[me]);n((()=>{""!==y&&y!==q.searchKeywords&&J({type:je.UpdateInitialSearchValue,payload:y})}),[y]),n((()=>{x&&(null==se?void 0:se.id)===u&&"unset"===oe&&Q()}),[x,se,oe]),n((()=>{m||oe===U||("granted"===U&&W?J({type:je.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:je.DenyGeoLocationPermission}))}),[oe,U,W,m]),n((()=>{X&&($?$(X):window.location.href=`${f}${X}`)}),[X]);const ve=a((function(){J({type:je.SelectCurrentLocation,payload:Ce})}),[T,J]);n((()=>{var e;"denied"===oe||le||J({type:je.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:d,slug:null===(e=p[P])||void 0===e?void 0:e.ALL}}),F&&F(oe,q.geoLocationCoordinates),h&&"granted"===oe&&se&&J({type:je.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[oe]),n((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),n((()=>{L!==ue&&J({type:je.SetInputSearchPlaceholder,payload:L})}),[L,ue]),n((()=>{pe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[pe]);const xe=a((function(e){"ms-MY"===P&&Z(!0),J({type:je.SelectLocation,payload:e}),"ms-MY"!==P&&we(),R&&R(e)}),[T,J]);function Se(){"ms-MY"===P&&Z(!0),h&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&we())}function Ee(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function we(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Ie(){J({type:je.CloseMobileModal})}function Fe(){return"location"!==ee?null:t.createElement(ne,{isLoading:te,cities:ie,onLocationClick:xe,onCurrentLocationClick:Se,isLocationLoading:te,geoLocationPermission:oe,selectedLocation:se,isOptionAllLocation:k})}function Me(){return"search"!==ee?null:q.autoCompleteDisabled?h?t.createElement(De,{onClick:()=>{M({cityId:q.selectedLocation.id,keyword:ae}),Ie()}}):null:t.createElement(rt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:ae,isLoading:de,hideResults:O,isNavResultItem:I})}function Re(){return t.createElement(Ve,{isMobile:h,state:q,dispatch:J,debouncedFetchCitiesByKeyword:be,debouncedFetchSearchResults:ye,focusLocationInput:Ee,focusSearchInput:we,renderLocationResults:Fe,renderSearchResults:Me,trackingAttributes:S,locationTrackingAttributes:E,onSearch:M,initalSearchValue:y})}return n((()=>{if(window.visualViewport){const e=e=>{const t=e.target;D(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[D]),n((()=>{if(se&&V&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:je.NavigateTo,payload:e}),Z(!1)}}),[V,P,se]),h?t.createElement(t.Fragment,null,t.createElement(Y,null),t.createElement(G,{ref:A}),t.createElement(_,{id:"booking-search-bar",ref:N,"data-is-modal":h&&pe,style:{"--mobile-care-searchbar-height":pe&&B?`${B}px`:"100%"}},pe?t.createElement(t.Fragment,null,t.createElement(H,null,t.createElement(Le,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Ie}),Re()),Fe(),Me()):t.createElement(fe,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){A.current&&A.current.focus(),J({type:je.OpenMobileModal}),yield Promise.resolve(),N.current&&(null===(t=N.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:ee,value:ae,trackingAttributes:S,inputSearchPlaceholder:L}))):t.createElement(z,{id:"booking-search-bar",ref:N},Re())},pt=b.div``,ut=b.div`
339
+ `,rt=({data:e,state:i,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>t.createElement(lt,null,e&&e.map((e=>l&&l.includes(e.type)?t.createElement(t.Fragment,null):t.createElement(st,{type:e.type,state:i,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:o,isLoading:n,keyword:s,isNavResultItem:r})))),ct=(e,t,i)=>V(e,Object.assign(Object.assign({},t),{domain:T[i||"en-PH"]}));const dt=({isMobile:h,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:y="",careFrontDomain:f="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:S,gaTrackingLocationSearch:E,autoCompleteDisabled:w=!1,inputSearchPlaceholder:L="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:$,onGeoLocationPermissionChange:F,onSearch:M,onChangeLocation:R})=>{const{t:T,locale:P}=r(),N=s(null),A=s(null),[B,D]=i(void 0),[V,Z]=i(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=K(),[q,J]=l($e,Oe,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:h,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:y,initialSelectedCity:b||null,selectedLocation:b||e.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||e.searchLocationKeywords,autoCompleteDisabled:w,inputSearchPlaceholder:L,locale:P}))),{navigateTo:X,focused:ee,isLoadingCities:te,cities:ie,searchKeywords:ae,geoLocationPermission:oe,selectedLocation:se,initialSelectedCity:le,defaultCity:re,searchResults:ce,isLoadingSearchResults:de,isMobileModalOpened:pe,inputSearchPlaceholder:ue}=q,{fetchCitiesByLocation:he,fetchCitiesByKeyword:ge,fetchSearchResults:me}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const o=a((function(a,o={}){const n=`${t}${a}`;return e({type:je.FetchCitiesStart}),fetch(ct(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:je.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:a((function({coordinates:t}){let a={};const n={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[o(k.GET_CITY_BY_IP,Object.assign(Object.assign({},a),n))];return"zh-TW"===i&&s.push(o(k.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:je.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:a((function(t){return o(k.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:je.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:a((function(a,o){const n=`${t}${k.GET_SEARCH_V2}`;e({type:je.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:je.FetchSearchResultsFinish});l.id===u?r||(c=s.id):c=l.id===d?"":l.id;const p=(null==r?void 0:r.lat)||"",h=(null==r?void 0:r.lng)||"";return fetch(ct(n,{domain:t,searchType:"global",keyword:a.trim().length>ke[i]?a.trim():"",city:c===u?"":c,lat:p,lng:h},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:je.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:je.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),Ce=o((()=>{var e;return{id:u,name:T("booking.searchBar.currentLocation"),slug:null===(e=p[P])||void 0===e?void 0:e.CURRENT}}),[T,P]),be=o((()=>c(ge,400)),[ge]),ye=o((()=>c(me,400)),[me]);n((()=>{""!==y&&y!==q.searchKeywords&&J({type:je.UpdateInitialSearchValue,payload:y})}),[y]),n((()=>{x&&(null==se?void 0:se.id)===u&&"unset"===oe&&Q()}),[x,se,oe]),n((()=>{m||oe===U||("granted"===U&&W?J({type:je.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:je.DenyGeoLocationPermission}))}),[oe,U,W,m]),n((()=>{X&&($?$(X):window.location.href=`${f}${X}`)}),[X]);const ve=a((function(){J({type:je.SelectCurrentLocation,payload:Ce})}),[T,J]);n((()=>{var e;"denied"===oe||le||J({type:je.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:d,slug:null===(e=p[P])||void 0===e?void 0:e.ALL}}),F&&F(oe,q.geoLocationCoordinates),h&&"granted"===oe&&se&&J({type:je.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[oe]),n((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),n((()=>{L!==ue&&J({type:je.SetInputSearchPlaceholder,payload:L})}),[L,ue]),n((()=>{pe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[pe]);const xe=a((function(e){"ms-MY"===P&&Z(!0),J({type:je.SelectLocation,payload:e}),"ms-MY"!==P&&we(),R&&R(e)}),[T,J]);function Se(){"ms-MY"===P&&Z(!0),h&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&we())}function Ee(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function we(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Ie(){J({type:je.CloseMobileModal})}function Fe(){return"location"!==ee?null:t.createElement(ne,{isLoading:te,cities:ie,onLocationClick:xe,onCurrentLocationClick:Se,isLocationLoading:te,geoLocationPermission:oe,selectedLocation:se,isOptionAllLocation:O})}function Me(){return"search"!==ee?null:q.autoCompleteDisabled?h?t.createElement(De,{onClick:()=>{M({cityId:q.selectedLocation.id,keyword:ae}),Ie()}}):null:t.createElement(rt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:ae,isLoading:de,hideResults:j,isNavResultItem:I})}function Re(){return t.createElement(Ve,{isMobile:h,state:q,dispatch:J,debouncedFetchCitiesByKeyword:be,debouncedFetchSearchResults:ye,focusLocationInput:Ee,focusSearchInput:we,renderLocationResults:Fe,renderSearchResults:Me,trackingAttributes:S,locationTrackingAttributes:E,onSearch:M,initalSearchValue:y})}return n((()=>{if(window.visualViewport){const e=e=>{const t=e.target;D(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[D]),n((()=>{if(se&&V&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:je.NavigateTo,payload:e}),Z(!1)}}),[V,P,se]),h?t.createElement(t.Fragment,null,t.createElement(Y,null),t.createElement(G,{ref:A}),t.createElement(_,{id:"booking-search-bar",ref:N,"data-is-modal":h&&pe,style:{"--mobile-care-searchbar-height":pe&&B?`${B}px`:"100%"}},pe?t.createElement(t.Fragment,null,t.createElement(H,null,t.createElement(Le,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Ie}),Re()),Fe(),Me()):t.createElement(fe,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){A.current&&A.current.focus(),J({type:je.OpenMobileModal}),yield Promise.resolve(),N.current&&(null===(t=N.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:ee,value:ae,trackingAttributes:S,inputSearchPlaceholder:L}))):t.createElement(z,{id:"booking-search-bar",ref:N},Re())},pt=b.div``,ut=b.div`
340
340
  background-color: ${x.colors.neutral50};
341
341
  padding-bottom: 1px;
342
342
  ${w.mbDown} {
@@ -485,7 +485,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
485
485
  line-height: 22px;
486
486
  cursor: pointer;
487
487
  }
488
- `;const kt=({state:e,type:i,results:a,location:n,isLoading:s,typeInformation:l,clientSlug:c="",dispatch:d})=>{const{locale:p,t:u}=r(),{selectedLocation:g}=e,m=o((()=>l[i].slug),[l,i]);return t.createElement(St,null,t.createElement(Et,null,t.createElement("div",{className:"title"},u("booking.searchResult.description",{search_type:l[i].name,search_location:n})),a.length>0&&t.createElement("div",{className:"btn-see-all",onClick:()=>{let t=`/${g.slug}/${m}`;const a=h[p][c];a&&(t+=`/${a}`),("doctor"===i||"hospital"===i)&&e.selectedSpecialty.id>0&&(t+=`?specialtyId=${e.selectedSpecialty.id}`),t&&d({type:bt.NavigateTo,payload:t})}},u("home.seeAll"))),t.createElement(wt,null,s&&Array(3).fill(void 0).map(((e,a)=>t.createElement(Lt,{key:i+"loading"+a,className:2===a?"last-item":""},t.createElement("div",{className:"image-item"},t.createElement(I,{height:48,circle:!0,mb:"xl",animate:!0})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},t.createElement(I,{height:8,mt:10,radius:"xl",animate:!0})),t.createElement("div",{className:"description"},t.createElement("div",{className:"sub-description"},t.createElement(I,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!s&&a&&a.length>0&&t.createElement(t.Fragment,null,a.map(((e,o)=>{var n,s;const r=a.length>4&&3===o||a.length<=4&&o===a.length-1;let c="";return"hospital"===i&&(c=(null==e?void 0:e.address)||""),"doctor"===i&&(c=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===i&&(c=(null===(s=null==e?void 0:e.hospital_branch)||void 0===s?void 0:s.name)||""),o>=4?t.createElement(t.Fragment,null):t.createElement(Lt,{key:e.id,className:r?"last-item":"",onClick:()=>(e=>{let t="";switch(i){case"service":t=`/${g.slug}/${m}/${e.slug}`;break;case"doctor":case"hospital":t=`/${m}/${e.slug}-${e.id}`}t&&d({type:bt.NavigateTo,payload:t})})(e)},t.createElement("div",{className:"image-item"},t.createElement("img",{src:e.logo||e.avatar,alt:e.name})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},e.name),t.createElement("div",{className:"description"},l[i].icon,t.createElement("div",{className:"sub-description"},c))))}))),!s&&0===(null==a?void 0:a.length)&&t.createElement(f,{size:"sm",color:x.colors.gray400},u("booking.searchBar.noResults"))))},Ot=b.div`
488
+ `;const kt=({state:e,type:i,results:a,location:n,isLoading:s,typeInformation:l,clientSlug:c="",dispatch:d})=>{const{locale:p,t:u}=r(),{selectedLocation:g}=e,m=o((()=>l[i].slug),[l,i]);return t.createElement(St,null,t.createElement(Et,null,t.createElement("div",{className:"title"},u("booking.searchResult.description",{search_type:l[i].name,search_location:n})),a.length>0&&t.createElement("div",{className:"btn-see-all",onClick:()=>{let t=`/${g.slug}/${m}`;const a=h[p][c];a&&(t+=`/${a}`),("doctor"===i||"hospital"===i)&&e.selectedSpecialty.id>0&&(t+=`?specialtyId=${e.selectedSpecialty.id}`),t&&d({type:bt.NavigateTo,payload:t})}},u("home.seeAll"))),t.createElement(wt,null,s&&Array(3).fill(void 0).map(((e,a)=>t.createElement(Lt,{key:i+"loading"+a,className:2===a?"last-item":""},t.createElement("div",{className:"image-item"},t.createElement(O,{height:48,circle:!0,mb:"xl",animate:!0})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},t.createElement(O,{height:8,mt:10,radius:"xl",animate:!0})),t.createElement("div",{className:"description"},t.createElement("div",{className:"sub-description"},t.createElement(O,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!s&&a&&a.length>0&&t.createElement(t.Fragment,null,a.map(((e,o)=>{var n,s;const r=a.length>4&&3===o||a.length<=4&&o===a.length-1;let c="";return"hospital"===i&&(c=(null==e?void 0:e.address)||""),"doctor"===i&&(c=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===i&&(c=(null===(s=null==e?void 0:e.hospital_branch)||void 0===s?void 0:s.name)||""),o>=4?t.createElement(t.Fragment,null):t.createElement(Lt,{key:e.id,className:r?"last-item":"",onClick:()=>(e=>{let t="";switch(i){case"service":t=`/${g.slug}/${m}/${e.slug}`;break;case"doctor":case"hospital":t=`/${m}/${e.slug}-${e.id}`}t&&d({type:bt.NavigateTo,payload:t})})(e)},t.createElement("div",{className:"image-item"},t.createElement("img",{src:e.logo||e.avatar,alt:e.name})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},e.name),t.createElement("div",{className:"description"},l[i].icon,t.createElement("div",{className:"sub-description"},c))))}))),!s&&0===(null==a?void 0:a.length)&&t.createElement(f,{size:"sm",color:x.colors.gray400},u("booking.searchBar.noResults"))))},Ot=b.div`
489
489
  position: relative;
490
490
 
491
491
  ${w.mbDown} {
@@ -563,7 +563,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
563
563
  &[data-is-denied='true'] {
564
564
  cursor: not-allowed;
565
565
  }
566
- `,$t=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),Ft=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Mt=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),Rt=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},t.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Tt=({state:e,isMobile:i,debouncedFetchSearchResults:n,selectedLocation:l,onSpecialtyClick:c,dispatch:d})=>{var u;const{t:h,locale:g}=r(),m=s(null),C=o((()=>p[g]),[g]),b=o((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),y=a((function(e){console.log(e)}),[n,d]);return E(m,(()=>{d({type:bt.ClickOutsideInputSpecialty})})),t.createElement(Ot,{ref:m},t.createElement($.Wrapper,null,t.createElement($,{size:i?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(u=null==e?void 0:e.selectedSpecialty)||void 0===u?void 0:u.name)||"",rightSection:t.createElement(D,null),styles:b,onFocus:()=>d({type:bt.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&t.createElement(jt,null,t.createElement(It,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{c&&c({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},t.createElement("div",{className:"image-item"},t.createElement(Rt,null)),t.createElement(f,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>t.createElement(It,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),c&&c(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},t.createElement("div",{className:"image-item"},t.createElement("img",{src:e.thumbnail,alt:e.name})),t.createElement(f,{size:"md"},e.name))))))},Pt=({state:e,type:i,isMobile:n,isLoading:l,initalSearchValue:c,typeInformation:d,debouncedFetchSearchResults:p,trackingAttributes:u,hideSpecialtySelection:h=!1,clientSlug:g="",focusSearchInput:m,onSearch:C,onEnterSearch:b,dispatch:y})=>{var f;const{t:x}=r(),S=s(null),w=o((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),L=o((()=>"doctor"===i?x("booking.searchBar.placeholder.doctor"):"service"===i?x("booking.searchBar.placeholder.service"):"hospital"===i?x("booking.searchBar.placeholder.hospital"):"specialty"===i?x("booking.searchBar.placeholder.specialty"):""),[i]),k=o((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),O=o((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),j=o((()=>({input:{color:"#262626"}})),[]);E(S,(()=>{y({type:bt.ClickOutsideInputSearch})}));const I=a((function(t){y({type:bt.ChangeInputSearch,payload:t}),"function"!=typeof C&&(t.trim().length>mt[e.locale]||c||0===t.trim().length?p(t.trim(),e,i,g):(p.cancel(),y({type:bt.DisplayInitialSearchResults})))}),[y,e,i]),F=a((function(e){y({type:bt.SelectSpecialty,payload:e}),m()}),[y]),M=a((e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),b&&b())}),[b]);return t.createElement(vt,{ref:S},"specialty"===i?t.createElement($.Wrapper,{styles:k},t.createElement($,{icon:t.createElement(v.Search,null),size:n?"md":"lg",placeholder:L,styles:j,value:e.searchKeywords,onFocus:()=>y({type:bt.FocusInputSearchSpecialty}),onChange:e=>{I(e.target.value)},onKeyDown:M})):t.createElement(t.Fragment,null,"service"===i?t.createElement($.Wrapper,{styles:k},t.createElement($,{icon:t.createElement(v.Search,null),size:n?"md":"lg",name:"search-results",placeholder:L,onFocus:()=>y({type:bt.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{I(e.target.value)},onKeyDown:M})):t.createElement(t.Fragment,null,n&&!h?t.createElement(t.Fragment,null,t.createElement(Tt,{state:e,isMobile:n,dispatch:y,debouncedFetchSearchResults:p,onSpecialtyClick:F}),t.createElement($.Wrapper,{styles:k},t.createElement($,{icon:t.createElement(v.Search,null),size:"md",placeholder:L,value:e.searchKeywords,name:"search-results",onFocus:()=>y({type:bt.FocusInputSearch}),onChange:e=>{I(e.target.value)},onKeyDown:M}))):t.createElement($.Wrapper,{styles:k,className:h?"hide-specialty-selection":""},t.createElement($,Object.assign({icon:t.createElement(v.Search,null),size:"lg",placeholder:L,styles:O,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{I(e.target.value)},onFocus:()=>y({type:bt.FocusInputSearch}),onKeyDown:M},w,{rightSection:h?t.createElement(t.Fragment,null):t.createElement(Tt,{state:e,isMobile:n,dispatch:y,debouncedFetchSearchResults:p,onSpecialtyClick:F})})))),"search"===e.focused&&t.createElement(xt,null,t.createElement(kt,{type:i,state:e,results:(null===(f=e.searchResults)||void 0===f?void 0:f[i])||[],location:e.selectedLocation.name,dispatch:y,isLoading:l,typeInformation:d,clientSlug:g}))))},Nt=b.div`
566
+ `,$t=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),Ft=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Mt=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),Rt=()=>t.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},t.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Tt=({state:e,isMobile:i,debouncedFetchSearchResults:n,selectedLocation:l,onSpecialtyClick:c,dispatch:d})=>{var u;const{t:h,locale:g}=r(),m=s(null),C=o((()=>p[g]),[g]),b=o((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),y=a((function(e){console.log(e)}),[n,d]);return E(m,(()=>{d({type:bt.ClickOutsideInputSpecialty})})),t.createElement(Ot,{ref:m},t.createElement(j.Wrapper,null,t.createElement(j,{size:i?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(u=null==e?void 0:e.selectedSpecialty)||void 0===u?void 0:u.name)||"",rightSection:t.createElement(D,null),styles:b,onFocus:()=>d({type:bt.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&t.createElement(jt,null,t.createElement(It,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{c&&c({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},t.createElement("div",{className:"image-item"},t.createElement(Rt,null)),t.createElement(f,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>t.createElement(It,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),c&&c(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},t.createElement("div",{className:"image-item"},t.createElement("img",{src:e.thumbnail,alt:e.name})),t.createElement(f,{size:"md"},e.name))))))},Pt=({state:e,type:i,isMobile:n,isLoading:l,initalSearchValue:c,typeInformation:d,debouncedFetchSearchResults:p,trackingAttributes:u,hideSpecialtySelection:h=!1,clientSlug:g="",focusSearchInput:m,onSearch:C,onEnterSearch:b,dispatch:y})=>{var f;const{t:x}=r(),S=s(null),w=o((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),L=o((()=>"doctor"===i?x("booking.searchBar.placeholder.doctor"):"service"===i?x("booking.searchBar.placeholder.service"):"hospital"===i?x("booking.searchBar.placeholder.hospital"):"specialty"===i?x("booking.searchBar.placeholder.specialty"):""),[i]),k=o((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),O=o((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),I=o((()=>({input:{color:"#262626"}})),[]);E(S,(()=>{y({type:bt.ClickOutsideInputSearch})}));const $=a((function(t){y({type:bt.ChangeInputSearch,payload:t}),"function"!=typeof C&&(t.trim().length>mt[e.locale]||c||0===t.trim().length?p(t.trim(),e,i,g):(p.cancel(),y({type:bt.DisplayInitialSearchResults})))}),[y,e,i]),F=a((function(e){y({type:bt.SelectSpecialty,payload:e}),m()}),[y]),M=a((e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),b&&b())}),[b]);return t.createElement(vt,{ref:S},"specialty"===i?t.createElement(j.Wrapper,{styles:k},t.createElement(j,{icon:t.createElement(v.Search,null),size:n?"md":"lg",placeholder:L,styles:I,value:e.searchKeywords,onFocus:()=>y({type:bt.FocusInputSearchSpecialty}),onChange:e=>{$(e.target.value)},onKeyDown:M})):t.createElement(t.Fragment,null,"service"===i?t.createElement(j.Wrapper,{styles:k},t.createElement(j,{icon:t.createElement(v.Search,null),size:n?"md":"lg",name:"search-results",placeholder:L,onFocus:()=>y({type:bt.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{$(e.target.value)},onKeyDown:M})):t.createElement(t.Fragment,null,n&&!h?t.createElement(t.Fragment,null,t.createElement(Tt,{state:e,isMobile:n,dispatch:y,debouncedFetchSearchResults:p,onSpecialtyClick:F}),t.createElement(j.Wrapper,{styles:k},t.createElement(j,{icon:t.createElement(v.Search,null),size:"md",placeholder:L,value:e.searchKeywords,name:"search-results",onFocus:()=>y({type:bt.FocusInputSearch}),onChange:e=>{$(e.target.value)},onKeyDown:M}))):t.createElement(j.Wrapper,{styles:k,className:h?"hide-specialty-selection":""},t.createElement(j,Object.assign({icon:t.createElement(v.Search,null),size:"lg",placeholder:L,styles:O,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{$(e.target.value)},onFocus:()=>y({type:bt.FocusInputSearch}),onKeyDown:M},w,{rightSection:h?t.createElement(t.Fragment,null):t.createElement(Tt,{state:e,isMobile:n,dispatch:y,debouncedFetchSearchResults:p,onSpecialtyClick:F})})))),"search"===e.focused&&t.createElement(xt,null,t.createElement(kt,{type:i,state:e,results:(null===(f=e.searchResults)||void 0===f?void 0:f[i])||[],location:e.selectedLocation.name,dispatch:y,isLoading:l,typeInformation:d,clientSlug:g}))))},Nt=b.div`
567
567
  position: relative;
568
568
 
569
569
  ${w.mbDown} {
@@ -627,7 +627,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
627
627
  width: 12px;
628
628
  height: 18px;
629
629
  flex: 0 0 12px;
630
- `,Vt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:n,selectedLocation:l,trackingAttributes:c,onLocationClick:u,dispatch:h})=>{const{t:g,locale:m}=r(),C=s(null),b=o((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),y=a((function(t){h({type:bt.ChangeInputLocation,payload:t}),t.trim().length>mt[e.locale]?n(t.trim()):(n.cancel(),h({type:bt.DisplayInitialCities}))}),[n,h]);return E(C,(()=>{h({type:bt.ClickOutsideInputLocation})})),t.createElement(Nt,{ref:C},t.createElement($.Wrapper,null,t.createElement($,Object.assign({size:i?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>h({type:bt.FocusInputLocation}),onChange:e=>{y(e.target.value)}},b))),"location"===e.focused&&t.createElement(At,null,t.createElement(Bt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;u&&u({name:g("booking.searchBar.allLocations"),id:d,slug:null===(e=p[m])||void 0===e?void 0:e.ALL})}},t.createElement(Dt,{color:x.colors.neutral400}),t.createElement(f,{size:"md"},g("booking.searchBar.allLocations"))),e.cities.map((e=>t.createElement(Bt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),u&&u(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},t.createElement(Dt,{color:x.colors.neutral400}),t.createElement(f,{size:"md"},e.name))))))},Kt=b.div`
630
+ `,Vt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:n,selectedLocation:l,trackingAttributes:c,onLocationClick:u,dispatch:h})=>{const{t:g,locale:m}=r(),C=s(null),b=o((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),y=a((function(t){h({type:bt.ChangeInputLocation,payload:t}),t.trim().length>mt[e.locale]?n(t.trim()):(n.cancel(),h({type:bt.DisplayInitialCities}))}),[n,h]);return E(C,(()=>{h({type:bt.ClickOutsideInputLocation})})),t.createElement(Nt,{ref:C},t.createElement(j.Wrapper,null,t.createElement(j,Object.assign({size:i?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>h({type:bt.FocusInputLocation}),onChange:e=>{y(e.target.value)}},b))),"location"===e.focused&&t.createElement(At,null,t.createElement(Bt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;u&&u({name:g("booking.searchBar.allLocations"),id:d,slug:null===(e=p[m])||void 0===e?void 0:e.ALL})}},t.createElement(Dt,{color:x.colors.neutral400}),t.createElement(f,{size:"md"},g("booking.searchBar.allLocations"))),e.cities.map((e=>t.createElement(Bt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),u&&u(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},t.createElement(Dt,{color:x.colors.neutral400}),t.createElement(f,{size:"md"},e.name))))))},Kt=b.div`
631
631
  display: flex;
632
632
  flex-wrap: wrap;
633
633
  row-gap: 8px;
@@ -688,7 +688,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
688
688
  line-height: 18px;
689
689
  }
690
690
  }
691
- `,_t=b(F)`
691
+ `,_t=b(I)`
692
692
  margin: 24px 0 !important;
693
693
  `,Ht=b.div`
694
694
  display: flex;
@@ -710,7 +710,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
710
710
  text-align: center;
711
711
  }
712
712
  }
713
- `,Gt=({state:e,isMobile:i,specialties:a,isLoading:n,dispatch:s})=>{const{t:l,locale:c}=r(),{selectedLocation:d}=e,u=o((()=>p[c]),[c]),h=o((()=>a.length>=9||e.searchKeywords.trim().length<=mt[e.locale]),[e.searchKeywords,a]);return t.createElement(t.Fragment,null,!i&&t.createElement(_t,{color:"#E4E8EC"}),t.createElement(Kt,null,a.length>0&&!n&&t.createElement(t.Fragment,null,a.map(((e,i)=>i>=9?t.createElement(t.Fragment,null):t.createElement(zt,{key:e.id,onClick:()=>(e=>{let t="";e===g?(t=`/${d.slug}/${u.HOSPITAL}/${m.GSK}/`,s({type:bt.ClickOutsideInputSearchSpecialty})):t=`/${d.slug}/${u.DOCTOR}/${e}`,s({type:bt.NavigateTo,payload:t})})(e.slug)},t.createElement("div",{className:"image-item"},t.createElement("img",{src:e.thumbnail,alt:e.name})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},e.name)))))),0===a.length&&!n&&t.createElement(f,{size:"sm",color:x.colors.gray400},l("booking.searchBar.noResults")),n&&Array(6).fill(void 0).map(((e,i)=>t.createElement(zt,{key:"loading"+i},t.createElement("div",{className:"image-item"},t.createElement(I,{height:40,animate:!0})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},t.createElement(I,{height:20,radius:"sm",animate:!0}))))))),h&&t.createElement(Ht,null,t.createElement("div",{className:"show-more",onClick:()=>{const e=`/${u.SPECIALTIES}`;s({type:bt.NavigateTo,payload:e})}},l("home.seeAll"))))},Zt=b.div`
713
+ `,Gt=({state:e,isMobile:i,specialties:a,isLoading:n,dispatch:s})=>{const{t:l,locale:c}=r(),{selectedLocation:d}=e,u=o((()=>p[c]),[c]),h=o((()=>a.length>=9||e.searchKeywords.trim().length<=mt[e.locale]),[e.searchKeywords,a]);return t.createElement(t.Fragment,null,!i&&t.createElement(_t,{color:"#E4E8EC"}),t.createElement(Kt,null,a.length>0&&!n&&t.createElement(t.Fragment,null,a.map(((e,i)=>i>=9?t.createElement(t.Fragment,null):t.createElement(zt,{key:e.id,onClick:()=>(e=>{let t="";e===g?(t=`/${d.slug}/${u.HOSPITAL}/${m.GSK}/`,s({type:bt.ClickOutsideInputSearchSpecialty})):t=`/${d.slug}/${u.DOCTOR}/${e}`,s({type:bt.NavigateTo,payload:t})})(e.slug)},t.createElement("div",{className:"image-item"},t.createElement("img",{src:e.thumbnail,alt:e.name})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},e.name)))))),0===a.length&&!n&&t.createElement(f,{size:"sm",color:x.colors.gray400},l("booking.searchBar.noResults")),n&&Array(6).fill(void 0).map(((e,i)=>t.createElement(zt,{key:"loading"+i},t.createElement("div",{className:"image-item"},t.createElement(O,{height:40,animate:!0})),t.createElement("div",{className:"infor"},t.createElement("div",{className:"title"},t.createElement(O,{height:20,radius:"sm",animate:!0}))))))),h&&t.createElement(Ht,null,t.createElement("div",{className:"show-more",onClick:()=>{const e=`/${u.SPECIALTIES}`;s({type:bt.NavigateTo,payload:e})}},l("home.seeAll"))))},Zt=b.div`
714
714
  display: flex;
715
715
  gap: 5px;
716
716
  margin-top: 16px;
@@ -763,7 +763,7 @@ import{a as e}from"./tslib.es6-ed0fd94c.js";import t,{useState as i,useCallback
763
763
  border-bottom: 1px solid ${x.colors.neutral100};
764
764
  `,qt=b(B)`
765
765
  padding: 0 16px;
766
- `,Jt=({currentTab:e,hideTabBookingSearch:i=[],isMobile:a,setCurrentTab:n})=>{const s=o((()=>({root:{overflowY:a?"hidden":"initial",overflowX:a?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:a?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:a?"14px":"16px",fontWeight:600,lineHeight:a?"22px":"24px"}})),[a]),l=(()=>{const{t:e}=r();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),c=o((()=>l.filter((e=>!i.includes(e.value)))||[]),[i,l]);return t.createElement(Qt,{className:"booking-search-tab"},t.createElement(qt,null,t.createElement(M,{value:e,onTabChange:e=>{n(e)},styles:s},t.createElement(M.List,null,c.map((e=>t.createElement(M.Tab,{value:e.value,key:e.value},e.label)))))))};var Xt;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Xt||(Xt={}));const ei=({isMobile:e,careApiDomain:g,geoLocationPermission:C,geoLocationCoordinates:b,initialSelectedCity:y,initialSearchValue:f="",initTypeSearch:v="hospital",initSpecialty:x,careFrontDomain:S="/care",isDebug:w=!1,gaTrackingSearchBar:L,gaTrackingLocationSearch:k,autoCompleteDisabled:O=!1,inputSearchPlaceholder:I="",hideTabBookingSearch:$=[],hideSpecialtySelection:F=!1,hidePopularSearchKeys:M=!1,clientSlug:P="",routerPush:N,onGeoLocationPermissionChange:A,onChangeLocation:B})=>{const{locale:D,t:V}=r(),z=s(null),_=s(null),[H,G]=i(v),{geoLocationPermission:Z,geoLocationCoordinates:Y}=K(),[U,W]=l(ft,Ct,(t=>Object.assign(Object.assign({},t),{isDebug:w,isMobile:e,geoLocationPermission:C||Z||"unset",geoLocationCoordinates:b||Y||null,searchKeywords:f,initialSelectedCity:y||null,selectedLocation:y||t.selectedLocation||null,searchLocationKeywords:(null==y?void 0:y.name)||t.searchLocationKeywords,autoCompleteDisabled:O,inputSearchPlaceholder:I,locale:D}))),{navigateTo:Q,focusedSpecialty:q,searchKeywords:J,geoLocationPermission:X,selectedLocation:ee,selectedSpecialty:te,initialSelectedCity:ie,searchResults:ae,isLoadingSearchResults:oe}=U,{fetchCitiesByLocation:ne,fetchCitiesByKeyword:se,fetchSearchResults:le,fetchAllSpecialties:re,fetchPopularKeys:ce}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN",client:o=""}){const n=a((function(a,o={}){const n=`${t}${a}`;return e({type:bt.FetchCitiesStart}),fetch(ct(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:bt.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:a((function({coordinates:t}){let a={};const s={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(s.noPaging=1);const l=[n(j.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),s),{client:m.MSD===o?"":o}))];return"zh-TW"===i&&l.push(n(j.GET_CITIES_LIST,{noPaging:1,client:m.MSD===o?"":o})),Promise.all(l).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:bt.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:a((function(t){return n(j.GET_CITIES_LIST,{keyword:t,client:o}).then((t=>{e({type:bt.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:a((function(a,n,s,l,r){const c="specialty"===s?`${t}${j.GET_SEARCH_SPECIALTY}`:`${t}${j.GET_SEARCH_V2}`;e({type:bt.FetchSearchResultsStart});const{selectedLocation:p,geoLocationCoordinates:h,selectedSpecialty:g}=n;let C="";if(!p)return void e({type:bt.FetchSearchResultsFinish});C=p.id===d?"":p.id;const b=(null==h?void 0:h.lat)||"",y=(null==h?void 0:h.lng)||"",f=(null==g?void 0:g.id)>0?null==g?void 0:g.id:"",v=a.trim().length>mt[i]?a.trim():"";return fetch(ct(c,{domain:t,searchType:s||"global",keyword:v,city:C===u?"":C,lat:b,lng:y,specialty_id:f,client_slug:m.MSD===l?"":l,msd:m.MSD===o?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let i=[];"specialty"!==s&&(i=t.searches),"specialty"===s&&(i=v?t.specialties:t.default),e({type:bt.FetchSearchResultsComplete,payload:{key:s,searches:i||[]}}),r&&e({type:bt.UpdateInitialSearchResults,payload:{key:s,searches:i||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:bt.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:a((function(){const a=`${t}${j.GET_SEARCH_SPECIALTY}`;return fetch(ct(a,{domain:t,searchType:"",msd:m.MSD===o?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:bt.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e]),fetchPopularKeys:a((function(a){const o=`${t}${j.GET_SEARCH_POPULAR_KEY}`;return fetch(ct(o,{domain:t,searchType:Xt[a],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:bt.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,t,e])}}({dispatch:W,locale:D,careApiDomain:g,client:P}),de=o((()=>p[D]),[D]),pe=o((()=>({doctor:{name:V("booking.searchPopup.doctors"),icon:t.createElement($t,null),slug:de.DOCTOR},service:{name:V("booking.searchPopup.services"),icon:t.createElement(Ft,null),slug:de.SERVICE},hospital:{name:V("booking.searchPopup.hospitals"),icon:t.createElement(Mt,null),slug:de.HOSPITAL},specialty:{name:V("booking.searchPopup.specialties"),icon:t.createElement(Rt,null),slug:de.SPECIALTIES}})),[H]),ue=o((()=>c(se,400)),[se]),he=o((()=>c(le,400)),[le]),ge=a((function(e){W({type:bt.SelectLocation,payload:e}),me(),B&&B(e)}),[V,W]);function me(){var e;z.current&&(null===(e=z.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Ce(){let e="";const{slug:t}=pe[H];let i="";const a=h[D][P];("doctor"===H||"hospital"===H)&&U.selectedSpecialty.id>0&&(i=`&specialtyId=${U.selectedSpecialty.id}`),e="specialty"===H?`/${t}`:`/${ee.slug}/${t}`,a&&(e+=`/${a}`),e+=`?q=${J}${i}`,e&&W({type:bt.NavigateTo,payload:e})}return E(_,(()=>{W({type:bt.ClickOutsideInputSearchSpecialty})})),n((()=>{var t;"denied"===X||ie||W({type:bt.SelectLocation,payload:{name:V("booking.searchBar.allLocations"),id:d,slug:null===(t=p[D])||void 0===t?void 0:t.ALL}}),A&&A(X,U.geoLocationCoordinates),e&&"granted"===X&&ee&&W({type:bt.FocusInputSearch}),ne({coordinates:U.geoLocationCoordinates})}),[X]),n((()=>{const e=x||{name:V("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:de.SPECIALTIES};U.selectedSpecialty||W({type:bt.SelectSpecialty,payload:e})}),[x,U.selectedSpecialty]),n((()=>{re()}),[]),n((()=>{ce(H)}),[H]),n((()=>{Q&&(N?N(Q):window.location.href=`${S}${Q}`)}),[Q]),n((()=>{le(U.searchKeywords,U,H,P,!0)}),[ee,te,H]),t.createElement(pt,{ref:z},t.createElement(Jt,{currentTab:H,setCurrentTab:G,isMobile:e,hideTabBookingSearch:$}),t.createElement(ut,{className:"booking-search-container"},t.createElement(ht,null,t.createElement(gt,null,t.createElement("div",{ref:_},t.createElement(R,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==H&&t.createElement(Vt,{state:U,isMobile:e,dispatch:W,debouncedFetchCitiesByKeyword:ue,selectedLocation:ee,onLocationClick:ge,trackingAttributes:k}),t.createElement(Pt,{type:H,isMobile:e,state:U,dispatch:W,debouncedFetchSearchResults:he,initalSearchValue:f,focusSearchInput:me,onEnterSearch:Ce,typeInformation:pe,trackingAttributes:L,isLoading:oe,hideSpecialtySelection:F,clientSlug:P}),t.createElement(T,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:Ce,styles:{root:{height:e?"40px":"48px"}}},V("booking.searchBar.searchButton"))),!M&&"specialty"!==H&&U.popularKeys.length>0&&t.createElement(Wt,{type:H,state:U,typeInformation:pe,dispatch:W}),"specialty"===H&&"search"===q&&t.createElement(Gt,{state:U,isMobile:e,dispatch:W,specialties:(null==ae?void 0:ae.specialty)||[],isLoading:oe}))))))},ti=b.div`
766
+ `,Jt=({currentTab:e,hideTabBookingSearch:i=[],isMobile:a,setCurrentTab:n})=>{const s=o((()=>({root:{overflowY:a?"hidden":"initial",overflowX:a?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:a?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:a?"14px":"16px",fontWeight:600,lineHeight:a?"22px":"24px"}})),[a]),l=(()=>{const{t:e}=r();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),c=o((()=>l.filter((e=>!i.includes(e.value)))||[]),[i,l]);return t.createElement(Qt,{className:"booking-search-tab"},t.createElement(qt,null,t.createElement($,{value:e,onTabChange:e=>{n(e)},styles:s},t.createElement($.List,null,c.map((e=>t.createElement($.Tab,{value:e.value,key:e.value},e.label)))))))};var Xt;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Xt||(Xt={}));const ei=({isMobile:e,careApiDomain:g,geoLocationPermission:C,geoLocationCoordinates:b,initialSelectedCity:y,initialSearchValue:f="",initTypeSearch:v="hospital",initSpecialty:x,careFrontDomain:S="/care",isDebug:w=!1,gaTrackingSearchBar:L,gaTrackingLocationSearch:O,autoCompleteDisabled:j=!1,inputSearchPlaceholder:I="",hideTabBookingSearch:$=[],hideSpecialtySelection:R=!1,hidePopularSearchKeys:T=!1,clientSlug:P="",routerPush:N,onGeoLocationPermissionChange:A,onChangeLocation:B})=>{const{locale:D,t:V}=r(),z=s(null),_=s(null),[H,G]=i(v),{geoLocationPermission:Z,geoLocationCoordinates:Y}=K(),[U,W]=l(ft,Ct,(t=>Object.assign(Object.assign({},t),{isDebug:w,isMobile:e,geoLocationPermission:C||Z||"unset",geoLocationCoordinates:b||Y||null,searchKeywords:f,initialSelectedCity:y||null,selectedLocation:y||t.selectedLocation||null,searchLocationKeywords:(null==y?void 0:y.name)||t.searchLocationKeywords,autoCompleteDisabled:j,inputSearchPlaceholder:I,locale:D}))),{navigateTo:Q,focusedSpecialty:q,searchKeywords:J,geoLocationPermission:X,selectedLocation:ee,selectedSpecialty:te,initialSelectedCity:ie,searchResults:ae,isLoadingSearchResults:oe}=U,{fetchCitiesByLocation:ne,fetchCitiesByKeyword:se,fetchSearchResults:le,fetchAllSpecialties:re,fetchPopularKeys:ce}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN",client:o=""}){const n=a((function(a,o={}){const n=`${t}${a}`;return e({type:bt.FetchCitiesStart}),fetch(ct(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:bt.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:a((function({coordinates:t}){let a={};const s={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(s.noPaging=1);const l=[n(k.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),s),{client:m.MSD===o?"":o}))];return"zh-TW"===i&&l.push(n(k.GET_CITIES_LIST,{noPaging:1,client:m.MSD===o?"":o})),Promise.all(l).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:bt.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:a((function(t){return n(k.GET_CITIES_LIST,{keyword:t,client:o}).then((t=>{e({type:bt.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:a((function(a,n,s,l,r){const c="specialty"===s?`${t}${k.GET_SEARCH_SPECIALTY}`:`${t}${k.GET_SEARCH_V2}`;e({type:bt.FetchSearchResultsStart});const{selectedLocation:p,geoLocationCoordinates:h,selectedSpecialty:g}=n;let C="";if(!p)return void e({type:bt.FetchSearchResultsFinish});C=p.id===d?"":p.id;const b=(null==h?void 0:h.lat)||"",y=(null==h?void 0:h.lng)||"",f=(null==g?void 0:g.id)>0?null==g?void 0:g.id:"",v=a.trim().length>mt[i]?a.trim():"";return fetch(ct(c,{domain:t,searchType:s||"global",keyword:v,city:C===u?"":C,lat:b,lng:y,specialty_id:f,client_slug:m.MSD===l?"":l,msd:m.MSD===o?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let i=[];"specialty"!==s&&(i=t.searches),"specialty"===s&&(i=v?t.specialties:t.default),e({type:bt.FetchSearchResultsComplete,payload:{key:s,searches:i||[]}}),r&&e({type:bt.UpdateInitialSearchResults,payload:{key:s,searches:i||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:bt.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:a((function(){const a=`${t}${k.GET_SEARCH_SPECIALTY}`;return fetch(ct(a,{domain:t,searchType:"",msd:m.MSD===o?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:bt.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e]),fetchPopularKeys:a((function(a){const o=`${t}${k.GET_SEARCH_POPULAR_KEY}`;return fetch(ct(o,{domain:t,searchType:Xt[a],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:bt.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,t,e])}}({dispatch:W,locale:D,careApiDomain:g,client:P}),de=o((()=>p[D]),[D]),pe=o((()=>({doctor:{name:V("booking.searchPopup.doctors"),icon:t.createElement($t,null),slug:de.DOCTOR},service:{name:V("booking.searchPopup.services"),icon:t.createElement(Ft,null),slug:de.SERVICE},hospital:{name:V("booking.searchPopup.hospitals"),icon:t.createElement(Mt,null),slug:de.HOSPITAL},specialty:{name:V("booking.searchPopup.specialties"),icon:t.createElement(Rt,null),slug:de.SPECIALTIES}})),[H]),ue=o((()=>c(se,400)),[se]),he=o((()=>c(le,400)),[le]),ge=a((function(e){W({type:bt.SelectLocation,payload:e}),me(),B&&B(e)}),[V,W]);function me(){var e;z.current&&(null===(e=z.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Ce(){let e="";const{slug:t}=pe[H];let i="";const a=h[D][P];("doctor"===H||"hospital"===H)&&U.selectedSpecialty.id>0&&(i=`&specialtyId=${U.selectedSpecialty.id}`),e="specialty"===H?`/${t}`:`/${ee.slug}/${t}`,a&&(e+=`/${a}`),e+=`?q=${J}${i}`,e&&W({type:bt.NavigateTo,payload:e})}return E(_,(()=>{W({type:bt.ClickOutsideInputSearchSpecialty})})),n((()=>{var t;"denied"===X||ie||W({type:bt.SelectLocation,payload:{name:V("booking.searchBar.allLocations"),id:d,slug:null===(t=p[D])||void 0===t?void 0:t.ALL}}),A&&A(X,U.geoLocationCoordinates),e&&"granted"===X&&ee&&W({type:bt.FocusInputSearch}),ne({coordinates:U.geoLocationCoordinates})}),[X]),n((()=>{const e=x||{name:V("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:de.SPECIALTIES};U.selectedSpecialty||W({type:bt.SelectSpecialty,payload:e})}),[x,U.selectedSpecialty]),n((()=>{re()}),[]),n((()=>{ce(H)}),[H]),n((()=>{Q&&(N?N(Q):window.location.href=`${S}${Q}`)}),[Q]),n((()=>{le(U.searchKeywords,U,H,P,!0)}),[ee,te,H]),t.createElement(pt,{ref:z},t.createElement(Jt,{currentTab:H,setCurrentTab:G,isMobile:e,hideTabBookingSearch:$}),t.createElement(ut,{className:"booking-search-container"},t.createElement(ht,null,t.createElement(gt,null,t.createElement("div",{ref:_},t.createElement(F,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==H&&t.createElement(Vt,{state:U,isMobile:e,dispatch:W,debouncedFetchCitiesByKeyword:ue,selectedLocation:ee,onLocationClick:ge,trackingAttributes:O}),t.createElement(Pt,{type:H,isMobile:e,state:U,dispatch:W,debouncedFetchSearchResults:he,initalSearchValue:f,focusSearchInput:me,onEnterSearch:Ce,typeInformation:pe,trackingAttributes:L,isLoading:oe,hideSpecialtySelection:R,clientSlug:P}),t.createElement(M,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:Ce,styles:{root:{height:e?"40px":"48px"}}},V("booking.searchBar.searchButton"))),!T&&"specialty"!==H&&U.popularKeys.length>0&&t.createElement(Wt,{type:H,state:U,typeInformation:pe,dispatch:W}),"specialty"===H&&"search"===q&&t.createElement(Gt,{state:U,isMobile:e,dispatch:W,specialties:(null==ae?void 0:ae.specialty)||[],isLoading:oe}))))))},ti=b.div`
767
767
  background-color: var(--neutral50);
768
768
  padding: 12px 0;
769
769
  box-shadow: inset 0px 1px 0px #e4e8ec;
@@ -1 +1 @@
1
- export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,E as ELEMENT_CONTROL_INPUT_TYPE,F as FULL_KEY_ADDRESS,G as Gender,L as LOCALE,f as NodeActionType,d as NodeFinalTypes,e as NodeIntentType,g as NodeMultipleOptions,N as NodePosition,c as NodeType,O as OnboardingStep,S as SubotType}from"./Subot-dac02b43.js";
1
+ export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,E as ELEMENT_CONTROL_INPUT_TYPE,F as FULL_KEY_ADDRESS,G as Gender,L as LOCALE,f as NodeActionType,d as NodeFinalTypes,e as NodeIntentType,g as NodeMultipleOptions,N as NodePosition,c as NodeType,O as OnboardingStep,S as SubotType}from"./Subot-0c45fa4c.js";
@@ -0,0 +1 @@
1
+ import{a as e}from"./tslib.es6-cabcb8ea.js";import{useRef as a,useEffect as n,useState as t,useCallback as i,useMemo as l}from"react";import{g as s}from"./cookieHelper-cbd9f06e.js";import{a as b,u as r}from"./useTranslations-80f9bf98.js";import{L as h}from"./Subot-0c45fa4c.js";function o(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const u=t=>{const i=a("");n((()=>(e(void 0,void 0,void 0,(function*(){var e,a,n,l,b;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(n=i.current)||void 0===n?void 0:n.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,n,i,r,h]=yield Promise.all([t.email?o(t.email):null,t.phone?o(t.phone):null,t.birthday?o(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?o(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?o(t.name):null]);s("_fbc"),s("_fbp");const u={user_id:t.id};h&&(u.fn=h),e&&(u.em=e),a&&(u.ph=a),n&&(u.db=n),r&&(u.ct=r),null===(b=null===(l=window.localStorage)||void 0===l?void 0:l.setItem)||void 0===b||b.call(l,"fbDataLayer_userInfo",JSON.stringify(u))}})),()=>{})),[t])},c=e=>{const n=a(),t=a(e);return b()||t.current===e||(n.current=t.current,t.current=e),n.current},g=e=>{const[l,s]=t(e),b=a(0),r=i((e=>{cancelAnimationFrame(b.current),b.current=requestAnimationFrame((()=>{s(e)}))}),[]);return n((()=>()=>cancelAnimationFrame(b.current))),[l,r]},d={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},p={[h.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[h.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[h.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[h.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[h.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[h.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};const m=e=>{const{locale:a}=r();return{isPregnancy:l((()=>decodeURI(e.replace(/\//gi,"")).includes(d[a])),[]),isParenting:l((()=>{var n;return decodeURI(e.replace(/\//gi,"")).includes(null===(n=p[a])||void 0===n?void 0:n.parenting)}),[]),type:l((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,p[a])),[e,a])}};export{p as M,d as P,c as a,g as b,m as c,u};
@@ -0,0 +1 @@
1
+ import{a as o}from"./tslib.es6-cabcb8ea.js";import{useState as t,useEffect as i,useCallback as a}from"react";import{a as e}from"./getDynamicHealthTool-37333454.js";const l=l=>{const[n,r]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield e(l);r(o)}))}),[e,l]);const s=a((o=>{var t;return(null===(t=n.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[n]);return{allTools:n,getHealthToolLink:s}};export{l as u};
@@ -1 +1 @@
1
- import{a as e}from"./tslib.es6-ed0fd94c.js";import{useState as i,useEffect as t}from"react";const o="undefined"==typeof window,n={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},r="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",c=(r="",c="",s="",d=500)=>{const[a,l]=i([]),[p,u]=i(!1);return t((()=>{let i;return r?i=window.setTimeout((()=>e(void 0,void 0,void 0,(function*(){var i;if(r)try{u(!0);const t=yield((i="",t="",r="vi")=>e(void 0,void 0,void 0,(function*(){return new Promise(((e,c)=>{if(!i)return c("Need valid text input");if(o)return c("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:i},t?{componentRestrictions:{country:t}}:{}),{language:n[r]}),e)}catch(e){c(e)}}))})))(r,c,s);l(!(i=t)||i.length<1?[]:i.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{u(!1)}else l([])}))),d):a.length&&l([]),()=>{window.clearTimeout(i)}}),[r,d,c]),{isLoading:p,predictions:a}};export{r as G,n as a,c as u};
1
+ import{a as e}from"./tslib.es6-cabcb8ea.js";import{useState as i,useEffect as t}from"react";const o="undefined"==typeof window,n={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},r="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",c=(r="",c="",a="",s=500)=>{const[d,l]=i([]),[p,u]=i(!1);return t((()=>{let i;return r?i=window.setTimeout((()=>e(void 0,void 0,void 0,(function*(){var i;if(r)try{u(!0);const t=yield((i="",t="",r="vi")=>e(void 0,void 0,void 0,(function*(){return new Promise(((e,c)=>{if(!i)return c("Need valid text input");if(o)return c("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:i},t?{componentRestrictions:{country:t}}:{}),{language:n[r]}),e)}catch(e){c(e)}}))})))(r,c,a);l(!(i=t)||i.length<1?[]:i.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{u(!1)}else l([])}))),s):d.length&&l([]),()=>{window.clearTimeout(i)}}),[r,s,c]),{isLoading:p,predictions:d}};export{r as G,n as a,c as u};
@@ -1 +1 @@
1
- import{useRef as r,useContext as t,useMemo as n}from"react";import{T as o}from"./translationsContext-2928d817.js";import e from"string-format";const a=()=>{const t=r(!0);return!!t.current&&(t.current=!1,!0)};let s=0;const l=()=>{const t=r("");return a()&&(s+=1,t.current=`hhg-gen-id${s}`),t.current};function c(){const{values:r,locale:a}=t(o)||{locale:"en-PH"};return n((()=>({t:(t,n)=>r?r[t]?n?e(r[t]||t,n):r[t]||t:(console.warn(`[useTranslations] Missing translation for key ${t} and locale ${a}`),n?e(t,n):t):(console.error("[useTranslations] t method called before translation values are loaded"),t),locale:a})),[r,a])}export{a,l as b,c as u};
1
+ import{useRef as r,useContext as t,useMemo as n}from"react";import{T as o}from"./translationsContext-9fc8f894.js";import e from"string-format";const a=()=>{const t=r(!0);return!!t.current&&(t.current=!1,!0)};let s=0;const l=()=>{const t=r("");return a()&&(s+=1,t.current=`hhg-gen-id${s}`),t.current};function c(){const{values:r,locale:a}=t(o)||{locale:"en-PH"};return n((()=>({t:(t,n)=>r?r[t]?n?e(r[t]||t,n):r[t]||t:(console.warn(`[useTranslations] Missing translation for key ${t} and locale ${a}`),n?e(t,n):t):(console.error("[useTranslations] t method called before translation values are loaded"),t),locale:a})),[r,a])}export{a,l as b,c as u};
@@ -1,4 +1,4 @@
1
- import{M as t}from"./screenSizeContext-96560239.js";import e from"styled-components";import a,{memo as o,useMemo as s}from"react";import{C as n}from"./index-c011f60e.js";import{I as r}from"./index-bc7b446c.js";import{L as h}from"./Subot-dac02b43.js";const l=e.div`
1
+ import{M as t}from"./utils-3f639011.js";import e from"styled-components";import a,{memo as o,useMemo as s}from"react";import{C as n}from"./index-3d2b9817.js";import{I as r}from"./index-9e5a2805.js";import{L as l}from"./Subot-0c45fa4c.js";const h=e.div`
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -138,4 +138,4 @@ import{M as t}from"./screenSizeContext-96560239.js";import e from"styled-compone
138
138
  width: unset;
139
139
  margin-bottom: 4px;
140
140
  margin-left: -3px;
141
- `,i=o((({type:t,width:e,height:o})=>{const h=s((()=>{switch(t){case"hellobacsi":return{width:e||"107px",height:o||"24px",src:n.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:e||"127px",height:o||"24px",src:n.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:e||"121px",height:o||"27px",src:n.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:e||"123px",height:o||"24px",src:n.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:e||"150px",height:o||"24px",src:n.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:e||"99px",height:o||"24px",src:n.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:e||"127px",height:o||"24px",src:n.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:e||"101px",height:o||"24px",src:n.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:e||"111px",height:o||"24px",src:n.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:e||"89px",height:o||"24px",src:n.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:e||"123px",height:o||"24px",src:n.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:e||"105px",height:o||"24px",src:n.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:e||"60px",height:o||"57px",src:n.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:e||"145px",height:o||"28px",src:n.getAssetPath("logo/marrybaby.png")};default:return null}}),[t,e,o]),{src:l,width:g,height:i}=h||{};return a.createElement(r,{alt:`${t} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),p=t=>{const e=t.getDate();return 11===t.getMonth()&&e>=16&&e<=25},d={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},c=[h.Vietnam,h.Taiwan,h.Indonesia,h.Malaysia],m=t=>{const e=t.getFullYear(),a=d[e];if(!a)return!1;const o=new Date(e,a[1],a[0]),s=new Date(o);s.setDate(o.getDate()-7);const n=new Date(o);return n.setDate(o.getDate()+5),s<=t&&t<=n},x=t=>{const e=t.getDate(),a=t.getMonth();return 11===a&&e>=26||0===a&&e<=15},w=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],u=t=>{const e=t.getFullYear(),a=w.filter((t=>t.year===e));return!!a.length&&a.some((a=>{const o=a.start[2]||e,s=new Date(o,a.start[1],a.start[0]),n=new Date(o,a.end[1],a.end[0]);return s<=t&&t<=n}))},f={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]},y=t=>{const e=t.getFullYear(),a=f[e];if(!a)return!1;const o=new Date(e,a[1],a[0]),s=new Date(o);s.setDate(o.getDate()-1);const n=new Date(o);return n.setDate(o.getDate()+1),s<=t&&t<=n},D=t=>{const e=t.getFullYear(),a=new Date(e,3,30),o=new Date(a);o.setDate(a.getDate()-1);const s=new Date(a);return s.setDate(a.getDate()+2),o<=t&&t<=s},b=t=>{const e=t.getFullYear(),a=new Date(e,4,1),o=new Date(a);o.setDate(a.getDate()-1);const s=new Date(a);return s.setDate(a.getDate()+1),o<=t&&t<=s};export{i as L,l as S,c as a,m as b,x as c,u as d,y as e,D as f,b as g,g as h,p as i};
141
+ `,i=o((({type:t,width:e,height:o})=>{const l=s((()=>{switch(t){case"hellobacsi":return{width:e||"107px",height:o||"24px",src:n.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:e||"127px",height:o||"24px",src:n.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:e||"121px",height:o||"27px",src:n.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:e||"123px",height:o||"24px",src:n.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:e||"150px",height:o||"24px",src:n.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:e||"99px",height:o||"24px",src:n.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:e||"127px",height:o||"24px",src:n.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:e||"101px",height:o||"24px",src:n.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:e||"111px",height:o||"24px",src:n.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:e||"89px",height:o||"24px",src:n.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:e||"123px",height:o||"24px",src:n.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:e||"105px",height:o||"24px",src:n.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:e||"60px",height:o||"57px",src:n.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:e||"145px",height:o||"28px",src:n.getAssetPath("logo/marrybaby.png")};default:return null}}),[t,e,o]),{src:h,width:g,height:i}=l||{};return a.createElement(r,{alt:`${t} logo`,className:"main-logo-icon",src:h,style:{width:g,height:i}})})),p=t=>{const e=t.getDate();return 11===t.getMonth()&&e>=16&&e<=25},d={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},c=[l.Vietnam,l.Taiwan,l.Indonesia,l.Malaysia],m=t=>{const e=t.getFullYear(),a=d[e];if(!a)return!1;const o=new Date(e,a[1],a[0]),s=new Date(o);s.setDate(o.getDate()-7);const n=new Date(o);return n.setDate(o.getDate()+5),s<=t&&t<=n},x=t=>{const e=t.getDate(),a=t.getMonth();return 11===a&&e>=26||0===a&&e<=15},u=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],w=t=>{const e=t.getFullYear(),a=u.filter((t=>t.year===e));return!!a.length&&a.some((a=>{const o=a.start[2]||e,s=new Date(o,a.start[1],a.start[0]),n=new Date(o,a.end[1],a.end[0]);return s<=t&&t<=n}))},f={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]},y=t=>{const e=t.getFullYear(),a=f[e];if(!a)return!1;const o=new Date(e,a[1],a[0]),s=new Date(o);s.setDate(o.getDate()-1);const n=new Date(o);return n.setDate(o.getDate()+1),s<=t&&t<=n},D=t=>{const e=t.getFullYear(),a=new Date(e,3,30),o=new Date(a);o.setDate(a.getDate()-1);const s=new Date(a);return s.setDate(a.getDate()+2),o<=t&&t<=s},b=t=>{const e=t.getFullYear(),a=new Date(e,4,1),o=new Date(a);o.setDate(a.getDate()-1);const s=new Date(a);return s.setDate(a.getDate()+1),o<=t&&t<=s};export{i as L,h as S,c as a,m as b,x as c,w as d,y as e,D as f,b as g,g as h,p as i};
@@ -0,0 +1,7 @@
1
+ import{a as e}from"./tslib.es6-cabcb8ea.js";import{g as t}from"./cookieHelper-cbd9f06e.js";import r from"slugify";import"./index-bcca5543.js";import o from"string-format";import a,{createContext as i,useState as s,useEffect as l}from"react";import{i as n}from"./isProduction-cfb9150a.js";
2
+ /*!
3
+ * cookie
4
+ * Copyright(c) 2012-2014 Roman Shtylman
5
+ * Copyright(c) 2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */var _=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||d,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var s=e.indexOf(";",a);if(-1===s)s=e.length;else if(s<i){a=e.lastIndexOf(";",i-1)+1;continue}var l=e.slice(a,i).trim();if(void 0===r[l]){var n=e.slice(i+1,s).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),r[l]=T(n,o)}a=s+1}return r},c=function(e,t,r){var o=r||{},a=o.encode||p;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!E.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!E.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(l)}if(o.domain){if(!E.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain="+o.domain}if(o.path){if(!E.test(o.path))throw new TypeError("option path is invalid");s+="; Path="+o.path}if(o.expires){var n=o.expires;if(!function(e){return"[object Date]"===u.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+n.toUTCString()}o.httpOnly&&(s+="; HttpOnly");o.secure&&(s+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},u=Object.prototype.toString,E=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function d(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function p(e){return encodeURIComponent(e)}function T(e,t){try{return t(e)}catch(t){return e}}var m={parse:_,serialize:c};const O={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",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}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},b={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},h={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},A={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},g={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},v=i({data:g,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});let I=g;const L=({locale:e="vi-VN",children:t,userInfo:r,router:o,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:n=(e=>e),pushNotifications:_=(()=>!1),formatMessage:c})=>{const[u,E]=s();return I={userInfo:r,locale:e,togetherUserId:u,router:o,env:i},l((()=>{(null==r?void 0:r.id)&&Q(V(O.PROFILE,{_locale:e}),"GET").then((e=>{var t;E(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==r?void 0:r.id]),a.createElement(v.Provider,{value:{data:{userInfo:r,locale:e,togetherUserId:u,router:o,env:i},action:{pushNotifications:_,sanitizeFunction:n},formatMessage:c}},t)},S="DD/MM/YYYY",w="/images/avatar.jpg",R="/images/default-image.jpg",y={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},f={"id-ID":{"kalkulator-bmi":y.BMI,"kebutuhan-kalori":y.BMR,"kalkulator-hari-perkiraan-lahir":y.DUE_DATE,"kalkulator-masa-subur-2":y.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":y.PWG,"kalkulator-detak-jantung-saat-olahraga":y.THR},"ms-MY":{"kalkulator-bmi":y.BMI,"kalkulator-bmr":y.BMR,"kalkulator-tarikh-bersalin":y.DUE_DATE,"kalkulator-kesuburan":y.OVULATION,"kalkulator-tambah-berat-badan-hamil":y.PWG,"target-heart-rate-calculator":y.THR},"vi-VN":{"cach-tinh-chi-so-bmi":y.BMI,"tinh-chi-so-bmr":y.BMR,"cong-cu-tinh-ngay-du-sinh":y.DUE_DATE,"tinh-ngay-rung-trung":y.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":y.PWG,"cong-cu-do-nhip-tim":y.THR},"zh-TW":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"en-PH":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":y.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":y.BMR,"เครื่องมือคำนวณกำหนดคลอด":y.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":y.OVULATION,"เครื่องคำนวณน้ำหนักตัว":y.PWG,"เครื่องวัดอัตราการเต้น":y.THR},"hi-IN":{"bmi-calculator-en":y.BMI,"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"delivery-date-calculator":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnancy-weight-gain-calculator":y.PWG,"target-heart-rate-calculator":y.THR},"km-KH":{"គណនា-bmi":y.BMI,"គណនា-bmr":y.BMR,"គណនាថ្ងៃសម្រាលកូន":y.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":y.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":y.PWG,"គណនារកចង្វាក់បេះដូងល្អ":y.THR},"my-MM":{"bmi-calculator":y.BMI,"bmr-calculator":y.BMR,"due-date-calendar":y.DUE_DATE,"ovulation-calculator":y.OVULATION,"pregnaancy-weight-calculator":y.PWG,"target-heartrate":y.THR,"pregnancy-weight-calculator":y.PWG,"target-heart-rate":y.THR}},P="hhg_user_token",D="together_admin_token",G={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},N="hhg-id",C={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},M=20,U={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var k=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:S,DEFAULT_AVATAR_IMG:w,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:R,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:y,LOCALE_HEALTH_TOOLS:f,BEARER_TOKEN_COOKIE:P,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:D,Z_INDEX:G,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:N,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",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",REPORT_REASON_MAP:C,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:U});const B={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},H={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",F=e=>{const{env:{isMarryBaby:t}}=I;return`https://${t?H[e]:B[e]}`},j=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},K=e=>{const{env:{isMarryBaby:t}}=I;if("undefined"!=typeof window)return window.location.origin;const r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${r?t?"fe.":"discover.":t?"www.":""}${B[e]}`},V=(e,t,r,a)=>{let i="";r&&(i=Object.keys(r).map((e=>e+"="+r[e])).join("&"));const{togetherBaseApiUrl:s=""}=(null==I?void 0:I.env)||{};let l=o(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:F(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${i}`;return(a||s)+"api/v1/"+j(l)},Y=(e,t,r)=>{const{discoverBaseApiUrl:a="",discoverBaseProdApiUrl:i=""}=(null==I?void 0:I.env)||{};return(!n&&r?i:a)+"wp-json/api/"+j(o(e,Object.assign({},t)))},W=(e,t,r)=>{const{marryBabyApiUrl:a="",marryBabyProdApiUrl:i=""}=(null==I?void 0:I.env)||{};return(r&&!n?i:a)+"wp-json/api/"+j(o(e,Object.assign({},t)))},$=(e,t)=>{const{careBaseApiUrl:r=""}=(null==I?void 0:I.env)||{};return(r||"https://service-health-care.hellohealthgroup.com/")+j(o(e,Object.assign({},t)))},X=(e,t)=>{const{premiumBaseApiUrl:r=""}=(null==I?void 0:I.env)||{};return(r||"https://premium-content-stag.hellohealthgroup.com/")+j(o(e,Object.assign({},t)))},z=(e,t)=>{const{publicSSO:r=""}=(null==I?void 0:I.env)||{};return(r||"https://staging-id.hellobacsi.com/")+"api/"+j(o(e,Object.assign({},t)))},q=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),Z=(t,r,o,a=!1)=>e(void 0,void 0,void 0,(function*(){var e,i,s,l;try{const e=yield fetch(a?t:(l=t,encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:r},q(o)),{headers:Object.assign({},null==o?void 0:o.headers)})).then((e=>e.json()));if(e)return e}catch(r){return console.log(r),console.log({url:t,status:null===(e=null==r?void 0:r.response)||void 0===e?void 0:e.status,statusText:null===(i=null==r?void 0:r.response)||void 0===i?void 0:i.statusText}),(null===(s=null==r?void 0:r.response)||void 0===s?void 0:s.data)||null}return null})),J=(r,o="GET",a,i)=>e(void 0,void 0,void 0,(function*(){var e,s,l,n,_,c;try{const n="string"==typeof r?r:r.url,_="string"==typeof r?r:r.backupUrl,c=m.parse(i||""),u=c[P]||t(P);if(!u||!u.length)return Z(_||n,o,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+u},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return Z(_||n,o,a);if(t)return t}catch(e){return console.log({status:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusText:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.statusText}),Z(_||n,o,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(c=null==e?void 0:e.response)||void 0===c?void 0:c.data)||null}return null})),Q=(r,o,a,i)=>e(void 0,void 0,void 0,(function*(){try{const e=m.parse(i||""),s=e[P]||t(P);if(s&&s.length){const e=yield fetch(r,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+s},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),ee=(r,o,a,i)=>e(void 0,void 0,void 0,(function*(){try{const e=m.parse(i||""),s=e[D]||t(D);if(s&&s.length){const e=yield fetch(r,Object.assign(Object.assign({method:o},q(a)),{headers:Object.assign({Authorization:"Bearer "+s},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function te(e,t,r){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}const re=(e,t,r="/community")=>{const o=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:r}=I.env,o=e||window.location.href;return t&&Object.keys(t).map((e=>{te(o,e,t[e])})),te(o,"source","communities"),r?`${r}?returnUrl=${encodeURIComponent(o.toString())}`:o})(`${a}${r}/on-boarding?return=${encodeURIComponent(o)}`,t)},oe=(e,t,o,a)=>o&&t?`${o}-${t}`:`${r(e||"",{lower:!0,locale:a||x})}-${t}`,ae=({name:e,id:t,locale:r})=>{var o;return`/care/${null===(o=U[r||"vi-VN"])||void 0===o?void 0:o.DOCTOR}/${oe(e,t)}`},ie=({name:e,id:t,slug:r,locale:o})=>{var a;return`/care/${null===(a=U[o||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${oe(e,t,r)}`};export{A,P as B,b as C,g as D,I as G,y as H,N as L,M,O as P,C as R,v as T,G as Z,L as a,Z as b,k as c,V as d,R as e,K as f,re as g,$ as h,B as i,ie as j,ae as k,Y as l,h as m,ee as n,Q as o,w as p,W as q,J as r,S as s,X as t,F as u,z as v,H as w,m as x,x as y};
@@ -0,0 +1 @@
1
+ const e=e=>{const t=Object.keys(e);return t.length?"?"+t.map((t=>`${t}=${e[t]}`)).join("&"):""},t=(t,_=1,n="page")=>{const[d,a]=t.split("?"),r=new URLSearchParams(a||""),E={};return r.forEach(((e,t)=>{e&&(E[t]=e)})),Number(_)>1?E[n]=String(_):delete E[n],d+e(E)},_=e=>{"undefined"!=typeof window&&(document.documentElement.style.overflow=e?"hidden":"")},n={BREAK_POINT_SMALL_MOBILE:480,BREAK_POINT_MOBILE:768,BREAK_POINT_TABLET:1024,BREAK_POINT_PC:1159,BREAK_POINT_LGPC:1440},d={smbDown:`@media (max-width: ${n.BREAK_POINT_SMALL_MOBILE-1}px)`,smbUp:`@media (min-width: ${n.BREAK_POINT_SMALL_MOBILE}px)`,mbDown:`@media (max-width: ${n.BREAK_POINT_MOBILE-1}px)`,mbOnly:`@media (min-width: ${n.BREAK_POINT_SMALL_MOBILE}px) and (max-width: ${n.BREAK_POINT_MOBILE-1}px)`,mbUp:`@media (min-width: ${n.BREAK_POINT_MOBILE}px)`,tdDown:`@media (max-width: ${n.BREAK_POINT_TABLET-1}px)`,tdOnly:`@media (min-width: ${n.BREAK_POINT_MOBILE}px) and (max-width: ${n.BREAK_POINT_TABLET-1}px)`,tdUp:`@media (min-width: ${n.BREAK_POINT_TABLET}px)`,pcUp:`@media (min-width: ${n.BREAK_POINT_PC}px)`,pcOnly:`@media (min-width: ${n.BREAK_POINT_TABLET}px) and (max-width: ${n.BREAK_POINT_PC-1}px)`,pcDown:`@media (max-width: ${n.BREAK_POINT_PC-1}px)`,lgPcUp:`@media (min-width: ${n.BREAK_POINT_LGPC}px)`,lgPcOnly:`@media (min-width: ${n.BREAK_POINT_PC}px) and (max-width: ${n.BREAK_POINT_LGPC-1}px)`,lgPcDown:`@media (max-width: ${n.BREAK_POINT_LGPC-1}px)`,mbToPC:`@media (min-width: ${n.BREAK_POINT_MOBILE}px) and (max-width: ${n.BREAK_POINT_PC-1}px)`},a=e=>{switch(e){case"smbDown":return[0,n.BREAK_POINT_SMALL_MOBILE-1];case"smbUp":return[n.BREAK_POINT_SMALL_MOBILE,0];case"mbDown":return[0,n.BREAK_POINT_MOBILE-1];case"mbOnly":return[n.BREAK_POINT_SMALL_MOBILE,n.BREAK_POINT_MOBILE-1];case"mbUp":return[n.BREAK_POINT_MOBILE,0];case"tdDown":return[0,n.BREAK_POINT_TABLET-1];case"tdOnly":return[n.BREAK_POINT_MOBILE,n.BREAK_POINT_TABLET-1];case"tdUp":return[n.BREAK_POINT_TABLET,0];case"pcUp":return[n.BREAK_POINT_PC,0];case"pcOnly":return[n.BREAK_POINT_TABLET,n.BREAK_POINT_PC-1];case"pcDown":return[0,n.BREAK_POINT_PC-1];case"lgPcUp":return[n.BREAK_POINT_LGPC,0];case"lgPcOnly":return[n.BREAK_POINT_PC,n.BREAK_POINT_LGPC-1];case"lgPcDown":return[0,n.BREAK_POINT_LGPC-1];case"mbToPC":return[n.BREAK_POINT_MOBILE,n.BREAK_POINT_PC-1]}},r=()=>{if("undefined"==typeof document)return null;const e="hhg-comp-popup-wrapper";if(!document.querySelector("#"+e)){const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return document.querySelector("#"+e)},E=(e,t)=>{if("undefined"==typeof document)return null;if(!e.querySelector(`[data-wrapper-selector="${t}"]`)){const e=document.createElement("div");e.setAttribute("data-wrapper-selector",t),document.body.appendChild(e)}return e.querySelector(`[data-wrapper-selector="${t}"]`)},B=e=>e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})),O=e=>decodeURI(e)!==e?e:encodeURI(e);export{n as B,d as M,r as a,E as b,O as c,t as f,a as g,e as m,B as s,_ as t};
@@ -1 +1 @@
1
- import{L as a}from"./Subot-dac02b43.js";const i={[a.Vietnam]:"VN",[a.Cambodia]:"KH",[a.Indonesia]:"ID",[a.Malaysia]:"MY",[a.PhilippinesEnglish]:"PH",[a.PhilippinesTagalog]:"PH",[a.Taiwan]:"TW",[a.Thailand]:"TH",[a.Myanmar]:"MM"},n=(a="")=>{const i=a.indexOf("@"),n=a.substring(0,i),s=n.length>3?3:n.length;return a.replace(a.substring(s,i),a.slice(s,i).replace(/./g,"x"))};export{i as M,n as h};
1
+ import{L as a}from"./Subot-0c45fa4c.js";const i={[a.Vietnam]:"VN",[a.Cambodia]:"KH",[a.Indonesia]:"ID",[a.Malaysia]:"MY",[a.PhilippinesEnglish]:"PH",[a.PhilippinesTagalog]:"PH",[a.Taiwan]:"TW",[a.Thailand]:"TH",[a.Myanmar]:"MM"},n=(a="")=>{const i=a.indexOf("@"),n=a.substring(0,i),s=n.length>3?3:n.length;return a.replace(a.substring(s,i),a.slice(s,i).replace(/./g,"x"))};export{i as M,n as h};