@hhgtech/hhg-components 1.29.527 → 1.29.529-beta-1

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 (579) hide show
  1. package/build/{InputDate-4723615c.js → InputDate-5e4a49ed.js} +5 -5
  2. package/build/{LastPeriod-73630d52.js → LastPeriod-ae6a6654.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-cc6f18e0.js → MobileBottomNavigationIcon-336e5400.js} +3 -3
  4. package/build/{SiteWideBanner-72c71636.js → SiteWideBanner-c790d1b1.js} +11 -11
  5. package/build/{Spinner-a6e3eb27.js → Spinner-cadbaad5.js} +1 -1
  6. package/build/{WhatsApp-5f603292.js → WhatsApp-d92a3699.js} +1 -1
  7. package/build/adapters.js +20 -20
  8. package/build/atoms.js +51 -51
  9. package/build/babyGrowth.js +86 -86
  10. package/build/cache.js +2 -2
  11. package/build/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  12. package/build/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  13. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  14. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  15. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  16. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  17. package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  18. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  19. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  20. package/build/care/components/organisms/bookingSearchBarV3/SearchResultContent.d.ts +13 -0
  21. package/build/care/components/organisms/bookingSearchBarV3/constants.d.ts +4 -0
  22. package/build/care/components/organisms/bookingSearchBarV3/index.d.ts +42 -0
  23. package/build/care/components/organisms/bookingSearchBarV3/index.styled.d.ts +16 -0
  24. package/build/care/components/organisms/bookingSearchBarV3/reducer.d.ts +166 -0
  25. package/build/care/components/organisms/bookingSearchBarV3/searchInputs/ModalSearchResult.d.ts +8 -0
  26. package/build/care/components/organisms/bookingSearchBarV3/searchInputs/index.d.ts +35 -0
  27. package/build/care/components/organisms/bookingSearchBarV3/searchInputs/index.styled.d.ts +17 -0
  28. package/build/care/components/organisms/bookingSearchBarV3/searchLocation/CustomSelectItem.d.ts +9 -0
  29. package/build/care/components/organisms/bookingSearchBarV3/searchLocation/index.d.ts +16 -0
  30. package/build/care/components/organisms/bookingSearchBarV3/searchLocation/index.styled.d.ts +21 -0
  31. package/build/care/components/organisms/bookingSearchBarV3/searchResult/icons.d.ts +5 -0
  32. package/build/care/components/organisms/bookingSearchBarV3/searchResult/index.d.ts +22 -0
  33. package/build/care/components/organisms/bookingSearchBarV3/searchResult/index.styled.d.ts +21 -0
  34. package/build/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.d.ts +12 -0
  35. package/build/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.styled.d.ts +16 -0
  36. package/build/care/components/organisms/bookingSearchBarV3/searchSpecialty/CustomSelectItem.d.ts +9 -0
  37. package/build/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.d.ts +15 -0
  38. package/build/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.styled.d.ts +13 -0
  39. package/build/care/components/organisms/bookingSearchBarV3/searchTag/index.d.ts +17 -0
  40. package/build/care/components/organisms/bookingSearchBarV3/searchTag/index.styled.d.ts +13 -0
  41. package/build/care/components/organisms/bookingSearchBarV3/tabSearch/index.d.ts +11 -0
  42. package/build/care/components/organisms/bookingSearchBarV3/tabSearch/index.styled.d.ts +8 -0
  43. package/build/care/components/organisms/bookingSearchBarV3/types.d.ts +17 -0
  44. package/build/care/components/organisms/bookingSearchBarV3/useSearchBarApi.d.ts +21 -0
  45. package/build/care/index.d.ts +1 -0
  46. package/build/care.js +25 -18
  47. package/build/careBookingSearchBar.js +14 -14
  48. package/build/careBookingSearchBarV2.js +553 -258
  49. package/build/components/atoms/inputMB/index.styled.d.ts +3 -3
  50. package/build/components.js +106 -106
  51. package/build/{constants-8ddf9f14.js → constants-0edb49d2.js} +1 -1
  52. package/build/{constants-ec3816fe.js → constants-d11ea2c1.js} +2 -2
  53. package/build/constants.js +3 -3
  54. package/build/constantsDomainLocales.js +1 -1
  55. package/build/constantsRiskScreener.js +2 -2
  56. package/build/constantsSite.js +2 -2
  57. package/build/{core-1b4b5bb6.js → core-bbf3a6e6.js} +1 -1
  58. package/build/{dataTransform-f5d2e15b.js → dataTransform-7afee0f7.js} +1 -1
  59. package/build/ecom.js +5 -5
  60. package/build/{editor-1f3a4880.js → editor-c8d3fd95.js} +11 -11
  61. package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
  62. package/build/embeddedHeathToolCards_babyPoop.js +22 -22
  63. package/build/embeddedHeathToolCards_babyVaccine.js +24 -24
  64. package/build/embeddedHeathToolCards_bmi_bmi.js +27 -27
  65. package/build/embeddedHeathToolCards_bmrBmr.js +27 -27
  66. package/build/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  67. package/build/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  68. package/build/embeddedHeathToolCards_pwg_pwg.js +28 -28
  69. package/build/embeddedHeathToolCards_targetHeartRate.js +29 -29
  70. package/build/esm/{InputDate-19558a4a.js → InputDate-ee44d874.js} +5 -5
  71. package/build/esm/{LastPeriod-36173ef3.js → LastPeriod-3f8bf079.js} +1 -1
  72. package/build/esm/{MobileBottomNavigationIcon-6c0c186f.js → MobileBottomNavigationIcon-689596bb.js} +3 -3
  73. package/build/esm/{SiteWideBanner-7010dc39.js → SiteWideBanner-a54f6112.js} +11 -11
  74. package/build/esm/{Spinner-432bb892.js → Spinner-493579cd.js} +1 -1
  75. package/build/esm/{WhatsApp-e843edd2.js → WhatsApp-7f209dbb.js} +1 -1
  76. package/build/esm/adapters.js +20 -20
  77. package/build/esm/atoms.js +51 -51
  78. package/build/esm/babyGrowth.js +86 -86
  79. package/build/esm/cache.js +2 -2
  80. package/build/esm/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  81. package/build/esm/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  82. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  83. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  84. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  85. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  86. package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  87. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  88. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  89. package/build/esm/care/components/organisms/bookingSearchBarV3/SearchResultContent.d.ts +13 -0
  90. package/build/esm/care/components/organisms/bookingSearchBarV3/constants.d.ts +4 -0
  91. package/build/esm/care/components/organisms/bookingSearchBarV3/index.d.ts +42 -0
  92. package/build/esm/care/components/organisms/bookingSearchBarV3/index.styled.d.ts +16 -0
  93. package/build/esm/care/components/organisms/bookingSearchBarV3/reducer.d.ts +166 -0
  94. package/build/esm/care/components/organisms/bookingSearchBarV3/searchInputs/ModalSearchResult.d.ts +8 -0
  95. package/build/esm/care/components/organisms/bookingSearchBarV3/searchInputs/index.d.ts +35 -0
  96. package/build/esm/care/components/organisms/bookingSearchBarV3/searchInputs/index.styled.d.ts +17 -0
  97. package/build/esm/care/components/organisms/bookingSearchBarV3/searchLocation/CustomSelectItem.d.ts +9 -0
  98. package/build/esm/care/components/organisms/bookingSearchBarV3/searchLocation/index.d.ts +16 -0
  99. package/build/esm/care/components/organisms/bookingSearchBarV3/searchLocation/index.styled.d.ts +21 -0
  100. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResult/icons.d.ts +5 -0
  101. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResult/index.d.ts +22 -0
  102. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResult/index.styled.d.ts +21 -0
  103. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.d.ts +12 -0
  104. package/build/esm/care/components/organisms/bookingSearchBarV3/searchResultSpecialties/index.styled.d.ts +16 -0
  105. package/build/esm/care/components/organisms/bookingSearchBarV3/searchSpecialty/CustomSelectItem.d.ts +9 -0
  106. package/build/esm/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.d.ts +15 -0
  107. package/build/esm/care/components/organisms/bookingSearchBarV3/searchSpecialty/index.styled.d.ts +13 -0
  108. package/build/esm/care/components/organisms/bookingSearchBarV3/searchTag/index.d.ts +17 -0
  109. package/build/esm/care/components/organisms/bookingSearchBarV3/searchTag/index.styled.d.ts +13 -0
  110. package/build/esm/care/components/organisms/bookingSearchBarV3/tabSearch/index.d.ts +11 -0
  111. package/build/esm/care/components/organisms/bookingSearchBarV3/tabSearch/index.styled.d.ts +8 -0
  112. package/build/esm/care/components/organisms/bookingSearchBarV3/types.d.ts +17 -0
  113. package/build/esm/care/components/organisms/bookingSearchBarV3/useSearchBarApi.d.ts +21 -0
  114. package/build/esm/care/index.d.ts +1 -0
  115. package/build/esm/care.js +24 -18
  116. package/build/esm/careBookingSearchBar.js +14 -14
  117. package/build/esm/careBookingSearchBarV2.js +555 -260
  118. package/build/esm/components/atoms/inputMB/index.styled.d.ts +3 -3
  119. package/build/esm/components.js +106 -106
  120. package/build/esm/{constants-5d94c1eb.js → constants-cbbcd60c.js} +1 -1
  121. package/build/esm/{constants-02ff2b9a.js → constants-d74221c3.js} +2 -2
  122. package/build/esm/constants.js +3 -3
  123. package/build/esm/constantsDomainLocales.js +1 -1
  124. package/build/esm/constantsRiskScreener.js +2 -2
  125. package/build/esm/constantsSite.js +2 -2
  126. package/build/esm/{core-28fc1feb.js → core-87d099fa.js} +1 -1
  127. package/build/esm/{dataTransform-18e7db46.js → dataTransform-c050b25e.js} +1 -1
  128. package/build/esm/ecom.js +5 -5
  129. package/build/esm/{editor-f39bd267.js → editor-ff27d44b.js} +11 -11
  130. package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
  131. package/build/esm/embeddedHeathToolCards_babyPoop.js +22 -22
  132. package/build/esm/embeddedHeathToolCards_babyVaccine.js +24 -24
  133. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +27 -27
  134. package/build/esm/embeddedHeathToolCards_bmrBmr.js +27 -27
  135. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  136. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  137. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +28 -28
  138. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +29 -29
  139. package/build/esm/footer.js +22 -22
  140. package/build/esm/gAssets.js +2 -2
  141. package/build/esm/{healthTools-67f81a15.js → healthTools-2b645605.js} +1 -1
  142. package/build/esm/healthToolsCardWrapper.js +20 -20
  143. package/build/esm/healthToolsForm.js +35 -35
  144. package/build/esm/hooks.js +14 -14
  145. package/build/esm/i18n.js +2 -2
  146. package/build/esm/i18nV2.js +2 -2
  147. package/build/esm/{index-9783f70f.js → index-07473d09.js} +6 -6
  148. package/build/esm/{index-d8bffadf.js → index-07d60a5d.js} +3 -3
  149. package/build/esm/{index-41b75b06.js → index-098ab7be.js} +16 -16
  150. package/build/esm/{index-88ad09a2.js → index-0c431eee.js} +21 -21
  151. package/build/esm/{index-3dcbd5d8.js → index-135f4576.js} +13 -13
  152. package/build/esm/{index-00172803.js → index-139a2d50.js} +3 -3
  153. package/build/esm/{index-350c8057.js → index-1a2816df.js} +3 -3
  154. package/build/esm/{index-f25b49f4.js → index-1c630192.js} +2 -2
  155. package/build/esm/{index-89dfc455.js → index-1e35a5b6.js} +11 -11
  156. package/build/esm/{index-835cb1a4.js → index-20fffe6c.js} +4 -4
  157. package/build/esm/{index-d920a82c.js → index-25ae585e.js} +3 -3
  158. package/build/esm/{index-2757fc57.js → index-2d5e3a60.js} +13 -13
  159. package/build/esm/{index-4de26227.js → index-2dd50937.js} +32 -32
  160. package/build/esm/{index-6b81ef4b.js → index-2f8ce1f5.js} +32 -32
  161. package/build/esm/{index-592bba40.js → index-309f8ac2.js} +2 -2
  162. package/build/esm/{index-e29f4da3.js → index-344d7049.js} +8 -8
  163. package/build/esm/{index-9eb4ea68.js → index-35974708.js} +5 -5
  164. package/build/esm/{index-c262545f.js → index-39db7b82.js} +3 -3
  165. package/build/esm/{index-b34a19f4.js → index-484e72f5.js} +4 -4
  166. package/build/esm/index-4d68a1b9.js +1942 -0
  167. package/build/esm/{index-cf0997ce.js → index-50ad9f8f.js} +16 -16
  168. package/build/esm/{index-a38113ec.js → index-52468161.js} +24 -24
  169. package/build/esm/{index-d6d9926d.js → index-5612e5da.js} +16 -16
  170. package/build/esm/{index-9f3cf366.js → index-57886ee2.js} +3 -3
  171. package/build/esm/{index-0d2192e4.js → index-5af9940c.js} +15 -15
  172. package/build/esm/{index-17e22a49.js → index-5e68846a.js} +3 -3
  173. package/build/esm/{index-927ce49f.js → index-64c20666.js} +17 -17
  174. package/build/esm/{index-3bbfc9b7.js → index-64e29cd4.js} +1 -1
  175. package/build/esm/{index-ec874d7f.js → index-6656e3b2.js} +2 -2
  176. package/build/esm/{index-baeae593.js → index-67e15096.js} +6 -6
  177. package/build/esm/{index-83cdc404.js → index-6bf51980.js} +7 -7
  178. package/build/esm/{index-ed3537b8.js → index-6c01e06d.js} +2 -2
  179. package/build/esm/{index-baa344ea.js → index-6f519afd.js} +1 -1
  180. package/build/esm/{index-a0a5c82d.js → index-6fff10d6.js} +2 -2
  181. package/build/esm/{index-6d341978.js → index-70c23dec.js} +1 -1
  182. package/build/esm/{index-81417442.js → index-75584c58.js} +6 -6
  183. package/build/esm/{index-2f2b3118.js → index-7565bfca.js} +2 -2
  184. package/build/esm/{index-037ffb65.js → index-7b7cf8f7.js} +7 -7
  185. package/build/esm/{index-08a9819c.js → index-7c8ce1fa.js} +3 -3
  186. package/build/esm/{index-33b29944.js → index-7cdd0882.js} +9 -9
  187. package/build/esm/{index-c288d070.js → index-82effa1d.js} +25 -25
  188. package/build/esm/{index-5ce992e9.js → index-85d73edb.js} +16 -16
  189. package/build/esm/{index-71ef7de6.js → index-89fcee3b.js} +18 -18
  190. package/build/esm/{index-11f06411.js → index-907d254e.js} +3 -3
  191. package/build/esm/{index-21e8e383.js → index-90f1c2d6.js} +18 -18
  192. package/build/esm/{index-51164185.js → index-91731ad5.js} +2 -2
  193. package/build/esm/{index-c2162f76.js → index-9586308a.js} +6 -6
  194. package/build/esm/{index-039f30e3.js → index-98a32be1.js} +2 -2
  195. package/build/esm/{index-e772c903.js → index-998a49c6.js} +15 -15
  196. package/build/esm/{index-d5a0deff.js → index-9b79992b.js} +14 -14
  197. package/build/esm/{index-2b33f487.js → index-9ee90ed6.js} +2 -2
  198. package/build/esm/{index-b09ae67e.js → index-9eefff11.js} +22 -22
  199. package/build/esm/{index-13cc2584.js → index-a2e186e5.js} +2 -2
  200. package/build/esm/{index-d3de292b.js → index-a4e6cf4d.js} +19 -19
  201. package/build/esm/{index-132ec066.js → index-b460b125.js} +5 -5
  202. package/build/esm/{index-c11e3721.js → index-b6d67522.js} +15 -15
  203. package/build/esm/{index-848bd280.js → index-bb82e5de.js} +2 -2
  204. package/build/esm/{index-eb266a2f.js → index-be4d4296.js} +9 -9
  205. package/build/esm/{index-78e91f91.js → index-cae823f0.js} +1 -1
  206. package/build/esm/{index-14c5bc71.js → index-cca70b83.js} +33 -33
  207. package/build/esm/{index-d51a88aa.js → index-d15ebd48.js} +1 -1
  208. package/build/esm/{index-16b3f06c.js → index-d24c77b8.js} +1 -1
  209. package/build/esm/{index-625b13b0.js → index-d2df7404.js} +14 -14
  210. package/build/esm/{index-5416cd64.js → index-d2f5b100.js} +14 -14
  211. package/build/esm/{index-fb51821c.js → index-d9ef4499.js} +2 -2
  212. package/build/esm/{index-3b6525bf.js → index-e8ad0d1e.js} +3 -3
  213. package/build/esm/{index-b26c8202.js → index-eb9f4128.js} +2 -2
  214. package/build/esm/{index-40506630.js → index-eec6638d.js} +1 -1
  215. package/build/esm/{index-cac853ef.js → index-f6cd1e12.js} +2 -2
  216. package/build/esm/{index-d8b71ebe.js → index-fbbfd7bd.js} +2 -2
  217. package/build/esm/{index-6562a540.js → index-ffdfffa1.js} +2 -2
  218. package/build/esm/index.js +126 -126
  219. package/build/esm/{labelSorting-b86fc783.js → labelSorting-19277d51.js} +4 -4
  220. package/build/esm/lead.js +37 -37
  221. package/build/esm/{logoIcon-8589d465.js → logoIcon-07a87cc2.js} +2 -2
  222. package/build/esm/mantine.js +27 -27
  223. package/build/esm/misc.js +19 -19
  224. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  225. package/build/esm/miscGetSocialList.js +8 -8
  226. package/build/esm/miscScreenSizeContext.js +1 -1
  227. package/build/esm/mobileBottomNavigation.js +5 -5
  228. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  229. package/build/esm/molecules.js +79 -79
  230. package/build/esm/moleculesArticleCard.js +6 -6
  231. package/build/esm/moleculesArticleCardV2.js +17 -17
  232. package/build/esm/navigation.js +49 -49
  233. package/build/esm/navigationLogoutPopup.js +11 -11
  234. package/build/esm/navigationProfileButton.js +27 -27
  235. package/build/esm/onboardingV2.js +30 -30
  236. package/build/esm/organisms.js +62 -62
  237. package/build/esm/{paths-28205e0f.js → paths-82fdd769.js} +2 -2
  238. package/build/esm/{post-85d8faaa.js → post-7898c0ce.js} +2 -2
  239. package/build/esm/profileNavigation.js +20 -20
  240. package/build/esm/progressBar.js +1 -1
  241. package/build/esm/pwg.js +23 -23
  242. package/build/esm/ssoV2/screens/updateEmail.d.ts +4 -2
  243. package/build/esm/ssoV2/ssoStateManager/store.d.ts +1 -0
  244. package/build/esm/ssoV2.js +88 -70
  245. package/build/esm/{store-46ca3b02.js → store-364bb20c.js} +37 -28
  246. package/build/esm/subot.js +40 -40
  247. package/build/esm/surveyOrPremiumBanner.js +34 -34
  248. package/build/esm/surveyQuestionCard.js +11 -11
  249. package/build/esm/{surveyThankyouCard-fe5eb710.js → surveyThankyouCard-661ebcbf.js} +5 -5
  250. package/build/esm/together.js +57 -57
  251. package/build/esm/togetherApiUtils.js +6 -6
  252. package/build/esm/togetherAtoms.js +31 -31
  253. package/build/esm/togetherComponentGlobalContext.js +6 -6
  254. package/build/esm/togetherMolecules.js +52 -52
  255. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  256. package/build/esm/togetherMoleculesPostImagePreview.js +13 -13
  257. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  258. package/build/esm/togetherOrganisms.js +51 -51
  259. package/build/esm/togetherRichTextEditor.js +20 -20
  260. package/build/esm/togetherShareBox.js +12 -12
  261. package/build/esm/{transform-9e1ae172.js → transform-82803dcc.js} +27 -27
  262. package/build/esm/{translationsProvider-7112664a.js → translationsProvider-5d50108d.js} +1 -1
  263. package/build/esm/{treePopoverMenu-4534abf4.js → treePopoverMenu-f431287f.js} +19 -19
  264. package/build/esm/types.js +2 -2
  265. package/build/esm/{useCartCareService-dab2f9d4.js → useCartCareService-b00b5a1b.js} +1 -1
  266. package/build/esm/{useHealthToolCache-c6faed71.js → useHealthToolCache-b1ce9a17.js} +1 -1
  267. package/build/esm/{usePhoneValidator-6d70c013.js → usePhoneValidator-46de313d.js} +5 -5
  268. package/build/esm/{usePlacesAutocomplete-eb7786f7.js → usePlacesAutocomplete-2f4b50df.js} +1 -1
  269. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  270. package/build/esm/{utils-5d0e618d.js → utils-60af12e4.js} +2 -2
  271. package/build/esm/{utils-9a6c6029.js → utils-6b4b76c4.js} +3 -3
  272. package/build/esm/{utils-fb8bf638.js → utils-708d119e.js} +3 -3
  273. package/build/esm/{utils-a6dea16c.js → utils-92ef5518.js} +5 -5
  274. package/build/esm/{utils-5e210f54.js → utils-e2f50745.js} +2 -2
  275. package/build/esm/vaccination.js +22 -22
  276. package/build/footer.js +22 -22
  277. package/build/gAssets.js +2 -2
  278. package/build/{healthTools-83fac0a5.js → healthTools-48f77d98.js} +1 -1
  279. package/build/healthToolsCardWrapper.js +20 -20
  280. package/build/healthToolsForm.js +35 -35
  281. package/build/hooks.js +14 -14
  282. package/build/i18n.js +2 -2
  283. package/build/i18nV2.js +1 -1
  284. package/build/{index-d13c0da0.js → index-010294cf.js} +19 -19
  285. package/build/{index-c785a38f.js → index-09b98fc9.js} +33 -33
  286. package/build/{index-27670cc8.js → index-1774b0c0.js} +16 -16
  287. package/build/{index-73704e7a.js → index-1948737b.js} +25 -25
  288. package/build/{index-4270d6cf.js → index-19880ee5.js} +1 -1
  289. package/build/{index-4b9dcf37.js → index-19b006b0.js} +7 -7
  290. package/build/{index-78f5bf5c.js → index-1b33cbda.js} +2 -2
  291. package/build/{index-d664f4c8.js → index-1bd406ae.js} +2 -2
  292. package/build/{index-221ad3a7.js → index-1c206b60.js} +1 -1
  293. package/build/{index-768ce2e2.js → index-1d387ead.js} +3 -3
  294. package/build/{index-04d4d6d5.js → index-1d8cc34f.js} +8 -8
  295. package/build/{index-696cbd6a.js → index-2367c86a.js} +3 -3
  296. package/build/{index-e584f6b5.js → index-2831fb46.js} +3 -3
  297. package/build/{index-3d421c34.js → index-3036f9bc.js} +2 -2
  298. package/build/{index-048c359c.js → index-33b95133.js} +14 -14
  299. package/build/{index-881cfb0f.js → index-39540a70.js} +2 -2
  300. package/build/{index-2509613f.js → index-3da5eda4.js} +6 -6
  301. package/build/{index-67eb9b89.js → index-422a7df7.js} +15 -15
  302. package/build/{index-b5f92ca0.js → index-469e7ea3.js} +6 -6
  303. package/build/{index-22841a69.js → index-4a51ca80.js} +3 -3
  304. package/build/{index-08383fcf.js → index-4d537fcf.js} +1 -1
  305. package/build/{index-1e657b96.js → index-501739d7.js} +2 -2
  306. package/build/{index-40725e8b.js → index-5196bee4.js} +3 -3
  307. package/build/{index-c0824124.js → index-56f3e7a0.js} +21 -21
  308. package/build/{index-ce60142f.js → index-57efa012.js} +16 -16
  309. package/build/{index-8d5df576.js → index-5980c301.js} +16 -16
  310. package/build/{index-edfd48a3.js → index-5bd7f9a9.js} +2 -2
  311. package/build/{index-beae4bf5.js → index-6176d4e6.js} +1 -1
  312. package/build/{index-5c45ee6c.js → index-637a3d93.js} +2 -2
  313. package/build/{index-640597bc.js → index-639baa53.js} +5 -5
  314. package/build/{index-623aa44d.js → index-64cafdd2.js} +2 -2
  315. package/build/{index-2cc01292.js → index-64df4fd2.js} +16 -16
  316. package/build/{index-163d3814.js → index-6a76ec1e.js} +2 -2
  317. package/build/{index-b2840c48.js → index-6be2baca.js} +9 -9
  318. package/build/{index-4f5e23e0.js → index-6bec7e79.js} +1 -1
  319. package/build/{index-06008daa.js → index-6def05b7.js} +17 -17
  320. package/build/{index-6043692f.js → index-6fdd1a6c.js} +2 -2
  321. package/build/{index-8be9c1f5.js → index-774a374e.js} +24 -24
  322. package/build/{index-381e1575.js → index-78a2f151.js} +18 -18
  323. package/build/{index-22ab16d6.js → index-78c22135.js} +2 -2
  324. package/build/{index-eb070ff1.js → index-78ed5707.js} +14 -14
  325. package/build/{index-21bd3fc2.js → index-8142f1e6.js} +13 -13
  326. package/build/{index-ae61f98e.js → index-81ca34e8.js} +11 -11
  327. package/build/{index-88d16ec2.js → index-8f94dc82.js} +6 -6
  328. package/build/{index-40eb2a9e.js → index-9128fa90.js} +2 -2
  329. package/build/{index-f8c96c21.js → index-9701293d.js} +32 -32
  330. package/build/{index-627899a6.js → index-9b4600c7.js} +18 -18
  331. package/build/{index-fcb30055.js → index-a19d0a96.js} +2 -2
  332. package/build/{index-91a769d7.js → index-a37c2c7e.js} +32 -32
  333. package/build/{index-231a399f.js → index-a3887c32.js} +5 -5
  334. package/build/{index-9dcf2fa6.js → index-ac0b9f93.js} +9 -9
  335. package/build/{index-1d9bd91f.js → index-afb0154c.js} +3 -3
  336. package/build/{index-acb6aa58.js → index-b475a60a.js} +3 -3
  337. package/build/{index-0384d19d.js → index-b88d27ed.js} +1 -1
  338. package/build/{index-b5d72bcf.js → index-bb5f043f.js} +14 -14
  339. package/build/{index-d44486f8.js → index-bda467d6.js} +22 -22
  340. package/build/{index-fca34957.js → index-c4e313bc.js} +13 -13
  341. package/build/{index-c60704f1.js → index-c5ddd651.js} +15 -15
  342. package/build/{index-b75bbb36.js → index-d09c29d9.js} +2 -2
  343. package/build/{index-ede1d939.js → index-d439a18f.js} +2 -2
  344. package/build/{index-680b660f.js → index-dc9c29d8.js} +4 -4
  345. package/build/{index-2358141f.js → index-dce662fa.js} +4 -4
  346. package/build/{index-d469f7de.js → index-de37f553.js} +2 -2
  347. package/build/{index-0dabd635.js → index-e69ca49a.js} +7 -7
  348. package/build/{index-034d9ef4.js → index-ed691500.js} +3 -3
  349. package/build/{index-6439d793.js → index-f0fe3133.js} +1 -1
  350. package/build/{index-c935c8ae.js → index-f6e281f3.js} +3 -3
  351. package/build/{index-cc8ff3c0.js → index-f8b113a4.js} +3 -3
  352. package/build/{index-12897bdd.js → index-fa620c5b.js} +15 -15
  353. package/build/{index-e0e468cb.js → index-fbec091b.js} +6 -6
  354. package/build/index-ff09c525.js +1951 -0
  355. package/build/index.js +127 -126
  356. package/build/{labelSorting-c9cb020f.js → labelSorting-c3a79fcf.js} +4 -4
  357. package/build/lead.js +37 -37
  358. package/build/{logoIcon-8ce9a50c.js → logoIcon-c26486ef.js} +2 -2
  359. package/build/mantine.js +25 -25
  360. package/build/misc.js +19 -19
  361. package/build/miscGetDynamicHealthTool.js +4 -4
  362. package/build/miscGetSocialList.js +8 -8
  363. package/build/miscScreenSizeContext.js +1 -1
  364. package/build/mobileBottomNavigation.js +5 -5
  365. package/build/mobileBottomNavigationIcon.js +5 -5
  366. package/build/molecules.js +79 -79
  367. package/build/moleculesArticleCard.js +6 -6
  368. package/build/moleculesArticleCardV2.js +17 -17
  369. package/build/navigation.js +49 -49
  370. package/build/navigationLogoutPopup.js +11 -11
  371. package/build/navigationProfileButton.js +27 -27
  372. package/build/onboardingV2.js +29 -29
  373. package/build/organisms.js +62 -62
  374. package/build/{paths-07bb96ba.js → paths-a6867c36.js} +2 -2
  375. package/build/{post-e25c60f7.js → post-9f543b9f.js} +2 -2
  376. package/build/profileNavigation.js +20 -20
  377. package/build/progressBar.js +1 -1
  378. package/build/pwg.js +23 -23
  379. package/build/ssoV2/screens/updateEmail.d.ts +4 -2
  380. package/build/ssoV2/ssoStateManager/store.d.ts +1 -0
  381. package/build/ssoV2.js +86 -68
  382. package/build/{store-2a85405b.js → store-beb77ea3.js} +37 -28
  383. package/build/subot.js +39 -39
  384. package/build/surveyOrPremiumBanner.js +34 -34
  385. package/build/surveyQuestionCard.js +11 -11
  386. package/build/{surveyThankyouCard-61ed696c.js → surveyThankyouCard-94110a1b.js} +5 -5
  387. package/build/together.js +57 -57
  388. package/build/togetherApiUtils.js +6 -6
  389. package/build/togetherAtoms.js +31 -31
  390. package/build/togetherComponentGlobalContext.js +6 -6
  391. package/build/togetherMolecules.js +52 -52
  392. package/build/togetherMoleculesCardAuthor.js +29 -29
  393. package/build/togetherMoleculesPostImagePreview.js +13 -13
  394. package/build/togetherMoleculesProfileDetail.js +40 -40
  395. package/build/togetherOrganisms.js +51 -51
  396. package/build/togetherRichTextEditor.js +20 -20
  397. package/build/togetherShareBox.js +12 -12
  398. package/build/{transform-61680d8a.js → transform-d90a99c9.js} +27 -27
  399. package/build/{translationsProvider-636d7cb5.js → translationsProvider-044f9dc9.js} +1 -1
  400. package/build/{treePopoverMenu-45f06b81.js → treePopoverMenu-dc002bf6.js} +19 -19
  401. package/build/types.js +2 -2
  402. package/build/{useCartCareService-46731f77.js → useCartCareService-5367f9c3.js} +1 -1
  403. package/build/{useHealthToolCache-b9319885.js → useHealthToolCache-31035137.js} +1 -1
  404. package/build/{usePhoneValidator-5a391cbf.js → usePhoneValidator-875a9a57.js} +5 -5
  405. package/build/{usePlacesAutocomplete-4c51dc6b.js → usePlacesAutocomplete-55eb2441.js} +1 -1
  406. package/build/useTogetherAuthRequiredAction.js +10 -10
  407. package/build/{utils-68673897.js → utils-303cf747.js} +2 -2
  408. package/build/{utils-595db140.js → utils-6dfd62c4.js} +5 -5
  409. package/build/{utils-83aaaf9c.js → utils-c3ecaa84.js} +3 -3
  410. package/build/{utils-bb345cce.js → utils-c54268a3.js} +2 -2
  411. package/build/{utils-6fe19ced.js → utils-e6417103.js} +3 -3
  412. package/build/vaccination.js +22 -22
  413. package/package.json +1 -1
  414. package/build/esm/index-9f43c268.js +0 -31
  415. package/build/index-5968ea5b.js +0 -38
  416. /package/build/{BMI_BOYS.percentile.monthly-71706d34.js → BMI_BOYS.percentile.monthly-013ccb45.js} +0 -0
  417. /package/build/{BMI_BOYS.percentile.weekly-7347a0d7.js → BMI_BOYS.percentile.weekly-b82f86d0.js} +0 -0
  418. /package/build/{BMI_BOYS.percentile.yearly-a91f42b3.js → BMI_BOYS.percentile.yearly-b8cd1c8d.js} +0 -0
  419. /package/build/{BMI_BOYS.zscore.monthly-5a655570.js → BMI_BOYS.zscore.monthly-237ecba5.js} +0 -0
  420. /package/build/{BMI_BOYS.zscore.weekly-a9d33e3a.js → BMI_BOYS.zscore.weekly-3449e342.js} +0 -0
  421. /package/build/{BMI_BOYS.zscore.yearly-484752f7.js → BMI_BOYS.zscore.yearly-1d08efed.js} +0 -0
  422. /package/build/{BMI_GIRLS.percentile.monthly-bcc5b3c5.js → BMI_GIRLS.percentile.monthly-00823f72.js} +0 -0
  423. /package/build/{BMI_GIRLS.percentile.weekly-10944ec1.js → BMI_GIRLS.percentile.weekly-6aa31276.js} +0 -0
  424. /package/build/{BMI_GIRLS.percentile.yearly-4cb9b07b.js → BMI_GIRLS.percentile.yearly-8cbffb79.js} +0 -0
  425. /package/build/{BMI_GIRLS.zscore.monthly-c8509ebc.js → BMI_GIRLS.zscore.monthly-fddaf790.js} +0 -0
  426. /package/build/{BMI_GIRLS.zscore.weekly-0a45a2af.js → BMI_GIRLS.zscore.weekly-bb3760d3.js} +0 -0
  427. /package/build/{BMI_GIRLS.zscore.yearly-38fd0761.js → BMI_GIRLS.zscore.yearly-7a7b6b5d.js} +0 -0
  428. /package/build/{ChevronDown-daab0252.js → ChevronDown-3a089752.js} +0 -0
  429. /package/build/{Close-6bcd5612.js → Close-bb74b5c0.js} +0 -0
  430. /package/build/{Google-46ae3220.js → Google-8f9986d4.js} +0 -0
  431. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-acd7d0c0.js → HEAD CIRCUM_BOYS.percentile.monthly-717c6639.js} +0 -0
  432. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-0624ad4a.js → HEAD CIRCUM_BOYS.percentile.weekly-fee60bf3.js} +0 -0
  433. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7f5e2f03.js → HEAD CIRCUM_BOYS.percentile.yearly-56ee28c2.js} +0 -0
  434. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e24a3e66.js → HEAD CIRCUM_BOYS.zscore.monthly-c5b413f1.js} +0 -0
  435. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f47af62d.js → HEAD CIRCUM_BOYS.zscore.weekly-d2b7a655.js} +0 -0
  436. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b9a06fde.js → HEAD CIRCUM_BOYS.zscore.yearly-e809d1d4.js} +0 -0
  437. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2a4e90ea.js → HEAD CIRCUM_GIRLS.percentile.monthly-d6fa5f70.js} +0 -0
  438. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-55b7b3ff.js → HEAD CIRCUM_GIRLS.percentile.weekly-6e7d0adb.js} +0 -0
  439. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-3072fb36.js → HEAD CIRCUM_GIRLS.percentile.yearly-577dba7d.js} +0 -0
  440. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-0d75efdc.js → HEAD CIRCUM_GIRLS.zscore.monthly-9cc4760a.js} +0 -0
  441. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-8cbb2c5b.js → HEAD CIRCUM_GIRLS.zscore.weekly-71bad006.js} +0 -0
  442. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-8d484ee7.js → HEAD CIRCUM_GIRLS.zscore.yearly-b3ce1651.js} +0 -0
  443. /package/build/{HEIGHT_BOYS.percentile.monthly-0ed745dc.js → HEIGHT_BOYS.percentile.monthly-97c16557.js} +0 -0
  444. /package/build/{HEIGHT_BOYS.percentile.weekly-83f4827d.js → HEIGHT_BOYS.percentile.weekly-34ec6517.js} +0 -0
  445. /package/build/{HEIGHT_BOYS.percentile.yearly-5010e8d8.js → HEIGHT_BOYS.percentile.yearly-c6e6be52.js} +0 -0
  446. /package/build/{HEIGHT_BOYS.zscore.monthly-3ea70741.js → HEIGHT_BOYS.zscore.monthly-cb80b7a6.js} +0 -0
  447. /package/build/{HEIGHT_BOYS.zscore.weekly-2e3eaa3f.js → HEIGHT_BOYS.zscore.weekly-85850c62.js} +0 -0
  448. /package/build/{HEIGHT_BOYS.zscore.yearly-2062c6ef.js → HEIGHT_BOYS.zscore.yearly-361f2d35.js} +0 -0
  449. /package/build/{HEIGHT_GIRLS.percentile.monthly-24046937.js → HEIGHT_GIRLS.percentile.monthly-15463120.js} +0 -0
  450. /package/build/{HEIGHT_GIRLS.percentile.weekly-5d48ca6c.js → HEIGHT_GIRLS.percentile.weekly-ca8c7bfb.js} +0 -0
  451. /package/build/{HEIGHT_GIRLS.percentile.yearly-93eeb025.js → HEIGHT_GIRLS.percentile.yearly-401d2863.js} +0 -0
  452. /package/build/{HEIGHT_GIRLS.zscore.monthly-b1d98e51.js → HEIGHT_GIRLS.zscore.monthly-ff7ab364.js} +0 -0
  453. /package/build/{HEIGHT_GIRLS.zscore.weekly-3ac2b96a.js → HEIGHT_GIRLS.zscore.weekly-aba2ece2.js} +0 -0
  454. /package/build/{HEIGHT_GIRLS.zscore.yearly-5e0b0bb8.js → HEIGHT_GIRLS.zscore.yearly-f46f3a7a.js} +0 -0
  455. /package/build/{Locale-a078bb23.js → Locale-2ad8ea20.js} +0 -0
  456. /package/build/{Visible-08c4be3d.js → Visible-88b9c33d.js} +0 -0
  457. /package/build/{WEIGHT_BOYS.percentile.monthly-78d2a6d0.js → WEIGHT_BOYS.percentile.monthly-cc1cd53a.js} +0 -0
  458. /package/build/{WEIGHT_BOYS.percentile.weekly-56168e21.js → WEIGHT_BOYS.percentile.weekly-60a1cb27.js} +0 -0
  459. /package/build/{WEIGHT_BOYS.percentile.yearly-80c8b72b.js → WEIGHT_BOYS.percentile.yearly-197a0edf.js} +0 -0
  460. /package/build/{WEIGHT_BOYS.zscore.monthly-e6e24158.js → WEIGHT_BOYS.zscore.monthly-f0e215a7.js} +0 -0
  461. /package/build/{WEIGHT_BOYS.zscore.weekly-ebcacfa3.js → WEIGHT_BOYS.zscore.weekly-5fb5c6f4.js} +0 -0
  462. /package/build/{WEIGHT_BOYS.zscore.yearly-cd0d70fa.js → WEIGHT_BOYS.zscore.yearly-0a044e45.js} +0 -0
  463. /package/build/{WEIGHT_GIRLS.percentile.monthly-131d256b.js → WEIGHT_GIRLS.percentile.monthly-de330329.js} +0 -0
  464. /package/build/{WEIGHT_GIRLS.percentile.weekly-21f14054.js → WEIGHT_GIRLS.percentile.weekly-2e4033fa.js} +0 -0
  465. /package/build/{WEIGHT_GIRLS.percentile.yearly-bd1f351e.js → WEIGHT_GIRLS.percentile.yearly-7903de3e.js} +0 -0
  466. /package/build/{WEIGHT_GIRLS.zscore.monthly-1aa42d0e.js → WEIGHT_GIRLS.zscore.monthly-ff5f391d.js} +0 -0
  467. /package/build/{WEIGHT_GIRLS.zscore.weekly-7c73bedc.js → WEIGHT_GIRLS.zscore.weekly-83c63d39.js} +0 -0
  468. /package/build/{WEIGHT_GIRLS.zscore.yearly-5f457f00.js → WEIGHT_GIRLS.zscore.yearly-d507528f.js} +0 -0
  469. /package/build/{ageGenerate-98e62464.js → ageGenerate-8ebb15fd.js} +0 -0
  470. /package/build/{animation-c1188035.js → animation-259918f0.js} +0 -0
  471. /package/build/{constants-8109eafd.js → constants-26fa8a00.js} +0 -0
  472. /package/build/{constants-1793f76d.js → constants-3ae32cc4.js} +0 -0
  473. /package/build/{context-df75dde3.js → context-12a694e0.js} +0 -0
  474. /package/build/{dataTransform-e60babbb.js → dataTransform-861d48d8.js} +0 -0
  475. /package/build/esm/{BMI_BOYS.percentile.monthly-2704f965.js → BMI_BOYS.percentile.monthly-e4fdaf1e.js} +0 -0
  476. /package/build/esm/{BMI_BOYS.percentile.weekly-cb98a634.js → BMI_BOYS.percentile.weekly-6412eb4e.js} +0 -0
  477. /package/build/esm/{BMI_BOYS.percentile.yearly-cf423a0a.js → BMI_BOYS.percentile.yearly-cea5a6e1.js} +0 -0
  478. /package/build/esm/{BMI_BOYS.zscore.monthly-685ba1c7.js → BMI_BOYS.zscore.monthly-577441e4.js} +0 -0
  479. /package/build/esm/{BMI_BOYS.zscore.weekly-f88a217b.js → BMI_BOYS.zscore.weekly-1c565943.js} +0 -0
  480. /package/build/esm/{BMI_BOYS.zscore.yearly-4112d011.js → BMI_BOYS.zscore.yearly-47de65c4.js} +0 -0
  481. /package/build/esm/{BMI_GIRLS.percentile.monthly-63c6d21c.js → BMI_GIRLS.percentile.monthly-4e2e91d0.js} +0 -0
  482. /package/build/esm/{BMI_GIRLS.percentile.weekly-447ff2e9.js → BMI_GIRLS.percentile.weekly-7d31f0fb.js} +0 -0
  483. /package/build/esm/{BMI_GIRLS.percentile.yearly-dd787daa.js → BMI_GIRLS.percentile.yearly-fef5e20d.js} +0 -0
  484. /package/build/esm/{BMI_GIRLS.zscore.monthly-3a9080d3.js → BMI_GIRLS.zscore.monthly-f2e27dc9.js} +0 -0
  485. /package/build/esm/{BMI_GIRLS.zscore.weekly-a6b58da1.js → BMI_GIRLS.zscore.weekly-a96cc896.js} +0 -0
  486. /package/build/esm/{BMI_GIRLS.zscore.yearly-efcd0984.js → BMI_GIRLS.zscore.yearly-a0b4a2a5.js} +0 -0
  487. /package/build/esm/{ChevronDown-13f6a5cf.js → ChevronDown-fcbcff06.js} +0 -0
  488. /package/build/esm/{Close-c1620eee.js → Close-365a2dc3.js} +0 -0
  489. /package/build/esm/{Google-9786875a.js → Google-96547fab.js} +0 -0
  490. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-582c90de.js → HEAD CIRCUM_BOYS.percentile.monthly-9cd6e5cc.js} +0 -0
  491. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-978bac8a.js → HEAD CIRCUM_BOYS.percentile.weekly-e176f965.js} +0 -0
  492. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-cf26e3d0.js → HEAD CIRCUM_BOYS.percentile.yearly-aab03611.js} +0 -0
  493. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-31de970e.js → HEAD CIRCUM_BOYS.zscore.monthly-1a7ca87e.js} +0 -0
  494. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-900f95f2.js → HEAD CIRCUM_BOYS.zscore.weekly-9cf04a9b.js} +0 -0
  495. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-409f8b98.js → HEAD CIRCUM_BOYS.zscore.yearly-b9dc3b94.js} +0 -0
  496. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4231eb97.js → HEAD CIRCUM_GIRLS.percentile.monthly-e697b31c.js} +0 -0
  497. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-b02c363f.js → HEAD CIRCUM_GIRLS.percentile.weekly-d80f97f9.js} +0 -0
  498. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-78b34ff2.js → HEAD CIRCUM_GIRLS.percentile.yearly-9abd42f4.js} +0 -0
  499. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-0c7a31f7.js → HEAD CIRCUM_GIRLS.zscore.monthly-b6936801.js} +0 -0
  500. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-868bf312.js → HEAD CIRCUM_GIRLS.zscore.weekly-e0ec4f0b.js} +0 -0
  501. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e76ac89e.js → HEAD CIRCUM_GIRLS.zscore.yearly-42274aa8.js} +0 -0
  502. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-20d42076.js → HEIGHT_BOYS.percentile.monthly-b0c84cb6.js} +0 -0
  503. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-a2798e49.js → HEIGHT_BOYS.percentile.weekly-7fc68853.js} +0 -0
  504. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-483306f2.js → HEIGHT_BOYS.percentile.yearly-77062365.js} +0 -0
  505. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-42784c9d.js → HEIGHT_BOYS.zscore.monthly-4bc3f790.js} +0 -0
  506. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-849fe5f4.js → HEIGHT_BOYS.zscore.weekly-369c6ae2.js} +0 -0
  507. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-548e7e60.js → HEIGHT_BOYS.zscore.yearly-aa09e24a.js} +0 -0
  508. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-c5b41a4d.js → HEIGHT_GIRLS.percentile.monthly-282f2aae.js} +0 -0
  509. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-430ad60a.js → HEIGHT_GIRLS.percentile.weekly-dc0c378f.js} +0 -0
  510. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ea5d2cef.js → HEIGHT_GIRLS.percentile.yearly-61cc9ba0.js} +0 -0
  511. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-feabe2d8.js → HEIGHT_GIRLS.zscore.monthly-4b018477.js} +0 -0
  512. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-6b3584e2.js → HEIGHT_GIRLS.zscore.weekly-14f8a486.js} +0 -0
  513. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-0d4773d1.js → HEIGHT_GIRLS.zscore.yearly-20dff142.js} +0 -0
  514. /package/build/esm/{Locale-adfd207f.js → Locale-f39ad168.js} +0 -0
  515. /package/build/esm/{Visible-5b3e8bb2.js → Visible-74b38449.js} +0 -0
  516. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-79ea5ed5.js → WEIGHT_BOYS.percentile.monthly-d214fe4b.js} +0 -0
  517. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-df533c0b.js → WEIGHT_BOYS.percentile.weekly-acb3be61.js} +0 -0
  518. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-be9284bf.js → WEIGHT_BOYS.percentile.yearly-2a2ab3f4.js} +0 -0
  519. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-33696cff.js → WEIGHT_BOYS.zscore.monthly-19967e44.js} +0 -0
  520. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-7ce33291.js → WEIGHT_BOYS.zscore.weekly-5840e98d.js} +0 -0
  521. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-87bf3a6e.js → WEIGHT_BOYS.zscore.yearly-4acc4bc6.js} +0 -0
  522. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-02a28d8b.js → WEIGHT_GIRLS.percentile.monthly-6c3ae757.js} +0 -0
  523. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-1e556624.js → WEIGHT_GIRLS.percentile.weekly-83da9c3a.js} +0 -0
  524. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-a2a7e950.js → WEIGHT_GIRLS.percentile.yearly-6dbc9b58.js} +0 -0
  525. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ca966e35.js → WEIGHT_GIRLS.zscore.monthly-63c00f8d.js} +0 -0
  526. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-995c55b4.js → WEIGHT_GIRLS.zscore.weekly-25a94d3a.js} +0 -0
  527. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-666e98e9.js → WEIGHT_GIRLS.zscore.yearly-1f305c82.js} +0 -0
  528. /package/build/esm/{ageGenerate-5820c481.js → ageGenerate-31ce7674.js} +0 -0
  529. /package/build/esm/{animation-d8cdf774.js → animation-925a6259.js} +0 -0
  530. /package/build/esm/{constants-1da5a50a.js → constants-655e384a.js} +0 -0
  531. /package/build/esm/{constants-ce5271a6.js → constants-bcce86bf.js} +0 -0
  532. /package/build/esm/{context-3ef9593e.js → context-d703ab29.js} +0 -0
  533. /package/build/esm/{dataTransform-cbeb5762.js → dataTransform-302b3bba.js} +0 -0
  534. /package/build/esm/{index-56e4d976.js → index-15d20abe.js} +0 -0
  535. /package/build/esm/{index-8166c45c.js → index-27131e44.js} +0 -0
  536. /package/build/esm/{index-ec96ed21.js → index-3ad17633.js} +0 -0
  537. /package/build/esm/{index-bef69cf0.js → index-44548783.js} +0 -0
  538. /package/build/esm/{index-e8324372.js → index-8e4b3940.js} +0 -0
  539. /package/build/esm/{index-a131e0d4.js → index-b1f7fde6.js} +0 -0
  540. /package/build/esm/{index-be67b7ae.js → index-bb7b263b.js} +0 -0
  541. /package/build/esm/{index-e6344e81.js → index-e1a9a22f.js} +0 -0
  542. /package/build/esm/{index-f488874b.js → index-e78b9ca8.js} +0 -0
  543. /package/build/esm/{index.styles-403f770f.js → index.styles-6465d6bb.js} +0 -0
  544. /package/build/esm/{localizeNumberFormat-88646ced.js → localizeNumberFormat-01ee3264.js} +0 -0
  545. /package/build/esm/{normalizeLink-5d0ac05d.js → normalizeLink-ffec6dc4.js} +0 -0
  546. /package/build/esm/{number-003a0b20.js → number-32750773.js} +0 -0
  547. /package/build/esm/{shared-f8354531.js → shared-0319a067.js} +0 -0
  548. /package/build/esm/{translationsContext-f5f75ec5.js → translationsContext-844e0548.js} +0 -0
  549. /package/build/esm/{tslib.es6-88ed8ad1.js → tslib.es6-05b7cc0f.js} +0 -0
  550. /package/build/esm/{types-1fa82904.js → types-635612fa.js} +0 -0
  551. /package/build/esm/{types-bb63b0f1.js → types-ebdb3527.js} +0 -0
  552. /package/build/esm/{useOutsideClick-8288aa4e.js → useOutsideClick-8871c23e.js} +0 -0
  553. /package/build/esm/{useScrollbarSize-84630ccb.js → useScrollbarSize-8fe7073b.js} +0 -0
  554. /package/build/esm/{useUniqueId-781519f9.js → useUniqueId-4a933ede.js} +0 -0
  555. /package/build/esm/{utils-308ca058.js → utils-30eaad0a.js} +0 -0
  556. /package/build/esm/{utils-e7b81bdc.js → utils-f6a039c9.js} +0 -0
  557. /package/build/{index-0c2bcd44.js → index-0e9f2341.js} +0 -0
  558. /package/build/{index-c92c0540.js → index-0f418bd4.js} +0 -0
  559. /package/build/{index-b262b1d4.js → index-1e6b4a87.js} +0 -0
  560. /package/build/{index-a2e16797.js → index-3b430792.js} +0 -0
  561. /package/build/{index-f74dab7a.js → index-41135ccc.js} +0 -0
  562. /package/build/{index-cf78f71e.js → index-7d41403f.js} +0 -0
  563. /package/build/{index-8f28b7cd.js → index-cee2c290.js} +0 -0
  564. /package/build/{index-4dcc592d.js → index-eee9fd4c.js} +0 -0
  565. /package/build/{index-858052e3.js → index-f0881ec4.js} +0 -0
  566. /package/build/{index.styles-eac100df.js → index.styles-74ff8ffd.js} +0 -0
  567. /package/build/{localizeNumberFormat-276f5621.js → localizeNumberFormat-09126b38.js} +0 -0
  568. /package/build/{normalizeLink-d947e46b.js → normalizeLink-8520a2c4.js} +0 -0
  569. /package/build/{number-50711ee8.js → number-33c4dc73.js} +0 -0
  570. /package/build/{shared-e6688092.js → shared-5981f43c.js} +0 -0
  571. /package/build/{translationsContext-a3ccdf71.js → translationsContext-19e0122e.js} +0 -0
  572. /package/build/{tslib.es6-96c97478.js → tslib.es6-d33594b5.js} +0 -0
  573. /package/build/{types-c613708f.js → types-dd1637a7.js} +0 -0
  574. /package/build/{types-b89d9486.js → types-fbaa732a.js} +0 -0
  575. /package/build/{useOutsideClick-de846086.js → useOutsideClick-76a3079d.js} +0 -0
  576. /package/build/{useScrollbarSize-fa69e3af.js → useScrollbarSize-3f4fdeb6.js} +0 -0
  577. /package/build/{useUniqueId-f936ca4e.js → useUniqueId-a15633b9.js} +0 -0
  578. /package/build/{utils-fe333e42.js → utils-9446bade.js} +0 -0
  579. /package/build/{utils-08509440.js → utils-e8a0bd68.js} +0 -0
@@ -3,24 +3,29 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var core$1 = require('@hhgtech/icons/core');
6
7
  var core = require('@mantine/core');
7
- var utils$1 = require('./utils-bb345cce.js');
8
- var useOutsideClick = require('./useOutsideClick-de846086.js');
9
- var index$1 = require('./index-08383fcf.js');
8
+ var hooks = require('@mantine/hooks');
9
+ var utils$1 = require('./utils-c54268a3.js');
10
+ var useOutsideClick = require('./useOutsideClick-76a3079d.js');
11
+ var index$1 = require('./index-4d537fcf.js');
10
12
  var debounce = require('lodash/debounce');
11
- var constants = require('./constants-1793f76d.js');
13
+ var constants = require('./constants-3ae32cc4.js');
12
14
  var styled = require('@emotion/styled');
13
15
  var miscTheme = require('./miscTheme.js');
14
- var utils = require('./utils-fe333e42.js');
15
- var index = require('./index-a2e16797.js');
16
- var core$1 = require('@hhgtech/icons/core');
17
- var index$2 = require('./index-edfd48a3.js');
18
- var ChevronDown = require('./ChevronDown-daab0252.js');
19
- var paths = require('./paths-07bb96ba.js');
20
- require('./index-d664f4c8.js');
16
+ var utils = require('./utils-9446bade.js');
17
+ var index = require('./index-3b430792.js');
18
+ var index$2 = require('./index-5bd7f9a9.js');
19
+ var ChevronDown = require('./ChevronDown-3a089752.js');
20
+ var tslib_es6 = require('./tslib.es6-d33594b5.js');
21
+ var arrow = require('@hhgtech/icons/arrow');
22
+ var index$3 = require('./index-de37f553.js');
23
+ var paths = require('./paths-a6867c36.js');
24
+ var index$4 = require('./index-2367c86a.js');
25
+ require('./index-1bd406ae.js');
21
26
  require('date-fns/locale');
22
- require('./index-4270d6cf.js');
23
- require('./Locale-a078bb23.js');
27
+ require('./index-19880ee5.js');
28
+ require('./Locale-2ad8ea20.js');
24
29
  require('./constantsSite.js');
25
30
  require('./constantsDomainLocales.js');
26
31
  require('./constantsRiskScreener.js');
@@ -28,9 +33,10 @@ require('./constantsIsProduction.js');
28
33
  require('./miscCookieHelper.js');
29
34
  require('react-loading-skeleton');
30
35
  require('string-format');
31
- require('./translationsContext-a3ccdf71.js');
32
- require('./tslib.es6-96c97478.js');
33
- require('./index-4dcc592d.js');
36
+ require('./translationsContext-19e0122e.js');
37
+ require('./index-eee9fd4c.js');
38
+ require('./index.styles-74ff8ffd.js');
39
+ require('./shared-5981f43c.js');
34
40
 
35
41
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
36
42
 
@@ -225,9 +231,9 @@ function reducer(state, action) {
225
231
  case ActionTypes.ClearInputSearch:
226
232
  return Object.assign(Object.assign({}, state), { focused: 'search', searchKeywords: '' });
227
233
  case ActionTypes.SelectLocation:
228
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name });
234
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name, searchResults: {} });
229
235
  case ActionTypes.SelectSpecialty:
230
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload });
236
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload, searchResults: {} });
231
237
  case ActionTypes.SelectSearchResult:
232
238
  return Object.assign(Object.assign({}, state), { searchKeywords: action.payload.name, isMobileModalOpened: false, focused: 'none', navigateTo: action.payload.url });
233
239
  case ActionTypes.FetchCitiesStart:
@@ -305,7 +311,7 @@ const StyleSearchInputsWrapper = styled__default["default"].div `
305
311
  gap: 12px;
306
312
  }
307
313
  `;
308
- const StyleResultWrapper$2 = styled__default["default"].div `
314
+ const StyleResultWrapper = styled__default["default"].div `
309
315
  position: absolute;
310
316
  top: calc(100% + 2px);
311
317
  width: 100%;
@@ -321,7 +327,7 @@ const StyleResultWrapper$2 = styled__default["default"].div `
321
327
  `;
322
328
 
323
329
  const StyledSearchResultWrapper = styled__default["default"].div ``;
324
- const StyleResultHeader = styled__default["default"].div `
330
+ styled__default["default"].div `
325
331
  display: flex;
326
332
  justify-content: space-between;
327
333
  align-item: center;
@@ -353,9 +359,12 @@ const StyleResultItem = styled__default["default"].div `
353
359
  align-items: center;
354
360
  cursor: pointer;
355
361
 
356
- &:hover {
357
- background-color: ${miscTheme.theme.colors.blue50};
362
+ ${utils.MediaQueries.mbUp} {
363
+ &:hover {
364
+ background-color: ${miscTheme.theme.colors.blue50};
365
+ }
358
366
  }
367
+
359
368
  .image-item {
360
369
  flex: 0 0 48px;
361
370
  width: 48px;
@@ -422,8 +431,12 @@ styled__default["default"].div `
422
431
  }
423
432
  `;
424
433
 
425
- const SearchResult = ({ state, type, results, location, isLoading, typeInformation, clientSlug = '', dispatch, }) => {
426
- const { locale, t } = index$1.useTranslations();
434
+ const SearchResult = ({ state, type, results,
435
+ // location,
436
+ isLoading, typeInformation,
437
+ // clientSlug = '',
438
+ dispatch, }) => {
439
+ const { t } = index$1.useTranslations();
427
440
  const { selectedLocation } = state;
428
441
  const typeSlug = React.useMemo(() => typeInformation[type].slug, [typeInformation, type]);
429
442
  const handleOnClick = (item) => {
@@ -444,40 +457,37 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
444
457
  });
445
458
  }
446
459
  };
447
- const handleSeeAll = () => {
448
- let url = `/${selectedLocation.slug}/${typeSlug}`;
449
- const slugClientUrl = constants.MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
450
- if (slugClientUrl) {
451
- url += `/${slugClientUrl}`;
452
- }
453
- if ((type === 'doctor' || type === 'hospital') &&
454
- state.selectedSpecialty.id > 0) {
455
- url += `?specialtyId=${state.selectedSpecialty.id}`;
456
- }
457
- if (url) {
458
- dispatch({ type: ActionTypes.NavigateTo, payload: url });
459
- }
460
- };
460
+ // const handleSeeAll = () => {
461
+ // let url = `/${selectedLocation.slug}/${typeSlug}`
462
+ // const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug]
463
+ // if (slugClientUrl) {
464
+ // url += `/${slugClientUrl}`
465
+ // }
466
+ // if (
467
+ // (type === 'doctor' || type === 'hospital') &&
468
+ // state.selectedSpecialty.id > 0
469
+ // ) {
470
+ // url += `?specialtyId=${state.selectedSpecialty.id}`
471
+ // }
472
+ // if (url) {
473
+ // dispatch({ type: ActionTypes.NavigateTo, payload: url })
474
+ // }
475
+ // }
476
+ if (results === null)
477
+ return null;
461
478
  return (React__default["default"].createElement(StyledSearchResultWrapper, null,
462
- React__default["default"].createElement(StyleResultHeader, null,
463
- React__default["default"].createElement("div", { className: "title" }, t('booking.searchResult.description', {
464
- search_type: typeInformation[type].name,
465
- search_location: location,
466
- })),
467
- results.length > 0 && (React__default["default"].createElement("div", { className: "btn-see-all", onClick: handleSeeAll }, t('home.seeAll')))),
468
- React__default["default"].createElement(StyleResultBody, null,
469
- isLoading &&
470
- Array(3)
471
- .fill(undefined)
472
- .map((_, i) => (React__default["default"].createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
473
- React__default["default"].createElement("div", { className: "image-item" },
474
- React__default["default"].createElement(core.Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
475
- React__default["default"].createElement("div", { className: "infor" },
476
- React__default["default"].createElement("div", { className: "title" },
477
- React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
478
- React__default["default"].createElement("div", { className: "description" },
479
- React__default["default"].createElement("div", { className: "sub-description" },
480
- React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))),
479
+ React__default["default"].createElement(StyleResultBody, { className: "search-results__body" },
480
+ isLoading && (React__default["default"].createElement("div", { className: "skeleton-result" }, Array(3)
481
+ .fill(undefined)
482
+ .map((_, i) => (React__default["default"].createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
483
+ React__default["default"].createElement("div", { className: "image-item" },
484
+ React__default["default"].createElement(core.Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
485
+ React__default["default"].createElement("div", { className: "infor" },
486
+ React__default["default"].createElement("div", { className: "title" },
487
+ React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
488
+ React__default["default"].createElement("div", { className: "description" },
489
+ React__default["default"].createElement("div", { className: "sub-description" },
490
+ React__default["default"].createElement(core.Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))))),
481
491
  !isLoading && results && results.length > 0 && (React__default["default"].createElement(React__default["default"].Fragment, null, results.map((item, index) => {
482
492
  var _a, _b;
483
493
  const isLastItem = (results.length > 4 && index === 3) ||
@@ -495,7 +505,7 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
495
505
  if (index >= 4) {
496
506
  return React__default["default"].createElement(React__default["default"].Fragment, null);
497
507
  }
498
- return (React__default["default"].createElement(StyleResultItem, { key: item.id, className: isLastItem ? 'last-item' : '', onClick: () => handleOnClick(item) },
508
+ return (React__default["default"].createElement(StyleResultItem, { key: item.id, className: core.clsx(isLastItem ? 'last-item' : '', 'result-item'), onClick: () => handleOnClick(item) },
499
509
  React__default["default"].createElement("div", { className: "image-item" },
500
510
  React__default["default"].createElement("img", { src: item.logo || item.avatar, alt: item.name })),
501
511
  React__default["default"].createElement("div", { className: "infor" },
@@ -504,7 +514,14 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
504
514
  typeInformation[type].icon,
505
515
  React__default["default"].createElement("div", { className: "sub-description" }, subDescription)))));
506
516
  }))),
507
- !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default["default"].createElement(index$2.Text, { size: "sm", color: miscTheme.theme.colors.gray400 }, t('booking.searchBar.noResults'))))));
517
+ !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default["default"].createElement(index$2.Text, { size: "sm", color: miscTheme.theme.colors.gray400, className: "noresult-block" }, t('booking.searchBar.noResults'))))));
518
+ };
519
+
520
+ const SearchResultContent = ({ state, type, isLoading, clientSlug, typeInformation, dispatch, }) => {
521
+ var _a;
522
+ if (state.focused !== 'search')
523
+ return null;
524
+ return (React__default["default"].createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || null, location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug }));
508
525
  };
509
526
 
510
527
  const StyleSearchSpecialtyWrapper = styled__default["default"].div `
@@ -517,7 +534,7 @@ const StyleSearchSpecialtyWrapper = styled__default["default"].div `
517
534
  gap: 12px;
518
535
  }
519
536
  `;
520
- const StyleResultWrapper$1 = styled__default["default"].div `
537
+ styled__default["default"].div `
521
538
  position: absolute;
522
539
  top: calc(100% + 2px);
523
540
  width: calc(100% + 100px);
@@ -599,97 +616,182 @@ const StyledSpecialtyItem = styled__default["default"].li `
599
616
  }
600
617
  `;
601
618
 
602
- const DoctorIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
603
- React__default["default"].createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
604
- const ServiceIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
605
- React__default["default"].createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
606
- const HospitalIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
607
- React__default["default"].createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
608
- const SpecialtyIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
609
- React__default["default"].createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
610
-
611
- const SearchSpecialty = ({ state, isMobile, debouncedFetchSearchResults, selectedLocation, onSpecialtyClick, dispatch, }) => {
612
- var _a;
619
+ const CustomSelectItem$1 = React.forwardRef((_a, ref) => {
620
+ var { label, value, specialty } = _a, others = tslib_es6.__rest(_a, ["label", "value", "specialty"]);
621
+ return (React__default["default"].createElement("div", Object.assign({ ref: ref }, others),
622
+ React__default["default"].createElement(StyledSpecialtyItem, { key: value,
623
+ // onClick={(evt) => {
624
+ // evt.nativeEvent.stopImmediatePropagation()
625
+ // if (onSpecialtyClick) {
626
+ // onSpecialtyClick({
627
+ // ...specialty,
628
+ // total_doctor: 0,
629
+ // })
630
+ // }
631
+ // }}
632
+ role: "button", tabIndex: 0, "aria-label": `Select ${label} as location` },
633
+ React__default["default"].createElement("div", { className: "image-item" },
634
+ React__default["default"].createElement("img", { src: specialty.thumbnail, alt: label })),
635
+ React__default["default"].createElement(core.Text, { size: "md" }, label))));
636
+ });
637
+
638
+ const SearchSpecialty = ({ state,
639
+ // debouncedFetchSearchResults,
640
+ onSpecialtyClick, dispatch, }) => {
613
641
  const { t, locale } = index$1.useTranslations();
614
642
  const inputSpecialtyWrapperRef = React.useRef(null);
615
643
  const slugs = React.useMemo(() => constants.LOCALIZED_SLUGS[locale], [locale]);
616
- const styleSpecialties = React.useMemo(() => {
617
- return {
618
- wrapper: {
619
- '&:after': {
620
- content: '""',
621
- width: '1px',
622
- height: '20px',
623
- backgroundColor: '#E4E8EC',
624
- position: 'absolute',
625
- right: 0,
626
- top: '13px',
627
- },
628
- },
629
- input: {
630
- border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
631
- height: isMobile ? '40px' : '46px !important',
632
- paddingRight: '30px',
633
- '&:focus': {
634
- boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
635
- },
636
- },
637
- rightSection: {
638
- width: '30px',
639
- svg: {
640
- fontSize: '20px',
641
- },
642
- },
643
- };
644
- }, [isMobile]);
645
- const handleSearchSpecialtyInputChange = React.useCallback(function handleSearchSpecialtyInputChange(value) {
646
- // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
647
- // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
648
- // debouncedFetchSearchResults(value.trim())
649
- // } else {
650
- // debouncedFetchSearchResults.cancel()
651
- // dispatch({ type: ActionTypes.DisplayInitialCities })
652
- // }
653
- console.log(value);
654
- }, [debouncedFetchSearchResults, dispatch]);
644
+ // const styleSpecialties = useMemo(() => {
645
+ // return {
646
+ // wrapper: {
647
+ // '&:after': {
648
+ // content: '""',
649
+ // width: '1px',
650
+ // height: '20px',
651
+ // backgroundColor: '#E4E8EC',
652
+ // position: 'absolute',
653
+ // right: 0,
654
+ // top: '13px',
655
+ // },
656
+ // },
657
+ // input: {
658
+ // border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
659
+ // height: isMobile ? '40px' : '46px !important',
660
+ // paddingRight: '30px',
661
+ // '&:focus': {
662
+ // boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
663
+ // },
664
+ // },
665
+ // rightSection: {
666
+ // width: '30px',
667
+ // svg: {
668
+ // fontSize: '20px',
669
+ // },
670
+ // },
671
+ // } as any
672
+ // }, [isMobile])
673
+ // const handleSearchSpecialtyInputChange = useCallback(
674
+ // function handleSearchSpecialtyInputChange(value: string) {
675
+ // // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
676
+ // // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
677
+ // // debouncedFetchSearchResults(value.trim())
678
+ // // } else {
679
+ // // debouncedFetchSearchResults.cancel()
680
+ // // dispatch({ type: ActionTypes.DisplayInitialCities })
681
+ // // }
682
+ // console.log(value)
683
+ // },
684
+ // [debouncedFetchSearchResults, dispatch],
685
+ // )
655
686
  useOutsideClick.useOutsideClick(inputSpecialtyWrapperRef, () => {
656
687
  dispatch({ type: ActionTypes.ClickOutsideInputSpecialty });
657
688
  });
689
+ const specialtyData = [
690
+ {
691
+ name: t('booking.searchBar.allSpecialties'),
692
+ id: -1,
693
+ thumbnail: '',
694
+ total_doctor: 0,
695
+ slug: slugs.SPECIALTIES,
696
+ },
697
+ ...state.allSpecialties,
698
+ ];
699
+ const selectValue = state.selectedSpecialty && typeof state.selectedSpecialty.id === 'number'
700
+ ? String(state.selectedSpecialty.id)
701
+ : null;
658
702
  return (React__default["default"].createElement(StyleSearchSpecialtyWrapper, { ref: inputSpecialtyWrapperRef },
659
- React__default["default"].createElement(core.Input.Wrapper, null,
660
- React__default["default"].createElement(core.Input, { size: isMobile ? 'md' : 'lg', placeholder: t('booking.searchPopup.specialties'), value: ((_a = state === null || state === void 0 ? void 0 : state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.name) || '', rightSection: React__default["default"].createElement(ChevronDown.ChevronDown, null), styles: styleSpecialties, onFocus: () => dispatch({ type: ActionTypes.FocusInputSpecialty }), onChange: (event) => {
661
- handleSearchSpecialtyInputChange(event.target.value);
662
- } })),
663
- state.focused === 'specialty' && (React__default["default"].createElement(StyleResultWrapper$1, null,
664
- React__default["default"].createElement(StyledSpecialtyItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
665
- if (onSpecialtyClick) {
666
- onSpecialtyClick({
667
- name: t('booking.searchBar.allSpecialties'),
668
- id: -1,
669
- thumbnail: '',
670
- total_doctor: 0,
671
- slug: slugs.SPECIALTIES,
672
- });
673
- }
674
- } },
675
- React__default["default"].createElement("div", { className: "image-item" },
676
- React__default["default"].createElement(SpecialtyIcon, null)),
677
- React__default["default"].createElement(index$2.Text, { size: "md" }, t('booking.searchBar.allSpecialties'))),
678
- state.allSpecialties.map((specialty) => (React__default["default"].createElement(StyledSpecialtyItem, { key: specialty.id, onClick: (evt) => {
679
- evt.nativeEvent.stopImmediatePropagation();
680
- if (onSpecialtyClick) {
681
- onSpecialtyClick(Object.assign(Object.assign({}, specialty), { total_doctor: 0 }));
682
- }
683
- }, role: "button", tabIndex: 0, "aria-label": `Select ${specialty.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === specialty.id },
684
- React__default["default"].createElement("div", { className: "image-item" },
685
- React__default["default"].createElement("img", { src: specialty.thumbnail, alt: specialty.name })),
686
- React__default["default"].createElement(index$2.Text, { size: "md" }, specialty.name))))))));
703
+ React__default["default"].createElement(core.Select, { value: selectValue, placeholder: t('booking.searchPopup.specialties'), searchable: true, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: specialtyData.map((specialty) => ({
704
+ value: String(specialty.id),
705
+ label: specialty.name,
706
+ specialty,
707
+ })), rightSection: React__default["default"].createElement(ChevronDown.ChevronDown, { style: { width: 20, height: 20 } }), styles: (theme) => ({
708
+ dropdown: {
709
+ left: '0 !important',
710
+ border: 0,
711
+ marginTop: -7,
712
+ borderRadius: 0,
713
+ '& [data-mantine-scrollbar]': {
714
+ '&[data-orientation="vertical"]': {
715
+ width: '6px',
716
+ },
717
+ },
718
+ [theme.fn.largerThan('sm')]: {
719
+ minWidth: 264,
720
+ width: `264px !important`,
721
+ },
722
+ },
723
+ item: {
724
+ padding: 0,
725
+ '&[data-selected]': {
726
+ '&, &:hover': {
727
+ backgroundColor: 'transparent',
728
+ color: 'inherit',
729
+ },
730
+ },
731
+ '&[data-hovered]': {
732
+ backgroundColor: 'transparent',
733
+ },
734
+ },
735
+ input: {
736
+ '&:not(.mantine-Textarea-input)': {
737
+ height: 40,
738
+ fontSize: core.rem(14),
739
+ paddingLeft: 14,
740
+ paddingRight: 14,
741
+ [theme.fn.largerThan('sm')]: {
742
+ height: 46,
743
+ fontSize: core.rem(16),
744
+ paddingLeft: 16,
745
+ paddingRight: 16,
746
+ borderColor: 'transparent',
747
+ },
748
+ '&:focus, &:focus-within': {
749
+ outline: 'none',
750
+ boxShadow: 'none',
751
+ },
752
+ },
753
+ },
754
+ itemsWrapper: {
755
+ padding: 0,
756
+ },
757
+ wrapper: {
758
+ [theme.fn.largerThan('sm')]: {
759
+ position: 'relative',
760
+ '&:after': {
761
+ content: '""',
762
+ width: '1px',
763
+ height: '20px',
764
+ backgroundColor: '#E4E8EC',
765
+ position: 'absolute',
766
+ right: 0,
767
+ top: '13px',
768
+ },
769
+ },
770
+ },
771
+ }), itemComponent: CustomSelectItem$1, filter: (value, item) => item.label.toLowerCase().includes(value.toLowerCase().trim()), onChange: (value) => {
772
+ if (value == null)
773
+ return;
774
+ const specialty = specialtyData.find((i) => String(i.id) === value);
775
+ if (!specialty)
776
+ return;
777
+ onSpecialtyClick(Object.assign(Object.assign(Object.assign({}, specialty), { thumbnail: specialty.thumbnail || '' }), (Number(value) !== -1 && {
778
+ total_doctor: 0,
779
+ })));
780
+ } })));
687
781
  };
688
782
 
689
- const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', focusSearchInput, onSearch, onEnterSearch, dispatch, }) => {
690
- var _a;
783
+ const SearchInputs = React.forwardRef(({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', onSearch, onFocusInput, onEnterSearch, dispatch, onlyShowSearchBox, onChangeSpecialty, }, ref) => {
691
784
  const { t } = index$1.useTranslations();
785
+ const theme = core.useMantineTheme();
692
786
  const inputSearchWrapperRef = React.useRef(null);
787
+ const internalInputRef = React.useRef(null);
788
+ React.useImperativeHandle(ref, () => ({
789
+ focus: () => {
790
+ var _a;
791
+ (_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
792
+ },
793
+ }));
794
+ const hasSearchIcon = !onlyShowSearchBox;
693
795
  const gaAttributes = React.useMemo(() => {
694
796
  if (trackingAttributes) {
695
797
  return {
@@ -703,20 +805,16 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
703
805
  }
704
806
  }, [trackingAttributes]);
705
807
  const placeholderSearch = React.useMemo(() => {
706
- if (type === 'doctor') {
808
+ if (type === 'doctor')
707
809
  return t('booking.searchBar.placeholder.doctor');
708
- }
709
- if (type === 'service') {
810
+ if (type === 'service')
710
811
  return t('booking.searchBar.placeholder.service');
711
- }
712
- if (type === 'hospital') {
812
+ if (type === 'hospital')
713
813
  return t('booking.searchBar.placeholder.hospital');
714
- }
715
- if (type === 'specialty') {
814
+ if (type === 'specialty')
716
815
  return t('booking.searchBar.placeholder.specialty');
717
- }
718
816
  return '';
719
- }, [type]);
817
+ }, [type, t]);
720
818
  const styleInputWrapper = React.useMemo(() => {
721
819
  return {
722
820
  root: {
@@ -726,7 +824,11 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
726
824
  display: 'none',
727
825
  },
728
826
  input: {
729
- paddingLeft: '48px',
827
+ paddingLeft: hasSearchIcon ? 48 : 16,
828
+ [theme.fn.smallerThan('sm')]: {
829
+ height: 40,
830
+ fontSize: core.rem(14),
831
+ },
730
832
  },
731
833
  '.mantine-Input-icon': {
732
834
  left: '0',
@@ -734,22 +836,22 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
734
836
  },
735
837
  },
736
838
  };
737
- }, []);
839
+ }, [hasSearchIcon, theme]);
738
840
  const styleInput = React.useMemo(() => {
739
841
  return {
740
842
  icon: {
741
- left: '165px',
843
+ left: '205px',
742
844
  },
743
845
  input: {
744
846
  color: '#262626',
745
847
  '&[data-with-icon="true"]': {
746
- paddingLeft: '205px',
848
+ paddingLeft: '245px',
747
849
  paddingRight: '16px',
748
850
  },
749
851
  },
750
852
  rightSection: {
751
853
  left: 0,
752
- width: '165px',
854
+ width: '205px',
753
855
  padding: '1px',
754
856
  },
755
857
  };
@@ -762,7 +864,7 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
762
864
  };
763
865
  }, []);
764
866
  useOutsideClick.useOutsideClick(inputSearchWrapperRef, () => {
765
- dispatch({ type: ActionTypes.ClickOutsideInputSearch });
867
+ !isMobile && dispatch({ type: ActionTypes.ClickOutsideInputSearch });
766
868
  });
767
869
  const handleSearchInputChange = React.useCallback(function handleSearchInputChange(value) {
768
870
  dispatch({ type: ActionTypes.ChangeInputSearch, payload: value });
@@ -774,40 +876,84 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
774
876
  value.trim().length === 0) {
775
877
  debouncedFetchSearchResults(value.trim(), state, type, clientSlug);
776
878
  }
777
- else {
778
- debouncedFetchSearchResults.cancel();
779
- dispatch({ type: ActionTypes.DisplayInitialSearchResults });
780
- }
781
- }, [dispatch, state, type]);
879
+ }, [
880
+ dispatch,
881
+ state,
882
+ type,
883
+ initalSearchValue,
884
+ debouncedFetchSearchResults,
885
+ clientSlug,
886
+ onSearch,
887
+ ]);
782
888
  const handleSpecialtyClick = React.useCallback(function handleSpecialtyClick(specialty) {
889
+ var _a;
783
890
  dispatch({ type: ActionTypes.SelectSpecialty, payload: specialty });
784
- focusSearchInput();
785
- }, [dispatch]);
891
+ onChangeSpecialty === null || onChangeSpecialty === void 0 ? void 0 : onChangeSpecialty(specialty);
892
+ !isMobile && ((_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus());
893
+ }, [dispatch, onChangeSpecialty]);
786
894
  const inputOnKeyDown = React.useCallback((e) => {
787
- if (e.keyCode === 13) {
895
+ if (e.key === 'Enter') {
788
896
  e.stopPropagation();
789
897
  e.preventDefault();
790
898
  onEnterSearch && onEnterSearch();
791
899
  }
792
900
  }, [onEnterSearch]);
793
901
  return (React__default["default"].createElement(StyleSearchInputsWrapper, { ref: inputSearchWrapperRef }, type === 'specialty' ? (React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper },
794
- React__default["default"].createElement(core.Input, { icon: React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
902
+ React__default["default"].createElement(core.Input, { ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
795
903
  handleSearchInputChange(event.target.value);
796
904
  }, onKeyDown: inputOnKeyDown }))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
797
905
  type === 'service' ? (React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper },
798
- React__default["default"].createElement(core.Input, { icon: React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), value: state.searchKeywords, onChange: (event) => {
906
+ React__default["default"].createElement(core.Input, { ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => {
907
+ dispatch({ type: ActionTypes.FocusInputSearch });
908
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
909
+ }, value: state.searchKeywords, onChange: (event) => {
799
910
  handleSearchInputChange(event.target.value);
800
911
  }, onKeyDown: inputOnKeyDown }))) : (React__default["default"].createElement(React__default["default"].Fragment, null, isMobile && !hideSpecialtySelection ? (React__default["default"].createElement(React__default["default"].Fragment, null,
801
- React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }),
912
+ !onlyShowSearchBox && (React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })),
802
913
  React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper },
803
- React__default["default"].createElement(core.Input, { icon: React__default["default"].createElement(core$1.Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onChange: (event) => {
914
+ React__default["default"].createElement(core.Input, { ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => {
915
+ dispatch({ type: ActionTypes.FocusInputSearch });
916
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
917
+ }, onChange: (event) => {
804
918
  handleSearchInputChange(event.target.value);
805
919
  }, onKeyDown: inputOnKeyDown })))) : (React__default["default"].createElement(core.Input.Wrapper, { styles: styleInputWrapper, className: hideSpecialtySelection ? 'hide-specialty-selection' : '' },
806
- React__default["default"].createElement(core.Input, Object.assign({ icon: React__default["default"].createElement(core$1.Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
920
+ React__default["default"].createElement(core.Input, Object.assign({ ref: internalInputRef, icon: hasSearchIcon && React__default["default"].createElement(core$1.Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
807
921
  handleSearchInputChange(event.target.value);
808
- }, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default["default"].createElement(React__default["default"].Fragment, null)) : (React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })) })))))),
809
- state.focused === 'search' && (React__default["default"].createElement(StyleResultWrapper$2, null,
810
- React__default["default"].createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || [], location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
922
+ }, onFocus: () => {
923
+ dispatch({ type: ActionTypes.FocusInputSearch });
924
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
925
+ }, onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default["default"].createElement(React__default["default"].Fragment, null)) : (!onlyShowSearchBox && (React__default["default"].createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }))) })))))),
926
+ !isMobile && (React__default["default"].createElement(StyleResultWrapper, null,
927
+ React__default["default"].createElement(SearchResultContent, { type: type, state: state, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
928
+ });
929
+ SearchInputs.displayName = 'SearchInputs';
930
+
931
+ const ModalSearchResult = (_a) => {
932
+ var { searchInputEle, closeModal, children } = _a, props = tslib_es6.__rest(_a, ["searchInputEle", "closeModal", "children"]);
933
+ const theme = core.useMantineTheme();
934
+ return (React__default["default"].createElement(index$3.Modal, Object.assign({}, props, { zIndex: 310, fullScreen: true, styles: {
935
+ content: {
936
+ borderRadius: 0,
937
+ height: '100%',
938
+ '.search-results__body': { padding: 0 },
939
+ '.result-item': {
940
+ paddingLeft: 16,
941
+ paddingRight: 16,
942
+ },
943
+ '.noresult-block': {
944
+ padding: 16,
945
+ },
946
+ '.skeleton-result': {
947
+ padding: 16,
948
+ },
949
+ },
950
+ header: { display: 'none' },
951
+ } }),
952
+ React__default["default"].createElement(core.Stack, { spacing: 16, sx: { paddingTop: 16 } },
953
+ React__default["default"].createElement(core.Flex, { align: 'center', gap: 12 },
954
+ React__default["default"].createElement(arrow.ArrowLeft, { size: 28, onClick: closeModal, color: theme.fn.primaryColor() }),
955
+ React__default["default"].createElement(core.Box, { sx: { width: '100%' } }, searchInputEle)),
956
+ children)));
811
957
  };
812
958
 
813
959
  const StyleSearchLocationWrapper = styled__default["default"].div `
@@ -820,7 +966,7 @@ const StyleSearchLocationWrapper = styled__default["default"].div `
820
966
  gap: 12px;
821
967
  }
822
968
  `;
823
- const StyleResultWrapper = styled__default["default"].div `
969
+ styled__default["default"].div `
824
970
  position: absolute;
825
971
  top: calc(100% + 2px);
826
972
  width: 100%;
@@ -843,17 +989,6 @@ const StyledLocationItem = styled__default["default"].div `
843
989
  gap: 14px;
844
990
  overflow: hidden;
845
991
 
846
- ${({ isSelected }) => isSelected &&
847
- `
848
- &::after {
849
- content: ${utils$1.checkMarkIconUrl};
850
- top: 50%;
851
- right: 18px;
852
- position: absolute;
853
- transform: translateY(-50%);
854
- }
855
- `}
856
-
857
992
  & + li::before {
858
993
  content: '';
859
994
  position: absolute;
@@ -888,9 +1023,29 @@ const StyledPinIcon = styled__default["default"](utils$1.PinIcon) `
888
1023
  flex: 0 0 12px;
889
1024
  `;
890
1025
 
891
- const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1026
+ const CustomSelectItem = React.forwardRef((_a, ref) => {
1027
+ var { label, value } = _a, others = tslib_es6.__rest(_a, ["label", "value"]);
1028
+ return (React__default["default"].createElement("div", Object.assign({ ref: ref }, others),
1029
+ React__default["default"].createElement(StyledLocationItem, { key: value, role: "button", tabIndex: 0, "aria-label": `Select ${label} as location`, className: "location-item" },
1030
+ React__default["default"].createElement(StyledPinIcon, { color: miscTheme.theme.colors.neutral400 }),
1031
+ React__default["default"].createElement(core.Text, { size: "md" }, label))));
1032
+ });
1033
+
1034
+ const SearchLocation = ({ state, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1035
+ var _a;
892
1036
  const { t, locale } = index$1.useTranslations();
893
1037
  const inputLocationWrapperRef = React.useRef(null);
1038
+ const citiesData = React.useMemo(() => {
1039
+ var _a;
1040
+ return [
1041
+ {
1042
+ name: t('booking.searchBar.allLocations'),
1043
+ id: constants.ID_OPTION_ALL_LOCATION,
1044
+ slug: (_a = constants.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
1045
+ },
1046
+ ...state.cities,
1047
+ ];
1048
+ }, [state.cities, t, locale]);
894
1049
  const gaAttributes = React.useMemo(() => {
895
1050
  if (trackingAttributes) {
896
1051
  return {
@@ -899,9 +1054,7 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
899
1054
  'data-event-label': trackingAttributes.dataEventLabel,
900
1055
  };
901
1056
  }
902
- else {
903
- return {};
904
- }
1057
+ return {};
905
1058
  }, [trackingAttributes]);
906
1059
  const handleSearchLocationInputChange = React.useCallback(function handleSearchLocationInputChange(value) {
907
1060
  dispatch({ type: ActionTypes.ChangeInputLocation, payload: value });
@@ -912,39 +1065,101 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
912
1065
  debouncedFetchCitiesByKeyword.cancel();
913
1066
  dispatch({ type: ActionTypes.DisplayInitialCities });
914
1067
  }
915
- }, [debouncedFetchCitiesByKeyword, dispatch]);
1068
+ }, [debouncedFetchCitiesByKeyword, dispatch, state.locale]);
916
1069
  useOutsideClick.useOutsideClick(inputLocationWrapperRef, () => {
917
1070
  dispatch({ type: ActionTypes.ClickOutsideInputLocation });
918
1071
  });
1072
+ const stateValue = (_a = selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) !== null && _a !== void 0 ? _a : null;
1073
+ const defaultValue = stateValue === null ? undefined : String(stateValue);
919
1074
  return (React__default["default"].createElement(StyleSearchLocationWrapper, { ref: inputLocationWrapperRef },
920
- React__default["default"].createElement(core.Input.Wrapper, null,
921
- React__default["default"].createElement(core.Input, Object.assign({ size: isMobile ? 'md' : 'lg', placeholder: "Search location", value: state.searchLocationKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputLocation }), onChange: (event) => {
922
- handleSearchLocationInputChange(event.target.value);
923
- } }, gaAttributes))),
924
- state.focused === 'location' && (React__default["default"].createElement(StyleResultWrapper, null,
925
- React__default["default"].createElement(core.ScrollArea, { scrollbarSize: 6, styles: { viewport: { maxHeight: 400 } } },
926
- React__default["default"].createElement(StyledLocationItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
927
- var _a;
928
- if (onLocationClick) {
929
- onLocationClick({
930
- name: t('booking.searchBar.allLocations'),
931
- id: constants.ID_OPTION_ALL_LOCATION,
932
- slug: (_a = constants.LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
933
- });
934
- }
935
- } },
936
- React__default["default"].createElement(StyledPinIcon, { color: miscTheme.theme.colors.neutral400 }),
937
- React__default["default"].createElement(index$2.Text, { size: "md" }, t('booking.searchBar.allLocations'))),
938
- state.cities.map((city) => (React__default["default"].createElement(StyledLocationItem, { key: city.id, onClick: (evt) => {
939
- evt.nativeEvent.stopImmediatePropagation();
940
- if (onLocationClick) {
941
- onLocationClick(city);
942
- }
943
- }, role: "button", tabIndex: 0, "aria-label": `Select ${city.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === city.id },
944
- React__default["default"].createElement(StyledPinIcon, { color: miscTheme.theme.colors.neutral400 }),
945
- React__default["default"].createElement(index$2.Text, { size: "md" }, city.name)))))))));
1075
+ React__default["default"].createElement(core.Select, Object.assign({ key: defaultValue !== null && defaultValue !== void 0 ? defaultValue : 'no-selected-location', defaultValue: defaultValue, placeholder: t('booking.searchBar.allLocations'), searchable: true, onSearchChange: (value) => {
1076
+ handleSearchLocationInputChange(value);
1077
+ }, onFocus: () => {
1078
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1079
+ }, onDropdownClose: () => {
1080
+ debouncedFetchCitiesByKeyword.cancel();
1081
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1082
+ }, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: citiesData.map((city) => ({
1083
+ value: String(city.id),
1084
+ label: city.name,
1085
+ city,
1086
+ })), rightSection: React__default["default"].createElement(React__default["default"].Fragment, null) }, gaAttributes, { styles: (theme) => ({
1087
+ item: {
1088
+ padding: 0,
1089
+ '&[data-selected]': {
1090
+ '&, &:hover': {
1091
+ backgroundColor: 'transparent',
1092
+ color: 'inherit',
1093
+ },
1094
+ '.location-item': {
1095
+ '&::after': {
1096
+ content: utils$1.checkMarkIconUrl,
1097
+ top: '50%',
1098
+ right: 19,
1099
+ position: 'absolute',
1100
+ transform: 'translateY(-50%)',
1101
+ },
1102
+ },
1103
+ },
1104
+ '&[data-hovered]': {
1105
+ backgroundColor: 'transparent',
1106
+ },
1107
+ },
1108
+ input: {
1109
+ '&:not(.mantine-Textarea-input)': {
1110
+ height: 48,
1111
+ fontSize: core.rem(16),
1112
+ paddingLeft: 16,
1113
+ paddingRight: 16,
1114
+ [theme.fn.smallerThan('sm')]: {
1115
+ height: 40,
1116
+ fontSize: core.rem(14),
1117
+ paddingLeft: 14,
1118
+ paddingRight: 14,
1119
+ },
1120
+ },
1121
+ },
1122
+ itemsWrapper: {
1123
+ padding: 0,
1124
+ },
1125
+ dropdown: {
1126
+ left: '0 !important',
1127
+ border: 0,
1128
+ marginTop: -7,
1129
+ borderRadius: 0,
1130
+ '& ::-webkit-scrollbar': {
1131
+ width: '6px',
1132
+ height: '6px',
1133
+ },
1134
+ },
1135
+ }), itemComponent: CustomSelectItem,
1136
+ // 3. Logic quan trọng nhất: Luôn trả về true để bỏ qua bộ lọc mặc định của Mantine
1137
+ // Vì chúng ta fetch data từ API hoặc dùng toàn bộ list ban đầu
1138
+ filter: () => true, onChange: (value) => {
1139
+ if (value == null)
1140
+ return;
1141
+ const city = citiesData.find((i) => String(i.id) === value);
1142
+ if (!city)
1143
+ return;
1144
+ onLocationClick(city);
1145
+ debouncedFetchCitiesByKeyword.cancel();
1146
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1147
+ setTimeout(() => {
1148
+ var _a, _b;
1149
+ (_b = (_a = inputLocationWrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === null || _b === void 0 ? void 0 : _b.blur();
1150
+ }, 0);
1151
+ } }))));
946
1152
  };
947
1153
 
1154
+ const DoctorIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1155
+ React__default["default"].createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
1156
+ const ServiceIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1157
+ React__default["default"].createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
1158
+ const HospitalIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1159
+ React__default["default"].createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
1160
+ const SpecialtyIcon = () => (React__default["default"].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
1161
+ React__default["default"].createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
1162
+
948
1163
  const StyleSpecialtiesWrapper = styled__default["default"].div `
949
1164
  display: flex;
950
1165
  flex-wrap: wrap;
@@ -1318,16 +1533,20 @@ function useSearchBarApi({ dispatch, careApiDomain, locale = 'vi-VN', client = '
1318
1533
  moreParams.noPaging = 1;
1319
1534
  }
1320
1535
  const requests = [
1321
- fetchCitiesApi(paths.PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { client: constants.CLIENT_KEY.MSD === client ? '' : client })),
1536
+ fetchCitiesApi(paths.PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { hospitalActive: 1, client: constants.CLIENT_KEY.MSD === client ? '' : client })),
1322
1537
  ];
1323
1538
  if (locale === 'zh-TW') {
1324
1539
  requests.push(fetchCitiesApi(paths.PATHS.GET_CITIES_LIST, {
1325
1540
  noPaging: 1,
1541
+ hospitalActive: 1,
1326
1542
  client: constants.CLIENT_KEY.MSD === client ? '' : client,
1327
1543
  }));
1328
1544
  }
1329
1545
  else {
1330
- requests.push(fetchCitiesApi(paths.PATHS.GET_CITIES_LIST));
1546
+ requests.push(fetchCitiesApi(paths.PATHS.GET_CITIES_LIST, {
1547
+ noPaging: 1,
1548
+ hospitalActive: 1,
1549
+ }));
1331
1550
  }
1332
1551
  return Promise.all(requests)
1333
1552
  .then(([data1, data2]) => {
@@ -1507,11 +1726,14 @@ gaTrackingSearchBar, gaTrackingLocationSearch, autoCompleteDisabled = false, inp
1507
1726
  // isOptionAllLocation = false,
1508
1727
  // hideResults = [],
1509
1728
  // isNavResultItem = true,
1510
- routerPush, onGeoLocationPermissionChange,
1729
+ triggerSearchWhenChangeFilter, routerPush, onGeoLocationPermissionChange,
1511
1730
  // onSearch,
1512
1731
  onChangeLocation, }) => {
1732
+ var _a;
1513
1733
  const { locale, t } = index$1.useTranslations();
1514
1734
  const wrapperRef = React.useRef(null);
1735
+ const searchInputDesktopRef = React.useRef(null);
1736
+ const searchInputMobileRef = React.useRef(null);
1515
1737
  const inputSearchSpecialtyWrapperRef = React.useRef(null);
1516
1738
  const [currentTab, setCurrentTab] = React.useState(initTypeSearch);
1517
1739
  const { geoLocationPermission: geoLocationPermissionFromHook, geoLocationCoordinates: geoLocationCoordinatesFromHook, } = utils$1.useGeolocation();
@@ -1526,7 +1748,9 @@ onChangeLocation, }) => {
1526
1748
  const { navigateTo, focusedSpecialty,
1527
1749
  // isLoadingCities,
1528
1750
  // cities,
1529
- searchKeywords, geoLocationPermission, selectedLocation, selectedSpecialty, initialSelectedCity,
1751
+ searchKeywords, geoLocationPermission, selectedLocation,
1752
+ // selectedSpecialty,
1753
+ initialSelectedCity,
1530
1754
  // defaultCity,
1531
1755
  searchResults, isLoadingSearchResults,
1532
1756
  // isMobileModalOpened,
@@ -1540,6 +1764,7 @@ onChangeLocation, }) => {
1540
1764
  client: clientSlug,
1541
1765
  });
1542
1766
  const slugs = React.useMemo(() => constants.LOCALIZED_SLUGS[locale], [locale]);
1767
+ const [opened, { close, open }] = hooks.useDisclosure(false);
1543
1768
  const typeInformation = React.useMemo(() => {
1544
1769
  return Object.assign({ doctor: {
1545
1770
  name: t('booking.searchPopup.doctors'),
@@ -1563,34 +1788,31 @@ onChangeLocation, }) => {
1563
1788
  }, [currentTab]);
1564
1789
  const debouncedFetchCitiesByKeyword = React.useMemo(() => debounce__default["default"](fetchCitiesByKeyword, 400), [fetchCitiesByKeyword]);
1565
1790
  const debouncedFetchSearchResults = React.useMemo(() => debounce__default["default"](fetchSearchResults, 400), [fetchSearchResults]);
1566
- const handleLocationClick = React.useCallback(function handleLocationClick(city) {
1567
- dispatch({ type: ActionTypes.SelectLocation, payload: city });
1568
- focusSearchInput();
1569
- if (onChangeLocation) {
1570
- onChangeLocation(city);
1571
- }
1572
- }, [t, dispatch]);
1573
- function focusSearchInput() {
1791
+ // function focusSearchInput() {
1792
+ // if (wrapperRef.current) {
1793
+ // wrapperRef.current
1794
+ // .querySelector<HTMLInputElement>('input[name="search-results"]')
1795
+ // ?.focus()
1796
+ // }
1797
+ // }
1798
+ const onClickSearchByKeyword = React.useCallback(function onClickSearchByKeyword({ locationSlug, specialtyId, } = {}) {
1574
1799
  var _a;
1575
- if (wrapperRef.current) {
1576
- (_a = wrapperRef.current
1577
- .querySelector('input[name="search-results"]')) === null || _a === void 0 ? void 0 : _a.focus();
1578
- }
1579
- }
1580
- function onClickSearchByKeyword() {
1800
+ close();
1581
1801
  let url = '';
1582
1802
  const { slug: typeSlug } = typeInformation[currentTab];
1583
1803
  let moreParams = '';
1584
1804
  const slugClientUrl = constants.MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
1805
+ const selectedSpecialtyId = specialtyId || ((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) || -1;
1806
+ const selectedLocationSlug = locationSlug || (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug) || '';
1585
1807
  if ((currentTab === 'doctor' || currentTab === 'hospital') &&
1586
- state.selectedSpecialty.id > 0) {
1587
- moreParams = `&specialtyId=${state.selectedSpecialty.id}`;
1808
+ selectedSpecialtyId > 0) {
1809
+ moreParams = `&specialtyId=${selectedSpecialtyId}`;
1588
1810
  }
1589
1811
  if (currentTab === 'specialty') {
1590
1812
  url = `/${typeSlug}`;
1591
1813
  }
1592
1814
  else {
1593
- url = `/${selectedLocation.slug}/${typeSlug}`;
1815
+ url = `/${selectedLocationSlug}/${typeSlug}`;
1594
1816
  }
1595
1817
  if (slugClientUrl) {
1596
1818
  url += `/${slugClientUrl}`;
@@ -1599,9 +1821,34 @@ onChangeLocation, }) => {
1599
1821
  if (url) {
1600
1822
  dispatch({ type: ActionTypes.NavigateTo, payload: url });
1601
1823
  }
1602
- }
1824
+ }, [
1825
+ clientSlug,
1826
+ close,
1827
+ currentTab,
1828
+ dispatch,
1829
+ locale,
1830
+ searchKeywords,
1831
+ selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug,
1832
+ (_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id,
1833
+ typeInformation,
1834
+ ]);
1835
+ const handleLocationClick = React.useCallback(function handleLocationClick(city) {
1836
+ triggerSearchWhenChangeFilter &&
1837
+ onClickSearchByKeyword({ locationSlug: city.slug });
1838
+ dispatch({ type: ActionTypes.SelectLocation, payload: city });
1839
+ if (onChangeLocation) {
1840
+ onChangeLocation(city);
1841
+ }
1842
+ }, [
1843
+ dispatch,
1844
+ isMobile,
1845
+ onChangeLocation,
1846
+ onClickSearchByKeyword,
1847
+ triggerSearchWhenChangeFilter,
1848
+ ]);
1603
1849
  useOutsideClick.useOutsideClick(inputSearchSpecialtyWrapperRef, () => {
1604
- dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1850
+ !isMobile &&
1851
+ dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1605
1852
  });
1606
1853
  React.useEffect(() => {
1607
1854
  var _a;
@@ -1624,6 +1871,7 @@ onChangeLocation, }) => {
1624
1871
  fetchCitiesByLocation({ coordinates: state.geoLocationCoordinates });
1625
1872
  }, [geoLocationPermission]);
1626
1873
  React.useEffect(() => {
1874
+ var _a;
1627
1875
  const defaultSpecialty = initSpecialty
1628
1876
  ? initSpecialty
1629
1877
  : {
@@ -1633,13 +1881,23 @@ onChangeLocation, }) => {
1633
1881
  total_doctor: 0,
1634
1882
  slug: slugs.SPECIALTIES,
1635
1883
  };
1636
- if (!state.selectedSpecialty) {
1884
+ if (initSpecialty) {
1885
+ if (((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) !== initSpecialty.id) {
1886
+ dispatch({
1887
+ type: ActionTypes.SelectSpecialty,
1888
+ payload: initSpecialty,
1889
+ });
1890
+ }
1891
+ return;
1892
+ }
1893
+ if (!state.selectedSpecialty ||
1894
+ state.selectedSpecialty.id !== defaultSpecialty.id) {
1637
1895
  dispatch({
1638
1896
  type: ActionTypes.SelectSpecialty,
1639
1897
  payload: defaultSpecialty,
1640
1898
  });
1641
1899
  }
1642
- }, [initSpecialty, state.selectedSpecialty]);
1900
+ }, [initSpecialty, slugs.SPECIALTIES, t]);
1643
1901
  React.useEffect(() => {
1644
1902
  fetchAllSpecialties();
1645
1903
  }, []);
@@ -1658,25 +1916,62 @@ onChangeLocation, }) => {
1658
1916
  }, [navigateTo]);
1659
1917
  React.useEffect(() => {
1660
1918
  fetchSearchResults(state.searchKeywords, state, currentTab, clientSlug, true);
1661
- }, [selectedLocation, selectedSpecialty, currentTab]);
1662
- return (React__default["default"].createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1663
- React__default["default"].createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1664
- React__default["default"].createElement(StyleWrapperContainer, { className: "booking-search-container" },
1665
- React__default["default"].createElement(StyleSearchInputContainer, null,
1666
- React__default["default"].createElement(StyleSearchContent, { className: "booking-search-content" },
1667
- React__default["default"].createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1668
- React__default["default"].createElement(core.Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1669
- currentTab !== 'specialty' && (React__default["default"].createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1670
- React__default["default"].createElement(SearchInputs, { type: currentTab, isMobile: isMobile, state: state, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, initalSearchValue: initialSearchValue, focusSearchInput: focusSearchInput, onEnterSearch: onClickSearchByKeyword, typeInformation: typeInformation, trackingAttributes: gaTrackingSearchBar, isLoading: isLoadingSearchResults, hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab, clientSlug: clientSlug }),
1671
- React__default["default"].createElement(core.Button, { size: isMobile ? 'md' : 'lg', color: "#2D87F3", fullWidth: isMobile, variant: "filled", onClick: onClickSearchByKeyword, styles: {
1672
- root: {
1673
- height: isMobile ? '40px' : '48px',
1674
- },
1675
- } }, t('booking.searchBar.searchButton'))),
1676
- !hidePopularSearchKeys &&
1677
- currentTab !== 'specialty' &&
1678
- state.popularKeys.length > 0 && (React__default["default"].createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1679
- currentTab === 'specialty' && focusedSpecialty === 'search' && (React__default["default"].createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))));
1919
+ }, [currentTab]);
1920
+ React.useEffect(() => {
1921
+ if (opened && isMobile) {
1922
+ const timer = setTimeout(() => {
1923
+ var _a;
1924
+ (_a = searchInputMobileRef.current) === null || _a === void 0 ? void 0 : _a.focus();
1925
+ }, 150);
1926
+ return () => clearTimeout(timer);
1927
+ }
1928
+ }, [opened, isMobile]);
1929
+ const searchInputsProps = {
1930
+ type: currentTab,
1931
+ isMobile: isMobile,
1932
+ state: state,
1933
+ dispatch: dispatch,
1934
+ debouncedFetchSearchResults: debouncedFetchSearchResults,
1935
+ initalSearchValue: initialSearchValue,
1936
+ // focusSearchInput: focusSearchInput,
1937
+ onEnterSearch: onClickSearchByKeyword,
1938
+ typeInformation: typeInformation,
1939
+ trackingAttributes: gaTrackingSearchBar,
1940
+ isLoading: isLoadingSearchResults,
1941
+ hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab,
1942
+ clientSlug: clientSlug,
1943
+ triggerSearchWhenChangeFilter,
1944
+ onChangeSpecialty: (specialty) => triggerSearchWhenChangeFilter &&
1945
+ onClickSearchByKeyword({ specialtyId: specialty.id }),
1946
+ };
1947
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
1948
+ React__default["default"].createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1949
+ React__default["default"].createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1950
+ React__default["default"].createElement(StyleWrapperContainer, { className: "booking-search-container" },
1951
+ React__default["default"].createElement(StyleSearchInputContainer, null,
1952
+ React__default["default"].createElement(StyleSearchContent, { className: "booking-search-content" },
1953
+ React__default["default"].createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1954
+ React__default["default"].createElement(core.Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1955
+ currentTab !== 'specialty' && (React__default["default"].createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1956
+ React__default["default"].createElement(SearchInputs, Object.assign({}, searchInputsProps, { ref: searchInputDesktopRef, onFocusInput: () => isMobile && open() })),
1957
+ React__default["default"].createElement(index$4.Button, { size: isMobile ? 'md' : 'lg', fullWidth: isMobile, variant: "primary", onClick: () => onClickSearchByKeyword(), styles: {
1958
+ root: {
1959
+ height: isMobile ? '40px' : '48px',
1960
+ },
1961
+ } }, t('booking.searchBar.searchButton'))),
1962
+ !hidePopularSearchKeys &&
1963
+ currentTab !== 'specialty' &&
1964
+ state.popularKeys.length > 0 && (React__default["default"].createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1965
+ currentTab === 'specialty' &&
1966
+ focusedSpecialty === 'search' && (React__default["default"].createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))),
1967
+ isMobile && (React__default["default"].createElement(ModalSearchResult, { keepMounted: true, opened: opened, onClose: close, closeModal: close, searchInputEle: React__default["default"].createElement(core.Flex, { align: 'center', gap: 8 },
1968
+ React__default["default"].createElement(SearchInputs, Object.assign({}, searchInputsProps, { onlyShowSearchBox: true, ref: searchInputMobileRef })),
1969
+ React__default["default"].createElement(index$4.Button, { variant: "primary", leftIcon: React__default["default"].createElement(core$1.Search, { size: 20, color: '#fff' }), onClick: () => onClickSearchByKeyword() })) },
1970
+ React__default["default"].createElement(core.Box, { sx: {
1971
+ marginLeft: -16,
1972
+ marginRight: -16,
1973
+ } },
1974
+ React__default["default"].createElement(SearchResultContent, { type: currentTab, state: state, dispatch: dispatch, isLoading: isLoadingSearchResults, typeInformation: typeInformation, clientSlug: clientSlug }))))));
1680
1975
  };
1681
1976
 
1682
1977
  exports.BookingSearchBarV2 = BookingSearchBarV2;