@redneckz/wildless-cms-uni-blocks 0.3.96 → 0.4.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 (1282) hide show
  1. package/bundle/bundle.umd.js +3030 -2922
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/ProjectSettings.d.ts +2 -3
  4. package/dist/ProjectSettings.js +2 -2
  5. package/dist/ProjectSettings.js.map +1 -1
  6. package/dist/api/LikeAPI.d.ts +1 -1
  7. package/dist/api/LikeAPI.js +6 -5
  8. package/dist/api/LikeAPI.js.map +1 -1
  9. package/dist/components/Accordion/Accordion.d.ts +1 -1
  10. package/dist/components/Accordion/Accordion.js +1 -1
  11. package/dist/components/Accordion/Accordion.js.map +1 -1
  12. package/dist/components/Accordion/Accordion.mobile.d.ts +1 -1
  13. package/dist/components/Accordion/AccordionItem.d.ts +1 -1
  14. package/dist/components/Accordion/AccordionItem.js +0 -1
  15. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  16. package/dist/components/Accordion/AccordionItem.mobile.d.ts +1 -1
  17. package/dist/components/Accordion/AccordionItem.mobile.js +1 -4
  18. package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
  19. package/dist/components/Accordion/AccordionItemInner.d.ts +1 -1
  20. package/dist/components/Accordion/AccordionItemInner.mobile.d.ts +1 -1
  21. package/dist/components/Accordion/useActiveHandler.d.ts +1 -1
  22. package/dist/components/Accordion/useActiveHandler.js +3 -2
  23. package/dist/components/Accordion/useActiveHandler.js.map +1 -1
  24. package/dist/components/BaseTile/BaseTile.d.ts +1 -1
  25. package/dist/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  26. package/dist/components/Blocks.d.ts +35 -35
  27. package/dist/components/Blocks.mobile.d.ts +16 -16
  28. package/dist/components/Bonus/Bonus.d.ts +1 -1
  29. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
  30. package/dist/components/Calculator/BonusCalculatorForm.d.ts +1 -1
  31. package/dist/components/Calculator/BonusCalculatorForm.js +4 -3
  32. package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  33. package/dist/components/Calculator/Calculator.d.ts +1 -1
  34. package/dist/components/Calculator/Calculator.js +4 -3
  35. package/dist/components/Calculator/Calculator.js.map +1 -1
  36. package/dist/components/Calculator/CalculatorValueBlock.d.ts +1 -1
  37. package/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -1
  38. package/dist/components/Calculator/CreditCalculatorForm.js +8 -7
  39. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  40. package/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  41. package/dist/components/Calculator/DepositCalculatorForm.js +3 -2
  42. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  43. package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
  44. package/dist/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
  45. package/dist/components/Calculator/MortgageCalculatorForm.js +5 -4
  46. package/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  47. package/dist/components/Calculator/Rate.d.ts +1 -1
  48. package/dist/components/Calculator/renderCalculatorBlock.js +1 -1
  49. package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  50. package/dist/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
  51. package/dist/components/Calculator/useBonusCalculatorParams.js +3 -2
  52. package/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  53. package/dist/components/Calculator/useCalculatorParams.d.ts +1 -2
  54. package/dist/components/Calculator/useCalculatorParams.js +3 -2
  55. package/dist/components/Calculator/useCalculatorParams.js.map +1 -1
  56. package/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
  57. package/dist/components/Calculator/useCreditCalculatorParams.js +2 -2
  58. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  59. package/dist/components/Catalog/Catalog.d.ts +1 -1
  60. package/dist/components/Catalog/Catalog.js +3 -2
  61. package/dist/components/Catalog/Catalog.js.map +1 -1
  62. package/dist/components/Catalog/CatalogCard.d.ts +1 -1
  63. package/dist/components/ComparisonTable/ComparisonTable.d.ts +1 -1
  64. package/dist/components/ComparisonTable/ComparisonTable.js +2 -1
  65. package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  66. package/dist/components/ComparisonTable/ComparisonTable.mobile.d.ts +1 -1
  67. package/dist/components/ComparisonTable/ComparisonTable.mobile.js +2 -1
  68. package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  69. package/dist/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
  70. package/dist/components/ComparisonTable/ComparisonTableBody.js +3 -2
  71. package/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
  72. package/dist/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
  73. package/dist/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
  74. package/dist/components/ComparisonTable/HeaderCell.d.ts +1 -1
  75. package/dist/components/ComparisonTable/HeaderCell.mobile.d.ts +1 -1
  76. package/dist/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
  77. package/dist/components/ComparisonTable/TableCell.d.ts +1 -1
  78. package/dist/components/ComparisonTable/TableCell.mobile.d.ts +1 -1
  79. package/dist/components/ComparisonTable/TableColumn.d.ts +1 -1
  80. package/dist/components/ComparisonTable/TableRow.d.ts +1 -1
  81. package/dist/components/ComparisonTable/TableRowContainer.d.ts +1 -4
  82. package/dist/components/ContentPage/ContentPage.d.ts +3 -3
  83. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  84. package/dist/components/ContentPage/ContentPageContext.d.ts +1 -19
  85. package/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
  86. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  87. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
  88. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
  89. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
  90. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  91. package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  92. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  93. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  94. package/dist/components/Footer/Contacts.d.ts +1 -1
  95. package/dist/components/Footer/Footer.d.ts +1 -1
  96. package/dist/components/Footer/Footer.mobile.d.ts +1 -1
  97. package/dist/components/Footer/Footer.mobile.js +1 -1
  98. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  99. package/dist/components/Footer/HorizontalNavigation.d.ts +1 -1
  100. package/dist/components/Footer/HorizontalNavigation.mobile.d.ts +1 -1
  101. package/dist/components/Footer/HorizontalNavigationLink.d.ts +1 -1
  102. package/dist/components/Footer/MediaButton.d.ts +1 -1
  103. package/dist/components/Footer/Sitemap.d.ts +1 -1
  104. package/dist/components/Footer/Sitemap.js +2 -2
  105. package/dist/components/Footer/Sitemap.js.map +1 -1
  106. package/dist/components/Footer/SocialMedia.d.ts +1 -1
  107. package/dist/components/Footer/SocialMedia.mobile.d.ts +1 -1
  108. package/dist/components/Footer/TextInformation.d.ts +1 -1
  109. package/dist/components/Footer/TextInformation.mobile.d.ts +1 -1
  110. package/dist/components/Footer/TextInformationLink.d.ts +1 -1
  111. package/dist/components/Gallery/Gallery.d.ts +1 -1
  112. package/dist/components/Gallery/Gallery.mobile.d.ts +1 -1
  113. package/dist/components/Gallery/GalleryCardInner.d.ts +1 -1
  114. package/dist/components/Gallery/GalleryContainer.d.ts +1 -1
  115. package/dist/components/Gallery/GalleryInner.d.ts +1 -1
  116. package/dist/components/Gallery/GalleryInner.js +2 -1
  117. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  118. package/dist/components/GracePeriod/GracePeriod.d.ts +1 -1
  119. package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
  120. package/dist/components/GroupBlock/GroupBlock.d.ts +1 -1
  121. package/dist/components/GroupBlock/GroupBlock.js +2 -1
  122. package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
  123. package/dist/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
  124. package/dist/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
  125. package/dist/components/Header/DropdownMenu.d.ts +1 -1
  126. package/dist/components/Header/Header.d.ts +1 -1
  127. package/dist/components/Header/Header.js +2 -2
  128. package/dist/components/Header/Header.js.map +1 -1
  129. package/dist/components/Header/Header.mobile.d.ts +1 -1
  130. package/dist/components/Header/Header.mobile.js +3 -2
  131. package/dist/components/Header/Header.mobile.js.map +1 -1
  132. package/dist/components/Header/HeaderBurger.d.ts +1 -1
  133. package/dist/components/Header/HeaderBurger.js +2 -1
  134. package/dist/components/Header/HeaderBurger.js.map +1 -1
  135. package/dist/components/Header/HeaderSecondaryMenu.d.ts +3 -3
  136. package/dist/components/Header/HeaderSecondaryMenu.js +3 -2
  137. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  138. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  139. package/dist/components/Header/HeaderSubMenu.d.ts +1 -1
  140. package/dist/components/Header/HeaderSubMenu.js +3 -2
  141. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  142. package/dist/components/Header/HeaderTop.d.ts +1 -1
  143. package/dist/components/Headline/Headline.d.ts +1 -1
  144. package/dist/components/Headline/Headline.mobile.d.ts +1 -1
  145. package/dist/components/Insurance/Insurance.d.ts +1 -1
  146. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
  147. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
  148. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  149. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +1 -1
  150. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
  151. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  152. package/dist/components/LikeControl/LikeControl.d.ts +1 -1
  153. package/dist/components/LikeControl/LikeControl.js +6 -2
  154. package/dist/components/LikeControl/LikeControl.js.map +1 -1
  155. package/dist/components/LinkDocs/LinkDocs.d.ts +1 -1
  156. package/dist/components/LinkDocs/LinkDocs.js +1 -1
  157. package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  158. package/dist/components/LinkDocs/LinkDocs.mobile.d.ts +1 -1
  159. package/dist/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
  160. package/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
  161. package/dist/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
  162. package/dist/components/LinkDocs/LinkDocsListItem.mobile.d.ts +1 -1
  163. package/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
  164. package/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  165. package/dist/components/LinkList/LinkList.d.ts +1 -1
  166. package/dist/components/MiniGallery/MiniGallery.d.ts +1 -1
  167. package/dist/components/MobileAppTile/MobileAppTile.d.ts +1 -1
  168. package/dist/components/MobileAppTile/MobileAppTile.mobile.d.ts +1 -1
  169. package/dist/components/Navigation/Navigation.d.ts +1 -1
  170. package/dist/components/Navigation/NavigationItem.d.ts +2 -2
  171. package/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
  172. package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  173. package/dist/components/OtherProducts/OtherProducts.d.ts +1 -1
  174. package/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -1
  175. package/dist/components/PictureText/PictureText.d.ts +1 -1
  176. package/dist/components/Placeholder/Placeholder.d.ts +1 -1
  177. package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
  178. package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +1 -1
  179. package/dist/components/ProductBlock/ProductBlockInner.d.ts +1 -1
  180. package/dist/components/ProductBlock/ProductBlockInner.mobile.d.ts +1 -1
  181. package/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
  182. package/dist/components/ProductGallery/ProductGallery.js +2 -1
  183. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  184. package/dist/components/ProductGallery/ProductGallery.mobile.d.ts +1 -1
  185. package/dist/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
  186. package/dist/components/ProductTile/ProductTile.d.ts +1 -1
  187. package/dist/components/ProductTile/ProductTile.js +1 -1
  188. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  189. package/dist/components/PromoTile/PromoTile.d.ts +1 -1
  190. package/dist/components/PromoTile/PromoTile.js +1 -1
  191. package/dist/components/PromoTile/PromoTile.js.map +1 -1
  192. package/dist/components/Recommendation/Recommendation.d.ts +1 -1
  193. package/dist/components/Recommendation/Recommendation.js +2 -1
  194. package/dist/components/Recommendation/Recommendation.js.map +1 -1
  195. package/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
  196. package/dist/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
  197. package/dist/components/SafeDepositRental/SafeDepositRental.js +3 -2
  198. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  199. package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
  200. package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +17 -16
  201. package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  202. package/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
  203. package/dist/components/StepsBlock/StepsBlock.mobile.d.ts +1 -1
  204. package/dist/components/Tabs/Tabs.d.ts +1 -1
  205. package/dist/components/Tabs/Tabs.js +3 -2
  206. package/dist/components/Tabs/Tabs.js.map +1 -1
  207. package/dist/components/TariffsTable/TableTileHeader.d.ts +1 -1
  208. package/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
  209. package/dist/components/TariffsTable/TariffsTable.js +2 -1
  210. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  211. package/dist/components/TariffsTable/TariffsTable.mobile.d.ts +1 -1
  212. package/dist/components/TariffsTable/TariffsTableCell.d.ts +1 -1
  213. package/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
  214. package/dist/components/TariffsTable/TariffsTableRow.d.ts +1 -1
  215. package/dist/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
  216. package/dist/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
  217. package/dist/components/TextBlock/TextBlock.d.ts +1 -1
  218. package/dist/components/TextBlock/TextBlock.mobile.d.ts +1 -1
  219. package/dist/components/Tile/Tile.d.ts +1 -1
  220. package/dist/components/Tile/Tile.js +1 -1
  221. package/dist/components/Tile/Tile.js.map +1 -1
  222. package/dist/hooks/useExchangeRates.d.ts +1 -2
  223. package/dist/hooks/useExchangeRates.js +3 -2
  224. package/dist/hooks/useExchangeRates.js.map +1 -1
  225. package/dist/hooks/useGeolocation.d.ts +1 -0
  226. package/dist/hooks/useGeolocation.js +21 -0
  227. package/dist/hooks/useGeolocation.js.map +1 -0
  228. package/dist/hooks/useLikeService.d.ts +5 -0
  229. package/dist/hooks/useLikeService.js +27 -0
  230. package/dist/hooks/useLikeService.js.map +1 -0
  231. package/dist/hooks/useLink.d.ts +1 -0
  232. package/dist/hooks/useLink.js +3 -2
  233. package/dist/hooks/useLink.js.map +1 -1
  234. package/dist/hooks/useSafeDepositRental.d.ts +1 -2
  235. package/dist/hooks/useSafeDepositRental.js +3 -2
  236. package/dist/hooks/useSafeDepositRental.js.map +1 -1
  237. package/dist/hooks/useSearch.d.ts +4 -0
  238. package/dist/hooks/useSearch.js +12 -0
  239. package/dist/hooks/useSearch.js.map +1 -0
  240. package/dist/index.d.ts +2 -1
  241. package/dist/index.js +5 -3
  242. package/dist/index.js.map +1 -1
  243. package/dist/react/setup-fixture.d.ts +1 -0
  244. package/dist/react/setup-fixture.js +1 -48
  245. package/dist/react/setup-fixture.js.map +1 -1
  246. package/dist/services/sitemap/useSitemap.d.ts +1 -2
  247. package/dist/services/sitemap/useSitemap.js +3 -2
  248. package/dist/services/sitemap/useSitemap.js.map +1 -1
  249. package/dist/ui-kit/BlockWrapper.d.ts +1 -1
  250. package/dist/ui-kit/BlockWrapper.js +3 -2
  251. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  252. package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
  253. package/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +10 -10
  254. package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +6 -6
  255. package/dist/ui-kit/Breadcrumb.d.ts +1 -1
  256. package/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
  257. package/dist/ui-kit/Button/Button.d.ts +1 -1
  258. package/dist/ui-kit/Button/Button.mobile.d.ts +1 -1
  259. package/dist/ui-kit/Button/ButtonInner.d.ts +1 -1
  260. package/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
  261. package/dist/ui-kit/Button/LikeButton.d.ts +1 -1
  262. package/dist/ui-kit/Checkbox/Checkbox.d.ts +1 -1
  263. package/dist/ui-kit/Checkbox/Checkbox.js +5 -3
  264. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  265. package/dist/ui-kit/Description/Description.d.ts +1 -1
  266. package/dist/ui-kit/Foldable/Foldable.d.ts +1 -1
  267. package/dist/ui-kit/Foldable/Foldable.js +1 -2
  268. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  269. package/dist/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
  270. package/dist/ui-kit/Foldable/useActiveHandler.js +3 -2
  271. package/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -1
  272. package/dist/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
  273. package/dist/ui-kit/HeaderItem/HeaderItem.mobile.d.ts +1 -1
  274. package/dist/ui-kit/Heading/Heading.d.ts +1 -1
  275. package/dist/ui-kit/Heading/Heading.mobile.d.ts +1 -1
  276. package/dist/ui-kit/Icon/Icon.d.ts +1 -1
  277. package/dist/ui-kit/Img/Img.d.ts +1 -1
  278. package/dist/ui-kit/Img/Img.mobile.d.ts +1 -1
  279. package/dist/ui-kit/Img/ImgAsPicture.d.ts +1 -1
  280. package/dist/ui-kit/Img/ImgInner.d.ts +1 -1
  281. package/dist/ui-kit/Input/Input.d.ts +1 -1
  282. package/dist/ui-kit/InputRange/InputRange.d.ts +1 -1
  283. package/dist/ui-kit/InputRange/InputRange.js +4 -3
  284. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  285. package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  286. package/dist/ui-kit/List/List.d.ts +1 -1
  287. package/dist/ui-kit/List/ListItem.d.ts +1 -1
  288. package/dist/ui-kit/Logo/Logo.d.ts +1 -1
  289. package/dist/ui-kit/Logo/Logo.mobile.d.ts +1 -1
  290. package/dist/ui-kit/Radio/Radio.d.ts +1 -1
  291. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  292. package/dist/ui-kit/SVG.d.ts +1 -1
  293. package/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -1
  294. package/dist/ui-kit/SearchBar/SearchBar.js +2 -2
  295. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  296. package/dist/ui-kit/SearchBar/SearchBar.mobile.d.ts +1 -1
  297. package/dist/ui-kit/SearchBar/SearchBar.mobile.js +2 -2
  298. package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  299. package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
  300. package/dist/ui-kit/SearchBar/SearchBarInner.js +3 -2
  301. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  302. package/dist/ui-kit/Select/Select.d.ts +1 -1
  303. package/dist/ui-kit/Select/SelectOption.d.ts +1 -1
  304. package/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
  305. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
  306. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  307. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
  308. package/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
  309. package/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
  310. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
  311. package/dist/ui-kit/Tabs/Tabs.d.ts +1 -1
  312. package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
  313. package/lib/ProjectSettings.d.ts +2 -3
  314. package/lib/ProjectSettings.js +2 -2
  315. package/lib/ProjectSettings.js.map +1 -1
  316. package/lib/api/LikeAPI.d.ts +1 -1
  317. package/lib/api/LikeAPI.js +6 -5
  318. package/lib/api/LikeAPI.js.map +1 -1
  319. package/lib/common.css +1 -1
  320. package/lib/components/Accordion/Accordion.d.ts +1 -1
  321. package/lib/components/Accordion/Accordion.js +1 -1
  322. package/lib/components/Accordion/Accordion.js.map +1 -1
  323. package/lib/components/Accordion/Accordion.mobile.d.ts +1 -1
  324. package/lib/components/Accordion/AccordionItem.d.ts +1 -1
  325. package/lib/components/Accordion/AccordionItem.js +0 -1
  326. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  327. package/lib/components/Accordion/AccordionItem.mobile.d.ts +1 -1
  328. package/lib/components/Accordion/AccordionItem.mobile.js +1 -4
  329. package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
  330. package/lib/components/Accordion/AccordionItemInner.d.ts +1 -1
  331. package/lib/components/Accordion/AccordionItemInner.mobile.d.ts +1 -1
  332. package/lib/components/Accordion/useActiveHandler.d.ts +1 -1
  333. package/lib/components/Accordion/useActiveHandler.js +3 -2
  334. package/lib/components/Accordion/useActiveHandler.js.map +1 -1
  335. package/lib/components/BaseTile/BaseTile.d.ts +1 -1
  336. package/lib/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  337. package/lib/components/Blocks.d.ts +35 -35
  338. package/lib/components/Blocks.mobile.d.ts +16 -16
  339. package/lib/components/Bonus/Bonus.d.ts +1 -1
  340. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
  341. package/lib/components/Calculator/BonusCalculatorForm.d.ts +1 -1
  342. package/lib/components/Calculator/BonusCalculatorForm.js +4 -3
  343. package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  344. package/lib/components/Calculator/Calculator.d.ts +1 -1
  345. package/lib/components/Calculator/Calculator.js +4 -3
  346. package/lib/components/Calculator/Calculator.js.map +1 -1
  347. package/lib/components/Calculator/CalculatorValueBlock.d.ts +1 -1
  348. package/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -1
  349. package/lib/components/Calculator/CreditCalculatorForm.js +8 -7
  350. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  351. package/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  352. package/lib/components/Calculator/DepositCalculatorForm.js +3 -2
  353. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  354. package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
  355. package/lib/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
  356. package/lib/components/Calculator/MortgageCalculatorForm.js +5 -4
  357. package/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  358. package/lib/components/Calculator/Rate.d.ts +1 -1
  359. package/lib/components/Calculator/renderCalculatorBlock.js +1 -1
  360. package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  361. package/lib/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
  362. package/lib/components/Calculator/useBonusCalculatorParams.js +3 -2
  363. package/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  364. package/lib/components/Calculator/useCalculatorParams.d.ts +1 -2
  365. package/lib/components/Calculator/useCalculatorParams.js +2 -1
  366. package/lib/components/Calculator/useCalculatorParams.js.map +1 -1
  367. package/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
  368. package/lib/components/Calculator/useCreditCalculatorParams.js +2 -2
  369. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  370. package/lib/components/Catalog/Catalog.d.ts +1 -1
  371. package/lib/components/Catalog/Catalog.js +3 -2
  372. package/lib/components/Catalog/Catalog.js.map +1 -1
  373. package/lib/components/Catalog/CatalogCard.d.ts +1 -1
  374. package/lib/components/ComparisonTable/ComparisonTable.d.ts +1 -1
  375. package/lib/components/ComparisonTable/ComparisonTable.js +2 -1
  376. package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  377. package/lib/components/ComparisonTable/ComparisonTable.mobile.d.ts +1 -1
  378. package/lib/components/ComparisonTable/ComparisonTable.mobile.js +2 -1
  379. package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  380. package/lib/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
  381. package/lib/components/ComparisonTable/ComparisonTableBody.js +3 -2
  382. package/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
  383. package/lib/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
  384. package/lib/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
  385. package/lib/components/ComparisonTable/HeaderCell.d.ts +1 -1
  386. package/lib/components/ComparisonTable/HeaderCell.mobile.d.ts +1 -1
  387. package/lib/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
  388. package/lib/components/ComparisonTable/TableCell.d.ts +1 -1
  389. package/lib/components/ComparisonTable/TableCell.mobile.d.ts +1 -1
  390. package/lib/components/ComparisonTable/TableColumn.d.ts +1 -1
  391. package/lib/components/ComparisonTable/TableRow.d.ts +1 -1
  392. package/lib/components/ComparisonTable/TableRowContainer.d.ts +1 -4
  393. package/lib/components/ContentPage/ContentPage.d.ts +3 -3
  394. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  395. package/lib/components/ContentPage/ContentPageContext.d.ts +1 -19
  396. package/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
  397. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  398. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
  399. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
  400. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
  401. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  402. package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  403. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  404. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  405. package/lib/components/Footer/Contacts.d.ts +1 -1
  406. package/lib/components/Footer/Footer.d.ts +1 -1
  407. package/lib/components/Footer/Footer.mobile.d.ts +1 -1
  408. package/lib/components/Footer/Footer.mobile.js +1 -1
  409. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  410. package/lib/components/Footer/HorizontalNavigation.d.ts +1 -1
  411. package/lib/components/Footer/HorizontalNavigation.mobile.d.ts +1 -1
  412. package/lib/components/Footer/HorizontalNavigationLink.d.ts +1 -1
  413. package/lib/components/Footer/MediaButton.d.ts +1 -1
  414. package/lib/components/Footer/Sitemap.d.ts +1 -1
  415. package/lib/components/Footer/Sitemap.js +2 -2
  416. package/lib/components/Footer/Sitemap.js.map +1 -1
  417. package/lib/components/Footer/SocialMedia.d.ts +1 -1
  418. package/lib/components/Footer/SocialMedia.mobile.d.ts +1 -1
  419. package/lib/components/Footer/TextInformation.d.ts +1 -1
  420. package/lib/components/Footer/TextInformation.mobile.d.ts +1 -1
  421. package/lib/components/Footer/TextInformationLink.d.ts +1 -1
  422. package/lib/components/Gallery/Gallery.d.ts +1 -1
  423. package/lib/components/Gallery/Gallery.mobile.d.ts +1 -1
  424. package/lib/components/Gallery/GalleryCardInner.d.ts +1 -1
  425. package/lib/components/Gallery/GalleryContainer.d.ts +1 -1
  426. package/lib/components/Gallery/GalleryInner.d.ts +1 -1
  427. package/lib/components/Gallery/GalleryInner.js +2 -1
  428. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  429. package/lib/components/GracePeriod/GracePeriod.d.ts +1 -1
  430. package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
  431. package/lib/components/GroupBlock/GroupBlock.d.ts +1 -1
  432. package/lib/components/GroupBlock/GroupBlock.js +2 -1
  433. package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
  434. package/lib/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
  435. package/lib/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
  436. package/lib/components/Header/DropdownMenu.d.ts +1 -1
  437. package/lib/components/Header/Header.d.ts +1 -1
  438. package/lib/components/Header/Header.js +2 -2
  439. package/lib/components/Header/Header.js.map +1 -1
  440. package/lib/components/Header/Header.mobile.d.ts +1 -1
  441. package/lib/components/Header/Header.mobile.js +3 -2
  442. package/lib/components/Header/Header.mobile.js.map +1 -1
  443. package/lib/components/Header/HeaderBurger.d.ts +1 -1
  444. package/lib/components/Header/HeaderBurger.js +2 -1
  445. package/lib/components/Header/HeaderBurger.js.map +1 -1
  446. package/lib/components/Header/HeaderSecondaryMenu.d.ts +3 -3
  447. package/lib/components/Header/HeaderSecondaryMenu.js +3 -2
  448. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  449. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  450. package/lib/components/Header/HeaderSubMenu.d.ts +1 -1
  451. package/lib/components/Header/HeaderSubMenu.js +3 -2
  452. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  453. package/lib/components/Header/HeaderTop.d.ts +1 -1
  454. package/lib/components/Headline/Headline.d.ts +1 -1
  455. package/lib/components/Headline/Headline.mobile.d.ts +1 -1
  456. package/lib/components/Insurance/Insurance.d.ts +1 -1
  457. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
  458. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
  459. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  460. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +1 -1
  461. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
  462. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  463. package/lib/components/LikeControl/LikeControl.d.ts +1 -1
  464. package/lib/components/LikeControl/LikeControl.js +6 -2
  465. package/lib/components/LikeControl/LikeControl.js.map +1 -1
  466. package/lib/components/LinkDocs/LinkDocs.d.ts +1 -1
  467. package/lib/components/LinkDocs/LinkDocs.js +1 -1
  468. package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  469. package/lib/components/LinkDocs/LinkDocs.mobile.d.ts +1 -1
  470. package/lib/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
  471. package/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
  472. package/lib/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
  473. package/lib/components/LinkDocs/LinkDocsListItem.mobile.d.ts +1 -1
  474. package/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
  475. package/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  476. package/lib/components/LinkList/LinkList.d.ts +1 -1
  477. package/lib/components/MiniGallery/MiniGallery.d.ts +1 -1
  478. package/lib/components/MobileAppTile/MobileAppTile.d.ts +1 -1
  479. package/lib/components/MobileAppTile/MobileAppTile.mobile.d.ts +1 -1
  480. package/lib/components/Navigation/Navigation.d.ts +1 -1
  481. package/lib/components/Navigation/NavigationItem.d.ts +2 -2
  482. package/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
  483. package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  484. package/lib/components/OtherProducts/OtherProducts.d.ts +1 -1
  485. package/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -1
  486. package/lib/components/PictureText/PictureText.d.ts +1 -1
  487. package/lib/components/Placeholder/Placeholder.d.ts +1 -1
  488. package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
  489. package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +1 -1
  490. package/lib/components/ProductBlock/ProductBlockInner.d.ts +1 -1
  491. package/lib/components/ProductBlock/ProductBlockInner.mobile.d.ts +1 -1
  492. package/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
  493. package/lib/components/ProductGallery/ProductGallery.js +2 -1
  494. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  495. package/lib/components/ProductGallery/ProductGallery.mobile.d.ts +1 -1
  496. package/lib/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
  497. package/lib/components/ProductTile/ProductTile.d.ts +1 -1
  498. package/lib/components/ProductTile/ProductTile.js +1 -1
  499. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  500. package/lib/components/PromoTile/PromoTile.d.ts +1 -1
  501. package/lib/components/PromoTile/PromoTile.js +1 -1
  502. package/lib/components/PromoTile/PromoTile.js.map +1 -1
  503. package/lib/components/Recommendation/Recommendation.d.ts +1 -1
  504. package/lib/components/Recommendation/Recommendation.js +2 -1
  505. package/lib/components/Recommendation/Recommendation.js.map +1 -1
  506. package/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
  507. package/lib/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
  508. package/lib/components/SafeDepositRental/SafeDepositRental.js +3 -2
  509. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  510. package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
  511. package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +17 -15
  512. package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  513. package/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
  514. package/lib/components/StepsBlock/StepsBlock.mobile.d.ts +1 -1
  515. package/lib/components/Tabs/Tabs.d.ts +1 -1
  516. package/lib/components/Tabs/Tabs.js +3 -2
  517. package/lib/components/Tabs/Tabs.js.map +1 -1
  518. package/lib/components/TariffsTable/TableTileHeader.d.ts +1 -1
  519. package/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
  520. package/lib/components/TariffsTable/TariffsTable.js +2 -1
  521. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  522. package/lib/components/TariffsTable/TariffsTable.mobile.d.ts +1 -1
  523. package/lib/components/TariffsTable/TariffsTableCell.d.ts +1 -1
  524. package/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
  525. package/lib/components/TariffsTable/TariffsTableRow.d.ts +1 -1
  526. package/lib/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
  527. package/lib/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
  528. package/lib/components/TextBlock/TextBlock.d.ts +1 -1
  529. package/lib/components/TextBlock/TextBlock.mobile.d.ts +1 -1
  530. package/lib/components/Tile/Tile.d.ts +1 -1
  531. package/lib/components/Tile/Tile.js +1 -1
  532. package/lib/components/Tile/Tile.js.map +1 -1
  533. package/lib/hooks/useExchangeRates.d.ts +1 -2
  534. package/lib/hooks/useExchangeRates.js +2 -1
  535. package/lib/hooks/useExchangeRates.js.map +1 -1
  536. package/lib/hooks/useGeolocation.d.ts +1 -0
  537. package/lib/hooks/useGeolocation.js +18 -0
  538. package/lib/hooks/useGeolocation.js.map +1 -0
  539. package/lib/hooks/useLikeService.d.ts +5 -0
  540. package/lib/hooks/useLikeService.js +24 -0
  541. package/lib/hooks/useLikeService.js.map +1 -0
  542. package/lib/hooks/useLink.d.ts +1 -0
  543. package/lib/hooks/useLink.js +1 -1
  544. package/lib/hooks/useLink.js.map +1 -1
  545. package/lib/hooks/useSafeDepositRental.d.ts +1 -2
  546. package/lib/hooks/useSafeDepositRental.js +2 -1
  547. package/lib/hooks/useSafeDepositRental.js.map +1 -1
  548. package/lib/hooks/useSearch.d.ts +4 -0
  549. package/lib/hooks/useSearch.js +9 -0
  550. package/lib/hooks/useSearch.js.map +1 -0
  551. package/lib/index.d.ts +2 -1
  552. package/lib/index.js +2 -1
  553. package/lib/index.js.map +1 -1
  554. package/lib/react/setup-fixture.d.ts +1 -0
  555. package/lib/react/setup-fixture.js +2 -46
  556. package/lib/react/setup-fixture.js.map +1 -1
  557. package/lib/services/sitemap/useSitemap.d.ts +1 -2
  558. package/lib/services/sitemap/useSitemap.js +2 -1
  559. package/lib/services/sitemap/useSitemap.js.map +1 -1
  560. package/lib/ui-kit/BlockWrapper.d.ts +1 -1
  561. package/lib/ui-kit/BlockWrapper.js +3 -2
  562. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  563. package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
  564. package/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +10 -10
  565. package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +6 -6
  566. package/lib/ui-kit/Breadcrumb.d.ts +1 -1
  567. package/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
  568. package/lib/ui-kit/Button/Button.d.ts +1 -1
  569. package/lib/ui-kit/Button/Button.mobile.d.ts +1 -1
  570. package/lib/ui-kit/Button/ButtonInner.d.ts +1 -1
  571. package/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
  572. package/lib/ui-kit/Button/LikeButton.d.ts +1 -1
  573. package/lib/ui-kit/Checkbox/Checkbox.d.ts +1 -1
  574. package/lib/ui-kit/Checkbox/Checkbox.js +5 -3
  575. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  576. package/lib/ui-kit/Description/Description.d.ts +1 -1
  577. package/lib/ui-kit/Foldable/Foldable.d.ts +1 -1
  578. package/lib/ui-kit/Foldable/Foldable.js +1 -2
  579. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  580. package/lib/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
  581. package/lib/ui-kit/Foldable/useActiveHandler.js +3 -2
  582. package/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -1
  583. package/lib/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
  584. package/lib/ui-kit/HeaderItem/HeaderItem.mobile.d.ts +1 -1
  585. package/lib/ui-kit/Heading/Heading.d.ts +1 -1
  586. package/lib/ui-kit/Heading/Heading.mobile.d.ts +1 -1
  587. package/lib/ui-kit/Icon/Icon.d.ts +1 -1
  588. package/lib/ui-kit/Img/Img.d.ts +1 -1
  589. package/lib/ui-kit/Img/Img.mobile.d.ts +1 -1
  590. package/lib/ui-kit/Img/ImgAsPicture.d.ts +1 -1
  591. package/lib/ui-kit/Img/ImgInner.d.ts +1 -1
  592. package/lib/ui-kit/Input/Input.d.ts +1 -1
  593. package/lib/ui-kit/InputRange/InputRange.d.ts +1 -1
  594. package/lib/ui-kit/InputRange/InputRange.js +4 -3
  595. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  596. package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  597. package/lib/ui-kit/List/List.d.ts +1 -1
  598. package/lib/ui-kit/List/ListItem.d.ts +1 -1
  599. package/lib/ui-kit/Logo/Logo.d.ts +1 -1
  600. package/lib/ui-kit/Logo/Logo.mobile.d.ts +1 -1
  601. package/lib/ui-kit/Radio/Radio.d.ts +1 -1
  602. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  603. package/lib/ui-kit/SVG.d.ts +1 -1
  604. package/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -1
  605. package/lib/ui-kit/SearchBar/SearchBar.js +2 -2
  606. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  607. package/lib/ui-kit/SearchBar/SearchBar.mobile.d.ts +1 -1
  608. package/lib/ui-kit/SearchBar/SearchBar.mobile.js +2 -2
  609. package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  610. package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
  611. package/lib/ui-kit/SearchBar/SearchBarInner.js +3 -2
  612. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  613. package/lib/ui-kit/Select/Select.d.ts +1 -1
  614. package/lib/ui-kit/Select/SelectOption.d.ts +1 -1
  615. package/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
  616. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
  617. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  618. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
  619. package/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
  620. package/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
  621. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
  622. package/lib/ui-kit/Tabs/Tabs.d.ts +1 -1
  623. package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
  624. package/mobile/bundle/bundle.umd.js +1897 -1794
  625. package/mobile/bundle/bundle.umd.min.js +1 -1
  626. package/mobile/dist/ProjectSettings.d.ts +2 -3
  627. package/mobile/dist/ProjectSettings.js +2 -2
  628. package/mobile/dist/ProjectSettings.js.map +1 -1
  629. package/mobile/dist/api/LikeAPI.d.ts +1 -1
  630. package/mobile/dist/api/LikeAPI.js +6 -5
  631. package/mobile/dist/api/LikeAPI.js.map +1 -1
  632. package/mobile/dist/components/Accordion/Accordion.d.ts +1 -1
  633. package/mobile/dist/components/Accordion/AccordionItem.d.ts +1 -1
  634. package/mobile/dist/components/Accordion/AccordionItem.js +1 -4
  635. package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
  636. package/mobile/dist/components/Accordion/AccordionItemInner.d.ts +1 -1
  637. package/mobile/dist/components/Accordion/useActiveHandler.d.ts +1 -1
  638. package/mobile/dist/components/Accordion/useActiveHandler.js +3 -2
  639. package/mobile/dist/components/Accordion/useActiveHandler.js.map +1 -1
  640. package/mobile/dist/components/BaseTile/BaseTile.d.ts +1 -1
  641. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  642. package/mobile/dist/components/Blocks.d.ts +16 -16
  643. package/mobile/dist/components/Bonus/Bonus.d.ts +1 -1
  644. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
  645. package/mobile/dist/components/Calculator/BonusCalculatorForm.d.ts +1 -1
  646. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +4 -3
  647. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  648. package/mobile/dist/components/Calculator/Calculator.d.ts +1 -1
  649. package/mobile/dist/components/Calculator/Calculator.js +4 -3
  650. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  651. package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +1 -1
  652. package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -1
  653. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +8 -7
  654. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  655. package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  656. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +3 -2
  657. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  658. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
  659. package/mobile/dist/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
  660. package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +5 -4
  661. package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  662. package/mobile/dist/components/Calculator/Rate.d.ts +1 -1
  663. package/mobile/dist/components/Calculator/renderCalculatorBlock.js +1 -1
  664. package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  665. package/mobile/dist/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
  666. package/mobile/dist/components/Calculator/useBonusCalculatorParams.js +3 -2
  667. package/mobile/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  668. package/mobile/dist/components/Calculator/useCalculatorParams.d.ts +1 -2
  669. package/mobile/dist/components/Calculator/useCalculatorParams.js +3 -2
  670. package/mobile/dist/components/Calculator/useCalculatorParams.js.map +1 -1
  671. package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
  672. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +2 -2
  673. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  674. package/mobile/dist/components/Catalog/Catalog.d.ts +1 -1
  675. package/mobile/dist/components/Catalog/Catalog.js +3 -2
  676. package/mobile/dist/components/Catalog/Catalog.js.map +1 -1
  677. package/mobile/dist/components/Catalog/CatalogCard.d.ts +1 -1
  678. package/mobile/dist/components/ComparisonTable/ComparisonTable.d.ts +1 -1
  679. package/mobile/dist/components/ComparisonTable/ComparisonTable.js +2 -1
  680. package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  681. package/mobile/dist/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
  682. package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js +3 -2
  683. package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
  684. package/mobile/dist/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
  685. package/mobile/dist/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
  686. package/mobile/dist/components/ComparisonTable/HeaderCell.d.ts +1 -1
  687. package/mobile/dist/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
  688. package/mobile/dist/components/ComparisonTable/TableCell.d.ts +1 -1
  689. package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +1 -1
  690. package/mobile/dist/components/ComparisonTable/TableRow.d.ts +1 -1
  691. package/mobile/dist/components/ComparisonTable/TableRowContainer.d.ts +1 -4
  692. package/mobile/dist/components/ContentPage/ContentPage.d.ts +3 -3
  693. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  694. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +1 -19
  695. package/mobile/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
  696. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  697. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
  698. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
  699. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
  700. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  701. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  702. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  703. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  704. package/mobile/dist/components/Footer/Contacts.d.ts +1 -1
  705. package/mobile/dist/components/Footer/Footer.d.ts +1 -1
  706. package/mobile/dist/components/Footer/Footer.js +1 -1
  707. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  708. package/mobile/dist/components/Footer/HorizontalNavigation.d.ts +1 -1
  709. package/mobile/dist/components/Footer/HorizontalNavigationLink.d.ts +1 -1
  710. package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
  711. package/mobile/dist/components/Footer/Sitemap.d.ts +1 -1
  712. package/mobile/dist/components/Footer/Sitemap.js +2 -2
  713. package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
  714. package/mobile/dist/components/Footer/SocialMedia.d.ts +1 -1
  715. package/mobile/dist/components/Footer/TextInformation.d.ts +1 -1
  716. package/mobile/dist/components/Footer/TextInformationLink.d.ts +1 -1
  717. package/mobile/dist/components/Gallery/Gallery.d.ts +1 -1
  718. package/mobile/dist/components/Gallery/GalleryCardInner.d.ts +1 -1
  719. package/mobile/dist/components/Gallery/GalleryContainer.d.ts +1 -1
  720. package/mobile/dist/components/Gallery/GalleryInner.d.ts +1 -1
  721. package/mobile/dist/components/Gallery/GalleryInner.js +2 -1
  722. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  723. package/mobile/dist/components/GracePeriod/GracePeriod.d.ts +1 -1
  724. package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
  725. package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +1 -1
  726. package/mobile/dist/components/GroupBlock/GroupBlock.js +2 -1
  727. package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
  728. package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
  729. package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
  730. package/mobile/dist/components/Header/DropdownMenu.d.ts +1 -1
  731. package/mobile/dist/components/Header/Header.d.ts +1 -1
  732. package/mobile/dist/components/Header/Header.js +3 -2
  733. package/mobile/dist/components/Header/Header.js.map +1 -1
  734. package/mobile/dist/components/Header/HeaderBurger.d.ts +1 -1
  735. package/mobile/dist/components/Header/HeaderBurger.js +2 -1
  736. package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
  737. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +3 -3
  738. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +3 -2
  739. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  740. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  741. package/mobile/dist/components/Header/HeaderSubMenu.d.ts +1 -1
  742. package/mobile/dist/components/Header/HeaderSubMenu.js +3 -2
  743. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  744. package/mobile/dist/components/Header/HeaderTop.d.ts +1 -1
  745. package/mobile/dist/components/Headline/Headline.d.ts +1 -1
  746. package/mobile/dist/components/Insurance/Insurance.d.ts +1 -1
  747. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
  748. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
  749. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  750. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +1 -1
  751. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
  752. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  753. package/mobile/dist/components/LikeControl/LikeControl.d.ts +1 -1
  754. package/mobile/dist/components/LikeControl/LikeControl.js +6 -2
  755. package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
  756. package/mobile/dist/components/LinkDocs/LinkDocs.d.ts +1 -1
  757. package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
  758. package/mobile/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
  759. package/mobile/dist/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
  760. package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
  761. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  762. package/mobile/dist/components/LinkList/LinkList.d.ts +1 -1
  763. package/mobile/dist/components/MiniGallery/MiniGallery.d.ts +1 -1
  764. package/mobile/dist/components/MobileAppTile/MobileAppTile.d.ts +1 -1
  765. package/mobile/dist/components/Navigation/Navigation.d.ts +1 -1
  766. package/mobile/dist/components/Navigation/NavigationItem.d.ts +2 -2
  767. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
  768. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  769. package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +1 -1
  770. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -1
  771. package/mobile/dist/components/PictureText/PictureText.d.ts +1 -1
  772. package/mobile/dist/components/Placeholder/Placeholder.d.ts +1 -1
  773. package/mobile/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
  774. package/mobile/dist/components/ProductBlock/ProductBlockInner.d.ts +1 -1
  775. package/mobile/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
  776. package/mobile/dist/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
  777. package/mobile/dist/components/ProductTile/ProductTile.d.ts +1 -1
  778. package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
  779. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  780. package/mobile/dist/components/PromoTile/PromoTile.d.ts +1 -1
  781. package/mobile/dist/components/PromoTile/PromoTile.js +1 -1
  782. package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
  783. package/mobile/dist/components/Recommendation/Recommendation.d.ts +1 -1
  784. package/mobile/dist/components/Recommendation/Recommendation.js +2 -1
  785. package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
  786. package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
  787. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
  788. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +3 -2
  789. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  790. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
  791. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +17 -16
  792. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  793. package/mobile/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
  794. package/mobile/dist/components/Tabs/Tabs.d.ts +1 -1
  795. package/mobile/dist/components/Tabs/Tabs.js +3 -2
  796. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  797. package/mobile/dist/components/TariffsTable/TableTileHeader.d.ts +1 -1
  798. package/mobile/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
  799. package/mobile/dist/components/TariffsTable/TariffsTableCell.d.ts +1 -1
  800. package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
  801. package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +1 -1
  802. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
  803. package/mobile/dist/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
  804. package/mobile/dist/components/TextBlock/TextBlock.d.ts +1 -1
  805. package/mobile/dist/components/Tile/Tile.d.ts +1 -1
  806. package/mobile/dist/components/Tile/Tile.js +1 -1
  807. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  808. package/mobile/dist/hooks/useExchangeRates.d.ts +1 -2
  809. package/mobile/dist/hooks/useExchangeRates.js +3 -2
  810. package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
  811. package/mobile/dist/hooks/useGeolocation.d.ts +1 -0
  812. package/mobile/dist/hooks/useGeolocation.js +21 -0
  813. package/mobile/dist/hooks/useGeolocation.js.map +1 -0
  814. package/mobile/dist/hooks/useLikeService.d.ts +5 -0
  815. package/mobile/dist/hooks/useLikeService.js +27 -0
  816. package/mobile/dist/hooks/useLikeService.js.map +1 -0
  817. package/mobile/dist/hooks/useLink.d.ts +1 -0
  818. package/mobile/dist/hooks/useLink.js +3 -2
  819. package/mobile/dist/hooks/useLink.js.map +1 -1
  820. package/mobile/dist/hooks/useSafeDepositRental.d.ts +1 -2
  821. package/mobile/dist/hooks/useSafeDepositRental.js +3 -2
  822. package/mobile/dist/hooks/useSafeDepositRental.js.map +1 -1
  823. package/mobile/dist/hooks/useSearch.d.ts +4 -0
  824. package/mobile/dist/hooks/useSearch.js +12 -0
  825. package/mobile/dist/hooks/useSearch.js.map +1 -0
  826. package/mobile/dist/index.d.ts +2 -1
  827. package/mobile/dist/index.js +5 -3
  828. package/mobile/dist/index.js.map +1 -1
  829. package/mobile/dist/react/setup-fixture.d.ts +1 -0
  830. package/mobile/dist/react/setup-fixture.js +1 -48
  831. package/mobile/dist/react/setup-fixture.js.map +1 -1
  832. package/mobile/dist/services/sitemap/useSitemap.d.ts +1 -2
  833. package/mobile/dist/services/sitemap/useSitemap.js +3 -2
  834. package/mobile/dist/services/sitemap/useSitemap.js.map +1 -1
  835. package/mobile/dist/ui-kit/BlockWrapper.d.ts +1 -1
  836. package/mobile/dist/ui-kit/BlockWrapper.js +3 -2
  837. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  838. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
  839. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +6 -6
  840. package/mobile/dist/ui-kit/Breadcrumb.d.ts +1 -1
  841. package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
  842. package/mobile/dist/ui-kit/Button/Button.d.ts +1 -1
  843. package/mobile/dist/ui-kit/Button/ButtonInner.d.ts +1 -1
  844. package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
  845. package/mobile/dist/ui-kit/Button/LikeButton.d.ts +1 -1
  846. package/mobile/dist/ui-kit/Checkbox/Checkbox.d.ts +1 -1
  847. package/mobile/dist/ui-kit/Checkbox/Checkbox.js +5 -3
  848. package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  849. package/mobile/dist/ui-kit/Description/Description.d.ts +1 -1
  850. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +1 -1
  851. package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -2
  852. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  853. package/mobile/dist/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
  854. package/mobile/dist/ui-kit/Foldable/useActiveHandler.js +3 -2
  855. package/mobile/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -1
  856. package/mobile/dist/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
  857. package/mobile/dist/ui-kit/Heading/Heading.d.ts +1 -1
  858. package/mobile/dist/ui-kit/Icon/Icon.d.ts +1 -1
  859. package/mobile/dist/ui-kit/Img/Img.d.ts +1 -1
  860. package/mobile/dist/ui-kit/Img/ImgAsPicture.d.ts +1 -1
  861. package/mobile/dist/ui-kit/Img/ImgInner.d.ts +1 -1
  862. package/mobile/dist/ui-kit/Input/Input.d.ts +1 -1
  863. package/mobile/dist/ui-kit/InputRange/InputRange.d.ts +1 -1
  864. package/mobile/dist/ui-kit/InputRange/InputRange.js +4 -3
  865. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  866. package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  867. package/mobile/dist/ui-kit/List/List.d.ts +1 -1
  868. package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -1
  869. package/mobile/dist/ui-kit/Logo/Logo.d.ts +1 -1
  870. package/mobile/dist/ui-kit/Radio/Radio.d.ts +1 -1
  871. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  872. package/mobile/dist/ui-kit/SVG.d.ts +1 -1
  873. package/mobile/dist/ui-kit/SearchBar/SearchBar.d.ts +1 -1
  874. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -2
  875. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  876. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
  877. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +3 -2
  878. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  879. package/mobile/dist/ui-kit/Select/Select.d.ts +1 -1
  880. package/mobile/dist/ui-kit/Select/SelectOption.d.ts +1 -1
  881. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
  882. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
  883. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  884. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
  885. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
  886. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
  887. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
  888. package/mobile/dist/ui-kit/Tabs/Tabs.d.ts +1 -1
  889. package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
  890. package/mobile/lib/ProjectSettings.d.ts +2 -3
  891. package/mobile/lib/ProjectSettings.js +2 -2
  892. package/mobile/lib/ProjectSettings.js.map +1 -1
  893. package/mobile/lib/api/LikeAPI.d.ts +1 -1
  894. package/mobile/lib/api/LikeAPI.js +6 -5
  895. package/mobile/lib/api/LikeAPI.js.map +1 -1
  896. package/mobile/lib/components/Accordion/Accordion.d.ts +1 -1
  897. package/mobile/lib/components/Accordion/AccordionItem.d.ts +1 -1
  898. package/mobile/lib/components/Accordion/AccordionItem.js +1 -4
  899. package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
  900. package/mobile/lib/components/Accordion/AccordionItemInner.d.ts +1 -1
  901. package/mobile/lib/components/Accordion/useActiveHandler.d.ts +1 -1
  902. package/mobile/lib/components/Accordion/useActiveHandler.js +3 -2
  903. package/mobile/lib/components/Accordion/useActiveHandler.js.map +1 -1
  904. package/mobile/lib/components/BaseTile/BaseTile.d.ts +1 -1
  905. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.d.ts +1 -1
  906. package/mobile/lib/components/Blocks.d.ts +16 -16
  907. package/mobile/lib/components/Bonus/Bonus.d.ts +1 -1
  908. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +1 -1
  909. package/mobile/lib/components/Calculator/BonusCalculatorForm.d.ts +1 -1
  910. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +4 -3
  911. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  912. package/mobile/lib/components/Calculator/Calculator.d.ts +1 -1
  913. package/mobile/lib/components/Calculator/Calculator.js +4 -3
  914. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  915. package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +1 -1
  916. package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -1
  917. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +8 -7
  918. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  919. package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
  920. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +3 -2
  921. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  922. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +4 -4
  923. package/mobile/lib/components/Calculator/MortgageCalculatorForm.d.ts +1 -1
  924. package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +5 -4
  925. package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  926. package/mobile/lib/components/Calculator/Rate.d.ts +1 -1
  927. package/mobile/lib/components/Calculator/renderCalculatorBlock.js +1 -1
  928. package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  929. package/mobile/lib/components/Calculator/useBonusCalculatorParams.d.ts +1 -2
  930. package/mobile/lib/components/Calculator/useBonusCalculatorParams.js +3 -2
  931. package/mobile/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  932. package/mobile/lib/components/Calculator/useCalculatorParams.d.ts +1 -2
  933. package/mobile/lib/components/Calculator/useCalculatorParams.js +2 -1
  934. package/mobile/lib/components/Calculator/useCalculatorParams.js.map +1 -1
  935. package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -2
  936. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +2 -2
  937. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  938. package/mobile/lib/components/Catalog/Catalog.d.ts +1 -1
  939. package/mobile/lib/components/Catalog/Catalog.js +3 -2
  940. package/mobile/lib/components/Catalog/Catalog.js.map +1 -1
  941. package/mobile/lib/components/Catalog/CatalogCard.d.ts +1 -1
  942. package/mobile/lib/components/ComparisonTable/ComparisonTable.d.ts +1 -1
  943. package/mobile/lib/components/ComparisonTable/ComparisonTable.js +2 -1
  944. package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  945. package/mobile/lib/components/ComparisonTable/ComparisonTableBody.d.ts +1 -1
  946. package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js +3 -2
  947. package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
  948. package/mobile/lib/components/ComparisonTable/ComparisonTableColumnHeaders.d.ts +1 -1
  949. package/mobile/lib/components/ComparisonTable/ComparisonTableRows.d.ts +1 -1
  950. package/mobile/lib/components/ComparisonTable/HeaderCell.d.ts +1 -1
  951. package/mobile/lib/components/ComparisonTable/TableCarouselContainer.d.ts +1 -1
  952. package/mobile/lib/components/ComparisonTable/TableCell.d.ts +1 -1
  953. package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +1 -1
  954. package/mobile/lib/components/ComparisonTable/TableRow.d.ts +1 -1
  955. package/mobile/lib/components/ComparisonTable/TableRowContainer.d.ts +1 -4
  956. package/mobile/lib/components/ContentPage/ContentPage.d.ts +3 -3
  957. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  958. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +1 -19
  959. package/mobile/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
  960. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  961. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +1 -1
  962. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +1 -1
  963. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -1
  964. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  965. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +1 -1
  966. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  967. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  968. package/mobile/lib/components/Footer/Contacts.d.ts +1 -1
  969. package/mobile/lib/components/Footer/Footer.d.ts +1 -1
  970. package/mobile/lib/components/Footer/Footer.js +1 -1
  971. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  972. package/mobile/lib/components/Footer/HorizontalNavigation.d.ts +1 -1
  973. package/mobile/lib/components/Footer/HorizontalNavigationLink.d.ts +1 -1
  974. package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
  975. package/mobile/lib/components/Footer/Sitemap.d.ts +1 -1
  976. package/mobile/lib/components/Footer/Sitemap.js +2 -2
  977. package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
  978. package/mobile/lib/components/Footer/SocialMedia.d.ts +1 -1
  979. package/mobile/lib/components/Footer/TextInformation.d.ts +1 -1
  980. package/mobile/lib/components/Footer/TextInformationLink.d.ts +1 -1
  981. package/mobile/lib/components/Gallery/Gallery.d.ts +1 -1
  982. package/mobile/lib/components/Gallery/GalleryCardInner.d.ts +1 -1
  983. package/mobile/lib/components/Gallery/GalleryContainer.d.ts +1 -1
  984. package/mobile/lib/components/Gallery/GalleryInner.d.ts +1 -1
  985. package/mobile/lib/components/Gallery/GalleryInner.js +2 -1
  986. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  987. package/mobile/lib/components/GracePeriod/GracePeriod.d.ts +1 -1
  988. package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +2 -2
  989. package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +1 -1
  990. package/mobile/lib/components/GroupBlock/GroupBlock.js +2 -1
  991. package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
  992. package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +1 -1
  993. package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +1 -1
  994. package/mobile/lib/components/Header/DropdownMenu.d.ts +1 -1
  995. package/mobile/lib/components/Header/Header.d.ts +1 -1
  996. package/mobile/lib/components/Header/Header.js +3 -2
  997. package/mobile/lib/components/Header/Header.js.map +1 -1
  998. package/mobile/lib/components/Header/HeaderBurger.d.ts +1 -1
  999. package/mobile/lib/components/Header/HeaderBurger.js +2 -1
  1000. package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
  1001. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +3 -3
  1002. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +3 -2
  1003. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  1004. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  1005. package/mobile/lib/components/Header/HeaderSubMenu.d.ts +1 -1
  1006. package/mobile/lib/components/Header/HeaderSubMenu.js +3 -2
  1007. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  1008. package/mobile/lib/components/Header/HeaderTop.d.ts +1 -1
  1009. package/mobile/lib/components/Headline/Headline.d.ts +1 -1
  1010. package/mobile/lib/components/Insurance/Insurance.d.ts +1 -1
  1011. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +1 -1
  1012. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +2 -1
  1013. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  1014. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +1 -1
  1015. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +4 -3
  1016. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  1017. package/mobile/lib/components/LikeControl/LikeControl.d.ts +1 -1
  1018. package/mobile/lib/components/LikeControl/LikeControl.js +6 -2
  1019. package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
  1020. package/mobile/lib/components/LinkDocs/LinkDocs.d.ts +1 -1
  1021. package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.d.ts +1 -1
  1022. package/mobile/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
  1023. package/mobile/lib/components/LinkDocs/LinkDocsListItem.d.ts +1 -1
  1024. package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
  1025. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  1026. package/mobile/lib/components/LinkList/LinkList.d.ts +1 -1
  1027. package/mobile/lib/components/MiniGallery/MiniGallery.d.ts +1 -1
  1028. package/mobile/lib/components/MobileAppTile/MobileAppTile.d.ts +1 -1
  1029. package/mobile/lib/components/Navigation/Navigation.d.ts +1 -1
  1030. package/mobile/lib/components/Navigation/NavigationItem.d.ts +2 -2
  1031. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +1 -1
  1032. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  1033. package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +1 -1
  1034. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -1
  1035. package/mobile/lib/components/PictureText/PictureText.d.ts +1 -1
  1036. package/mobile/lib/components/Placeholder/Placeholder.d.ts +1 -1
  1037. package/mobile/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
  1038. package/mobile/lib/components/ProductBlock/ProductBlockInner.d.ts +1 -1
  1039. package/mobile/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
  1040. package/mobile/lib/components/ProductGallery/ProductGalleryBlock.d.ts +1 -1
  1041. package/mobile/lib/components/ProductTile/ProductTile.d.ts +1 -1
  1042. package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
  1043. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  1044. package/mobile/lib/components/PromoTile/PromoTile.d.ts +1 -1
  1045. package/mobile/lib/components/PromoTile/PromoTile.js +1 -1
  1046. package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
  1047. package/mobile/lib/components/Recommendation/Recommendation.d.ts +1 -1
  1048. package/mobile/lib/components/Recommendation/Recommendation.js +2 -1
  1049. package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
  1050. package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
  1051. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.d.ts +1 -1
  1052. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +3 -2
  1053. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  1054. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -8
  1055. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +17 -15
  1056. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  1057. package/mobile/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
  1058. package/mobile/lib/components/Tabs/Tabs.d.ts +1 -1
  1059. package/mobile/lib/components/Tabs/Tabs.js +3 -2
  1060. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  1061. package/mobile/lib/components/TariffsTable/TableTileHeader.d.ts +1 -1
  1062. package/mobile/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
  1063. package/mobile/lib/components/TariffsTable/TariffsTableCell.d.ts +1 -1
  1064. package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +2 -2
  1065. package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +1 -1
  1066. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.d.ts +1 -1
  1067. package/mobile/lib/components/TariffsTable/TariffsTableVertical.d.ts +2 -2
  1068. package/mobile/lib/components/TextBlock/TextBlock.d.ts +1 -1
  1069. package/mobile/lib/components/Tile/Tile.d.ts +1 -1
  1070. package/mobile/lib/components/Tile/Tile.js +1 -1
  1071. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  1072. package/mobile/lib/hooks/useExchangeRates.d.ts +1 -2
  1073. package/mobile/lib/hooks/useExchangeRates.js +2 -1
  1074. package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
  1075. package/mobile/lib/hooks/useGeolocation.d.ts +1 -0
  1076. package/mobile/lib/hooks/useGeolocation.js +18 -0
  1077. package/mobile/lib/hooks/useGeolocation.js.map +1 -0
  1078. package/mobile/lib/hooks/useLikeService.d.ts +5 -0
  1079. package/mobile/lib/hooks/useLikeService.js +24 -0
  1080. package/mobile/lib/hooks/useLikeService.js.map +1 -0
  1081. package/mobile/lib/hooks/useLink.d.ts +1 -0
  1082. package/mobile/lib/hooks/useLink.js +1 -1
  1083. package/mobile/lib/hooks/useLink.js.map +1 -1
  1084. package/mobile/lib/hooks/useSafeDepositRental.d.ts +1 -2
  1085. package/mobile/lib/hooks/useSafeDepositRental.js +2 -1
  1086. package/mobile/lib/hooks/useSafeDepositRental.js.map +1 -1
  1087. package/mobile/lib/hooks/useSearch.d.ts +4 -0
  1088. package/mobile/lib/hooks/useSearch.js +9 -0
  1089. package/mobile/lib/hooks/useSearch.js.map +1 -0
  1090. package/mobile/lib/index.d.ts +2 -1
  1091. package/mobile/lib/index.js +2 -1
  1092. package/mobile/lib/index.js.map +1 -1
  1093. package/mobile/lib/react/setup-fixture.d.ts +1 -0
  1094. package/mobile/lib/react/setup-fixture.js +2 -46
  1095. package/mobile/lib/react/setup-fixture.js.map +1 -1
  1096. package/mobile/lib/services/sitemap/useSitemap.d.ts +1 -2
  1097. package/mobile/lib/services/sitemap/useSitemap.js +2 -1
  1098. package/mobile/lib/services/sitemap/useSitemap.js.map +1 -1
  1099. package/mobile/lib/ui-kit/BlockWrapper.d.ts +1 -1
  1100. package/mobile/lib/ui-kit/BlockWrapper.js +3 -2
  1101. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  1102. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +0 -2
  1103. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +6 -6
  1104. package/mobile/lib/ui-kit/Breadcrumb.d.ts +1 -1
  1105. package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
  1106. package/mobile/lib/ui-kit/Button/Button.d.ts +1 -1
  1107. package/mobile/lib/ui-kit/Button/ButtonInner.d.ts +1 -1
  1108. package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
  1109. package/mobile/lib/ui-kit/Button/LikeButton.d.ts +1 -1
  1110. package/mobile/lib/ui-kit/Checkbox/Checkbox.d.ts +1 -1
  1111. package/mobile/lib/ui-kit/Checkbox/Checkbox.js +5 -3
  1112. package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  1113. package/mobile/lib/ui-kit/Description/Description.d.ts +1 -1
  1114. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +1 -1
  1115. package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -2
  1116. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  1117. package/mobile/lib/ui-kit/Foldable/useActiveHandler.d.ts +1 -3
  1118. package/mobile/lib/ui-kit/Foldable/useActiveHandler.js +3 -2
  1119. package/mobile/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -1
  1120. package/mobile/lib/ui-kit/HeaderItem/HeaderItem.d.ts +1 -1
  1121. package/mobile/lib/ui-kit/Heading/Heading.d.ts +1 -1
  1122. package/mobile/lib/ui-kit/Icon/Icon.d.ts +1 -1
  1123. package/mobile/lib/ui-kit/Img/Img.d.ts +1 -1
  1124. package/mobile/lib/ui-kit/Img/ImgAsPicture.d.ts +1 -1
  1125. package/mobile/lib/ui-kit/Img/ImgInner.d.ts +1 -1
  1126. package/mobile/lib/ui-kit/Input/Input.d.ts +1 -1
  1127. package/mobile/lib/ui-kit/InputRange/InputRange.d.ts +1 -1
  1128. package/mobile/lib/ui-kit/InputRange/InputRange.js +4 -3
  1129. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  1130. package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  1131. package/mobile/lib/ui-kit/List/List.d.ts +1 -1
  1132. package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -1
  1133. package/mobile/lib/ui-kit/Logo/Logo.d.ts +1 -1
  1134. package/mobile/lib/ui-kit/Radio/Radio.d.ts +1 -1
  1135. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  1136. package/mobile/lib/ui-kit/SVG.d.ts +1 -1
  1137. package/mobile/lib/ui-kit/SearchBar/SearchBar.d.ts +1 -1
  1138. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -2
  1139. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  1140. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +3 -3
  1141. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +3 -2
  1142. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  1143. package/mobile/lib/ui-kit/Select/Select.d.ts +1 -1
  1144. package/mobile/lib/ui-kit/Select/SelectOption.d.ts +1 -1
  1145. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +1 -1
  1146. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +4 -3
  1147. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  1148. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
  1149. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlItem.d.ts +1 -1
  1150. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlList.d.ts +1 -1
  1151. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +1 -1
  1152. package/mobile/lib/ui-kit/Tabs/Tabs.d.ts +1 -1
  1153. package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
  1154. package/mobile/src/ProjectSettings.ts +3 -4
  1155. package/mobile/src/api/LikeAPI.ts +21 -16
  1156. package/mobile/src/common.css +25 -7
  1157. package/mobile/src/components/Accordion/AccordionItem.tsx +1 -4
  1158. package/mobile/src/components/Accordion/useActiveHandler.ts +3 -2
  1159. package/mobile/src/components/Blocks.spec.tsx +9 -15
  1160. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +4 -3
  1161. package/mobile/src/components/Calculator/Calculator.tsx +5 -4
  1162. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +8 -7
  1163. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +3 -2
  1164. package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +5 -4
  1165. package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +1 -1
  1166. package/mobile/src/components/Calculator/useBonusCalculatorParams.ts +2 -6
  1167. package/mobile/src/components/Calculator/useCalculatorParams.ts +2 -2
  1168. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -6
  1169. package/mobile/src/components/Catalog/Catalog.tsx +3 -2
  1170. package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +3 -2
  1171. package/mobile/src/components/ComparisonTable/ComparisonTableBody.tsx +5 -4
  1172. package/mobile/src/components/ContentPage/ContentPage.tsx +3 -5
  1173. package/mobile/src/components/ContentPage/ContentPageContext.tsx +1 -26
  1174. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -1
  1175. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
  1176. package/mobile/src/components/Footer/Footer.tsx +1 -1
  1177. package/mobile/src/components/Footer/Sitemap.tsx +2 -2
  1178. package/mobile/src/components/Gallery/GalleryInner.tsx +3 -2
  1179. package/mobile/src/components/GroupBlock/GroupBlock.tsx +2 -1
  1180. package/mobile/src/components/Header/Header.tsx +6 -5
  1181. package/mobile/src/components/Header/HeaderBurger.tsx +2 -1
  1182. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +6 -4
  1183. package/mobile/src/components/Header/HeaderSubMenu.tsx +3 -2
  1184. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +2 -1
  1185. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +4 -3
  1186. package/mobile/src/components/LikeControl/LikeControl.tsx +11 -3
  1187. package/mobile/src/components/ProductTile/ProductTile.tsx +2 -1
  1188. package/mobile/src/components/PromoTile/PromoTile.tsx +3 -2
  1189. package/mobile/src/components/Recommendation/Recommendation.tsx +2 -1
  1190. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +3 -2
  1191. package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +32 -32
  1192. package/mobile/src/components/Tabs/Tabs.tsx +3 -2
  1193. package/mobile/src/components/Tile/Tile.tsx +2 -2
  1194. package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +11 -9
  1195. package/mobile/src/hooks/useExchangeRates.ts +2 -2
  1196. package/mobile/src/hooks/useGeolocation.ts +22 -0
  1197. package/mobile/src/hooks/useLikeService.ts +29 -0
  1198. package/mobile/src/hooks/useLink.ts +1 -1
  1199. package/mobile/src/hooks/useSafeDepositRental.ts +2 -2
  1200. package/mobile/src/hooks/useSearch.ts +10 -0
  1201. package/mobile/src/index.ts +2 -1
  1202. package/mobile/src/react/setup-fixture.ts +2 -55
  1203. package/mobile/src/services/sitemap/useSitemap.ts +2 -2
  1204. package/mobile/src/ui-kit/BlockWrapper.tsx +3 -2
  1205. package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +0 -2
  1206. package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +28 -26
  1207. package/mobile/src/ui-kit/Foldable/Foldable.tsx +0 -2
  1208. package/mobile/src/ui-kit/Foldable/useActiveHandler.ts +3 -4
  1209. package/mobile/src/ui-kit/InputRange/InputRange.tsx +21 -7
  1210. package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  1211. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +2 -2
  1212. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +57 -58
  1213. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +3 -3
  1214. package/package.json +2 -2
  1215. package/src/ProjectSettings.ts +3 -4
  1216. package/src/api/LikeAPI.ts +21 -16
  1217. package/src/common.css +25 -7
  1218. package/src/components/Accordion/Accordion.tsx +1 -0
  1219. package/src/components/Accordion/AccordionItem.mobile.tsx +1 -4
  1220. package/src/components/Accordion/AccordionItem.tsx +0 -1
  1221. package/src/components/Accordion/useActiveHandler.ts +3 -2
  1222. package/src/components/Blocks.spec.tsx +9 -15
  1223. package/src/components/Calculator/BonusCalculatorForm.tsx +4 -3
  1224. package/src/components/Calculator/Calculator.tsx +5 -4
  1225. package/src/components/Calculator/CreditCalculatorForm.tsx +8 -7
  1226. package/src/components/Calculator/DepositCalculatorForm.tsx +3 -2
  1227. package/src/components/Calculator/MortgageCalculatorForm.tsx +5 -4
  1228. package/src/components/Calculator/renderCalculatorBlock.tsx +1 -1
  1229. package/src/components/Calculator/useBonusCalculatorParams.ts +2 -6
  1230. package/src/components/Calculator/useCalculatorParams.ts +2 -2
  1231. package/src/components/Calculator/useCreditCalculatorParams.ts +1 -6
  1232. package/src/components/Catalog/Catalog.tsx +3 -2
  1233. package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +3 -2
  1234. package/src/components/ComparisonTable/ComparisonTable.tsx +2 -1
  1235. package/src/components/ComparisonTable/ComparisonTableBody.tsx +5 -4
  1236. package/src/components/ContentPage/ContentPage.tsx +3 -5
  1237. package/src/components/ContentPage/ContentPageContext.tsx +1 -26
  1238. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +2 -1
  1239. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
  1240. package/src/components/Footer/Footer.mobile.tsx +1 -1
  1241. package/src/components/Footer/Sitemap.tsx +2 -2
  1242. package/src/components/Gallery/GalleryInner.tsx +3 -2
  1243. package/src/components/GroupBlock/GroupBlock.tsx +2 -1
  1244. package/src/components/Header/Header.mobile.tsx +6 -5
  1245. package/src/components/Header/Header.tsx +1 -2
  1246. package/src/components/Header/HeaderBurger.tsx +2 -1
  1247. package/src/components/Header/HeaderSecondaryMenu.tsx +6 -4
  1248. package/src/components/Header/HeaderSubMenu.tsx +3 -2
  1249. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +2 -1
  1250. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +4 -3
  1251. package/src/components/LikeControl/LikeControl.tsx +11 -3
  1252. package/src/components/LinkDocs/LinkDocs.tsx +1 -0
  1253. package/src/components/ProductGallery/ProductGallery.tsx +3 -2
  1254. package/src/components/ProductTile/ProductTile.tsx +2 -1
  1255. package/src/components/PromoTile/PromoTile.tsx +3 -2
  1256. package/src/components/Recommendation/Recommendation.tsx +2 -1
  1257. package/src/components/SafeDepositRental/SafeDepositRental.tsx +3 -2
  1258. package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +32 -32
  1259. package/src/components/Tabs/Tabs.tsx +3 -2
  1260. package/src/components/TariffsTable/TariffsTable.tsx +3 -2
  1261. package/src/components/Tile/Tile.tsx +2 -2
  1262. package/src/components/__snapshots__/Blocks.spec.tsx.snap +11 -9
  1263. package/src/hooks/useExchangeRates.ts +2 -2
  1264. package/src/hooks/useGeolocation.ts +22 -0
  1265. package/src/hooks/useLikeService.ts +29 -0
  1266. package/src/hooks/useLink.ts +1 -1
  1267. package/src/hooks/useSafeDepositRental.ts +2 -2
  1268. package/src/hooks/useSearch.ts +10 -0
  1269. package/src/index.ts +2 -1
  1270. package/src/react/setup-fixture.ts +2 -55
  1271. package/src/services/sitemap/useSitemap.ts +2 -2
  1272. package/src/ui-kit/BlockWrapper.tsx +3 -2
  1273. package/src/ui-kit/BlocksList/BlocksListProps.ts +0 -2
  1274. package/src/ui-kit/Checkbox/Checkbox.tsx +28 -26
  1275. package/src/ui-kit/Foldable/Foldable.tsx +0 -2
  1276. package/src/ui-kit/Foldable/useActiveHandler.ts +3 -4
  1277. package/src/ui-kit/InputRange/InputRange.tsx +21 -7
  1278. package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  1279. package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +2 -2
  1280. package/src/ui-kit/SearchBar/SearchBar.tsx +2 -2
  1281. package/src/ui-kit/SearchBar/SearchBarInner.tsx +57 -58
  1282. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +3 -3
@@ -1,1804 +1,1907 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.UniMobileBlocks = {}));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.UniMobileBlocks = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- const setup = (_jsx, _jsxs) => {
8
- setup._jsx = _jsx;
9
- setup._jsxs = _jsxs || _jsx;
10
- };
11
-
12
- setup.vue = _ => {
13
- const adapter = (type, { children, dangerouslySetInnerHTML, ...rest } = {}) => {
14
- const props = Object.assign({}, rest, dangerouslySetInnerHTML ? { innerHTML: dangerouslySetInnerHTML.__html } : {});
15
- const isComponent = typeof type !== 'string';
16
- const lazyChildren = isComponent ? () => children : children; // Vue optimization
17
- return _(type, props, lazyChildren);
18
- };
19
- setup(adapter);
20
- };
21
-
22
- const jsx = (...args) => setup._jsx(...args);
23
- const jsxs = (...args) => setup._jsxs(...args);
24
-
25
- const JSX = Component => {
26
- if (Component._tmpl) return Component._tmpl;
27
-
28
- Component._tmpl = function JSXTmpl(rawProps, context) {
29
- const { children: rawChildren, ...props } = rawProps || {};
30
-
31
- const defaultSlot = context?.slots?.default; // Vue
32
- const children = rawChildren || (defaultSlot && defaultSlot());
33
- return Component(Object.assign(props, children && { children }), context);
34
- };
35
-
36
- Component._tmpl.inheritAttrs = false; // Vue
37
-
38
- return Component._tmpl;
39
- };
40
-
41
- const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
42
-
43
- function DaDataAPI(baseURL = '') {
44
- async function getFetcherAddress() {
45
- if (!('geolocation' in navigator)) {
46
- return null;
47
- }
48
- try {
49
- const coords = await getGeolocation();
50
- const response = await fetch(`${baseURL}/geolocate`, {
51
- method: 'POST',
52
- mode: 'cors',
53
- body: JSON.stringify({
54
- lat: coords.latitude,
55
- lon: coords.longitude,
56
- count: 1,
57
- }),
58
- });
59
- const data = (await response.json());
60
- return data?.suggestions?.[0]?.data?.city;
61
- }
62
- catch (e) {
63
- console.error(e);
64
- return null;
65
- }
66
- }
67
- return {
68
- getFetcherAddress,
69
- };
70
- }
71
-
72
- const AUTH_PREFIX = 'guest';
73
- const STORAGE_KEY = 'likesToken';
74
- // eslint-disable-next-line max-lines-per-function
75
- function LikeAPI(projectId, baseURL = '') {
76
- async function getLikeCount(...nodeIds) {
77
- if (!nodeIds.length) {
78
- return [];
79
- }
80
- const { token: Authorization } = await auth();
81
- try {
82
- const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/likes`, {
83
- method: 'POST',
84
- mode: 'cors',
85
- headers: { 'Content-Type': 'application/json', Authorization },
86
- body: JSON.stringify({
87
- node_ids: nodeIds,
88
- }),
89
- });
90
- const { likes } = await response.json();
91
- return likes || [];
92
- }
93
- catch (e) {
94
- console.error(e);
95
- return [];
96
- }
97
- }
98
- async function like(nodeId) {
99
- if (!nodeId) {
100
- return 0;
101
- }
102
- const { token: Authorization, name } = await auth();
103
- try {
104
- const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/like`, {
105
- method: 'POST',
106
- mode: 'cors',
107
- headers: {
108
- 'Content-Type': 'application/json',
109
- Authorization,
110
- UserID: name,
111
- },
112
- body: JSON.stringify({
113
- node_id: nodeId,
114
- user_name: name,
115
- }),
116
- });
117
- const { likes } = await response.json();
118
- return likes || 0;
119
- }
120
- catch (e) {
121
- console.error(e);
122
- return 0;
123
- }
124
- }
125
- async function dislike(nodeId) {
126
- if (!nodeId) {
127
- return 0;
128
- }
129
- const { token: Authorization, name } = await auth();
130
- try {
131
- const response = await fetch(`${baseURL}/assist/v1/public/projects/${projectId}/nodes/unlike`, {
132
- method: 'POST',
133
- mode: 'cors',
134
- headers: {
135
- 'Content-Type': 'application/json',
136
- Authorization,
137
- UserID: name,
138
- },
139
- body: JSON.stringify({
140
- node_id: nodeId,
141
- user_name: name,
142
- }),
143
- });
144
- const { likes } = await response.json();
145
- return likes || 0;
146
- }
147
- catch (e) {
148
- console.error(e);
149
- return 0;
150
- }
151
- }
152
- async function auth() {
153
- try {
154
- const userData = JSON.parse(globalThis.localStorage.getItem(STORAGE_KEY) || '');
155
- if (userData?.token) {
156
- return userData;
157
- }
158
- }
159
- catch (e) {
160
- // do nothing
161
- }
162
- try {
163
- const response = await fetch(`${baseURL}/assist/v1/public/auth`, {
164
- method: 'POST',
165
- mode: 'cors',
166
- headers: {
167
- 'Content-Type': 'application/json',
168
- },
169
- body: JSON.stringify({
170
- prefix: AUTH_PREFIX,
171
- }),
172
- });
173
- const { token, name } = await response.json();
174
- globalThis.localStorage.setItem(STORAGE_KEY, JSON.stringify({ token, name }));
175
- return { token, name };
176
- }
177
- catch (e) {
178
- console.error(e);
179
- return {};
180
- }
181
- }
182
- return {
183
- getLikeCount,
184
- like,
185
- dislike,
186
- };
187
- }
188
-
189
- const HeadingClass = {
190
- h0: 'text-m-title',
191
- h1: 'text-m-title',
192
- h2: 'text-m-title',
193
- h3: 'text-h6',
194
- h4: 'text-m-title-xs',
195
- h5: 'text-m-title-xs',
196
- h6: 'text-m-title-xs',
197
- };
198
- const Heading = JSX((props) => {
199
- const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
200
- return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
201
- });
202
-
203
- // Generated. Do not touch
204
- /* eslint-disable max-len, max-lines */
205
- var IconMap;
206
- (function (IconMap) {
207
- IconMap["ActualBalanceIcon"] = "ActualBalanceIcon";
208
- IconMap["AirPlane"] = "AirPlane";
209
- IconMap["AppleIcon"] = "AppleIcon";
210
- IconMap["ArrowDownIcon"] = "ArrowDownIcon";
211
- IconMap["ArrowLeftIcon"] = "ArrowLeftIcon";
212
- IconMap["ArrowUpIcon"] = "ArrowUpIcon";
213
- IconMap["AtmIcon"] = "AtmIcon";
214
- IconMap["BankIcon"] = "BankIcon";
215
- IconMap["BurgerIcon"] = "BurgerIcon";
216
- IconMap["Calendar2Icon"] = "Calendar2Icon";
217
- IconMap["CalendarCircleIcon"] = "CalendarCircleIcon";
218
- IconMap["CalendarIcon"] = "CalendarIcon";
219
- IconMap["CalendarTickIcon"] = "CalendarTickIcon";
220
- IconMap["CardIcon"] = "CardIcon";
221
- IconMap["CardPosIcon"] = "CardPosIcon";
222
- IconMap["CardTickIcon"] = "CardTickIcon";
223
- IconMap["CardWithGemIcon"] = "CardWithGemIcon";
224
- IconMap["CarIcon"] = "CarIcon";
225
- IconMap["ChartSquareIcon"] = "ChartSquareIcon";
226
- IconMap["CinemaIcon"] = "CinemaIcon";
227
- IconMap["ClockIcon"] = "ClockIcon";
228
- IconMap["CloseIcon"] = "CloseIcon";
229
- IconMap["ComfortableCompIcon"] = "ComfortableCompIcon";
230
- IconMap["CreditCardsIcon"] = "CreditCardsIcon";
231
- IconMap["DiscountShapeIcon"] = "DiscountShapeIcon";
232
- IconMap["DocIcon"] = "DocIcon";
233
- IconMap["DocIconMonoColor"] = "DocIconMonoColor";
234
- IconMap["DocsIcon"] = "DocsIcon";
235
- IconMap["DocumentTextIcon"] = "DocumentTextIcon";
236
- IconMap["DollarIcon"] = "DollarIcon";
237
- IconMap["DoneIcon"] = "DoneIcon";
238
- IconMap["EarthIcon"] = "EarthIcon";
239
- IconMap["EmptyWalletChangeIcon"] = "EmptyWalletChangeIcon";
240
- IconMap["EmptyWalletIcon"] = "EmptyWalletIcon";
241
- IconMap["EuroIcon"] = "EuroIcon";
242
- IconMap["GeolocationIcon"] = "GeolocationIcon";
243
- IconMap["GlassIcon"] = "GlassIcon";
244
- IconMap["GlobalIcon"] = "GlobalIcon";
245
- IconMap["GpsIcon"] = "GpsIcon";
246
- IconMap["GridIcon"] = "GridIcon";
247
- IconMap["InterestGrowthIcon"] = "InterestGrowthIcon";
248
- IconMap["InterestIcon"] = "InterestIcon";
249
- IconMap["JCBIcon"] = "JCBIcon";
250
- IconMap["Logo"] = "Logo";
251
- IconMap["LoupeIcon"] = "LoupeIcon";
252
- IconMap["MasterCardIcon"] = "MasterCardIcon";
253
- IconMap["MinusIcon"] = "MinusIcon";
254
- IconMap["MirIcon"] = "MirIcon";
255
- IconMap["MoneyIcon"] = "MoneyIcon";
256
- IconMap["MoneyInsuranceIcon"] = "MoneyInsuranceIcon";
257
- IconMap["MonitorMobileIcon"] = "MonitorMobileIcon";
258
- IconMap["NewDocIcon"] = "NewDocIcon";
259
- IconMap["OfficeIcon"] = "OfficeIcon";
260
- IconMap["OkIcon"] = "OkIcon";
261
- IconMap["PackA4"] = "PackA4";
262
- IconMap["PassSendIcon"] = "PassSendIcon";
263
- IconMap["PercentageRoundIcon"] = "PercentageRoundIcon";
264
- IconMap["PercentageSquareIcon"] = "PercentageSquareIcon";
265
- IconMap["PersonalCardIcon"] = "PersonalCardIcon";
266
- IconMap["PlayMarketIcon"] = "PlayMarketIcon";
267
- IconMap["PlusIcon"] = "PlusIcon";
268
- IconMap["PowerIcon"] = "PowerIcon";
269
- IconMap["Profile2UserIcon"] = "Profile2UserIcon";
270
- IconMap["ProfileIcon"] = "ProfileIcon";
271
- IconMap["PumpkinIcon"] = "PumpkinIcon";
272
- IconMap["RoundRubleIcon"] = "RoundRubleIcon";
273
- IconMap["SafeIcon"] = "SafeIcon";
274
- IconMap["ShieldTickIcon"] = "ShieldTickIcon";
275
- IconMap["SignDocsIcon"] = "SignDocsIcon";
276
- IconMap["SmallClockIcon"] = "SmallClockIcon";
277
- IconMap["SoundIcon"] = "SoundIcon";
278
- IconMap["StateMortgageIcon"] = "StateMortgageIcon";
279
- IconMap["TelegramIcon"] = "TelegramIcon";
280
- IconMap["UnionPayIcon"] = "UnionPayIcon";
281
- IconMap["UserTickIcon"] = "UserTickIcon";
282
- IconMap["VisaIcon"] = "VisaIcon";
283
- IconMap["VKIcon"] = "VKIcon";
284
- IconMap["WalletAdd2Icon"] = "WalletAdd2Icon";
285
- IconMap["WalletAddIcon"] = "WalletAddIcon";
286
- IconMap["WalletIcon"] = "WalletIcon";
287
- IconMap["WalletWithMoneyIcon"] = "WalletWithMoneyIcon";
288
- IconMap["WateringCan"] = "WateringCan";
289
- })(IconMap || (IconMap = {}));
290
- var IconTitleMap;
291
- (function (IconTitleMap) {
292
- IconTitleMap["ActualBalanceIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
293
- IconTitleMap["AirPlane"] = "\u0421\u0430\u043C\u043E\u043B\u0435\u0442";
294
- IconTitleMap["AppleIcon"] = "\u041B\u043E\u0433\u043E \u00ABApple\u00BB";
295
- IconTitleMap["ArrowDownIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043D\u0438\u0437'";
296
- IconTitleMap["ArrowLeftIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430";
297
- IconTitleMap["ArrowUpIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u0432\u0435\u0440\u0445";
298
- IconTitleMap["AtmIcon"] = "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442";
299
- IconTitleMap["BankIcon"] = "\u0411\u0430\u043D\u043A";
300
- IconTitleMap["BurgerIcon"] = "\u0411\u0443\u0440\u0433\u0435\u0440";
301
- IconTitleMap["Calendar2Icon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C 2";
302
- IconTitleMap["CalendarCircleIcon"] = "\u0421\u043A\u0440\u0443\u0433\u043B\u0451\u043D\u043D\u044B\u0439 \u043A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
303
- IconTitleMap["CalendarIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
304
- IconTitleMap["CalendarTickIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
305
- IconTitleMap["CardIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430";
306
- IconTitleMap["CardPosIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u043F\u043E\u0434 \u043D\u0430\u043A\u043B\u043E\u043D\u043E\u043C";
307
- IconTitleMap["CardTickIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
308
- IconTitleMap["CardWithGemIcon"] = "\u041A\u0430\u0440\u0442\u0430 \u0441 \u0434\u0440\u0430\u0433\u043E\u0446\u0435\u043D\u043D\u043E\u0441\u0442\u044F\u043C\u0438";
309
- IconTitleMap["CarIcon"] = "\u041C\u0430\u0448\u0438\u043D\u0430";
310
- IconTitleMap["ChartSquareIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438 \u0432\u043D\u0443\u0442\u0440\u0438 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430";
311
- IconTitleMap["CinemaIcon"] = "\u041A\u0438\u043D\u043E";
312
- IconTitleMap["ClockIcon"] = "\u0427\u0430\u0441\u044B";
313
- IconTitleMap["CloseIcon"] = "\u041A\u0440\u0435\u0441\u0442\u0438\u043A";
314
- IconTitleMap["ComfortableCompIcon"] = "\u041A\u0440\u0435\u0441\u043B\u043E";
315
- IconTitleMap["CreditCardsIcon"] = "\u041A\u0440\u0435\u0434\u0438\u0442\u043D\u044B\u0435 \u043A\u0430\u0440\u0442\u044B";
316
- IconTitleMap["DiscountShapeIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
317
- IconTitleMap["DocIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
318
- IconTitleMap["DocIconMonoColor"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 (\u043E\u0434\u043D\u043E\u0446\u0432\u0435\u0442\u043D\u044B\u0439)";
319
- IconTitleMap["DocsIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
320
- IconTitleMap["DocumentTextIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C";
321
- IconTitleMap["DollarIcon"] = "\u0414\u043E\u043B\u043B\u0430\u0440";
322
- IconTitleMap["DoneIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430'";
323
- IconTitleMap["EarthIcon"] = "\u0417\u0435\u043C\u043B\u044F";
324
- IconTitleMap["EmptyWalletChangeIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u043E\u043C";
325
- IconTitleMap["EmptyWalletIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A";
326
- IconTitleMap["EuroIcon"] = "\u0415\u0432\u0440\u043E";
327
- IconTitleMap["GeolocationIcon"] = "\u0413\u0435\u043E\u043B\u043E\u043A\u0430\u0446\u0438\u044F";
328
- IconTitleMap["GlassIcon"] = "\u0417\u0435\u0440\u043A\u0430\u043B\u043E";
329
- IconTitleMap["GlobalIcon"] = "\u0413\u043B\u043E\u0431\u0443\u0441";
330
- IconTitleMap["GpsIcon"] = "Gps";
331
- IconTitleMap["GridIcon"] = "\u0421\u0435\u0442\u043A\u0430 (\u0431\u0435\u043B\u0430\u044F)";
332
- IconTitleMap["InterestGrowthIcon"] = "\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430 \u0440\u043E\u0441\u0442\u0430";
333
- IconTitleMap["InterestIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
334
- IconTitleMap["JCBIcon"] = "JCB";
335
- IconTitleMap["Logo"] = "Logo";
336
- IconTitleMap["LoupeIcon"] = "\u041B\u0443\u043F\u0430";
337
- IconTitleMap["MasterCardIcon"] = "MasterCard";
338
- IconTitleMap["MinusIcon"] = "\u041C\u0438\u043D\u0443\u0441";
339
- IconTitleMap["MirIcon"] = "\u041C\u0418\u0420";
340
- IconTitleMap["MoneyIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
341
- IconTitleMap["MoneyInsuranceIcon"] = "\u0414\u0435\u043D\u0435\u0436\u043D\u043E\u0435 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435";
342
- IconTitleMap["MonitorMobileIcon"] = "\u041C\u043E\u043D\u0438\u0442\u043E\u0440 \u0438 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439";
343
- IconTitleMap["NewDocIcon"] = "\u041D\u043E\u0432\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
344
- IconTitleMap["OfficeIcon"] = "\u041E\u0444\u0438\u0441";
345
- IconTitleMap["OkIcon"] = "\u041B\u043E\u0433\u043E \u00AB\u041E\u0434\u043D\u043E\u043A\u043B\u0430\u0441\u0441\u043D\u0438\u043A\u0438\u00BB";
346
- IconTitleMap["PackA4"] = "PackA4";
347
- IconTitleMap["PassSendIcon"] = "\u0411\u0438\u0437\u043D\u0435\u0441";
348
- IconTitleMap["PercentageRoundIcon"] = "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u044B (\u043A\u0440\u0443\u0433.)";
349
- IconTitleMap["PercentageSquareIcon"] = "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u044B";
350
- IconTitleMap["PersonalCardIcon"] = "\u041F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u0440\u0442\u0430";
351
- IconTitleMap["PlayMarketIcon"] = "\u041B\u043E\u0433\u043E \u00ABPlayMarket\u00BB";
352
- IconTitleMap["PlusIcon"] = "\u041F\u043B\u044E\u0441";
353
- IconTitleMap["PowerIcon"] = "\u0429\u0438\u0442";
354
- IconTitleMap["Profile2UserIcon"] = "\u041F\u0440\u043E\u0444\u0438\u043B\u044C, 2 \u043F\u0435\u0440\u0441\u043E\u043D\u044B";
355
- IconTitleMap["ProfileIcon"] = "\u041F\u0440\u043E\u0444\u0438\u043B\u044C";
356
- IconTitleMap["PumpkinIcon"] = "\u0422\u044B\u043A\u0432\u0430";
357
- IconTitleMap["RoundRubleIcon"] = "\u0420\u0443\u0431\u043B\u044C (\u043A\u0440\u0443\u0433.)";
358
- IconTitleMap["SafeIcon"] = "\u0421\u0435\u0439\u0444";
359
- IconTitleMap["ShieldTickIcon"] = "\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C";
360
- IconTitleMap["SignDocsIcon"] = "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
361
- IconTitleMap["SmallClockIcon"] = "\u041C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0435 \u0447\u0430\u0441\u044B";
362
- IconTitleMap["SoundIcon"] = "\u0417\u0432\u0443\u043A";
363
- IconTitleMap["StateMortgageIcon"] = "StateMortgageIcon";
364
- IconTitleMap["TelegramIcon"] = "\u041B\u043E\u0433\u043E \u00ABTelegram\u00BB";
365
- IconTitleMap["UnionPayIcon"] = "UnionPay";
366
- IconTitleMap["UserTickIcon"] = "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C";
367
- IconTitleMap["VisaIcon"] = "Visa";
368
- IconTitleMap["VKIcon"] = "\u041B\u043E\u0433\u043E \u00ABVK\u00BB";
369
- IconTitleMap["WalletAdd2Icon"] = "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u0430\u0440\u0442\u044B";
370
- IconTitleMap["WalletAddIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u043F\u043B\u044E\u0441\u043E\u043C";
371
- IconTitleMap["WalletIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A";
372
- IconTitleMap["WalletWithMoneyIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0434\u0435\u043D\u044C\u0433\u0430\u043C\u0438";
373
- IconTitleMap["WateringCan"] = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0434\u0443\u043A\u0442";
374
- })(IconTitleMap || (IconTitleMap = {}));
375
-
376
- const projectSettings = new (class {
377
- _ = {
378
- PROD_BRANCH: 'master',
379
- FORCED_DRAFT_FLOW: false,
380
- };
381
- setup(_) {
382
- this._ = _;
383
- }
384
- get TEST_BRANCH() {
385
- return this._.TEST_BRANCH;
386
- }
387
- get RC_BRANCH() {
388
- return this._.RC_BRANCH;
389
- }
390
- get PROD_BRANCH() {
391
- return this._.PROD_BRANCH;
392
- }
393
- get FORCED_DRAFT_FLOW() {
394
- return this._.FORCED_DRAFT_FLOW;
395
- }
396
- get ENABLE_ASSIST() {
397
- return this._.ENABLE_ASSIST;
398
- }
399
- get SITEMAP() {
400
- return this._.SITEMAP;
401
- }
402
- get CDN() {
403
- return this._.CDN;
404
- }
405
- })();
406
-
407
- const svgUseStyleMap = {
408
- normal: 'text-primary-main',
409
- black: 'text-black',
410
- white: 'text-black invert',
411
- };
412
- const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${IconTitleMap[name] || name}`, title = alt, iconVersion = 'normal', asSVG, ...imgProps }) => {
413
- const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
414
- if (asSVG) {
415
- return (jsxs("svg", { className: className, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { className: `${svgUseStyleMap[iconVersion]} ${imageClassName}`, href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
416
- }
417
- return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
418
- });
419
-
420
- function getIconVersion(image) {
421
- return typeof image === 'string' ? 'normal' : image.iconVersion || 'normal';
422
- }
423
-
424
- const sourcesComparator = (a, b) => {
425
- if (a.media && b.media) {
426
- return a.media - b.media;
427
- }
428
- return 0;
429
- };
430
- const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false }) => {
431
- if (!image || (!image?.sources && !image?.src)) {
432
- return null;
433
- }
434
- const pictureStyles = isMobile ? 'flex' : 'flex-none';
435
- return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
436
- ? image.sources
437
- .sort(sourcesComparator)
438
- .map(({ src, format, media, size }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...size }, `${index}_${src}`)))
439
- : null, renderImg(image, imageClassName, isMobile)] }));
440
- });
441
- const renderImg = (image, imageClassName = '', isMobile = false) => {
442
- const title = image.title || '';
443
- const alt = image.alt || image.title;
444
- const imgStyle = isMobile ? 'm-auto' : 'm-0';
445
- return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, ...image.size }));
446
- };
447
- function formatToMimeType(format) {
448
- return format ? `image/${String(format)}` : undefined;
449
- }
450
-
451
- const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, ...iconProps }) => {
452
- if (!image) {
453
- return null;
454
- }
455
- // backwards compatibility with existing icons in usage
456
- const icon = typeof image === 'string' ? image : image.icon;
457
- if (icon || icon === '') {
458
- return icon.length ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: getIconVersion(image), name: icon, ...iconProps })) : null;
459
- }
460
- return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
461
- });
462
-
463
- const Img = JSX(({ className = '', image, imageClassName, ...iconProps }) => {
464
- return (jsx(ImgInner, { className: className, image: image, imageClassName: imageClassName, ...iconProps, isMobile: true }));
465
- });
466
-
467
- function style2className(style) {
468
- return style ? style.filter(Boolean).join(' ') : '';
469
- }
470
-
471
- const ALIGN_TEXT = {
472
- left: 'text-left',
473
- center: 'text-center',
474
- right: 'text-right',
475
- };
476
- const HEADLINE_BLOCK_STYLE_MAPS = {
477
- transparent: {
478
- background: 'bg-transparent',
479
- text: 'text-primary-text',
480
- description: 'text-primary-text',
481
- },
482
- primary: {
483
- background: 'bg-white',
484
- text: 'text-primary-text',
485
- description: 'text-primary-text',
486
- },
487
- secondary: {
488
- background: 'bg-primary-main',
489
- text: 'text-white',
490
- description: 'text-white/80',
491
- },
492
- };
493
-
494
- const Headline = JSX(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
495
- const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
496
- return (jsxs("section", { className: `px-4 py-6 flex flex-col gap-2.5 ${STYLE_MAPS.background} ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })) : null, description ? (jsx("p", { className: `text-m ${STYLE_MAPS.description} ${ALIGN_TEXT[align]}`, children: description })) : null, image?.src && (jsx("div", { className: "mt-2.5 mx-auto flex justify-center", children: jsx(Img, { image: image }) }))] }));
497
- });
498
-
499
- // column-gap between children of SwipeListControl container
500
- const DEFAULT_GAP = 14;
501
- /*
502
- Horizontal padding used on a container above SwipeListControl.
503
- Same value used on a SwipeListControlChildren container to compensate it
504
- and get rid of a clipping effect caused by overflow: hidden.
505
- */
506
- const DEFAULT_PADDING = 16;
507
- // Classes used to compensate outer container padding, so that child elements won't be clipped
508
-
509
- const DOT_STYLES = 'bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full';
510
- const BASE_DOT_WIDTH = 6;
511
- const ACTIVE_DOT_WIDTH_CHANGE = 16;
512
- const BASE_DOT_OPACITY = 0.3;
513
- const ACTIVE_DOT_OPACITY_CHANGE = 0.7;
514
- const SwipeListControlDots = JSX(({ children, activeIndex, indexFraction, showDots }) => {
515
- const handleClick = (idx) => (e) => {
516
- if (idx === activeIndex) {
517
- return;
518
- }
519
- const contentContainer = e.currentTarget.parentElement
520
- ?.previousElementSibling;
521
- contentContainer?.children[idx]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
522
- };
523
- return showDots && children?.length ? (jsx("div", { className: "flex gap-2 mx-auto mt-5 w-fit", children: children?.map((_, idx) => (jsx("div", { onClick: handleClick(idx), className: `${DOT_STYLES}`, style: getDotStyles(idx, activeIndex, indexFraction), "aria-hidden": true }, String(idx)))) })) : null;
524
- });
525
- const getDotStyles = (currentIdx, activeIndex, indexFraction) => {
526
- if (currentIdx < activeIndex || currentIdx > activeIndex + 1) {
527
- return;
528
- }
529
- const leftIndexMod = 1 - indexFraction;
530
- const rightIndexMod = indexFraction;
531
- return currentIdx === activeIndex
532
- ? {
533
- opacity: `${BASE_DOT_OPACITY + ACTIVE_DOT_OPACITY_CHANGE * leftIndexMod}`,
534
- width: `${BASE_DOT_WIDTH + ACTIVE_DOT_WIDTH_CHANGE * leftIndexMod}px`,
535
- }
536
- : {
537
- opacity: `${BASE_DOT_OPACITY + ACTIVE_DOT_OPACITY_CHANGE * rightIndexMod}`,
538
- width: `${BASE_DOT_WIDTH + ACTIVE_DOT_WIDTH_CHANGE * rightIndexMod}px`,
539
- };
540
- };
541
-
542
- const SwipeListControlItem = JSX(({ className = '', children, ...rest }) => {
543
- return (jsx("div", { className: `snap-center snap-always min-w-full box-border ${className}`, role: "listitem", ...rest, children: children }));
544
- });
545
-
546
- // styles used to compensate outer container padding to get rid of clipping effect
547
- const getContainerStyle = (padding) => {
548
- return {
549
- marginLeft: `${-padding}px`,
550
- marginRight: `${-padding}px`,
551
- paddingLeft: `${padding}px`,
552
- paddingRight: `${padding}px`,
553
- };
554
- };
555
-
556
- const SwipeListControlList = JSX(({ className = '', children, activeIndex, onScroll, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, }) => {
557
- return (jsx("div", { className: `overflow-auto flex horizontal-list no-scrollbar ${className}`, style: { ...getContainerStyle(padding), gap: `${gap}px` }, role: "list", onScroll: onScroll, children: children?.length ? (children?.map((child, idx) => (jsx(SwipeListControlItem, { style: getContainerStyle(padding / 4), "aria-current": Boolean(activeIndex === idx), children: child }, String(idx))))) : (jsx(SwipeListControlItem, { children: children })) }));
558
- });
559
-
560
- /*
561
- Returns object containing whole index part, and it's decimal part for a given
562
- scrollLeft value of a container and an array of tuple containing values of a
563
- start and end boundaries of a scrollable child, right boundary non-inclusive.
564
- Returns object with index equal -1 and fraction equal 0 if scrollLeft is outside given scrollPoints
565
- */
566
- const getIndexParts = (scrollLeft, scrollPoints) => {
567
- const index = scrollPoints.findIndex(([pointStart, pointEnd]) => pointStart <= scrollLeft && scrollLeft < pointEnd);
568
- if (index < 0) {
569
- return { index, fraction: 0 };
570
- }
571
- const [start, end] = scrollPoints[index];
572
- const fraction = (scrollLeft - start) / (end - start);
573
- return { index, fraction };
574
- };
575
-
576
- /*
577
- Calculates array of breakpoints for each scrollable element in container.
578
- Returns array of tuples consisting of [start, end] boundary scrollLeft values.
579
- */
580
- const getScrollPoints = ({ gap, padding, clientWidth, scrollWidth, childElementCount, itemWidth, }) => {
581
- const scrollableDistance = scrollWidth - clientWidth;
582
- if (childElementCount === 2) {
583
- return [
584
- [0, scrollableDistance],
585
- [scrollableDistance, scrollWidth],
586
- ];
587
- }
588
- const scrollItemWidth = itemWidth + gap;
589
- const edgeScrollDistance = clientWidth - gap - padding;
590
- const lastScrollableIdx = childElementCount - 2;
591
- const scrollPoints = new Array(childElementCount)
592
- .fill(0)
593
- .map((_, idx) => idx === 0 || idx === lastScrollableIdx
594
- ? [
595
- idx > 0 ? scrollableDistance - edgeScrollDistance : 0,
596
- idx > 0 ? scrollableDistance : edgeScrollDistance,
597
- ]
598
- : [
599
- (idx - 1) * scrollItemWidth + edgeScrollDistance,
600
- idx * scrollItemWidth + edgeScrollDistance,
601
- ]);
602
- scrollPoints[childElementCount - 1] = [scrollableDistance, scrollWidth];
603
- return scrollPoints;
604
- };
605
-
606
- const SwipeListControl = JSX(({ className, context, children, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, onSlideChange, }) => {
607
- const [activeIndex, setActiveIndex] = context.useState(0);
608
- const [indexFraction, setIndexFraction] = context.useState(0);
609
- const dotsProps = {
610
- activeIndex,
611
- indexFraction,
612
- showDots,
613
- children,
614
- };
615
- const handleScroll = (e) => {
616
- const { scrollLeft, clientWidth, childElementCount, scrollWidth, children: childrenCollection, } = e?.currentTarget;
617
- // horizontal PADDING / 2 to compensate padding-margin combo of child container
618
- // without CSS calc function, as wrapper element gets bigger in the DOM, remaining same visually
619
- const itemWidth = childrenCollection[0].offsetWidth - padding / 2;
620
- const scrollPoints = getScrollPoints({
621
- gap,
622
- padding,
623
- clientWidth,
624
- scrollWidth,
625
- childElementCount,
626
- itemWidth,
627
- });
628
- const { index, fraction } = getIndexParts(scrollLeft, scrollPoints);
629
- if (index !== activeIndex && onSlideChange) {
630
- onSlideChange();
631
- }
632
- setActiveIndex(index);
633
- setIndexFraction(fraction);
634
- };
635
- return (jsxs("div", { className: className, children: [jsx(SwipeListControlList, { gap: gap, padding: padding, activeIndex: activeIndex, onScroll: handleScroll, children: children }), jsx(SwipeListControlDots, { ...dotsProps })] }));
636
- });
637
-
638
- const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
639
- const { text, fileSize, ...linkProps } = doc;
640
- return (jsxs("a", { className: className, role: "link", ...linkProps, children: [icon ? (jsx(Img, { className: iconClassName, image: icon, width: "24px", height: "24px", asSVG: true })) : null, text ? (jsxs("span", { className: textClassName, children: [text, jsx("span", { className: suffixClassName, children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })) : null] }));
641
- });
642
- const formatSuffix = (ext, fileSize) => {
643
- const prefix = ext || fileSize ? ',' : '';
644
- const extension = ext ? ` ${ext}` : '';
645
- const size = fileSize ? ` (${fileSize})` : '';
646
- return prefix + extension + size;
647
- };
648
- const getExtFromHref = (href) => {
649
- if (!href) {
650
- return '';
651
- }
652
- const index = href.lastIndexOf('.');
653
- return index !== -1 ? href.substring(index + 1) : '';
654
- };
655
-
656
- const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-3 min-w-6 min-h-6", doc: doc, icon: icon })));
657
-
658
- const LinkDocsHorizontalList = JSX(({ context, hasBorder = true, documents, icon }) => {
659
- return (jsx(SwipeListControl, { context: context, className: "text-s text-primary-main mt-5", children: documents?.length
660
- ? documents.map((doc, i) => (jsx(LinkDocsListItem, { className: hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : '', doc: doc, icon: icon }, String(i))))
661
- : null }));
662
- });
663
-
664
- const LinkDocsVerticalList = JSX(({ hasBorder = true, documents, icon }) => {
665
- return (jsx("div", { className: `text-s text-primary-main flex flex-col mt-5 ${hasBorder ? 'gap-3.5' : 'gap-2'}`, role: "list", children: documents?.length
666
- ? documents.map((doc, i) => (jsx("div", { role: "listitem", children: jsx(LinkDocsListItem, { className: hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : '', doc: doc, icon: icon }) }, String(i))))
667
- : null }));
668
- });
669
-
670
- const LinkDocs = JSX(({ className = '', context, title, description, icon = { icon: 'DocIconMonoColor' }, documents, orientation = 'vertical', hasBorder = true, }) => {
671
- return (jsxs("section", { className: `font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${className}`, children: [jsx(Headline, { className: `!p-0 ${description ? 'gap-2' : 'gap-5'}`, title: title, description: description, context: context, align: "center" }), orientation === 'vertical' ? (jsx(LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : (jsx(LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
672
- });
673
-
674
- const isURL = (href) => href?.includes('//');
675
- const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
676
- const getOrigin = (href) => {
677
- if (!href || !isURL(href)) {
678
- return undefined;
679
- }
680
- const url = href;
681
- const protoSeparator = '//';
682
- const endOfProto = url.indexOf(protoSeparator);
683
- const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
684
- return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
685
- };
686
- const getHash = (href) => {
687
- if (!href || !isURL(href)) {
688
- return undefined;
689
- }
690
- const hashIndex = href.indexOf('#');
691
- return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
692
- };
693
- const isHash = (href) => href?.startsWith('#');
694
-
695
- var url = /*#__PURE__*/Object.freeze({
696
- __proto__: null,
697
- isURL: isURL,
698
- withoutQuery: withoutQuery,
699
- getOrigin: getOrigin,
700
- getHash: getHash,
701
- isHash: isHash
702
- });
703
-
704
- const MOBILE_URL_PATH = '/mobile';
705
- const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
706
-
707
- const adjustHref = (href, router) => {
708
- if (!href) {
709
- return href;
710
- }
711
- const relativeHref = toRelativeHref(href, router) || '';
712
- const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
713
- return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
714
- };
715
- const toRelativeHref = (href, router) => {
716
- if (!href) {
717
- return href;
718
- }
719
- const origin = getOrigin(router?.href);
720
- return origin ? href.replace(origin, '') || '/' : href;
721
- };
722
-
723
- const defaultHandlerDecorator = (handler) => handler;
724
- function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
725
- const href = adjustHref(link.href, router);
726
- return {
727
- ...link,
728
- href,
729
- 'aria-label': link.text,
730
- onClick: handlerDecorator((ev) => {
731
- const isLocalHref = href && !isURL(href);
732
- const isLocalTarget = !link.target || link.target === '_self';
733
- if (isLocalHref && isLocalTarget) {
734
- ev?.preventDefault();
735
- router.push(href);
736
- }
737
- }, link),
738
- };
739
- }
740
-
741
- const ButtonInner = JSX((props) => {
742
- const { text, aboveText, appendLeft, appendRight } = props;
743
- return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-xs-light text-left", children: aboveText }), jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-0.5' : 'text-l'}`, children: text })] })) : null, appendRight ? appendRight : null] }));
744
- });
745
- const getButtonStyle = (props) => {
746
- const { version, aboveText, rounded } = props;
747
- if (version === 'link') {
748
- return '';
749
- }
750
- const withTextStyle = `gap-2 ${aboveText ? 'py-2.5 px-7' : 'py-4 px-9'}`;
751
- return [
752
- 'flex items-center justify-center',
753
- isWithText(props) ? withTextStyle : 'h-12 w-12',
754
- rounded ? 'rounded-full' : '',
755
- ].join(' ');
756
- };
757
- const isWithText = ({ text, aboveText, appendLeft }) => Boolean(text || aboveText || !appendLeft);
758
-
759
- const buttonStyleMap = {
760
- primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
761
- secondary: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
762
- link: 'text-primary-main',
763
- };
764
- const buttonDisabledStyleMap = {
765
- primary: 'bg-secondary-dark text-secondary-text',
766
- secondary: 'bg-secondary-light text-secondary-text',
767
- link: '',
768
- };
769
- const styleButton = 'w-full text-center font-sans select-none';
770
- const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'primary', ariaLabel, ...rest }) => {
771
- const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded, version: version }));
772
- if (disabled) {
773
- return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: `inline-block ${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
774
- }
775
- return (jsx("a", { className: `${styleButton} inline-block cursor-pointer no-underline focus:border focus:border-primary-focus ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
776
- });
777
-
778
- const ButtonSection = JSX(({ context, className = '', buttons }) => {
779
- const { handlerDecorator } = context;
780
- const router = context.useRouter();
781
- return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton$2(useLink({ router, handlerDecorator }, button), index)) })) : null;
782
- });
783
- function renderButton$2({ icon, iconRight, ...button }, i) {
784
- if (!button?.text) {
785
- return null;
786
- }
787
- return icon ? (jsx(Button, { appendLeft: jsx(Img, { image: icon, width: "24", height: "24", asSVG: true }), appendRight: jsx(Img, { image: iconRight, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
788
- }
789
-
790
- const LIST_STYLE_CLASSES = {
791
- primary: 'rounded-full inline-block mr-3 mt-2',
792
- secondary: 'rounded-full inline-block mr-3 mt-2',
793
- gray: 'rounded-full inline-block mr-3 mt-2',
794
- tile: 'rounded-full inline-block mr-4 mt-3',
795
- 'tile-white': 'rounded-full inline-block mr-4 mt-3',
796
- };
797
- const LIST_DOT_STYLE_MAP = {
798
- primary: 'bg-primary-text',
799
- secondary: 'bg-white',
800
- gray: 'bg-secondary-text',
801
- tile: 'bg-black',
802
- 'tile-white': 'bg-white',
803
- };
804
- const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary' }) => {
805
- return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted ? jsx("div", { className: getListStyle(version) }) : null, jsx("span", { children: children })] }));
806
- });
807
- const getListStyle = (version) => {
808
- const size = {
809
- primary: 'w-2 h-2 min-w-2 min-h-2',
810
- secondary: 'w-2 h-2 min-w-2 min-h-2',
811
- gray: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5',
812
- tile: 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
813
- 'tile-white': 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
814
- };
815
- return `${LIST_STYLE_CLASSES[version]} ${LIST_DOT_STYLE_MAP[version]} ${size[version]}`;
816
- };
817
-
818
- const TEXT_STYLE_MAP = {
819
- primary: 'text-primary-text',
820
- secondary: 'text-white',
821
- gray: 'text-secondary-text',
822
- tile: 'text-primary-text',
823
- 'tile-white': 'text-white',
824
- };
825
- const List = JSX((props) => {
826
- const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
827
- return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${className}`, role: "list", children: items?.length
828
- ? items.map((_, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, version: version, children: _ }, String(i))))
829
- : null }));
830
- });
831
-
832
- const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
833
- return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { children: buttons }) : null] }), image] })] }));
834
- });
835
-
836
- const benefitTitleStyleMap = {
837
- primary: 'text-primary-text',
838
- secondary: 'text-white',
839
- };
840
- const benefitDescStyleMap = {
841
- primary: 'text-secondary-text',
842
- secondary: 'text-white',
843
- };
844
- function renderBenefit({ benefit, version = 'primary' }, i) {
845
- const isIconWhite = version === 'secondary';
846
- return (jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, jsx("div", { className: `text-l m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `text-s ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
847
- }
848
- function renderBenefitIconBgStyle(version) {
849
- let bgColorStyle = 'text-primary-main';
850
- if (version === 'secondary') {
851
- bgColorStyle = 'text-black';
852
- }
853
- return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
854
- }
855
-
856
- const ProductBlockInner = JSX(({ className = '', context, title, headlineVersion = 'L', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, label, }) => {
857
- return (jsxs("div", { className: `w-full ${className}`, children: [jsxs("div", { children: [label ? renderLabel(label, version) : null, jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, bgColorHeadline: version, headlineVersion: headlineVersion }), jsxs(BaseTile, { context: context, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((benefit, i) => renderBenefit({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-3 text-m", items: items, version: version, isDotted: isDotted })) : null] })] }), renderImage$1(image)] }));
858
- });
859
- function renderImage$1(image) {
860
- return image?.src ? (jsx(Img, { imageClassName: "mt-5 mx-auto block", image: { className: 'block', ...image } })) : null;
861
- }
862
- const labelStyleMap = {
863
- primary: 'text-primary-main border-secondary-hover',
864
- secondary: 'text-white/80',
865
- };
866
- const renderLabel = (label, version) => (jsx("div", { className: `px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${labelStyleMap[version]}`, children: label }));
867
-
868
- const productBlockStyleMap = {
869
- primary: 'bg-white text-primary-text',
870
- secondary: 'bg-primary-main text-white',
871
- };
872
- const ProductBlock = JSX((props /* Get rid of image and benefits */) => {
873
- const { className = '', version = 'primary' } = props;
874
- return (jsx("section", { className: `font-sans bg-white px-4 py-6 ${productBlockStyleMap[version]} ${className}`, children: jsx(ProductBlockInner, { ...props }) }));
875
- });
876
-
877
- const textBlockStyleMaps = {
878
- primary: {
879
- background: 'bg-white',
880
- icon: 'bg-primary-main text-white',
881
- title: 'text-primary-text',
882
- description: 'text-secondary-text',
883
- },
884
- secondary: {
885
- background: 'bg-primary-main',
886
- icon: 'bg-white text-primary-main',
887
- title: 'text-white',
888
- description: 'text-white',
889
- },
890
- 'secondary-light': {
891
- background: 'bg-primary-main/10',
892
- icon: 'bg-primary-main text-white',
893
- title: 'text-primary-text',
894
- description: 'text-secondary-text',
895
- },
896
- };
897
- const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className = '', items, isDotted = true, }) => {
898
- const textBlockStyleMap = textBlockStyleMaps[blockVersion];
899
- const listBlockVersion = blockVersion === 'secondary' ? 'secondary' : 'gray';
900
- return (jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `text-l font-medium mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-s ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (jsx(List, { className: "mt-1 text-m", items: items, isDotted: isDotted, version: listBlockVersion })) : null] })] }));
901
- });
902
- function renderIcon(className) {
903
- return (jsx("div", { className: "mb-3", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${className}`, children: "i" }) }));
904
- }
905
- function renderImage(image) {
906
- return image?.src ? jsx(Img, { className: "pb-3 mr-auto", image: image }) : null;
907
- }
908
-
909
- const blockStyle = {
910
- primary: 'bg-white',
911
- secondary: 'bg-primary-main text-white',
912
- };
913
- const Gallery = JSX(({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
914
- const headingClassName = description ? 'mb-2' : 'mb-5';
915
- return (jsxs("section", { className: `relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-5", children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${headingClassName}`, title: title })) : null, description ? (jsx("div", { className: "text-m max-w-[600px] text-center mb-5", children: description })) : null] }), renderCardsLayout(orientation, cards, context)] }));
916
- });
917
- function renderCardsLayout(orientation, cards, context) {
918
- return orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, children: cards?.map(renderCard) })) : (jsx("div", { className: "grid gap-[14px]", children: cards?.map(renderCard) }));
919
- }
920
- function renderCard(card, key) {
921
- return (jsxs("div", { className: `h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col
7
+ let _hooks;
8
+ const setupHooks = (_) => {
9
+ _hooks = _;
10
+ };
11
+ const lazyHook = (name) => (...args) => _hooks[name](...args);
12
+ const useState = lazyHook('useState');
13
+ const useEffect = lazyHook('useEffect');
14
+ const useCallback = lazyHook('useCallback');
15
+ const useMemo = lazyHook('useMemo');
16
+
17
+ const setup = (_jsx, _jsxs) => {
18
+ globalThis._uni = {
19
+ _jsx,
20
+ _jsxs: _jsxs || _jsx
21
+ };
22
+ };
23
+
24
+ const getGeolocation = async () => new Promise((resolve) => navigator.geolocation.getCurrentPosition(({ coords }) => resolve(coords)));
25
+
26
+ function DaDataAPI(baseURL = '') {
27
+ async function getFetcherAddress() {
28
+ if (!('geolocation' in navigator)) {
29
+ return null;
30
+ }
31
+ try {
32
+ const coords = await getGeolocation();
33
+ const response = await fetch(`${baseURL}/geolocate`, {
34
+ method: 'POST',
35
+ mode: 'cors',
36
+ body: JSON.stringify({
37
+ lat: coords.latitude,
38
+ lon: coords.longitude,
39
+ count: 1,
40
+ }),
41
+ });
42
+ const data = (await response.json());
43
+ return data?.suggestions?.[0]?.data?.city;
44
+ }
45
+ catch (e) {
46
+ console.error(e);
47
+ return null;
48
+ }
49
+ }
50
+ return {
51
+ getFetcherAddress,
52
+ };
53
+ }
54
+
55
+ const projectSettings = new (class {
56
+ _ = {
57
+ PROD_BRANCH: 'master',
58
+ FORCED_DRAFT_FLOW: false,
59
+ };
60
+ setup(_) {
61
+ this._ = _;
62
+ }
63
+ get TEST_BRANCH() {
64
+ return this._.TEST_BRANCH;
65
+ }
66
+ get RC_BRANCH() {
67
+ return this._.RC_BRANCH;
68
+ }
69
+ get PROD_BRANCH() {
70
+ return this._.PROD_BRANCH;
71
+ }
72
+ get FORCED_DRAFT_FLOW() {
73
+ return this._.FORCED_DRAFT_FLOW;
74
+ }
75
+ get ASSIST_PROJECT_ID() {
76
+ return this._.ASSIST_PROJECT_ID;
77
+ }
78
+ get SITEMAP() {
79
+ return this._.SITEMAP;
80
+ }
81
+ get CDN() {
82
+ return this._.CDN;
83
+ }
84
+ })();
85
+
86
+ const AUTH_PREFIX = 'guest';
87
+ const STORAGE_KEY = 'likesToken';
88
+ // eslint-disable-next-line max-lines-per-function
89
+ function LikeAPI() {
90
+ async function getLikeCount(...nodeIds) {
91
+ if (!nodeIds.length) {
92
+ return [];
93
+ }
94
+ const { token: Authorization } = await auth();
95
+ try {
96
+ const response = await fetch(`/assist/v1/public/projects/${projectSettings.ASSIST_PROJECT_ID}/nodes/likes`, {
97
+ method: 'POST',
98
+ mode: 'cors',
99
+ headers: { 'Content-Type': 'application/json', Authorization },
100
+ body: JSON.stringify({
101
+ node_ids: nodeIds,
102
+ }),
103
+ });
104
+ const { likes } = await response.json();
105
+ return likes || [];
106
+ }
107
+ catch (e) {
108
+ console.error(e);
109
+ return [];
110
+ }
111
+ }
112
+ async function like(nodeId) {
113
+ if (!nodeId) {
114
+ return 0;
115
+ }
116
+ const { token: Authorization, name } = await auth();
117
+ try {
118
+ const response = await fetch(`/assist/v1/public/projects/${projectSettings.ASSIST_PROJECT_ID}/nodes/like`, {
119
+ method: 'POST',
120
+ mode: 'cors',
121
+ headers: {
122
+ 'Content-Type': 'application/json',
123
+ Authorization,
124
+ UserID: name,
125
+ },
126
+ body: JSON.stringify({
127
+ node_id: nodeId,
128
+ user_name: name,
129
+ }),
130
+ });
131
+ const { likes } = await response.json();
132
+ return likes || 0;
133
+ }
134
+ catch (e) {
135
+ console.error(e);
136
+ return 0;
137
+ }
138
+ }
139
+ async function dislike(nodeId) {
140
+ if (!nodeId) {
141
+ return 0;
142
+ }
143
+ const { token: Authorization, name } = await auth();
144
+ try {
145
+ const response = await fetch(`/assist/v1/public/projects/${projectSettings.ASSIST_PROJECT_ID}/nodes/unlike`, {
146
+ method: 'POST',
147
+ mode: 'cors',
148
+ headers: {
149
+ 'Content-Type': 'application/json',
150
+ Authorization,
151
+ UserID: name,
152
+ },
153
+ body: JSON.stringify({
154
+ node_id: nodeId,
155
+ user_name: name,
156
+ }),
157
+ });
158
+ const { likes } = await response.json();
159
+ return likes || 0;
160
+ }
161
+ catch (e) {
162
+ console.error(e);
163
+ return 0;
164
+ }
165
+ }
166
+ async function auth() {
167
+ try {
168
+ const userData = JSON.parse(globalThis.localStorage.getItem(STORAGE_KEY) || '');
169
+ if (userData?.token) {
170
+ return userData;
171
+ }
172
+ }
173
+ catch (e) {
174
+ // do nothing
175
+ }
176
+ try {
177
+ const response = await fetch(`/assist/v1/public/auth`, {
178
+ method: 'POST',
179
+ mode: 'cors',
180
+ headers: {
181
+ 'Content-Type': 'application/json',
182
+ },
183
+ body: JSON.stringify({
184
+ prefix: AUTH_PREFIX,
185
+ }),
186
+ });
187
+ const { token, name } = await response.json();
188
+ globalThis.localStorage.setItem(STORAGE_KEY, JSON.stringify({ token, name }));
189
+ return { token, name };
190
+ }
191
+ catch (e) {
192
+ console.error(e);
193
+ return {};
194
+ }
195
+ }
196
+ return {
197
+ getLikeCount,
198
+ like,
199
+ dislike,
200
+ };
201
+ }
202
+
203
+ const jsx = (...args) => globalThis._uni._jsx(...args);
204
+ const jsxs = (...args) => globalThis._uni._jsxs(...args);
205
+
206
+ const JSX = (Component) => {
207
+ const Internal = Component;
208
+ if (!Internal._tmpl) {
209
+ Internal._tmpl = globalThis.__UNI_REACT__ ? Component : VueTmpl(Component);
210
+ }
211
+ return Internal._tmpl;
212
+ };
213
+ const VueTmpl = (Component) => {
214
+ function JSXTmpl(rawProps, context) {
215
+ const { children: rawChildren, ...props } = rawProps || {};
216
+ const defaultSlot = context?.slots?.default; // Vue
217
+ const children = rawChildren || (defaultSlot && defaultSlot());
218
+ return Component(Object.assign(props, children && { children }), context);
219
+ }
220
+ JSXTmpl.inheritAttrs = false;
221
+ return JSXTmpl;
222
+ };
223
+
224
+ const HeadingClass = {
225
+ h0: 'text-m-title',
226
+ h1: 'text-m-title',
227
+ h2: 'text-m-title',
228
+ h3: 'text-h6',
229
+ h4: 'text-m-title-xs',
230
+ h5: 'text-m-title-xs',
231
+ h6: 'text-m-title-xs',
232
+ };
233
+ const Heading = JSX((props) => {
234
+ const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
235
+ return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
236
+ });
237
+
238
+ // Generated. Do not touch
239
+ /* eslint-disable max-len, max-lines */
240
+ var IconMap;
241
+ (function (IconMap) {
242
+ IconMap["ActualBalanceIcon"] = "ActualBalanceIcon";
243
+ IconMap["AirPlane"] = "AirPlane";
244
+ IconMap["AppleIcon"] = "AppleIcon";
245
+ IconMap["ArrowDownIcon"] = "ArrowDownIcon";
246
+ IconMap["ArrowLeftIcon"] = "ArrowLeftIcon";
247
+ IconMap["ArrowUpIcon"] = "ArrowUpIcon";
248
+ IconMap["AtmIcon"] = "AtmIcon";
249
+ IconMap["BankIcon"] = "BankIcon";
250
+ IconMap["BurgerIcon"] = "BurgerIcon";
251
+ IconMap["Calendar2Icon"] = "Calendar2Icon";
252
+ IconMap["CalendarCircleIcon"] = "CalendarCircleIcon";
253
+ IconMap["CalendarIcon"] = "CalendarIcon";
254
+ IconMap["CalendarTickIcon"] = "CalendarTickIcon";
255
+ IconMap["CardIcon"] = "CardIcon";
256
+ IconMap["CardPosIcon"] = "CardPosIcon";
257
+ IconMap["CardTickIcon"] = "CardTickIcon";
258
+ IconMap["CardWithGemIcon"] = "CardWithGemIcon";
259
+ IconMap["CarIcon"] = "CarIcon";
260
+ IconMap["ChartSquareIcon"] = "ChartSquareIcon";
261
+ IconMap["CinemaIcon"] = "CinemaIcon";
262
+ IconMap["ClockIcon"] = "ClockIcon";
263
+ IconMap["CloseIcon"] = "CloseIcon";
264
+ IconMap["ComfortableCompIcon"] = "ComfortableCompIcon";
265
+ IconMap["CreditCardsIcon"] = "CreditCardsIcon";
266
+ IconMap["DiscountShapeIcon"] = "DiscountShapeIcon";
267
+ IconMap["DocIcon"] = "DocIcon";
268
+ IconMap["DocIconMonoColor"] = "DocIconMonoColor";
269
+ IconMap["DocsIcon"] = "DocsIcon";
270
+ IconMap["DocumentTextIcon"] = "DocumentTextIcon";
271
+ IconMap["DollarIcon"] = "DollarIcon";
272
+ IconMap["DoneIcon"] = "DoneIcon";
273
+ IconMap["EarthIcon"] = "EarthIcon";
274
+ IconMap["EmptyWalletChangeIcon"] = "EmptyWalletChangeIcon";
275
+ IconMap["EmptyWalletIcon"] = "EmptyWalletIcon";
276
+ IconMap["EuroIcon"] = "EuroIcon";
277
+ IconMap["GeolocationIcon"] = "GeolocationIcon";
278
+ IconMap["GlassIcon"] = "GlassIcon";
279
+ IconMap["GlobalIcon"] = "GlobalIcon";
280
+ IconMap["GpsIcon"] = "GpsIcon";
281
+ IconMap["GridIcon"] = "GridIcon";
282
+ IconMap["InterestGrowthIcon"] = "InterestGrowthIcon";
283
+ IconMap["InterestIcon"] = "InterestIcon";
284
+ IconMap["JCBIcon"] = "JCBIcon";
285
+ IconMap["Logo"] = "Logo";
286
+ IconMap["LoupeIcon"] = "LoupeIcon";
287
+ IconMap["MasterCardIcon"] = "MasterCardIcon";
288
+ IconMap["MinusIcon"] = "MinusIcon";
289
+ IconMap["MirIcon"] = "MirIcon";
290
+ IconMap["MoneyIcon"] = "MoneyIcon";
291
+ IconMap["MoneyInsuranceIcon"] = "MoneyInsuranceIcon";
292
+ IconMap["MonitorMobileIcon"] = "MonitorMobileIcon";
293
+ IconMap["NewDocIcon"] = "NewDocIcon";
294
+ IconMap["OfficeIcon"] = "OfficeIcon";
295
+ IconMap["OkIcon"] = "OkIcon";
296
+ IconMap["PackA4"] = "PackA4";
297
+ IconMap["PassSendIcon"] = "PassSendIcon";
298
+ IconMap["PercentageRoundIcon"] = "PercentageRoundIcon";
299
+ IconMap["PercentageSquareIcon"] = "PercentageSquareIcon";
300
+ IconMap["PersonalCardIcon"] = "PersonalCardIcon";
301
+ IconMap["PlayMarketIcon"] = "PlayMarketIcon";
302
+ IconMap["PlusIcon"] = "PlusIcon";
303
+ IconMap["PowerIcon"] = "PowerIcon";
304
+ IconMap["Profile2UserIcon"] = "Profile2UserIcon";
305
+ IconMap["ProfileIcon"] = "ProfileIcon";
306
+ IconMap["PumpkinIcon"] = "PumpkinIcon";
307
+ IconMap["RoundRubleIcon"] = "RoundRubleIcon";
308
+ IconMap["SafeIcon"] = "SafeIcon";
309
+ IconMap["ShieldTickIcon"] = "ShieldTickIcon";
310
+ IconMap["SignDocsIcon"] = "SignDocsIcon";
311
+ IconMap["SmallClockIcon"] = "SmallClockIcon";
312
+ IconMap["SoundIcon"] = "SoundIcon";
313
+ IconMap["StateMortgageIcon"] = "StateMortgageIcon";
314
+ IconMap["TelegramIcon"] = "TelegramIcon";
315
+ IconMap["UnionPayIcon"] = "UnionPayIcon";
316
+ IconMap["UserTickIcon"] = "UserTickIcon";
317
+ IconMap["VisaIcon"] = "VisaIcon";
318
+ IconMap["VKIcon"] = "VKIcon";
319
+ IconMap["WalletAdd2Icon"] = "WalletAdd2Icon";
320
+ IconMap["WalletAddIcon"] = "WalletAddIcon";
321
+ IconMap["WalletIcon"] = "WalletIcon";
322
+ IconMap["WalletWithMoneyIcon"] = "WalletWithMoneyIcon";
323
+ IconMap["WateringCan"] = "WateringCan";
324
+ })(IconMap || (IconMap = {}));
325
+ var IconTitleMap;
326
+ (function (IconTitleMap) {
327
+ IconTitleMap["ActualBalanceIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
328
+ IconTitleMap["AirPlane"] = "\u0421\u0430\u043C\u043E\u043B\u0435\u0442";
329
+ IconTitleMap["AppleIcon"] = "\u041B\u043E\u0433\u043E \u00ABApple\u00BB";
330
+ IconTitleMap["ArrowDownIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 '\u0412\u043D\u0438\u0437'";
331
+ IconTitleMap["ArrowLeftIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430";
332
+ IconTitleMap["ArrowUpIcon"] = "\u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u0432\u0435\u0440\u0445";
333
+ IconTitleMap["AtmIcon"] = "\u0411\u0430\u043D\u043A\u043E\u043C\u0430\u0442";
334
+ IconTitleMap["BankIcon"] = "\u0411\u0430\u043D\u043A";
335
+ IconTitleMap["BurgerIcon"] = "\u0411\u0443\u0440\u0433\u0435\u0440";
336
+ IconTitleMap["Calendar2Icon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C 2";
337
+ IconTitleMap["CalendarCircleIcon"] = "\u0421\u043A\u0440\u0443\u0433\u043B\u0451\u043D\u043D\u044B\u0439 \u043A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
338
+ IconTitleMap["CalendarIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C";
339
+ IconTitleMap["CalendarTickIcon"] = "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
340
+ IconTitleMap["CardIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430";
341
+ IconTitleMap["CardPosIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u043F\u043E\u0434 \u043D\u0430\u043A\u043B\u043E\u043D\u043E\u043C";
342
+ IconTitleMap["CardTickIcon"] = "\u041A\u0440\u0435\u0434. \u043A\u0430\u0440\u0442\u0430 \u0441 \u0433\u0430\u043B\u043E\u0447\u043A\u043E\u0439";
343
+ IconTitleMap["CardWithGemIcon"] = "\u041A\u0430\u0440\u0442\u0430 \u0441 \u0434\u0440\u0430\u0433\u043E\u0446\u0435\u043D\u043D\u043E\u0441\u0442\u044F\u043C\u0438";
344
+ IconTitleMap["CarIcon"] = "\u041C\u0430\u0448\u0438\u043D\u0430";
345
+ IconTitleMap["ChartSquareIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438 \u0432\u043D\u0443\u0442\u0440\u0438 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430";
346
+ IconTitleMap["CinemaIcon"] = "\u041A\u0438\u043D\u043E";
347
+ IconTitleMap["ClockIcon"] = "\u0427\u0430\u0441\u044B";
348
+ IconTitleMap["CloseIcon"] = "\u041A\u0440\u0435\u0441\u0442\u0438\u043A";
349
+ IconTitleMap["ComfortableCompIcon"] = "\u041A\u0440\u0435\u0441\u043B\u043E";
350
+ IconTitleMap["CreditCardsIcon"] = "\u041A\u0440\u0435\u0434\u0438\u0442\u043D\u044B\u0435 \u043A\u0430\u0440\u0442\u044B";
351
+ IconTitleMap["DiscountShapeIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
352
+ IconTitleMap["DocIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
353
+ IconTitleMap["DocIconMonoColor"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 (\u043E\u0434\u043D\u043E\u0446\u0432\u0435\u0442\u043D\u044B\u0439)";
354
+ IconTitleMap["DocsIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
355
+ IconTitleMap["DocumentTextIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C";
356
+ IconTitleMap["DollarIcon"] = "\u0414\u043E\u043B\u043B\u0430\u0440";
357
+ IconTitleMap["DoneIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430'";
358
+ IconTitleMap["EarthIcon"] = "\u0417\u0435\u043C\u043B\u044F";
359
+ IconTitleMap["EmptyWalletChangeIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u043E\u043C";
360
+ IconTitleMap["EmptyWalletIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A";
361
+ IconTitleMap["EuroIcon"] = "\u0415\u0432\u0440\u043E";
362
+ IconTitleMap["GeolocationIcon"] = "\u0413\u0435\u043E\u043B\u043E\u043A\u0430\u0446\u0438\u044F";
363
+ IconTitleMap["GlassIcon"] = "\u0417\u0435\u0440\u043A\u0430\u043B\u043E";
364
+ IconTitleMap["GlobalIcon"] = "\u0413\u043B\u043E\u0431\u0443\u0441";
365
+ IconTitleMap["GpsIcon"] = "Gps";
366
+ IconTitleMap["GridIcon"] = "\u0421\u0435\u0442\u043A\u0430 (\u0431\u0435\u043B\u0430\u044F)";
367
+ IconTitleMap["InterestGrowthIcon"] = "\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430 \u0440\u043E\u0441\u0442\u0430";
368
+ IconTitleMap["InterestIcon"] = "\u0421\u043A\u0438\u0434\u043A\u0430";
369
+ IconTitleMap["JCBIcon"] = "JCB";
370
+ IconTitleMap["Logo"] = "Logo";
371
+ IconTitleMap["LoupeIcon"] = "\u041B\u0443\u043F\u0430";
372
+ IconTitleMap["MasterCardIcon"] = "MasterCard";
373
+ IconTitleMap["MinusIcon"] = "\u041C\u0438\u043D\u0443\u0441";
374
+ IconTitleMap["MirIcon"] = "\u041C\u0418\u0420";
375
+ IconTitleMap["MoneyIcon"] = "\u0414\u0435\u043D\u044C\u0433\u0438";
376
+ IconTitleMap["MoneyInsuranceIcon"] = "\u0414\u0435\u043D\u0435\u0436\u043D\u043E\u0435 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435";
377
+ IconTitleMap["MonitorMobileIcon"] = "\u041C\u043E\u043D\u0438\u0442\u043E\u0440 \u0438 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439";
378
+ IconTitleMap["NewDocIcon"] = "\u041D\u043E\u0432\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442";
379
+ IconTitleMap["OfficeIcon"] = "\u041E\u0444\u0438\u0441";
380
+ IconTitleMap["OkIcon"] = "\u041B\u043E\u0433\u043E \u00AB\u041E\u0434\u043D\u043E\u043A\u043B\u0430\u0441\u0441\u043D\u0438\u043A\u0438\u00BB";
381
+ IconTitleMap["PackA4"] = "PackA4";
382
+ IconTitleMap["PassSendIcon"] = "\u0411\u0438\u0437\u043D\u0435\u0441";
383
+ IconTitleMap["PercentageRoundIcon"] = "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u044B (\u043A\u0440\u0443\u0433.)";
384
+ IconTitleMap["PercentageSquareIcon"] = "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u044B";
385
+ IconTitleMap["PersonalCardIcon"] = "\u041F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u0440\u0442\u0430";
386
+ IconTitleMap["PlayMarketIcon"] = "\u041B\u043E\u0433\u043E \u00ABPlayMarket\u00BB";
387
+ IconTitleMap["PlusIcon"] = "\u041F\u043B\u044E\u0441";
388
+ IconTitleMap["PowerIcon"] = "\u0429\u0438\u0442";
389
+ IconTitleMap["Profile2UserIcon"] = "\u041F\u0440\u043E\u0444\u0438\u043B\u044C, 2 \u043F\u0435\u0440\u0441\u043E\u043D\u044B";
390
+ IconTitleMap["ProfileIcon"] = "\u041F\u0440\u043E\u0444\u0438\u043B\u044C";
391
+ IconTitleMap["PumpkinIcon"] = "\u0422\u044B\u043A\u0432\u0430";
392
+ IconTitleMap["RoundRubleIcon"] = "\u0420\u0443\u0431\u043B\u044C (\u043A\u0440\u0443\u0433.)";
393
+ IconTitleMap["SafeIcon"] = "\u0421\u0435\u0439\u0444";
394
+ IconTitleMap["ShieldTickIcon"] = "\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C";
395
+ IconTitleMap["SignDocsIcon"] = "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u043D\u044B\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
396
+ IconTitleMap["SmallClockIcon"] = "\u041C\u0430\u043B\u0435\u043D\u044C\u043A\u0438\u0435 \u0447\u0430\u0441\u044B";
397
+ IconTitleMap["SoundIcon"] = "\u0417\u0432\u0443\u043A";
398
+ IconTitleMap["StateMortgageIcon"] = "StateMortgageIcon";
399
+ IconTitleMap["TelegramIcon"] = "\u041B\u043E\u0433\u043E \u00ABTelegram\u00BB";
400
+ IconTitleMap["UnionPayIcon"] = "UnionPay";
401
+ IconTitleMap["UserTickIcon"] = "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C";
402
+ IconTitleMap["VisaIcon"] = "Visa";
403
+ IconTitleMap["VKIcon"] = "\u041B\u043E\u0433\u043E \u00ABVK\u00BB";
404
+ IconTitleMap["WalletAdd2Icon"] = "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u0430\u0440\u0442\u044B";
405
+ IconTitleMap["WalletAddIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u043F\u043B\u044E\u0441\u043E\u043C";
406
+ IconTitleMap["WalletIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A";
407
+ IconTitleMap["WalletWithMoneyIcon"] = "\u041A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0434\u0435\u043D\u044C\u0433\u0430\u043C\u0438";
408
+ IconTitleMap["WateringCan"] = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0434\u0443\u043A\u0442";
409
+ })(IconTitleMap || (IconTitleMap = {}));
410
+
411
+ const svgUseStyleMap = {
412
+ normal: 'text-primary-main',
413
+ black: 'text-black',
414
+ white: 'text-black invert',
415
+ };
416
+ const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${IconTitleMap[name] || name}`, title = alt, iconVersion = 'normal', asSVG, ...imgProps }) => {
417
+ const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
418
+ if (asSVG) {
419
+ return (jsxs("svg", { className: className, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { className: `${svgUseStyleMap[iconVersion]} ${imageClassName}`, href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
420
+ }
421
+ return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
422
+ });
423
+
424
+ function getIconVersion(image) {
425
+ return typeof image === 'string' ? 'normal' : image.iconVersion || 'normal';
426
+ }
427
+
428
+ const sourcesComparator = (a, b) => {
429
+ if (a.media && b.media) {
430
+ return a.media - b.media;
431
+ }
432
+ return 0;
433
+ };
434
+ const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false }) => {
435
+ if (!image || (!image?.sources && !image?.src)) {
436
+ return null;
437
+ }
438
+ const pictureStyles = isMobile ? 'flex' : 'flex-none';
439
+ return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
440
+ ? image.sources
441
+ .sort(sourcesComparator)
442
+ .map(({ src, format, media, size }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...size }, `${index}_${src}`)))
443
+ : null, renderImg(image, imageClassName, isMobile)] }));
444
+ });
445
+ const renderImg = (image, imageClassName = '', isMobile = false) => {
446
+ const title = image.title || '';
447
+ const alt = image.alt || image.title;
448
+ const imgStyle = isMobile ? 'm-auto' : 'm-0';
449
+ return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, ...image.size }));
450
+ };
451
+ function formatToMimeType(format) {
452
+ return format ? `image/${String(format)}` : undefined;
453
+ }
454
+
455
+ const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, ...iconProps }) => {
456
+ if (!image) {
457
+ return null;
458
+ }
459
+ // backwards compatibility with existing icons in usage
460
+ const icon = typeof image === 'string' ? image : image.icon;
461
+ if (icon || icon === '') {
462
+ return icon.length ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: getIconVersion(image), name: icon, ...iconProps })) : null;
463
+ }
464
+ return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
465
+ });
466
+
467
+ const Img = JSX(({ className = '', image, imageClassName, ...iconProps }) => {
468
+ return (jsx(ImgInner, { className: className, image: image, imageClassName: imageClassName, ...iconProps, isMobile: true }));
469
+ });
470
+
471
+ function style2className(style) {
472
+ return style ? style.filter(Boolean).join(' ') : '';
473
+ }
474
+
475
+ const ALIGN_TEXT = {
476
+ left: 'text-left',
477
+ center: 'text-center',
478
+ right: 'text-right',
479
+ };
480
+ const HEADLINE_BLOCK_STYLE_MAPS = {
481
+ transparent: {
482
+ background: 'bg-transparent',
483
+ text: 'text-primary-text',
484
+ description: 'text-primary-text',
485
+ },
486
+ primary: {
487
+ background: 'bg-white',
488
+ text: 'text-primary-text',
489
+ description: 'text-primary-text',
490
+ },
491
+ secondary: {
492
+ background: 'bg-primary-main',
493
+ text: 'text-white',
494
+ description: 'text-white/80',
495
+ },
496
+ };
497
+
498
+ const Headline = JSX(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
499
+ const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
500
+ return (jsxs("section", { className: `px-4 py-6 flex flex-col gap-2.5 ${STYLE_MAPS.background} ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })) : null, description ? (jsx("p", { className: `text-m ${STYLE_MAPS.description} ${ALIGN_TEXT[align]}`, children: description })) : null, image?.src && (jsx("div", { className: "mt-2.5 mx-auto flex justify-center", children: jsx(Img, { image: image }) }))] }));
501
+ });
502
+
503
+ // column-gap between children of SwipeListControl container
504
+ const DEFAULT_GAP = 14;
505
+ /*
506
+ Horizontal padding used on a container above SwipeListControl.
507
+ Same value used on a SwipeListControlChildren container to compensate it
508
+ and get rid of a clipping effect caused by overflow: hidden.
509
+ */
510
+ const DEFAULT_PADDING = 16;
511
+ // Classes used to compensate outer container padding, so that child elements won't be clipped
512
+
513
+ const DOT_STYLES = 'bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full';
514
+ const BASE_DOT_WIDTH = 6;
515
+ const ACTIVE_DOT_WIDTH_CHANGE = 16;
516
+ const BASE_DOT_OPACITY = 0.3;
517
+ const ACTIVE_DOT_OPACITY_CHANGE = 0.7;
518
+ const SwipeListControlDots = JSX(({ children, activeIndex, indexFraction, showDots }) => {
519
+ const handleClick = (idx) => (e) => {
520
+ if (idx === activeIndex) {
521
+ return;
522
+ }
523
+ const contentContainer = e.currentTarget.parentElement
524
+ ?.previousElementSibling;
525
+ contentContainer?.children[idx]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
526
+ };
527
+ return showDots && children?.length ? (jsx("div", { className: "flex gap-2 mx-auto mt-5 w-fit", children: children?.map((_, idx) => (jsx("div", { onClick: handleClick(idx), className: `${DOT_STYLES}`, style: getDotStyles(idx, activeIndex, indexFraction), "aria-hidden": true }, String(idx)))) })) : null;
528
+ });
529
+ const getDotStyles = (currentIdx, activeIndex, indexFraction) => {
530
+ if (currentIdx < activeIndex || currentIdx > activeIndex + 1) {
531
+ return;
532
+ }
533
+ const leftIndexMod = 1 - indexFraction;
534
+ const rightIndexMod = indexFraction;
535
+ return currentIdx === activeIndex
536
+ ? {
537
+ opacity: `${BASE_DOT_OPACITY + ACTIVE_DOT_OPACITY_CHANGE * leftIndexMod}`,
538
+ width: `${BASE_DOT_WIDTH + ACTIVE_DOT_WIDTH_CHANGE * leftIndexMod}px`,
539
+ }
540
+ : {
541
+ opacity: `${BASE_DOT_OPACITY + ACTIVE_DOT_OPACITY_CHANGE * rightIndexMod}`,
542
+ width: `${BASE_DOT_WIDTH + ACTIVE_DOT_WIDTH_CHANGE * rightIndexMod}px`,
543
+ };
544
+ };
545
+
546
+ const SwipeListControlItem = JSX(({ className = '', children, ...rest }) => {
547
+ return (jsx("div", { className: `snap-center snap-always min-w-full box-border ${className}`, role: "listitem", ...rest, children: children }));
548
+ });
549
+
550
+ // styles used to compensate outer container padding to get rid of clipping effect
551
+ const getContainerStyle = (padding) => {
552
+ return {
553
+ marginLeft: `${-padding}px`,
554
+ marginRight: `${-padding}px`,
555
+ paddingLeft: `${padding}px`,
556
+ paddingRight: `${padding}px`,
557
+ };
558
+ };
559
+
560
+ const SwipeListControlList = JSX(({ className = '', children, activeIndex, onScroll, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, }) => {
561
+ return (jsx("div", { className: `overflow-auto flex horizontal-list no-scrollbar ${className}`, style: { ...getContainerStyle(padding), gap: `${gap}px` }, role: "list", onScroll: onScroll, children: children?.length ? (children?.map((child, idx) => (jsx(SwipeListControlItem, { style: getContainerStyle(padding / 4), "aria-current": Boolean(activeIndex === idx), children: child }, String(idx))))) : (jsx(SwipeListControlItem, { children: children })) }));
562
+ });
563
+
564
+ /*
565
+ Returns object containing whole index part, and it's decimal part for a given
566
+ scrollLeft value of a container and an array of tuple containing values of a
567
+ start and end boundaries of a scrollable child, right boundary non-inclusive.
568
+ Returns object with index equal -1 and fraction equal 0 if scrollLeft is outside given scrollPoints
569
+ */
570
+ const getIndexParts = (scrollLeft, scrollPoints) => {
571
+ const index = scrollPoints.findIndex(([pointStart, pointEnd]) => pointStart <= scrollLeft && scrollLeft < pointEnd);
572
+ if (index < 0) {
573
+ return { index, fraction: 0 };
574
+ }
575
+ const [start, end] = scrollPoints[index];
576
+ const fraction = (scrollLeft - start) / (end - start);
577
+ return { index, fraction };
578
+ };
579
+
580
+ /*
581
+ Calculates array of breakpoints for each scrollable element in container.
582
+ Returns array of tuples consisting of [start, end] boundary scrollLeft values.
583
+ */
584
+ const getScrollPoints = ({ gap, padding, clientWidth, scrollWidth, childElementCount, itemWidth, }) => {
585
+ const scrollableDistance = scrollWidth - clientWidth;
586
+ if (childElementCount === 2) {
587
+ return [
588
+ [0, scrollableDistance],
589
+ [scrollableDistance, scrollWidth],
590
+ ];
591
+ }
592
+ const scrollItemWidth = itemWidth + gap;
593
+ const edgeScrollDistance = clientWidth - gap - padding;
594
+ const lastScrollableIdx = childElementCount - 2;
595
+ const scrollPoints = new Array(childElementCount)
596
+ .fill(0)
597
+ .map((_, idx) => idx === 0 || idx === lastScrollableIdx
598
+ ? [
599
+ idx > 0 ? scrollableDistance - edgeScrollDistance : 0,
600
+ idx > 0 ? scrollableDistance : edgeScrollDistance,
601
+ ]
602
+ : [
603
+ (idx - 1) * scrollItemWidth + edgeScrollDistance,
604
+ idx * scrollItemWidth + edgeScrollDistance,
605
+ ]);
606
+ scrollPoints[childElementCount - 1] = [scrollableDistance, scrollWidth];
607
+ return scrollPoints;
608
+ };
609
+
610
+ const SwipeListControl = JSX(({ className, children, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, onSlideChange, }) => {
611
+ const [activeIndex, setActiveIndex] = useState(0);
612
+ const [indexFraction, setIndexFraction] = useState(0);
613
+ const dotsProps = {
614
+ activeIndex,
615
+ indexFraction,
616
+ showDots,
617
+ children,
618
+ };
619
+ const handleScroll = (e) => {
620
+ const { scrollLeft, clientWidth, childElementCount, scrollWidth, children: childrenCollection, } = e?.currentTarget;
621
+ // horizontal PADDING / 2 to compensate padding-margin combo of child container
622
+ // without CSS calc function, as wrapper element gets bigger in the DOM, remaining same visually
623
+ const itemWidth = childrenCollection[0].offsetWidth - padding / 2;
624
+ const scrollPoints = getScrollPoints({
625
+ gap,
626
+ padding,
627
+ clientWidth,
628
+ scrollWidth,
629
+ childElementCount,
630
+ itemWidth,
631
+ });
632
+ const { index, fraction } = getIndexParts(scrollLeft, scrollPoints);
633
+ if (index !== activeIndex && onSlideChange) {
634
+ onSlideChange();
635
+ }
636
+ setActiveIndex(index);
637
+ setIndexFraction(fraction);
638
+ };
639
+ return (jsxs("div", { className: className, children: [jsx(SwipeListControlList, { gap: gap, padding: padding, activeIndex: activeIndex, onScroll: handleScroll, children: children }), jsx(SwipeListControlDots, { ...dotsProps })] }));
640
+ });
641
+
642
+ const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
643
+ const { text, fileSize, ...linkProps } = doc;
644
+ return (jsxs("a", { className: className, role: "link", ...linkProps, children: [icon ? (jsx(Img, { className: iconClassName, image: icon, width: "24px", height: "24px", asSVG: true })) : null, text ? (jsxs("span", { className: textClassName, children: [text, jsx("span", { className: suffixClassName, children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })) : null] }));
645
+ });
646
+ const formatSuffix = (ext, fileSize) => {
647
+ const prefix = ext || fileSize ? ',' : '';
648
+ const extension = ext ? ` ${ext}` : '';
649
+ const size = fileSize ? ` (${fileSize})` : '';
650
+ return prefix + extension + size;
651
+ };
652
+ const getExtFromHref = (href) => {
653
+ if (!href) {
654
+ return '';
655
+ }
656
+ const index = href.lastIndexOf('.');
657
+ return index !== -1 ? href.substring(index + 1) : '';
658
+ };
659
+
660
+ const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-3 min-w-6 min-h-6", doc: doc, icon: icon })));
661
+
662
+ const LinkDocsHorizontalList = JSX(({ context, hasBorder = true, documents, icon }) => {
663
+ return (jsx(SwipeListControl, { context: context, className: "text-s text-primary-main mt-5", children: documents?.length
664
+ ? documents.map((doc, i) => (jsx(LinkDocsListItem, { className: hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : '', doc: doc, icon: icon }, String(i))))
665
+ : null }));
666
+ });
667
+
668
+ const LinkDocsVerticalList = JSX(({ hasBorder = true, documents, icon }) => {
669
+ return (jsx("div", { className: `text-s text-primary-main flex flex-col mt-5 ${hasBorder ? 'gap-3.5' : 'gap-2'}`, role: "list", children: documents?.length
670
+ ? documents.map((doc, i) => (jsx("div", { role: "listitem", children: jsx(LinkDocsListItem, { className: hasBorder ? 'rounded-md border-main-stroke border border-solid p-4' : '', doc: doc, icon: icon }) }, String(i))))
671
+ : null }));
672
+ });
673
+
674
+ const LinkDocs = JSX(({ className = '', context, title, description, icon = { icon: 'DocIconMonoColor' }, documents, orientation = 'vertical', hasBorder = true, }) => {
675
+ return (jsxs("section", { className: `font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${className}`, children: [jsx(Headline, { className: `!p-0 ${description ? 'gap-2' : 'gap-5'}`, title: title, description: description, context: context, align: "center" }), orientation === 'vertical' ? (jsx(LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : (jsx(LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
676
+ });
677
+
678
+ const isURL = (href) => href?.includes('//');
679
+ const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
680
+ const getOrigin = (href) => {
681
+ if (!href || !isURL(href)) {
682
+ return undefined;
683
+ }
684
+ const url = href;
685
+ const protoSeparator = '//';
686
+ const endOfProto = url.indexOf(protoSeparator);
687
+ const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
688
+ return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
689
+ };
690
+ const getHash = (href) => {
691
+ if (!href || !isURL(href)) {
692
+ return undefined;
693
+ }
694
+ const hashIndex = href.indexOf('#');
695
+ return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
696
+ };
697
+ const isHash = (href) => href?.startsWith('#');
698
+
699
+ var url = /*#__PURE__*/Object.freeze({
700
+ __proto__: null,
701
+ isURL: isURL,
702
+ withoutQuery: withoutQuery,
703
+ getOrigin: getOrigin,
704
+ getHash: getHash,
705
+ isHash: isHash
706
+ });
707
+
708
+ const MOBILE_URL_PATH = '/mobile';
709
+ const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
710
+
711
+ const adjustHref = (href, router) => {
712
+ if (!href) {
713
+ return href;
714
+ }
715
+ const relativeHref = toRelativeHref(href, router) || '';
716
+ const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
717
+ return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
718
+ };
719
+ const toRelativeHref = (href, router) => {
720
+ if (!href) {
721
+ return href;
722
+ }
723
+ const origin = getOrigin(router?.href);
724
+ return origin ? href.replace(origin, '') || '/' : href;
725
+ };
726
+
727
+ const defaultHandlerDecorator = (handler) => handler;
728
+ function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
729
+ const href = adjustHref(link.href, router);
730
+ return {
731
+ ...link,
732
+ href,
733
+ 'aria-label': link.text,
734
+ onClick: handlerDecorator((ev) => {
735
+ const isLocalHref = href && !isURL(href);
736
+ const isLocalTarget = !link.target || link.target === '_self';
737
+ if (isLocalHref && isLocalTarget) {
738
+ ev?.preventDefault();
739
+ router.push(href);
740
+ }
741
+ }, link),
742
+ };
743
+ }
744
+
745
+ const ButtonInner = JSX((props) => {
746
+ const { text, aboveText, appendLeft, appendRight } = props;
747
+ return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-xs-light text-left", children: aboveText }), jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-0.5' : 'text-l'}`, children: text })] })) : null, appendRight ? appendRight : null] }));
748
+ });
749
+ const getButtonStyle = (props) => {
750
+ const { version, aboveText, rounded } = props;
751
+ if (version === 'link') {
752
+ return '';
753
+ }
754
+ const withTextStyle = `gap-2 ${aboveText ? 'py-2.5 px-7' : 'py-4 px-9'}`;
755
+ return [
756
+ 'flex items-center justify-center',
757
+ isWithText(props) ? withTextStyle : 'h-12 w-12',
758
+ rounded ? 'rounded-full' : '',
759
+ ].join(' ');
760
+ };
761
+ const isWithText = ({ text, aboveText, appendLeft }) => Boolean(text || aboveText || !appendLeft);
762
+
763
+ const buttonStyleMap = {
764
+ primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
765
+ secondary: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
766
+ link: 'text-primary-main',
767
+ };
768
+ const buttonDisabledStyleMap = {
769
+ primary: 'bg-secondary-dark text-secondary-text',
770
+ secondary: 'bg-secondary-light text-secondary-text',
771
+ link: '',
772
+ };
773
+ const styleButton = 'w-full text-center font-sans select-none';
774
+ const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'primary', ariaLabel, ...rest }) => {
775
+ const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded, version: version }));
776
+ if (disabled) {
777
+ return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: `inline-block ${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
778
+ }
779
+ return (jsx("a", { className: `${styleButton} inline-block cursor-pointer no-underline focus:border focus:border-primary-focus ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
780
+ });
781
+
782
+ const ButtonSection = JSX(({ context, className = '', buttons }) => {
783
+ const { handlerDecorator } = context;
784
+ const router = context.useRouter();
785
+ return buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton$2(useLink({ router, handlerDecorator }, button), index)) })) : null;
786
+ });
787
+ function renderButton$2({ icon, iconRight, ...button }, i) {
788
+ if (!button?.text) {
789
+ return null;
790
+ }
791
+ return icon ? (jsx(Button, { appendLeft: jsx(Img, { image: icon, width: "24", height: "24", asSVG: true }), appendRight: jsx(Img, { image: iconRight, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
792
+ }
793
+
794
+ const LIST_STYLE_CLASSES = {
795
+ primary: 'rounded-full inline-block mr-3 mt-2',
796
+ secondary: 'rounded-full inline-block mr-3 mt-2',
797
+ gray: 'rounded-full inline-block mr-3 mt-2',
798
+ tile: 'rounded-full inline-block mr-4 mt-3',
799
+ 'tile-white': 'rounded-full inline-block mr-4 mt-3',
800
+ };
801
+ const LIST_DOT_STYLE_MAP = {
802
+ primary: 'bg-primary-text',
803
+ secondary: 'bg-white',
804
+ gray: 'bg-secondary-text',
805
+ tile: 'bg-black',
806
+ 'tile-white': 'bg-white',
807
+ };
808
+ const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary' }) => {
809
+ return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted ? jsx("div", { className: getListStyle(version) }) : null, jsx("span", { children: children })] }));
810
+ });
811
+ const getListStyle = (version) => {
812
+ const size = {
813
+ primary: 'w-2 h-2 min-w-2 min-h-2',
814
+ secondary: 'w-2 h-2 min-w-2 min-h-2',
815
+ gray: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5',
816
+ tile: 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
817
+ 'tile-white': 'w-[7px] h-[7px] min-w-[7px] min-h-[7px]',
818
+ };
819
+ return `${LIST_STYLE_CLASSES[version]} ${LIST_DOT_STYLE_MAP[version]} ${size[version]}`;
820
+ };
821
+
822
+ const TEXT_STYLE_MAP = {
823
+ primary: 'text-primary-text',
824
+ secondary: 'text-white',
825
+ gray: 'text-secondary-text',
826
+ tile: 'text-primary-text',
827
+ 'tile-white': 'text-white',
828
+ };
829
+ const List = JSX((props) => {
830
+ const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
831
+ return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${className}`, role: "list", children: items?.length
832
+ ? items.map((_, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, version: version, children: _ }, String(i))))
833
+ : null }));
834
+ });
835
+
836
+ const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
837
+ return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { children: buttons }) : null] }), image] })] }));
838
+ });
839
+
840
+ const benefitTitleStyleMap = {
841
+ primary: 'text-primary-text',
842
+ secondary: 'text-white',
843
+ };
844
+ const benefitDescStyleMap = {
845
+ primary: 'text-secondary-text',
846
+ secondary: 'text-white',
847
+ };
848
+ function renderBenefit({ benefit, version = 'primary' }, i) {
849
+ const isIconWhite = version === 'secondary';
850
+ return (jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, jsx("div", { className: `text-l m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `text-s ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
851
+ }
852
+ function renderBenefitIconBgStyle(version) {
853
+ let bgColorStyle = 'text-primary-main';
854
+ if (version === 'secondary') {
855
+ bgColorStyle = 'text-black';
856
+ }
857
+ return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
858
+ }
859
+
860
+ const ProductBlockInner = JSX(({ className = '', context, title, headlineVersion = 'L', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, label, }) => {
861
+ return (jsxs("div", { className: `w-full ${className}`, children: [jsxs("div", { children: [label ? renderLabel(label, version) : null, jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, bgColorHeadline: version, headlineVersion: headlineVersion }), jsxs(BaseTile, { context: context, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((benefit, i) => renderBenefit({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-3 text-m", items: items, version: version, isDotted: isDotted })) : null] })] }), renderImage$1(image)] }));
862
+ });
863
+ function renderImage$1(image) {
864
+ return image?.src ? (jsx(Img, { imageClassName: "mt-5 mx-auto block", image: { className: 'block', ...image } })) : null;
865
+ }
866
+ const labelStyleMap = {
867
+ primary: 'text-primary-main border-secondary-hover',
868
+ secondary: 'text-white/80',
869
+ };
870
+ const renderLabel = (label, version) => (jsx("div", { className: `px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${labelStyleMap[version]}`, children: label }));
871
+
872
+ const productBlockStyleMap = {
873
+ primary: 'bg-white text-primary-text',
874
+ secondary: 'bg-primary-main text-white',
875
+ };
876
+ const ProductBlock = JSX((props /* Get rid of image and benefits */) => {
877
+ const { className = '', version = 'primary' } = props;
878
+ return (jsx("section", { className: `font-sans bg-white px-4 py-6 ${productBlockStyleMap[version]} ${className}`, children: jsx(ProductBlockInner, { ...props }) }));
879
+ });
880
+
881
+ const textBlockStyleMaps = {
882
+ primary: {
883
+ background: 'bg-white',
884
+ icon: 'bg-primary-main text-white',
885
+ title: 'text-primary-text',
886
+ description: 'text-secondary-text',
887
+ },
888
+ secondary: {
889
+ background: 'bg-primary-main',
890
+ icon: 'bg-white text-primary-main',
891
+ title: 'text-white',
892
+ description: 'text-white',
893
+ },
894
+ 'secondary-light': {
895
+ background: 'bg-primary-main/10',
896
+ icon: 'bg-primary-main text-white',
897
+ title: 'text-primary-text',
898
+ description: 'text-secondary-text',
899
+ },
900
+ };
901
+ const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className = '', items, isDotted = true, }) => {
902
+ const textBlockStyleMap = textBlockStyleMaps[blockVersion];
903
+ const listBlockVersion = blockVersion === 'secondary' ? 'secondary' : 'gray';
904
+ return (jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `text-l font-medium mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-s ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (jsx(List, { className: "mt-1 text-m", items: items, isDotted: isDotted, version: listBlockVersion })) : null] })] }));
905
+ });
906
+ function renderIcon(className) {
907
+ return (jsx("div", { className: "mb-3", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${className}`, children: "i" }) }));
908
+ }
909
+ function renderImage(image) {
910
+ return image?.src ? jsx(Img, { className: "pb-3 mr-auto", image: image }) : null;
911
+ }
912
+
913
+ const blockStyle = {
914
+ primary: 'bg-white',
915
+ secondary: 'bg-primary-main text-white',
916
+ };
917
+ const Gallery = JSX(({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
918
+ const headingClassName = description ? 'mb-2' : 'mb-5';
919
+ return (jsxs("section", { className: `relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-5", children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${headingClassName}`, title: title })) : null, description ? (jsx("div", { className: "text-m max-w-[600px] text-center mb-5", children: description })) : null] }), renderCardsLayout(orientation, cards, context)] }));
920
+ });
921
+ function renderCardsLayout(orientation, cards, context) {
922
+ return orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, children: cards?.map(renderCard) })) : (jsx("div", { className: "grid gap-[14px]", children: cards?.map(renderCard) }));
923
+ }
924
+ function renderCard(card, key) {
925
+ return (jsxs("div", { className: `h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col
922
926
  ${blockStyle[card.version ?? 'primary']}`, children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-3.5", image: card.image }) })) : null, card.title ? jsx("h3", { className: `text-m-title-xs font-medium m-0`, children: card.title }) : null, card.description ? renderDescription(card) : null, card.items?.length ? renderItems(card.items, card.isDotted, card.version) : null] }), card?.button?.text ? renderButton$1(card.button) : null] }, key));
923
- }
924
- function renderButton$1(button) {
925
- return (jsx(Button, { className: "mt-3", appendLeft: button?.icon && jsx(Img, { image: button?.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
926
- }
927
- function renderDescription(card) {
928
- return (jsx("div", { className: `text-secondary-text mt-1 text-s ${card.version === 'secondary' ? 'text-white opacity-80' : ''}`, children: card.description }));
929
- }
930
- function renderItems(items, isDotted, version = 'primary') {
931
- return (jsx("section", { className: "mt-3", children: items.map((item, i) => (jsxs("div", { children: [isDotted ? jsx("div", { className: getListStyle(version) }) : null, jsx("span", { className: "text-m font-medium", children: item.title }), jsx("span", { className: `text-s pl-2 ${version === 'primary' ? 'text-secondary-text' : ''}`, children: item.text })] }, String(i)))) }));
932
- }
933
-
934
- class EventBus {
935
- static inst = new EventBus();
936
- subscribers = {};
937
- subjectsStateMap = {};
938
- subscribe(type, listener) {
939
- this.subscribers[type] ||= [];
940
- this.subscribers[type]?.push(listener);
941
- const latestEvent = this.subjectsStateMap[type];
942
- if (latestEvent) {
943
- listener(latestEvent);
944
- }
945
- return () => {
946
- this.unsubscribe(type, listener);
947
- };
948
- }
949
- unsubscribe(type, listener) {
950
- this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
951
- }
952
- fire(type, event) {
953
- this.subjectsStateMap[type] = event;
954
- this.subscribers[type]?.forEach((s) => s(event));
955
- }
956
- subject(type, event) {
957
- this.subjectsStateMap[type] = event;
958
- }
959
- }
960
-
961
- const changeHashOnObserve = (entries) => {
962
- if (!entries.length) {
963
- return;
964
- }
965
- const [entry] = entries;
966
- if (entry.isIntersecting) ;
967
- };
968
-
969
- const BlockWrapper = JSX(({ anchor, className, context, children, tag = 'section', labels }) => {
970
- const Tag = tag;
971
- const { IntersectionObserverTag } = context;
972
- const [shouldRenderBlock, setShouldRenderBlock] = context.useState(true);
973
- context.useEffect(() => EventBus.inst.subscribe('tab', (event) => {
974
- setShouldRenderBlock(!labels?.length || !event.label || labels.includes(event.label));
975
- }), [labels]);
976
- if (!shouldRenderBlock) {
977
- return null;
978
- }
979
- return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
980
- });
981
-
982
- const LinkList = JSX(({ className = '', documents, ...rest }) => {
983
- return (jsx(BlockWrapper, { className: `font-sans bg-white mt-[10px] ${className}`, ...rest, children: jsx("ul", { className: "flex flex-col text-s text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
984
- });
985
- const renderLinkListItem = (documents) => {
986
- return documents.map((doc, i) => {
987
- const { text, ...linkProps } = doc;
988
- return (jsx("li", { className: "mb-4 list-none", children: jsx("a", { className: "hover:text-primary-main", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
989
- });
990
- };
991
-
992
- const EmbeddableBlocks = {
993
- Headline,
994
- LinkDocs,
995
- TextBlock,
996
- ProductBlock,
997
- Gallery,
998
- LinkList,
999
- };
1000
-
1001
- const renderBlocksList = ({ blocks, context, className = '' }) => blocks?.length ? blocks.map(renderBlock$1({ context, className })) : null;
1002
- const renderBlock$1 = ({ context, className }) => (block, i) => {
1003
- if (!block) {
1004
- return null;
1005
- }
1006
- const { style, blockListType: type, ...rest } = block;
1007
- if (!type || !(type in EmbeddableBlocks)) {
1008
- return null;
1009
- }
1010
- const classNameBlock = style2className(style);
1011
- const EmbeddedBlock = EmbeddableBlocks[type];
1012
- return (jsx(EmbeddedBlock, { className: `${className} ${classNameBlock}`, context: context, ...rest }, `block_${i}`));
1013
- };
1014
-
1015
- const AccordionItemInner = JSX(({ blocks, context }) => {
1016
- return (jsx("div", { className: "flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: renderBlocksList({ context, blocks, className: '!px-0' }) }));
1017
- });
1018
-
1019
- const useActiveHandler = ({ context, blocks, initialState = false }) => {
1020
- const [isActive, setIsActive] = context.useState(initialState);
1021
- const hasContent = blocks?.length;
1022
- const icon = isActive ? 'MinusIcon' : 'PlusIcon';
1023
- const handleToggle = (e) => {
1024
- const currentTarget = e.currentTarget;
1025
- if (!currentTarget) {
1026
- return;
1027
- }
1028
- setIsActive(!isActive);
1029
- const contentBlock = currentTarget.nextSibling;
1030
- contentBlock.style.maxHeight = contentBlock.style.maxHeight
1031
- ? ''
1032
- : `${contentBlock.scrollHeight}px`;
1033
- };
1034
- return { isActive, hasContent, icon, handleToggle };
1035
- };
1036
-
1037
- const AccordionItem = JSX(({ label, labelIcon, blocks, bordered, context }) => {
1038
- const { hasContent, icon, handleToggle } = useActiveHandler({
1039
- context,
1040
- blocks,
1041
- });
1042
- return (jsxs("li", { className: `${borderedLiClass(bordered)} border-solid border-main-divider`, children: [jsxs("button", { className: `border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text
927
+ }
928
+ function renderButton$1(button) {
929
+ return (jsx(Button, { className: "mt-3", appendLeft: button?.icon && jsx(Img, { image: button?.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
930
+ }
931
+ function renderDescription(card) {
932
+ return (jsx("div", { className: `text-secondary-text mt-1 text-s ${card.version === 'secondary' ? 'text-white opacity-80' : ''}`, children: card.description }));
933
+ }
934
+ function renderItems(items, isDotted, version = 'primary') {
935
+ return (jsx("section", { className: "mt-3", children: items.map((item, i) => (jsxs("div", { children: [isDotted ? jsx("div", { className: getListStyle(version) }) : null, jsx("span", { className: "text-m font-medium", children: item.title }), jsx("span", { className: `text-s pl-2 ${version === 'primary' ? 'text-secondary-text' : ''}`, children: item.text })] }, String(i)))) }));
936
+ }
937
+
938
+ class EventBus {
939
+ static inst = new EventBus();
940
+ subscribers = {};
941
+ subjectsStateMap = {};
942
+ subscribe(type, listener) {
943
+ this.subscribers[type] ||= [];
944
+ this.subscribers[type]?.push(listener);
945
+ const latestEvent = this.subjectsStateMap[type];
946
+ if (latestEvent) {
947
+ listener(latestEvent);
948
+ }
949
+ return () => {
950
+ this.unsubscribe(type, listener);
951
+ };
952
+ }
953
+ unsubscribe(type, listener) {
954
+ this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
955
+ }
956
+ fire(type, event) {
957
+ this.subjectsStateMap[type] = event;
958
+ this.subscribers[type]?.forEach((s) => s(event));
959
+ }
960
+ subject(type, event) {
961
+ this.subjectsStateMap[type] = event;
962
+ }
963
+ }
964
+
965
+ const changeHashOnObserve = (entries) => {
966
+ if (!entries.length) {
967
+ return;
968
+ }
969
+ const [entry] = entries;
970
+ if (entry.isIntersecting) ;
971
+ };
972
+
973
+ const BlockWrapper = JSX(({ anchor, className, context, children, tag = 'section', labels }) => {
974
+ const Tag = tag;
975
+ const { IntersectionObserverTag } = context;
976
+ const [shouldRenderBlock, setShouldRenderBlock] = useState(true);
977
+ useEffect(() => EventBus.inst.subscribe('tab', (event) => {
978
+ setShouldRenderBlock(!labels?.length || !event.label || labels.includes(event.label));
979
+ }), [labels]);
980
+ if (!shouldRenderBlock) {
981
+ return null;
982
+ }
983
+ return anchor ? (jsx(IntersectionObserverTag, { tag: tag, className: className, observerCallback: changeHashOnObserve, observerOptions: { threshold: 1 }, anchor: anchor, children: children })) : (jsx(Tag, { className: className, children: children }));
984
+ });
985
+
986
+ const LinkList = JSX(({ className = '', documents, ...rest }) => {
987
+ return (jsx(BlockWrapper, { className: `font-sans bg-white mt-[10px] ${className}`, ...rest, children: jsx("ul", { className: "flex flex-col text-s text-secondary-text p-0", children: documents?.length ? renderLinkListItem(documents) : null }) }));
988
+ });
989
+ const renderLinkListItem = (documents) => {
990
+ return documents.map((doc, i) => {
991
+ const { text, ...linkProps } = doc;
992
+ return (jsx("li", { className: "mb-4 list-none", children: jsx("a", { className: "hover:text-primary-main", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
993
+ });
994
+ };
995
+
996
+ const EmbeddableBlocks = {
997
+ Headline,
998
+ LinkDocs,
999
+ TextBlock,
1000
+ ProductBlock,
1001
+ Gallery,
1002
+ LinkList,
1003
+ };
1004
+
1005
+ const renderBlocksList = ({ blocks, context, className = '' }) => blocks?.length ? blocks.map(renderBlock$1({ context, className })) : null;
1006
+ const renderBlock$1 = ({ context, className }) => (block, i) => {
1007
+ if (!block) {
1008
+ return null;
1009
+ }
1010
+ const { style, blockListType: type, ...rest } = block;
1011
+ if (!type || !(type in EmbeddableBlocks)) {
1012
+ return null;
1013
+ }
1014
+ const classNameBlock = style2className(style);
1015
+ const EmbeddedBlock = EmbeddableBlocks[type];
1016
+ return (jsx(EmbeddedBlock, { className: `${className} ${classNameBlock}`, context: context, ...rest }, `block_${i}`));
1017
+ };
1018
+
1019
+ const AccordionItemInner = JSX(({ blocks, context }) => {
1020
+ return (jsx("div", { className: "flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0", children: renderBlocksList({ context, blocks, className: '!px-0' }) }));
1021
+ });
1022
+
1023
+ const useActiveHandler = ({ blocks, initialState = false }) => {
1024
+ const [isActive, setIsActive] = useState(initialState);
1025
+ const hasContent = blocks?.length;
1026
+ const icon = isActive ? 'MinusIcon' : 'PlusIcon';
1027
+ const handleToggle = (e) => {
1028
+ const currentTarget = e.currentTarget;
1029
+ if (!currentTarget) {
1030
+ return;
1031
+ }
1032
+ setIsActive(!isActive);
1033
+ const contentBlock = currentTarget.nextSibling;
1034
+ contentBlock.style.maxHeight = contentBlock.style.maxHeight
1035
+ ? ''
1036
+ : `${contentBlock.scrollHeight}px`;
1037
+ };
1038
+ return { isActive, hasContent, icon, handleToggle };
1039
+ };
1040
+
1041
+ const AccordionItem = JSX(({ label, labelIcon, blocks, bordered, context }) => {
1042
+ const { hasContent, icon, handleToggle } = useActiveHandler({ blocks });
1043
+ return (jsxs("li", { className: `${borderedLiClass(bordered)} border-solid border-main-divider`, children: [jsxs("button", { className: `border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text
1043
1044
  ${bordered ? '' : 'py-[14px] px-0'}
1044
1045
  ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsxs("span", { className: `text-m-title-xs font-medium pr-2.5 flex ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: [labelIcon ? (jsx(Img, { image: labelIcon, width: "24", height: "24", asSVG: true, className: "mr-3" })) : null, label] }), hasContent ? jsx(Img, { className: "w-6", image: icon, width: "24", height: "24", asSVG: true }) : null] }), hasContent ? jsx(AccordionItemInner, { blocks: blocks, context: context }) : null] }));
1045
- });
1046
- function borderedLiClass(bordered) {
1047
- return bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0';
1048
- }
1049
-
1050
- const Accordion = JSX(({ title, description, accordionItems, context, className = '', bordered }) => {
1051
- return (jsxs("section", { className: `py-6 px-4 font-sans bg-white text-primary-text ${className}`, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-2 text-center", title: title }) : null, description ? jsx("div", { className: "mb-5 text-m-light text-center", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context, bordered: bordered }, `AccordionItem_${i}`))) })) : null] }));
1052
- });
1053
-
1054
- const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
1055
- const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
1056
-
1057
- const headingStyle = (isFillGradient = false) => (isFillGradient ? 'text-white' : '');
1058
- const subtitleStyle = (isFillGradient = false) => `text-s mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`;
1059
- const HeaderCell = JSX(({ icon, image, title, subtitle, isFillGradient }) => (jsxs("div", { role: "columnheader", children: [icon ? (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })) : null, image?.src && (jsx("div", { className: "mb-3.5", children: jsx(Img, { image: image }) })), title ? (jsx(Heading, { headingType: "h4", className: headingStyle(isFillGradient), title: title })) : null, subtitle ? jsx("div", { className: subtitleStyle(isFillGradient), children: subtitle }) : null] })));
1060
-
1061
- const TableCell = JSX(({ cell, rowHeader, isFillGradient = false }) => {
1062
- const cellWrapperClasses = `box-border flex flex-col`;
1063
- const cellClasses = `h-full ${DIVIDER_CLASSES}`;
1064
- return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map(renderCellInner$1(isFillGradient, rowHeader)) }) }));
1065
- });
1066
- const renderCellInner$1 = (isFillGradient, rowHeader) => ({ label, description }, i) => (jsxs("div", { className: "flex justify-between text-s py-3.5", children: [jsx("div", { className: `${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: rowHeader }), jsxs("div", { className: "basis-1/2", children: [label ? (jsx("div", { className: `text-right ${isFillGradient ? 'text-white' : ''}`, children: label })) : null, description ? (jsx("div", { className: `text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: description })) : null] })] }, String(i)));
1067
-
1068
- const TableColumn = JSX(({ header, columnData, visibleRowLength = 0, isFillGradient, showRow, onToggleColumn }) => {
1069
- const columnDataView = columnData?.slice(0, showRow ? columnData.length : visibleRowLength);
1070
- const gradientClassName = isFillGradient ? GRADIENT : '';
1071
- const buttonVersion = isFillGradient ? 'secondary' : 'primary';
1072
- return (jsxs("div", { className: `border border-main-stroke rounded-md p-4 mb-3.5 ${gradientClassName}`, role: "row", children: [jsx(HeaderCell, { ...header, isFillGradient: isFillGradient }), columnDataView?.length
1073
- ? columnDataView.map(({ rowHeader, cell }, i) => (jsx(TableCell, { cell: cell, rowHeader: rowHeader, isFillGradient: isFillGradient }, String(i))))
1074
- : null, showRow && renderButton({ header, buttonVersion }), renderToggleButton({ onToggleColumn, isFillGradient, showRow })] }));
1075
- });
1076
- const renderButton = ({ header, buttonVersion }) => (jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "text-s font-medium mt-4 py-[11px]", children: header.link.text }));
1077
- const renderToggleButton = ({ onToggleColumn, isFillGradient, showRow }) => (jsx("div", { className: "mt-5", role: "cell", children: jsx("a", { role: "link", onClick: onToggleColumn, className: `text-s font-medium cursor-pointer ${isFillGradient ? 'text-white/80' : 'text-primary-main'}`, children: !showRow ? 'Показать описание' : 'Скрыть' }) }));
1078
-
1079
- const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, orientation = 'vertical', }) => {
1080
- const tableData = columns?.map(({ data, header }) => ({
1081
- header,
1082
- column: data?.map((cell, i) => ({ cell, rowHeader: rowHeaders?.[i]?.title })),
1083
- })) || [];
1084
- const [columnsViewState, setColumnsViewState] = context.useState(new Array(columns?.length).fill(!visibleRowLength));
1085
- const handleToggleColumn = (i) => {
1086
- columnsViewState[i] = !columnsViewState[i];
1087
- setColumnsViewState([...columnsViewState]);
1088
- };
1089
- return (jsxs("section", { className: `bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: "font-medium text-center m-0 mb-5", title: title })) : null, renderColumns({
1090
- tableData,
1091
- context,
1092
- visibleRowLength,
1093
- isColoredFirstColumn,
1094
- columnsViewState,
1095
- handleToggleColumn,
1096
- orientation,
1097
- setColumnsViewState,
1098
- })] }));
1099
- });
1100
- const renderColumns = ({ context, tableData, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn, orientation = 'horizontal', setColumnsViewState, }) => (jsx("div", { role: "table", children: tableData?.length
1101
- ? renderInnerTable({
1102
- orientation,
1103
- context,
1104
- columnsViewState,
1105
- setColumnsViewState,
1106
- tableData,
1107
- visibleRowLength,
1108
- isColoredFirstColumn,
1109
- handleToggleColumn,
1110
- })
1111
- : null }));
1112
- const renderInnerTable = ({ orientation, context, columnsViewState, setColumnsViewState, tableData, visibleRowLength, isColoredFirstColumn, handleToggleColumn, }) => orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, onSlideChange: onSlideChange(columnsViewState, setColumnsViewState), children: tableData.map(renderColumn({
1113
- context,
1114
- visibleRowLength,
1115
- isColoredFirstColumn,
1116
- columnsViewState,
1117
- handleToggleColumn,
1118
- })) })) : (tableData.map(renderColumn({
1119
- context,
1120
- visibleRowLength,
1121
- isColoredFirstColumn,
1122
- columnsViewState,
1123
- handleToggleColumn,
1124
- })));
1125
- const renderColumn = ({ context, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn }) => (columnData, i) => (jsx(TableColumn, { context: context, visibleRowLength: visibleRowLength, showRow: columnsViewState[i], header: columnData.header, columnData: columnData.column, isFillGradient: i === 0 && isColoredFirstColumn, onToggleColumn: () => handleToggleColumn(i) }, String(i)));
1126
- const onSlideChange = (columnsViewState, setColumnsViewState) => () => {
1127
- setColumnsViewState(new Array(columnsViewState.length).fill(false));
1128
- };
1129
-
1130
- function useExchangeRates(useAsyncData) {
1131
- const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1132
- const result = data?.hits?.hits?.map((_) => _._source) || [];
1133
- return result.length ? getCurrencyListByRate(result) : result;
1134
- }
1135
- async function fetchExchangeRates() {
1136
- try {
1137
- const response = await fetch(EXCHANGE_RATES_URL, {
1138
- method: 'POST',
1139
- headers: {
1140
- 'Content-Type': 'application/json',
1141
- },
1142
- body: JSON.stringify(EXCHANGE_RATES_BODY),
1143
- });
1144
- return await response.json();
1145
- }
1146
- catch (err) {
1147
- console.error(err);
1148
- return Promise.resolve();
1149
- }
1150
- }
1151
- const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
1152
- const EXCHANGE_RATES_BODY = {
1153
- query: {
1154
- bool: {
1155
- must: [
1156
- {
1157
- term: {
1158
- // eslint-disable-next-line camelcase
1159
- russian_region_code: '77',
1160
- },
1161
- },
1162
- {
1163
- term: {
1164
- // eslint-disable-next-line camelcase
1165
- from_volume: '0',
1166
- },
1167
- },
1168
- {
1169
- terms: {
1170
- // eslint-disable-next-line camelcase
1171
- currency_pair: ['USD/RUB', 'EUR/RUB'],
1172
- },
1173
- },
1174
- ],
1175
- },
1176
- },
1177
- };
1178
- const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
1179
- const currencyInfo = _['currency_first'];
1180
- const currencyCode = currencyInfo?.code;
1181
- if (!result.some((i) => i.code === currencyCode)) {
1182
- result.push({
1183
- code: currencyCode,
1184
- buy: roundRate(Number(_.rate_buy)),
1185
- sell: roundRate(Number(_.rate_sell)),
1186
- });
1187
- }
1188
- return result;
1189
- }, []);
1190
- const roundRate = (value) => Math.round(value * 1000) / 1000;
1191
-
1192
- var Currency;
1193
- (function (Currency) {
1194
- Currency["RUB"] = "RUB";
1195
- Currency["EUR"] = "EUR";
1196
- Currency["USD"] = "USD";
1197
- })(Currency || (Currency = {}));
1198
-
1199
- const currencyNumberFormat = new Intl.NumberFormat('ru', {
1200
- style: 'currency',
1201
- currency: Currency.RUB,
1202
- });
1203
- const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
1204
-
1205
- const TABLE_HEAD_STYLE = 'text-left text-m-light text-secondary-text';
1206
- const CURRENCY_ICONS_MAP = {
1207
- USD: 'DollarIcon',
1208
- EUR: 'EuroIcon',
1209
- };
1210
- const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => {
1211
- return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
1212
- });
1213
- const renderCurrencyRow = (exchangeCurrencyItem) => {
1214
- const code = exchangeCurrencyItem?.code;
1215
- return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.sell) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buy) })] }, code));
1216
- };
1217
-
1218
- const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(Img, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0 text-m", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
1219
-
1220
- const roundTo = (value, precision = 2) => {
1221
- const factor = Math.pow(10, precision);
1222
- return Math.round(parseFloat(String(value)) * factor) / factor;
1223
- };
1224
-
1225
- const calculateResult = (value, rate, precision) => {
1226
- const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
1227
- return Number.isInteger(result) ? result : roundTo(result);
1228
- };
1229
- const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
1230
-
1231
- const tableFunc = (table) => (input) => {
1232
- const [, output] = table.find(([predicate]) => predicate(input)) || [];
1233
- return output;
1234
- };
1235
-
1236
- const callbackCurrencySelect = (props) => tableFunc([
1237
- [
1238
- (_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
1239
- () => props.handleConvert(props.value, Currency.RUB),
1240
- ],
1241
- [
1242
- (_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
1243
- () => props.handleConvert(props.value, Currency.USD),
1244
- ],
1245
- [() => true, () => props.handleConvert(props.value)],
1246
- ])(props)?.();
1247
-
1248
- const Input = JSX(({ className = '', id, name, type = 'text', placeholder, pattern, value, onChange }) => {
1249
- const handleChange = (e) => {
1250
- const validInputValue = e.target.validity.valid ? e.target.value : value;
1251
- onChange(validInputValue);
1252
- };
1253
- return (jsx("input", { className: className, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: handleChange }));
1254
- });
1255
-
1256
- const selectStyle = {
1257
- background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
1258
- };
1259
- const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
1260
- return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
1261
- });
1262
-
1263
- const SelectOption = JSX(({ className = '', value, selected, children }) => {
1264
- return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
1265
- });
1266
-
1267
- function renderInput(props) {
1268
- const { placeholder, rates, selected, value, setValue, setSelected } = props;
1269
- return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "shrink-0 w-20 h-9 -translate-x-8 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
1270
- }
1271
-
1272
- const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell, button }) => {
1273
- const { useRouter, handlerDecorator } = context;
1274
- const router = useRouter();
1275
- const [calcState, setCalcState] = context.useState({
1276
- inputSell: '',
1277
- inputBuy: '',
1278
- selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
1279
- selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
1280
- });
1281
- const handleSetCalcState = (newState) => {
1282
- setCalcState((oldState) => ({ ...oldState, ...newState }));
1283
- };
1284
- return (jsxs("div", { className: `grid gap-[18px] pt-2 ${className}`, children: [renderInput({
1285
- placeholder: 'Хочу продать',
1286
- rates: currencyRatesSell,
1287
- selected: calcState.selectSell,
1288
- setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
1289
- value: calcState.inputSell,
1290
- setValue: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
1291
- }), renderInput({
1292
- placeholder: 'Получу',
1293
- rates: currencyRatesBuy,
1294
- selected: calcState.selectBuy,
1295
- setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
1296
- value: calcState.inputBuy,
1297
- setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
1298
- }), button?.text ? (jsx(Button, { className: "py-4 mr-1", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
1299
- });
1300
- const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
1301
- setCalcState({ selectSell: value });
1302
- callbackCurrencySelect({
1303
- value,
1304
- oppositeValue: calcState.selectBuy,
1305
- handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
1306
- handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
1307
- },
1308
- });
1309
- };
1310
- const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
1311
- setCalcState({ selectBuy: value });
1312
- callbackCurrencySelect({
1313
- value,
1314
- oppositeValue: calcState.selectSell,
1315
- handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
1316
- });
1317
- };
1318
- const handleInputSell = (setCalcState, currencyRatesSell) => (value, codeFrom, codeTo) => {
1319
- setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
1320
- const rate = currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
1321
- currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
1322
- if (rate) {
1323
- setCalcState({
1324
- inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
1325
- });
1326
- }
1327
- };
1328
- const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, codeTo, codeFrom) => {
1329
- setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
1330
- const rate = currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
1331
- currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
1332
- if (rate) {
1333
- setCalcState({
1334
- inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
1335
- });
1336
- }
1337
- };
1338
-
1339
- const DEFAULT_LOCATION = {
1340
- address: 'Москва, ул.Ленина д.28',
1341
- distance: '6км',
1342
- };
1343
- const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
1344
- const currencyRates = useExchangeRates(context.useAsyncData);
1345
- const currencyRatesBuy = currencyRates.filter((_) => _.buy);
1346
- currencyRatesBuy.unshift({ code: Currency.RUB });
1347
- const currencyRatesSell = currencyRates.filter((_) => _.sell);
1348
- currencyRatesSell.push({ code: Currency.RUB });
1349
- return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
1350
- });
1351
-
1352
- const SVG_COLOR = {
1353
- 'bg-white': 'text-primary-main',
1354
- transparent: 'text-white',
1355
- };
1356
- const TEXT_COLOR = {
1357
- 'bg-white': 'text-black',
1358
- transparent: 'text-white',
1359
- };
1360
- const Logo = JSX(({ className = '', href, children, targetBlank, bgColor = 'bg-white', hideTitle }) => {
1361
- return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10 h-[38px]`, asSVG: true }), hideTitle ? null : (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-s font-medium ml-2.5`, children: children || 'Россельхозбанк' }))] }));
1362
- });
1363
-
1364
- const MobileAppTile = JSX(({ className = '', title = 'Мобильное приложение', description, href = '#' }) => {
1365
- return (jsx("div", { className: `col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${className}`, children: href ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]", children: jsx(Logo, { className: "w-[33px]", bgColor: "transparent", hideTitle: true }) }), jsxs("a", { href: href, target: "_blank", className: "flex flex-col justify-center pl-3", children: [jsx("div", { className: "text-s font-medium mb-[3px]", children: title }), jsx("div", { className: "text-s text-secondary-text", children: description })] })] })) : null }));
1366
- });
1367
-
1368
- const Contacts = JSX(({ className = '', items, hasButton, context }) => {
1369
- const router = context.useRouter();
1370
- const { handlerDecorator } = context;
1371
- return (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", ...useLink({ router, handlerDecorator }, {
1372
- text: 'Обратная связь',
1373
- href: '/',
1374
- target: '_blank',
1375
- }) })) : null] }));
1376
- });
1377
- const renderContact = (item, index) => {
1378
- const { type, text, description } = item;
1379
- return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "mt-1 text-s-light text-secondary-text", children: description })] }, String(index)));
1380
- };
1381
- const renderText = (type, text = '') => {
1382
- switch (type) {
1383
- case 'tel':
1384
- return (jsx("a", { className: "text-h6 text-primary-text hover:text-primary-main no-underline", href: `tel:${formatTel(text)}`, children: text }));
1385
- case 'email':
1386
- return (jsx("a", { className: "text-xl-light text-primary-text no-underline", href: `mailto:${text}`, children: text }));
1387
- default:
1388
- return jsx("span", { children: text });
1389
- }
1390
- };
1391
- const formatTel = (s) => s.replaceAll(/\D/g, '');
1392
-
1393
- const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `text-secondary-text hover:text-primary-main inline-block no-underline ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
1394
-
1395
- const HorizontalNavigation = JSX(({ title, links, className = '', context }) => {
1396
- const router = context.useRouter();
1397
- const { handlerDecorator } = context;
1398
- return (jsxs("div", { className: className, children: [jsx("span", { className: "text-primary-text text-s font-medium", children: title }), links?.length ? (jsx("div", { className: "flex flex-col gap-2 pt-3", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-s", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1399
- });
1400
-
1401
- const ICONS_MAP = [
1402
- {
1403
- origins: ['t.me', 'telegram.org'],
1404
- icon: { icon: 'TelegramIcon' },
1405
- label: 'Телеграм',
1406
- },
1407
- {
1408
- origins: ['vk.com'],
1409
- icon: { icon: 'VKIcon' },
1410
- label: 'ВКонтакте',
1411
- },
1412
- {
1413
- origins: ['ok.ru'],
1414
- icon: { icon: 'OkIcon' },
1415
- label: 'Одноклассники',
1416
- },
1417
- {
1418
- origins: ['apps.apple.com'],
1419
- icon: { icon: 'AppleIcon' },
1420
- label: 'App Store',
1421
- },
1422
- {
1423
- origins: ['play.google.com'],
1424
- icon: { icon: 'PlayMarketIcon' },
1425
- label: 'Google Play',
1426
- },
1427
- ];
1428
- const MediaButton = JSX(({ href, version = 'primary' }) => {
1429
- const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
1430
- if (!icon) {
1431
- return null;
1432
- }
1433
- const classes = version === 'secondary'
1434
- ? 'bg-secondary-light hover:bg-secondary-hover'
1435
- : 'border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main';
1436
- const isPrimary = version === 'primary';
1437
- return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, imageClassName: "group-hover:text-white", width: "24", height: "24", asSVG: true })) : null }));
1438
- });
1439
-
1440
- const SocialMedia = JSX(({ className, media, version, context }) => {
1441
- const router = context.useRouter();
1442
- const { handlerDecorator } = context;
1443
- return (jsx("div", { className: `flex gap-2 items-start justify-start pt-6 pb-6 ${className || ''}`, children: media?.map((_, index) => (jsx(MediaButton, { version: version, ...useLink({ router, handlerDecorator }, _) }, String(index)))) }));
1444
- });
1445
-
1446
- const TextInformationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
1447
-
1448
- const TextInformation = JSX(({ className, links, context }) => {
1449
- const router = context.useRouter();
1450
- const { handlerDecorator } = context;
1451
- return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "py-6", children: jsx("span", { className: "text-xs-light text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: `flex flex-col justify-start items-start gap-2`, children: links.map((_, i) => (jsx(TextInformationLink, { index: i, className: "", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1452
- });
1453
-
1454
- function useSitemap(useAsyncData) {
1455
- const { data } = useAsyncData(sitemapURL(), fetchSitemap);
1456
- return data || {};
1457
- }
1458
- async function fetchSitemap() {
1459
- const response = await fetch(sitemapURL());
1460
- return await response.json();
1461
- }
1462
- function sitemapURL() {
1463
- return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
1464
- }
1465
-
1466
- const SearchBarInner = JSX(({ className, context, isMobile = false }) => {
1467
- const { term, setTerm } = context.useSearch();
1468
- const LoupeIconClassName = isMobile ? 'w-[20px] h-[20px]' : 'w-[24px] h-[24px]';
1469
- const SearchBarLabelClassName = isMobile ? 'text-s' : 'text-l-light';
1470
- const SearchBarInputClassName = isMobile ? ' placeholder-transparent' : 'h-full';
1471
- const inputPlaceholder = isMobile ? 'some search' : undefined;
1472
- return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: LoupeIconClassName, children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), term ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text ${SearchBarLabelClassName}`, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
1046
+ });
1047
+ function borderedLiClass(bordered) {
1048
+ return bordered ? 'border p-4 rounded mb-4' : 'border-0 border-b last:border-b-0';
1049
+ }
1050
+
1051
+ const Accordion = JSX(({ title, description, accordionItems, context, className = '', bordered }) => {
1052
+ return (jsxs("section", { className: `py-6 px-4 font-sans bg-white text-primary-text ${className}`, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-2 text-center", title: title }) : null, description ? jsx("div", { className: "mb-5 text-m-light text-center", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context, bordered: bordered }, `AccordionItem_${i}`))) })) : null] }));
1053
+ });
1054
+
1055
+ const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
1056
+ const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
1057
+
1058
+ const headingStyle = (isFillGradient = false) => (isFillGradient ? 'text-white' : '');
1059
+ const subtitleStyle = (isFillGradient = false) => `text-s mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`;
1060
+ const HeaderCell = JSX(({ icon, image, title, subtitle, isFillGradient }) => (jsxs("div", { role: "columnheader", children: [icon ? (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })) : null, image?.src && (jsx("div", { className: "mb-3.5", children: jsx(Img, { image: image }) })), title ? (jsx(Heading, { headingType: "h4", className: headingStyle(isFillGradient), title: title })) : null, subtitle ? jsx("div", { className: subtitleStyle(isFillGradient), children: subtitle }) : null] })));
1061
+
1062
+ const TableCell = JSX(({ cell, rowHeader, isFillGradient = false }) => {
1063
+ const cellWrapperClasses = `box-border flex flex-col`;
1064
+ const cellClasses = `h-full ${DIVIDER_CLASSES}`;
1065
+ return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map(renderCellInner$1(isFillGradient, rowHeader)) }) }));
1066
+ });
1067
+ const renderCellInner$1 = (isFillGradient, rowHeader) => ({ label, description }, i) => (jsxs("div", { className: "flex justify-between text-s py-3.5", children: [jsx("div", { className: `${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: rowHeader }), jsxs("div", { className: "basis-1/2", children: [label ? (jsx("div", { className: `text-right ${isFillGradient ? 'text-white' : ''}`, children: label })) : null, description ? (jsx("div", { className: `text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`, children: description })) : null] })] }, String(i)));
1068
+
1069
+ const TableColumn = JSX(({ header, columnData, visibleRowLength = 0, isFillGradient, showRow, onToggleColumn }) => {
1070
+ const columnDataView = columnData?.slice(0, showRow ? columnData.length : visibleRowLength);
1071
+ const gradientClassName = isFillGradient ? GRADIENT : '';
1072
+ const buttonVersion = isFillGradient ? 'secondary' : 'primary';
1073
+ return (jsxs("div", { className: `border border-main-stroke rounded-md p-4 mb-3.5 ${gradientClassName}`, role: "row", children: [jsx(HeaderCell, { ...header, isFillGradient: isFillGradient }), columnDataView?.length
1074
+ ? columnDataView.map(({ rowHeader, cell }, i) => (jsx(TableCell, { cell: cell, rowHeader: rowHeader, isFillGradient: isFillGradient }, String(i))))
1075
+ : null, showRow && renderButton({ header, buttonVersion }), renderToggleButton({ onToggleColumn, isFillGradient, showRow })] }));
1076
+ });
1077
+ const renderButton = ({ header, buttonVersion }) => (jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "text-s font-medium mt-4 py-[11px]", children: header.link.text }));
1078
+ const renderToggleButton = ({ onToggleColumn, isFillGradient, showRow }) => (jsx("div", { className: "mt-5", role: "cell", children: jsx("a", { role: "link", onClick: onToggleColumn, className: `text-s font-medium cursor-pointer ${isFillGradient ? 'text-white/80' : 'text-primary-main'}`, children: !showRow ? 'Показать описание' : 'Скрыть' }) }));
1079
+
1080
+ const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, orientation = 'vertical', }) => {
1081
+ const tableData = columns?.map(({ data, header }) => ({
1082
+ header,
1083
+ column: data?.map((cell, i) => ({ cell, rowHeader: rowHeaders?.[i]?.title })),
1084
+ })) || [];
1085
+ const [columnsViewState, setColumnsViewState] = useState(new Array(columns?.length || 0).fill(!visibleRowLength));
1086
+ const handleToggleColumn = (i) => {
1087
+ columnsViewState[i] = !columnsViewState[i];
1088
+ setColumnsViewState([...columnsViewState]);
1089
+ };
1090
+ return (jsxs("section", { className: `bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: "font-medium text-center m-0 mb-5", title: title })) : null, renderColumns({
1091
+ tableData,
1092
+ context,
1093
+ visibleRowLength,
1094
+ isColoredFirstColumn,
1095
+ columnsViewState,
1096
+ handleToggleColumn,
1097
+ orientation,
1098
+ setColumnsViewState,
1099
+ })] }));
1100
+ });
1101
+ const renderColumns = ({ context, tableData, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn, orientation = 'horizontal', setColumnsViewState, }) => (jsx("div", { role: "table", children: tableData?.length
1102
+ ? renderInnerTable({
1103
+ orientation,
1104
+ context,
1105
+ columnsViewState,
1106
+ setColumnsViewState,
1107
+ tableData,
1108
+ visibleRowLength,
1109
+ isColoredFirstColumn,
1110
+ handleToggleColumn,
1111
+ })
1112
+ : null }));
1113
+ const renderInnerTable = ({ orientation, context, columnsViewState, setColumnsViewState, tableData, visibleRowLength, isColoredFirstColumn, handleToggleColumn, }) => orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, onSlideChange: onSlideChange(columnsViewState, setColumnsViewState), children: tableData.map(renderColumn({
1114
+ context,
1115
+ visibleRowLength,
1116
+ isColoredFirstColumn,
1117
+ columnsViewState,
1118
+ handleToggleColumn,
1119
+ })) })) : (tableData.map(renderColumn({
1120
+ context,
1121
+ visibleRowLength,
1122
+ isColoredFirstColumn,
1123
+ columnsViewState,
1124
+ handleToggleColumn,
1125
+ })));
1126
+ const renderColumn = ({ context, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn }) => (columnData, i) => (jsx(TableColumn, { context: context, visibleRowLength: visibleRowLength, showRow: columnsViewState[i], header: columnData.header, columnData: columnData.column, isFillGradient: i === 0 && isColoredFirstColumn, onToggleColumn: () => handleToggleColumn(i) }, String(i)));
1127
+ const onSlideChange = (columnsViewState, setColumnsViewState) => () => {
1128
+ setColumnsViewState(new Array(columnsViewState.length).fill(false));
1129
+ };
1130
+
1131
+ const consistentDataMap = new Map();
1132
+ function useAsyncData$1(key, fetcher) {
1133
+ const args = useMemo(() => keyToArgs(key), [key]);
1134
+ const [data, setData] = useState();
1135
+ const [error, setError] = useState();
1136
+ const chainToConsistentResult = (_) => {
1137
+ _.then(_data => consistentDataMap.get(args) || _data)
1138
+ .then(setData)
1139
+ .catch(setError);
1140
+ };
1141
+ useEffect(() => {
1142
+ const isEmptyKey = args.every(_ => _ === null);
1143
+ if (isEmptyKey) {
1144
+ return;
1145
+ }
1146
+ try {
1147
+ const _ = fetcher(...args);
1148
+ if ('then' in _) {
1149
+ chainToConsistentResult(_);
1150
+ }
1151
+ else {
1152
+ setData(_);
1153
+ }
1154
+ }
1155
+ catch (err) {
1156
+ setError(err);
1157
+ }
1158
+ }, [fetcher, ...args]);
1159
+ return {
1160
+ data,
1161
+ error,
1162
+ mutate: () => Promise.resolve(undefined),
1163
+ isValidating: false
1164
+ };
1165
+ }
1166
+ function keyToArgs(key) {
1167
+ if (!key) {
1168
+ return [key];
1169
+ }
1170
+ if (Array.isArray(key)) {
1171
+ return key;
1172
+ }
1173
+ else if (key instanceof Function) {
1174
+ return keyToArgs(key());
1175
+ }
1176
+ else {
1177
+ return [key];
1178
+ }
1179
+ }
1180
+
1181
+ let impl = useAsyncData$1;
1182
+ const useAsyncData = (key, fetcher) => impl(key, fetcher);
1183
+
1184
+ function useExchangeRates() {
1185
+ const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1186
+ const result = data?.hits?.hits?.map((_) => _._source) || [];
1187
+ return result.length ? getCurrencyListByRate(result) : result;
1188
+ }
1189
+ async function fetchExchangeRates() {
1190
+ try {
1191
+ const response = await fetch(EXCHANGE_RATES_URL, {
1192
+ method: 'POST',
1193
+ headers: {
1194
+ 'Content-Type': 'application/json',
1195
+ },
1196
+ body: JSON.stringify(EXCHANGE_RATES_BODY),
1197
+ });
1198
+ return await response.json();
1199
+ }
1200
+ catch (err) {
1201
+ console.error(err);
1202
+ return Promise.resolve();
1203
+ }
1204
+ }
1205
+ const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
1206
+ const EXCHANGE_RATES_BODY = {
1207
+ query: {
1208
+ bool: {
1209
+ must: [
1210
+ {
1211
+ term: {
1212
+ // eslint-disable-next-line camelcase
1213
+ russian_region_code: '77',
1214
+ },
1215
+ },
1216
+ {
1217
+ term: {
1218
+ // eslint-disable-next-line camelcase
1219
+ from_volume: '0',
1220
+ },
1221
+ },
1222
+ {
1223
+ terms: {
1224
+ // eslint-disable-next-line camelcase
1225
+ currency_pair: ['USD/RUB', 'EUR/RUB'],
1226
+ },
1227
+ },
1228
+ ],
1229
+ },
1230
+ },
1231
+ };
1232
+ const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
1233
+ const currencyInfo = _['currency_first'];
1234
+ const currencyCode = currencyInfo?.code;
1235
+ if (!result.some((i) => i.code === currencyCode)) {
1236
+ result.push({
1237
+ code: currencyCode,
1238
+ buy: roundRate(Number(_.rate_buy)),
1239
+ sell: roundRate(Number(_.rate_sell)),
1240
+ });
1241
+ }
1242
+ return result;
1243
+ }, []);
1244
+ const roundRate = (value) => Math.round(value * 1000) / 1000;
1245
+
1246
+ var Currency;
1247
+ (function (Currency) {
1248
+ Currency["RUB"] = "RUB";
1249
+ Currency["EUR"] = "EUR";
1250
+ Currency["USD"] = "USD";
1251
+ })(Currency || (Currency = {}));
1252
+
1253
+ const currencyNumberFormat = new Intl.NumberFormat('ru', {
1254
+ style: 'currency',
1255
+ currency: Currency.RUB,
1256
+ });
1257
+ const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
1258
+
1259
+ const TABLE_HEAD_STYLE = 'text-left text-m-light text-secondary-text';
1260
+ const CURRENCY_ICONS_MAP = {
1261
+ USD: 'DollarIcon',
1262
+ EUR: 'EuroIcon',
1263
+ };
1264
+ const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => {
1265
+ return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
1266
+ });
1267
+ const renderCurrencyRow = (exchangeCurrencyItem) => {
1268
+ const code = exchangeCurrencyItem?.code;
1269
+ return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.sell) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buy) })] }, code));
1270
+ };
1271
+
1272
+ const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(Img, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0 text-m", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
1273
+
1274
+ const roundTo = (value, precision = 2) => {
1275
+ const factor = Math.pow(10, precision);
1276
+ return Math.round(parseFloat(String(value)) * factor) / factor;
1277
+ };
1278
+
1279
+ const calculateResult = (value, rate, precision) => {
1280
+ const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
1281
+ return Number.isInteger(result) ? result : roundTo(result);
1282
+ };
1283
+ const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
1284
+
1285
+ const tableFunc = (table) => (input) => {
1286
+ const [, output] = table.find(([predicate]) => predicate(input)) || [];
1287
+ return output;
1288
+ };
1289
+
1290
+ const callbackCurrencySelect = (props) => tableFunc([
1291
+ [
1292
+ (_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
1293
+ () => props.handleConvert(props.value, Currency.RUB),
1294
+ ],
1295
+ [
1296
+ (_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
1297
+ () => props.handleConvert(props.value, Currency.USD),
1298
+ ],
1299
+ [() => true, () => props.handleConvert(props.value)],
1300
+ ])(props)?.();
1301
+
1302
+ const Input = JSX(({ className = '', id, name, type = 'text', placeholder, pattern, value, onChange }) => {
1303
+ const handleChange = (e) => {
1304
+ const validInputValue = e.target.validity.valid ? e.target.value : value;
1305
+ onChange(validInputValue);
1306
+ };
1307
+ return (jsx("input", { className: className, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: handleChange }));
1308
+ });
1309
+
1310
+ const selectStyle = {
1311
+ background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
1312
+ };
1313
+ const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
1314
+ return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
1315
+ });
1316
+
1317
+ const SelectOption = JSX(({ className = '', value, selected, children }) => {
1318
+ return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
1319
+ });
1320
+
1321
+ function renderInput(props) {
1322
+ const { placeholder, rates, selected, value, setValue, setSelected } = props;
1323
+ return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "shrink-0 w-20 h-9 -translate-x-8 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
1324
+ }
1325
+
1326
+ const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell, button }) => {
1327
+ const { useRouter, handlerDecorator } = context;
1328
+ const router = useRouter();
1329
+ const [calcState, setCalcState] = useState({
1330
+ inputSell: '',
1331
+ inputBuy: '',
1332
+ selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
1333
+ selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
1334
+ });
1335
+ const handleSetCalcState = (newState) => {
1336
+ setCalcState((oldState) => ({ ...oldState, ...newState }));
1337
+ };
1338
+ return (jsxs("div", { className: `grid gap-[18px] pt-2 ${className}`, children: [renderInput({
1339
+ placeholder: 'Хочу продать',
1340
+ rates: currencyRatesSell,
1341
+ selected: calcState.selectSell,
1342
+ setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
1343
+ value: calcState.inputSell,
1344
+ setValue: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
1345
+ }), renderInput({
1346
+ placeholder: 'Получу',
1347
+ rates: currencyRatesBuy,
1348
+ selected: calcState.selectBuy,
1349
+ setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
1350
+ value: calcState.inputBuy,
1351
+ setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
1352
+ }), button?.text ? (jsx(Button, { className: "py-4 mr-1", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
1353
+ });
1354
+ const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
1355
+ setCalcState({ selectSell: value });
1356
+ callbackCurrencySelect({
1357
+ value,
1358
+ oppositeValue: calcState.selectBuy,
1359
+ handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
1360
+ handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
1361
+ },
1362
+ });
1363
+ };
1364
+ const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
1365
+ setCalcState({ selectBuy: value });
1366
+ callbackCurrencySelect({
1367
+ value,
1368
+ oppositeValue: calcState.selectSell,
1369
+ handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
1370
+ });
1371
+ };
1372
+ const handleInputSell = (setCalcState, currencyRatesSell) => (value, codeFrom, codeTo) => {
1373
+ setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
1374
+ const rate = currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
1375
+ currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
1376
+ if (rate) {
1377
+ setCalcState({
1378
+ inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
1379
+ });
1380
+ }
1381
+ };
1382
+ const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, codeTo, codeFrom) => {
1383
+ setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
1384
+ const rate = currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
1385
+ currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
1386
+ if (rate) {
1387
+ setCalcState({
1388
+ inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
1389
+ });
1390
+ }
1391
+ };
1392
+
1393
+ const DEFAULT_LOCATION = {
1394
+ address: 'Москва, ул.Ленина д.28',
1395
+ distance: '6км',
1396
+ };
1397
+ const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', button, ...rest }) => {
1398
+ const currencyRates = useExchangeRates();
1399
+ const currencyRatesBuy = currencyRates.filter((_) => _.buy);
1400
+ currencyRatesBuy.unshift({ code: Currency.RUB });
1401
+ const currencyRatesSell = currencyRates.filter((_) => _.sell);
1402
+ currencyRatesSell.push({ code: Currency.RUB });
1403
+ return (jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, ...rest, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
1404
+ });
1405
+
1406
+ const SVG_COLOR = {
1407
+ 'bg-white': 'text-primary-main',
1408
+ transparent: 'text-white',
1409
+ };
1410
+ const TEXT_COLOR = {
1411
+ 'bg-white': 'text-black',
1412
+ transparent: 'text-white',
1413
+ };
1414
+ const Logo = JSX(({ className = '', href, children, targetBlank, bgColor = 'bg-white', hideTitle }) => {
1415
+ return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', "aria-label": "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A", children: [jsx(Img, { image: { icon: 'Logo' }, className: `${SVG_COLOR[bgColor]} w-10 h-[38px]`, asSVG: true }), hideTitle ? null : (jsx("span", { className: `${TEXT_COLOR[bgColor]} text-s font-medium ml-2.5`, children: children || 'Россельхозбанк' }))] }));
1416
+ });
1417
+
1418
+ const MobileAppTile = JSX(({ className = '', title = 'Мобильное приложение', description, href = '#' }) => {
1419
+ return (jsx("div", { className: `col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${className}`, children: href ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]", children: jsx(Logo, { className: "w-[33px]", bgColor: "transparent", hideTitle: true }) }), jsxs("a", { href: href, target: "_blank", className: "flex flex-col justify-center pl-3", children: [jsx("div", { className: "text-s font-medium mb-[3px]", children: title }), jsx("div", { className: "text-s text-secondary-text", children: description })] })] })) : null }));
1420
+ });
1421
+
1422
+ const Contacts = JSX(({ className = '', items, hasButton, context }) => {
1423
+ const router = context.useRouter();
1424
+ const { handlerDecorator } = context;
1425
+ return (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", ...useLink({ router, handlerDecorator }, {
1426
+ text: 'Обратная связь',
1427
+ href: '/',
1428
+ target: '_blank',
1429
+ }) })) : null] }));
1430
+ });
1431
+ const renderContact = (item, index) => {
1432
+ const { type, text, description } = item;
1433
+ return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "mt-1 text-s-light text-secondary-text", children: description })] }, String(index)));
1434
+ };
1435
+ const renderText = (type, text = '') => {
1436
+ switch (type) {
1437
+ case 'tel':
1438
+ return (jsx("a", { className: "text-h6 text-primary-text hover:text-primary-main no-underline", href: `tel:${formatTel(text)}`, children: text }));
1439
+ case 'email':
1440
+ return (jsx("a", { className: "text-xl-light text-primary-text no-underline", href: `mailto:${text}`, children: text }));
1441
+ default:
1442
+ return jsx("span", { children: text });
1443
+ }
1444
+ };
1445
+ const formatTel = (s) => s.replaceAll(/\D/g, '');
1446
+
1447
+ const HorizontalNavigationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `text-secondary-text hover:text-primary-main inline-block no-underline ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
1448
+
1449
+ const HorizontalNavigation = JSX(({ title, links, className = '', context }) => {
1450
+ const router = context.useRouter();
1451
+ const { handlerDecorator } = context;
1452
+ return (jsxs("div", { className: className, children: [jsx("span", { className: "text-primary-text text-s font-medium", children: title }), links?.length ? (jsx("div", { className: "flex flex-col gap-2 pt-3", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-s", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1453
+ });
1454
+
1455
+ const ICONS_MAP = [
1456
+ {
1457
+ origins: ['t.me', 'telegram.org'],
1458
+ icon: { icon: 'TelegramIcon' },
1459
+ label: 'Телеграм',
1460
+ },
1461
+ {
1462
+ origins: ['vk.com'],
1463
+ icon: { icon: 'VKIcon' },
1464
+ label: 'ВКонтакте',
1465
+ },
1466
+ {
1467
+ origins: ['ok.ru'],
1468
+ icon: { icon: 'OkIcon' },
1469
+ label: 'Одноклассники',
1470
+ },
1471
+ {
1472
+ origins: ['apps.apple.com'],
1473
+ icon: { icon: 'AppleIcon' },
1474
+ label: 'App Store',
1475
+ },
1476
+ {
1477
+ origins: ['play.google.com'],
1478
+ icon: { icon: 'PlayMarketIcon' },
1479
+ label: 'Google Play',
1480
+ },
1481
+ ];
1482
+ const MediaButton = JSX(({ href, version = 'primary' }) => {
1483
+ const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
1484
+ if (!icon) {
1485
+ return null;
1486
+ }
1487
+ const classes = version === 'secondary'
1488
+ ? 'bg-secondary-light hover:bg-secondary-hover'
1489
+ : 'border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main';
1490
+ const isPrimary = version === 'primary';
1491
+ return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, imageClassName: "group-hover:text-white", width: "24", height: "24", asSVG: true })) : null }));
1492
+ });
1493
+
1494
+ const SocialMedia = JSX(({ className, media, version, context }) => {
1495
+ const router = context.useRouter();
1496
+ const { handlerDecorator } = context;
1497
+ return (jsx("div", { className: `flex gap-2 items-start justify-start pt-6 pb-6 ${className || ''}`, children: media?.map((_, index) => (jsx(MediaButton, { version: version, ...useLink({ router, handlerDecorator }, _) }, String(index)))) }));
1498
+ });
1499
+
1500
+ const TextInformationLink = JSX(({ className = '', index, text, href, target, onClick }) => (jsx("a", { className: `text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
1501
+
1502
+ const TextInformation = JSX(({ className, links, context }) => {
1503
+ const router = context.useRouter();
1504
+ const { handlerDecorator } = context;
1505
+ return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "py-6", children: jsx("span", { className: "text-xs-light text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: `flex flex-col justify-start items-start gap-2`, children: links.map((_, i) => (jsx(TextInformationLink, { index: i, className: "", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1506
+ });
1507
+
1508
+ function useSitemap() {
1509
+ const { data } = useAsyncData(sitemapURL(), fetchSitemap);
1510
+ return data || {};
1511
+ }
1512
+ async function fetchSitemap() {
1513
+ const response = await fetch(sitemapURL());
1514
+ return await response.json();
1515
+ }
1516
+ function sitemapURL() {
1517
+ return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
1518
+ }
1519
+
1520
+ const useSearch = () => {
1521
+ const [term, setTerm] = useState('');
1522
+ return {
1523
+ term,
1524
+ setTerm: (text) => setTerm(text),
1525
+ };
1526
+ };
1527
+
1528
+ const SearchBarInner = JSX(({ className, isMobile = false }) => {
1529
+ const { term, setTerm } = useSearch();
1530
+ const LoupeIconClassName = isMobile ? 'w-[20px] h-[20px]' : 'w-[24px] h-[24px]';
1531
+ const SearchBarLabelClassName = isMobile ? 'text-s' : 'text-l-light';
1532
+ const SearchBarInputClassName = isMobile ? ' placeholder-transparent' : 'h-full';
1533
+ const inputPlaceholder = isMobile ? 'some search' : undefined;
1534
+ return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: LoupeIconClassName, children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), term ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text ${SearchBarLabelClassName}`, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
1473
1535
  outline-none pr-[6%] border-main-divider focus:border-primary-text ${SearchBarInputClassName}`, value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input", placeholder: inputPlaceholder }), isMobile ? (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
1474
- e.preventDefault();
1475
- setTerm('');
1476
- }, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24" }) })) : (jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (ev) => {
1477
- ev?.preventDefault();
1478
- console.log('click');
1479
- }, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
1480
- });
1481
-
1482
- const SearchBar = JSX(({ className = '', context }) => {
1483
- return jsx(SearchBarInner, { context: context, className: className, isMobile: true });
1484
- });
1485
-
1486
- const getAccordionItems = (items) => items?.map((item) => ({
1487
- label: item.text || '',
1488
- blocks: [
1489
- {
1490
- accordionBlockType: 'LinkList',
1491
- documents: item.items || [],
1492
- },
1493
- ],
1494
- }));
1495
-
1496
- const Footer = JSX(({ className = '', documents, relatedEnterprises, contacts, socialMedia, context, horizontalNavigationTitle, }) => {
1497
- const sitemap = useSitemap(context.useAsyncData);
1498
- const dispositions = sitemap?.dispositions;
1499
- return (jsxs("footer", { className: `font-sans px-4 py-[26px] bg-white ${className}`, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, context: context, hasButton: true }), jsx(Accordion, { context: context, className: "!p-0 mb-4", accordionItems: getAccordionItems(sitemap.topItems) }), jsx("div", { children: dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { context: context, title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android" }), jsx(SearchBar, { context: context, className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia, context: context }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
1500
- });
1501
- const renderSubMenuItem = (menu, i) => {
1502
- const { icon, href, text } = menu;
1503
- return (jsxs(Button, { version: "link", href: href, className: "flex text-s mb-4 w-6", children: [icon ? jsx(Img, { className: "pr-1", image: icon, width: "24", height: "24", asSVG: true }) : null, jsx("span", { className: "pl-2.5 font-medium text-primary-text", children: text })] }, `footer-${i}`));
1504
- };
1505
-
1506
- const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
1507
-
1508
- const isHrefActive = (href, router, cmp = (targetHref, baseHref) => baseHref.startsWith(targetHref)) => {
1509
- return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
1510
- };
1511
-
1512
- const isSubItemActive = (router) => (subItem) => isHrefActive(subItem.href, router);
1513
-
1514
- const findActiveSubItem = (router) => (items = []) => {
1515
- const possibleActiveSubItems = items?.filter(isSubItemActive(router));
1516
- return possibleActiveSubItems?.length
1517
- ? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
1518
- : undefined;
1519
- };
1520
-
1521
- const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
1522
-
1523
- const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) ||
1524
- isHrefActive(topItem.href, router) ||
1525
- checkIsHrefSameOrigin(topItem.href, router);
1526
-
1527
- const cmp = (a) => (b) => a?.href === b?.href;
1528
- const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
1529
- const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
1530
- const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
1531
-
1532
- const TEXT_CLASSES = 'font-sans text-s';
1533
- const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
1534
- const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white' }) => {
1535
- return (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] }));
1536
- });
1537
- const getTextClasses = (bgColor, active = false) => {
1538
- let classes = 'text-white';
1539
- if (bgColor === 'bg-white') {
1540
- classes = active ? 'text-primary-main' : 'text-secondary-text hover:text-primary-main';
1541
- }
1542
- return `${classes} ${TEXT_CLASSES}`;
1543
- };
1544
- const getBorderClasses = (bgColor, active = false) => {
1545
- if (!active) {
1546
- return BORDER_CLASSES;
1547
- }
1548
- return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
1549
- };
1550
-
1551
- const HeaderBurger = JSX(({ context, burgerSubMenu, onClick, defaultLocation = '', children }) => {
1552
- const [city, getCity] = context.useGeolocation(defaultLocation);
1553
- return (jsxs("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [jsx("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), jsxs("button", { onClick: getCity, className: "flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer", children: [jsx(Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), city] }), children, jsx("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), jsx(SearchBar, { context: context, className: "grow" })] }));
1554
- });
1555
- const renderBurgerSubMenuItem = (menu, i) => {
1556
- const { icon, href, text } = menu;
1557
- return (jsxs("a", { href: href, className: "flex text-s mb-4 hover:text-primary-main", children: [icon ? (jsx(Img, { className: "text-primary-main pr-1", image: icon, width: "24", height: "24", asSVG: true })) : null, jsx("span", { className: "font-medium pl-0.5", children: text })] }, `headerSubMenu-${i}`));
1558
- };
1559
-
1560
- const HeaderTop = JSX(({ onClick, bgColor }) => (jsxs("div", { className: "flex items-center justify-between border-0 border-b border-main-divider h-[50px]", children: [jsxs("div", { className: "flex items-center", children: [jsx("button", { className: "pl-0 pr-4 border-0 bg-transparent cursor-pointer", onClick: onClick, "aria-label": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E", children: jsx(Img, { image: { icon: 'BurgerIcon', iconVersion: bgColor === 'bg-white' ? 'black' : 'white' }, className: "text-primary-text w-6 h-6", width: "24", height: "24", asSVG: true }) }), jsx(Logo, { className: "mr-8", bgColor: bgColor })] }), jsx("button", { className: `${bgColor === 'bg-white' ? 'text-primary-main' : 'text-white'} text-s border-0 bg-transparent cursor-pointer`, children: "\u0412\u043E\u0439\u0442\u0438" })] })));
1561
-
1562
- const Header = JSX(({ className = '', defaultLocation, bgColor = 'bg-white', context, topItems }) => {
1563
- const router = context.useRouter();
1564
- const sitemap = useSitemap(context.useAsyncData);
1565
- const dispositions = sitemap?.dispositions;
1566
- const { handlerDecorator } = context;
1567
- const mergedItems = mergeTopItems(sitemap.topItems, topItems);
1568
- const activeTopItem = mergedItems.find(isTopItemActive(router));
1569
- const subItems = activeTopItem?.items;
1570
- const activeSubItem = findActiveSubItem(router)(subItems);
1571
- const [burgerMenuShow, setBurgerMenuShow] = context.useState(false);
1572
- const toggleBurgerMenu = () => setBurgerMenuShow(!burgerMenuShow);
1573
- return (jsxs("header", { className: `${bgColor} ${className}`, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: toggleBurgerMenu, bgColor: bgColor }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => renderSubItem({
1574
- ...useLink({ router, handlerDecorator }, _),
1575
- active: _ === activeSubItem,
1576
- bgColor,
1577
- }, i)) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { context: context, onClick: toggleBurgerMenu, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx(Accordion, { context: context, accordionItems: getAccordionItems(sitemap.topItems), className: "!p-0 mb-4" }) })) : null] }));
1578
- });
1579
- const renderSubItem = (item, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", ...item }, String(i)));
1580
-
1581
- const getColSpan = (className) => {
1582
- const colSpanPrefix = 'col-span-';
1583
- const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
1584
- return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
1585
- };
1586
-
1587
- function getTileHeadingType(className = '') {
1588
- const colSpan = getColSpan(className);
1589
- if (colSpan <= 4) {
1590
- return 'S';
1591
- }
1592
- else if (colSpan <= 8) {
1593
- return 'M';
1594
- }
1595
- else {
1596
- return 'L';
1597
- }
1598
- }
1599
-
1600
- function getTileMinHeight(className = '') {
1601
- const colSpan = getColSpan(className);
1602
- if (colSpan <= 6) {
1603
- return 'min-h-[300px]';
1604
- }
1605
- else if (colSpan <= 8) {
1606
- return 'min-h-[320px]';
1607
- }
1608
- else {
1609
- return 'min-h-[360px]';
1610
- }
1611
- }
1612
-
1613
- function getTileRightPadding(className = '') {
1614
- const colSpan = getColSpan(className);
1615
- if (colSpan <= 6) {
1616
- return 'pr-9';
1617
- }
1618
- else if (colSpan <= 8) {
1619
- return 'pr-[4.75rem]';
1620
- }
1621
- else {
1622
- return 'pr-[9.4rem]';
1623
- }
1624
- }
1625
-
1626
- const GOLDEN_RATIO = 1.618;
1627
- const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', ...rest }) => {
1628
- return (jsxs(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: [jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, headlineVersion: getTileHeadingType(className) }), jsx("figure", { className: "m-0 min-w-[80%]", children: renderShimmer() })] }));
1629
- });
1630
- const renderShimmer = (size = 3) => goldenSequence(100, size)
1631
- .map((_) => Math.floor(_))
1632
- .map(renderShimmerItem);
1633
- const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
1634
- const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
1635
-
1636
- const productGalleryStyleMap = {
1637
- primary: 'bg-white text-primary-text',
1638
- secondary: 'bg-primary-main text-white',
1639
- };
1640
- const ProductGalleryBlock = JSX(({ block, context, className = '' }) => {
1641
- const version = block?.version ?? 'primary';
1642
- return (jsx("section", { className: `flex grow-0 shrink-0 basis-full px-4 pt-6 ${productGalleryStyleMap[version]} ${className}`, role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { context: context, ...block }) }) }));
1643
- });
1644
-
1645
- const ProductGallery = JSX(({ className, context, slides = [] }) => {
1646
- const galleryBlocks = slides.map((s) => s.productBlock);
1647
- return (jsx("section", { className: `font-sans bg-white overflow-hidden w-100 pb-6 ${className || ''}`, children: jsx(SwipeListControl, { context: context, children: galleryBlocks.map((block, i) => (jsx(ProductGalleryBlock, { block: block, context: context }, String(i)))) }) }));
1648
- });
1649
-
1650
- const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
1651
-
1652
- const STEPS_BLOCK_STYLE_MAPS = {
1653
- primary: {
1654
- background: 'bg-white',
1655
- title: 'text-primary-text',
1656
- description: 'text-secondary-text',
1657
- iconText: 'text-secondary-text',
1658
- iconBackground: 'bg-main-divider',
1659
- iconConnector: 'bg-secondary-light',
1660
- },
1661
- secondary: {
1662
- background: 'bg-primary-main',
1663
- title: 'text-white',
1664
- description: 'text-white/80',
1665
- iconText: 'text-white',
1666
- iconBackground: 'bg-white/30',
1667
- iconConnector: 'bg-white',
1668
- },
1669
- };
1670
-
1671
- const STEPS_SIZE_MAP = {
1672
- normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
1673
- small: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]',
1674
- };
1675
- const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
1676
- normal: 'min-h-[70px]',
1677
- small: 'min-h-[50px]',
1678
- };
1679
- const StepsBlock = JSX(({ className, title, description, showLines = true, steps, size = 'normal', version = 'primary', }) => {
1680
- const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
1681
- return (jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
1536
+ e.preventDefault();
1537
+ setTerm('');
1538
+ }, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24" }) })) : (jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (ev) => {
1539
+ ev?.preventDefault();
1540
+ console.log('click');
1541
+ }, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
1542
+ });
1543
+
1544
+ const SearchBar = JSX(({ className = '' }) => {
1545
+ return jsx(SearchBarInner, { className: className, isMobile: true });
1546
+ });
1547
+
1548
+ const getAccordionItems = (items) => items?.map((item) => ({
1549
+ label: item.text || '',
1550
+ blocks: [
1551
+ {
1552
+ accordionBlockType: 'LinkList',
1553
+ documents: item.items || [],
1554
+ },
1555
+ ],
1556
+ }));
1557
+
1558
+ const Footer = JSX(({ className = '', documents, relatedEnterprises, contacts, socialMedia, context, horizontalNavigationTitle, }) => {
1559
+ const sitemap = useSitemap();
1560
+ const dispositions = sitemap?.dispositions;
1561
+ return (jsxs("footer", { className: `font-sans px-4 py-[26px] bg-white ${className}`, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, context: context, hasButton: true }), jsx(Accordion, { context: context, className: "!p-0 mb-4", accordionItems: getAccordionItems(sitemap.topItems) }), jsx("div", { children: dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { context: context, title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android" }), jsx(SearchBar, { context: context, className: "grow" }), jsx(SocialMedia, { className: "pb-4", media: socialMedia, context: context }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
1562
+ });
1563
+ const renderSubMenuItem = (menu, i) => {
1564
+ const { icon, href, text } = menu;
1565
+ return (jsxs(Button, { version: "link", href: href, className: "flex text-s mb-4 w-6", children: [icon ? jsx(Img, { className: "pr-1", image: icon, width: "24", height: "24", asSVG: true }) : null, jsx("span", { className: "pl-2.5 font-medium text-primary-text", children: text })] }, `footer-${i}`));
1566
+ };
1567
+
1568
+ const maxBy = (discriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
1569
+
1570
+ const isHrefActive = (href, router, cmp = (targetHref, baseHref) => baseHref.startsWith(targetHref)) => {
1571
+ return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
1572
+ };
1573
+
1574
+ const isSubItemActive = (router) => (subItem) => isHrefActive(subItem.href, router);
1575
+
1576
+ const findActiveSubItem = (router) => (items = []) => {
1577
+ const possibleActiveSubItems = items?.filter(isSubItemActive(router));
1578
+ return possibleActiveSubItems?.length
1579
+ ? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
1580
+ : undefined;
1581
+ };
1582
+
1583
+ const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
1584
+
1585
+ const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) ||
1586
+ isHrefActive(topItem.href, router) ||
1587
+ checkIsHrefSameOrigin(topItem.href, router);
1588
+
1589
+ const cmp = (a) => (b) => a?.href === b?.href;
1590
+ const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
1591
+ const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
1592
+ const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
1593
+
1594
+ const TEXT_CLASSES = 'font-sans text-s';
1595
+ const BORDER_CLASSES = 'absolute left-0 -bottom-3 w-full h-[2px]';
1596
+ const HeaderItem = JSX(({ className = '', text, href, target, active, onClick, children, bgColor = 'bg-white' }) => {
1597
+ return (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: getTextClasses(bgColor, active), children: text || children }), active ? jsx("div", { className: getBorderClasses(bgColor, active) }) : null] }));
1598
+ });
1599
+ const getTextClasses = (bgColor, active = false) => {
1600
+ let classes = 'text-white';
1601
+ if (bgColor === 'bg-white') {
1602
+ classes = active ? 'text-primary-main' : 'text-secondary-text hover:text-primary-main';
1603
+ }
1604
+ return `${classes} ${TEXT_CLASSES}`;
1605
+ };
1606
+ const getBorderClasses = (bgColor, active = false) => {
1607
+ if (!active) {
1608
+ return BORDER_CLASSES;
1609
+ }
1610
+ return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
1611
+ };
1612
+
1613
+ const DaData = DaDataAPI('https://10.80.4.9');
1614
+ function useGeolocation(defaultLocation) {
1615
+ const [city, setCity] = useState(defaultLocation);
1616
+ useEffect(() => {
1617
+ setCity(globalThis?.localStorage.getItem('location') || defaultLocation);
1618
+ }, [defaultLocation]);
1619
+ const getCity = useCallback(() => {
1620
+ DaData.getFetcherAddress().then((_) => {
1621
+ const location = _ || defaultLocation;
1622
+ globalThis?.localStorage.setItem('location', location);
1623
+ setCity(location);
1624
+ });
1625
+ }, [defaultLocation]);
1626
+ return [city, getCity];
1627
+ }
1628
+
1629
+ const HeaderBurger = JSX(({ context, burgerSubMenu, onClick, defaultLocation = '', children }) => {
1630
+ const [city, getCity] = useGeolocation(defaultLocation);
1631
+ return (jsxs("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [jsx("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), jsxs("button", { onClick: getCity, className: "flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer", children: [jsx(Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), city] }), children, jsx("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), jsx(SearchBar, { context: context, className: "grow" })] }));
1632
+ });
1633
+ const renderBurgerSubMenuItem = (menu, i) => {
1634
+ const { icon, href, text } = menu;
1635
+ return (jsxs("a", { href: href, className: "flex text-s mb-4 hover:text-primary-main", children: [icon ? (jsx(Img, { className: "text-primary-main pr-1", image: icon, width: "24", height: "24", asSVG: true })) : null, jsx("span", { className: "font-medium pl-0.5", children: text })] }, `headerSubMenu-${i}`));
1636
+ };
1637
+
1638
+ const HeaderTop = JSX(({ onClick, bgColor }) => (jsxs("div", { className: "flex items-center justify-between border-0 border-b border-main-divider h-[50px]", children: [jsxs("div", { className: "flex items-center", children: [jsx("button", { className: "pl-0 pr-4 border-0 bg-transparent cursor-pointer", onClick: onClick, "aria-label": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E", children: jsx(Img, { image: { icon: 'BurgerIcon', iconVersion: bgColor === 'bg-white' ? 'black' : 'white' }, className: "text-primary-text w-6 h-6", width: "24", height: "24", asSVG: true }) }), jsx(Logo, { className: "mr-8", bgColor: bgColor })] }), jsx("button", { className: `${bgColor === 'bg-white' ? 'text-primary-main' : 'text-white'} text-s border-0 bg-transparent cursor-pointer`, children: "\u0412\u043E\u0439\u0442\u0438" })] })));
1639
+
1640
+ const Header = JSX(({ className = '', defaultLocation, bgColor = 'bg-white', context, topItems }) => {
1641
+ const router = context.useRouter();
1642
+ const sitemap = useSitemap();
1643
+ const dispositions = sitemap?.dispositions;
1644
+ const { handlerDecorator } = context;
1645
+ const mergedItems = mergeTopItems(sitemap.topItems, topItems);
1646
+ const activeTopItem = mergedItems.find(isTopItemActive(router));
1647
+ const subItems = activeTopItem?.items;
1648
+ const activeSubItem = findActiveSubItem(router)(subItems);
1649
+ const [burgerMenuShow, setBurgerMenuShow] = useState(false);
1650
+ const toggleBurgerMenu = () => setBurgerMenuShow(!burgerMenuShow);
1651
+ return (jsxs("header", { className: `${bgColor} ${className}`, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: toggleBurgerMenu, bgColor: bgColor }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => renderSubItem({
1652
+ ...useLink({ router, handlerDecorator }, _),
1653
+ active: _ === activeSubItem,
1654
+ bgColor,
1655
+ }, i)) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { context: context, onClick: toggleBurgerMenu, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx(Accordion, { context: context, accordionItems: getAccordionItems(sitemap.topItems), className: "!p-0 mb-4" }) })) : null] }));
1656
+ });
1657
+ const renderSubItem = (item, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", ...item }, String(i)));
1658
+
1659
+ const getColSpan = (className) => {
1660
+ const colSpanPrefix = 'col-span-';
1661
+ const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
1662
+ return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
1663
+ };
1664
+
1665
+ function getTileHeadingType(className = '') {
1666
+ const colSpan = getColSpan(className);
1667
+ if (colSpan <= 4) {
1668
+ return 'S';
1669
+ }
1670
+ else if (colSpan <= 8) {
1671
+ return 'M';
1672
+ }
1673
+ else {
1674
+ return 'L';
1675
+ }
1676
+ }
1677
+
1678
+ function getTileMinHeight(className = '') {
1679
+ const colSpan = getColSpan(className);
1680
+ if (colSpan <= 6) {
1681
+ return 'min-h-[300px]';
1682
+ }
1683
+ else if (colSpan <= 8) {
1684
+ return 'min-h-[320px]';
1685
+ }
1686
+ else {
1687
+ return 'min-h-[360px]';
1688
+ }
1689
+ }
1690
+
1691
+ function getTileRightPadding(className = '') {
1692
+ const colSpan = getColSpan(className);
1693
+ if (colSpan <= 6) {
1694
+ return 'pr-9';
1695
+ }
1696
+ else if (colSpan <= 8) {
1697
+ return 'pr-[4.75rem]';
1698
+ }
1699
+ else {
1700
+ return 'pr-[9.4rem]';
1701
+ }
1702
+ }
1703
+
1704
+ const GOLDEN_RATIO = 1.618;
1705
+ const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', ...rest }) => {
1706
+ return (jsxs(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: [jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, headlineVersion: getTileHeadingType(className) }), jsx("figure", { className: "m-0 min-w-[80%]", children: renderShimmer() })] }));
1707
+ });
1708
+ const renderShimmer = (size = 3) => goldenSequence(100, size)
1709
+ .map((_) => Math.floor(_))
1710
+ .map(renderShimmerItem);
1711
+ const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
1712
+ const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
1713
+
1714
+ const productGalleryStyleMap = {
1715
+ primary: 'bg-white text-primary-text',
1716
+ secondary: 'bg-primary-main text-white',
1717
+ };
1718
+ const ProductGalleryBlock = JSX(({ block, context, className = '' }) => {
1719
+ const version = block?.version ?? 'primary';
1720
+ return (jsx("section", { className: `flex grow-0 shrink-0 basis-full px-4 pt-6 ${productGalleryStyleMap[version]} ${className}`, role: "listitem", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { context: context, ...block }) }) }));
1721
+ });
1722
+
1723
+ const ProductGallery = JSX(({ className, context, slides = [] }) => {
1724
+ const galleryBlocks = slides.map((s) => s.productBlock);
1725
+ return (jsx("section", { className: `font-sans bg-white overflow-hidden w-100 pb-6 ${className || ''}`, children: jsx(SwipeListControl, { context: context, children: galleryBlocks.map((block, i) => (jsx(ProductGalleryBlock, { block: block, context: context }, String(i)))) }) }));
1726
+ });
1727
+
1728
+ const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
1729
+
1730
+ const STEPS_BLOCK_STYLE_MAPS = {
1731
+ primary: {
1732
+ background: 'bg-white',
1733
+ title: 'text-primary-text',
1734
+ description: 'text-secondary-text',
1735
+ iconText: 'text-secondary-text',
1736
+ iconBackground: 'bg-main-divider',
1737
+ iconConnector: 'bg-secondary-light',
1738
+ },
1739
+ secondary: {
1740
+ background: 'bg-primary-main',
1741
+ title: 'text-white',
1742
+ description: 'text-white/80',
1743
+ iconText: 'text-white',
1744
+ iconBackground: 'bg-white/30',
1745
+ iconConnector: 'bg-white',
1746
+ },
1747
+ };
1748
+
1749
+ const STEPS_SIZE_MAP = {
1750
+ normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
1751
+ small: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]',
1752
+ };
1753
+ const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
1754
+ normal: 'min-h-[70px]',
1755
+ small: 'min-h-[50px]',
1756
+ };
1757
+ const StepsBlock = JSX(({ className, title, description, showLines = true, steps, size = 'normal', version = 'primary', }) => {
1758
+ const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
1759
+ return (jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
1682
1760
  ${styleMap.background} ${styleMap.title} ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${styleMap.title}`, title: title })) : null, description ? (jsx("p", { className: `text-m-light text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? (jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStepTitle(size, version, showLines)) }) })) : null] }));
1683
- });
1684
- const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
1685
- const isLastStep = steps.length - 1 === i;
1686
- const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
1687
- const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
1688
- return (jsx("div", { children: jsxs("div", { className: "flex flex-row text-center relative", children: [jsxs("div", { className: "overflow-hidden", children: [renderIconArea(size, version)(step, i), isLastStep ? null : (jsx("div", { className: `min-h-8 h-full w-[2px] ${showLines ? styleMap.iconConnector : ''} ${margin}` }))] }), jsxs("div", { className: `flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`, children: [step.label ? (jsx("div", { className: "text-m-title-xs font-medium m-0 text-left mb-1", children: step.label })) : null, step.description ? (jsx("div", { className: `text-s ${styleMap.description} text-left`, children: step.description })) : null] })] }) }, String(i)));
1689
- };
1690
- const renderIconArea = (size, version) => (step, i) => {
1691
- const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
1692
- const iconAreaSize = STEPS_SIZE_MAP[size];
1693
- const iconSize = size === 'normal' ? '38' : '27';
1694
- const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
1695
- return (jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: jsx("span", { className: `font-medium flex self-center ${styleMap.title} ${iconTextSize}`, children: checkIsIconRenderable(step?.icon) ? (jsx(Img, { image: step.icon, width: iconSize, height: iconSize, asSVG: true })) : (jsx("span", { children: i + 1 })) }) }));
1696
- };
1697
-
1698
- const TableTileHeader = JSX(({ title, icon }) => {
1699
- return (jsxs("div", { className: "flex gap-2.5 mb-2", children: [title ? jsx(Heading, { headingType: "h3", className: "font-medium", title: title }) : null, icon ? (jsx(Img, { className: "ml-auto max-w-6 max-h-6", image: icon, width: "24px", height: "24px" })) : null] }));
1700
- });
1701
-
1702
- const getButtonAriaLabel = (icon) => icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
1703
-
1704
- const TariffsTableTileCell = JSX(({ header, data }) => {
1705
- return (jsxs("div", { className: "rounded-md border-main-stroke h-full box-border border p-4", children: [jsx(TableTileHeader, { ...header }), data?.length ? data.map(renderCellInner) : null] }));
1706
- });
1707
- const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? jsx("div", { className: "text-s m-0", children: label }) : null, description ? jsx("div", { className: "text-s text-secondary-text mt-[3px]", children: description }) : null, list?.items?.length ? renderList(list) : null, image ? jsx(Img, { image: { ...image, className: 'm-0' } }) : null, buttons?.length ? renderButtons(buttons) : null] }, String(i)));
1708
- const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-s", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
1709
- const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps, "aria-label": icon }, String(idx)))) }));
1710
-
1711
- const TariffsTableHorizontal = JSX(({ tiles, context }) => (jsx(SwipeListControl, { context: context, children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
1712
-
1713
- const TariffsTableVertical = JSX(({ tiles }) => (jsx("div", { className: "flex flex-col gap-3.5", children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
1714
-
1715
- const TariffsTable = JSX(({ className, context, title, description, columns, rowHeaders, orientation = 'vertical' }) => {
1716
- const colData = getColData(columns);
1717
- const tiles = getTiles(rowHeaders, colData);
1718
- const headingMargin = description ? 'mb-2' : 'mb-5';
1719
- return (jsxs("section", { className: `px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `text-center ${headingMargin}`, title: title })) : null, description ? jsx("div", { className: "mb-5 text-center text-m", children: description }) : null, tiles?.length ? renderOrientationTable(orientation, tiles, context) : null] }));
1720
- });
1721
- function renderOrientationTable(orientation, tiles, context) {
1722
- return orientation === 'vertical' ? (jsx(TariffsTableVertical, { tiles: tiles })) : (jsx(TariffsTableHorizontal, { context: context, tiles: tiles }));
1723
- }
1724
- const getColData = (columns) => columns?.[0].data ? columns[0].data : [];
1725
- const getTiles = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
1726
- header,
1727
- data: colData?.[i] || [{}],
1728
- }));
1729
-
1730
- const Blocks = {
1731
- Accordion,
1732
- ComparisonTable,
1733
- ExchangeRateTile,
1734
- Footer,
1735
- Gallery,
1736
- Header,
1737
- Headline,
1738
- LinkDocs,
1739
- LinkList,
1740
- MobileAppTile,
1741
- ProductBlock,
1742
- ProductGallery,
1743
- StepsBlock,
1744
- TariffsTable,
1745
- TextBlock,
1746
- Placeholder,
1747
- };
1748
-
1749
- const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
1750
- const renderLikeIcon = () => {
1751
- const params = {
1752
- stroke: '#292D32',
1753
- strokeLinecap: 'round',
1754
- strokeLinejoin: 'round',
1755
- strokeWidth: '1.5',
1756
- };
1757
- return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10",
1758
- /* eslint-disable max-len */
1759
- d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
1760
- };
1761
-
1762
- const LikeControl = JSX(({ className, context, ...rest }) => {
1763
- const likeService = context.useLikeService();
1764
- return (jsxs(BlockWrapper, { tag: "div", context: context, className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, ...rest, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
1765
- });
1766
-
1767
- const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1768
- const ContentPage = JSX(({ className = '', context, blocksRegistry, data = {}, blockDecorator = defaultBlockDecorator, }) => {
1769
- const { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' } = data;
1770
- const { header } = slots;
1771
- return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, page: data, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context, page: data }, i)) })) : null, likeControl ? (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") })) : null] }));
1772
- });
1773
- function renderBlock({ block, blockDecorator, blocksRegistry, context, page }, i) {
1774
- const { type } = block;
1775
- if (!(type && type in blocksRegistry)) {
1776
- console.warn(`No block with "${type}" is registered`);
1777
- }
1778
- const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
1779
- return blockDecorator({
1780
- blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
1781
- block,
1782
- render: (props) => {
1783
- const { version, content, anchor, labels } = props.block;
1784
- return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, page: page, anchor: anchor, labels: labels, ...content }, `${type}-${i}`));
1785
- },
1786
- }, `block-${i}`);
1787
- }
1788
-
1789
- function joinList(sep) {
1790
- return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
1791
- }
1792
-
1793
- exports.Blocks = Blocks;
1794
- exports.ContentPage = ContentPage;
1795
- exports.DaDataAPI = DaDataAPI;
1796
- exports.LikeAPI = LikeAPI;
1797
- exports.joinList = joinList;
1798
- exports.projectSettings = projectSettings;
1799
- exports.setup = setup;
1800
- exports.url = url;
1801
-
1802
- Object.defineProperty(exports, '__esModule', { value: true });
1761
+ });
1762
+ const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
1763
+ const isLastStep = steps.length - 1 === i;
1764
+ const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
1765
+ const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
1766
+ return (jsx("div", { children: jsxs("div", { className: "flex flex-row text-center relative", children: [jsxs("div", { className: "overflow-hidden", children: [renderIconArea(size, version)(step, i), isLastStep ? null : (jsx("div", { className: `min-h-8 h-full w-[2px] ${showLines ? styleMap.iconConnector : ''} ${margin}` }))] }), jsxs("div", { className: `flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`, children: [step.label ? (jsx("div", { className: "text-m-title-xs font-medium m-0 text-left mb-1", children: step.label })) : null, step.description ? (jsx("div", { className: `text-s ${styleMap.description} text-left`, children: step.description })) : null] })] }) }, String(i)));
1767
+ };
1768
+ const renderIconArea = (size, version) => (step, i) => {
1769
+ const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
1770
+ const iconAreaSize = STEPS_SIZE_MAP[size];
1771
+ const iconSize = size === 'normal' ? '38' : '27';
1772
+ const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
1773
+ return (jsx("div", { className: `${iconAreaSize} ${styleMap.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: jsx("span", { className: `font-medium flex self-center ${styleMap.title} ${iconTextSize}`, children: checkIsIconRenderable(step?.icon) ? (jsx(Img, { image: step.icon, width: iconSize, height: iconSize, asSVG: true })) : (jsx("span", { children: i + 1 })) }) }));
1774
+ };
1775
+
1776
+ const TableTileHeader = JSX(({ title, icon }) => {
1777
+ return (jsxs("div", { className: "flex gap-2.5 mb-2", children: [title ? jsx(Heading, { headingType: "h3", className: "font-medium", title: title }) : null, icon ? (jsx(Img, { className: "ml-auto max-w-6 max-h-6", image: icon, width: "24px", height: "24px" })) : null] }));
1778
+ });
1779
+
1780
+ const getButtonAriaLabel = (icon) => icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
1781
+
1782
+ const TariffsTableTileCell = JSX(({ header, data }) => {
1783
+ return (jsxs("div", { className: "rounded-md border-main-stroke h-full box-border border p-4", children: [jsx(TableTileHeader, { ...header }), data?.length ? data.map(renderCellInner) : null] }));
1784
+ });
1785
+ const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? jsx("div", { className: "text-s m-0", children: label }) : null, description ? jsx("div", { className: "text-s text-secondary-text mt-[3px]", children: description }) : null, list?.items?.length ? renderList(list) : null, image ? jsx(Img, { image: { ...image, className: 'm-0' } }) : null, buttons?.length ? renderButtons(buttons) : null] }, String(i)));
1786
+ const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-s", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
1787
+ const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps, "aria-label": icon }, String(idx)))) }));
1788
+
1789
+ const TariffsTableHorizontal = JSX(({ tiles, context }) => (jsx(SwipeListControl, { context: context, children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
1790
+
1791
+ const TariffsTableVertical = JSX(({ tiles }) => (jsx("div", { className: "flex flex-col gap-3.5", children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
1792
+
1793
+ const TariffsTable = JSX(({ className, context, title, description, columns, rowHeaders, orientation = 'vertical' }) => {
1794
+ const colData = getColData(columns);
1795
+ const tiles = getTiles(rowHeaders, colData);
1796
+ const headingMargin = description ? 'mb-2' : 'mb-5';
1797
+ return (jsxs("section", { className: `px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${className}`, children: [title ? (jsx(Heading, { headingType: "h2", className: `text-center ${headingMargin}`, title: title })) : null, description ? jsx("div", { className: "mb-5 text-center text-m", children: description }) : null, tiles?.length ? renderOrientationTable(orientation, tiles, context) : null] }));
1798
+ });
1799
+ function renderOrientationTable(orientation, tiles, context) {
1800
+ return orientation === 'vertical' ? (jsx(TariffsTableVertical, { tiles: tiles })) : (jsx(TariffsTableHorizontal, { context: context, tiles: tiles }));
1801
+ }
1802
+ const getColData = (columns) => columns?.[0].data ? columns[0].data : [];
1803
+ const getTiles = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
1804
+ header,
1805
+ data: colData?.[i] || [{}],
1806
+ }));
1807
+
1808
+ const Blocks = {
1809
+ Accordion,
1810
+ ComparisonTable,
1811
+ ExchangeRateTile,
1812
+ Footer,
1813
+ Gallery,
1814
+ Header,
1815
+ Headline,
1816
+ LinkDocs,
1817
+ LinkList,
1818
+ MobileAppTile,
1819
+ ProductBlock,
1820
+ ProductGallery,
1821
+ StepsBlock,
1822
+ TariffsTable,
1823
+ TextBlock,
1824
+ Placeholder,
1825
+ };
1826
+
1827
+ const api = LikeAPI();
1828
+ function useLikeService(pagePath) {
1829
+ const [likeCount, setLikeCount] = useState(0);
1830
+ useEffect(() => {
1831
+ (async () => {
1832
+ const [likeData] = await api.getLikeCount(pagePath);
1833
+ setLikeCount(likeData?.value || 0);
1834
+ })();
1835
+ }, [pagePath]);
1836
+ const like = useCallback(async () => {
1837
+ setLikeCount(await api.like(pagePath));
1838
+ }, [pagePath]);
1839
+ const dislike = useCallback(async () => {
1840
+ setLikeCount(await api.dislike(pagePath));
1841
+ }, [pagePath]);
1842
+ return {
1843
+ likeCount,
1844
+ like,
1845
+ dislike,
1846
+ };
1847
+ }
1848
+
1849
+ const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
1850
+ const renderLikeIcon = () => {
1851
+ const params = {
1852
+ stroke: '#292D32',
1853
+ strokeLinecap: 'round',
1854
+ strokeLinejoin: 'round',
1855
+ strokeWidth: '1.5',
1856
+ };
1857
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("path", { ...params, strokeMiterlimit: "10",
1858
+ /* eslint-disable max-len */
1859
+ d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
1860
+ };
1861
+
1862
+ const LikeControl = JSX(({ className, context, ...rest }) => {
1863
+ const { useRouter, handlerDecorator = defaultHandlerDecorator } = context;
1864
+ const router = useRouter();
1865
+ const likeService = useLikeService(router.pathname);
1866
+ return (jsxs(BlockWrapper, { tag: "div", context: context, className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, ...rest, children: [jsx(LikeButton, { onClick: handlerDecorator(likeService.like), ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: handlerDecorator(likeService.dislike), className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
1867
+ });
1868
+
1869
+ const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1870
+ const ContentPage = JSX(({ className = '', context, blocksRegistry, data = {}, blockDecorator = defaultBlockDecorator, }) => {
1871
+ const { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' } = data;
1872
+ const { header } = slots;
1873
+ return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, page: data, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context, page: data }, i)) })) : null, likeControl ? (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") })) : null] }));
1874
+ });
1875
+ function renderBlock({ block, blockDecorator, blocksRegistry, context, page }, i) {
1876
+ const { type } = block;
1877
+ if (!(type && type in blocksRegistry)) {
1878
+ console.warn(`No block with "${type}" is registered`);
1879
+ }
1880
+ const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
1881
+ return blockDecorator({
1882
+ blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
1883
+ block,
1884
+ render: (props) => {
1885
+ const { version, content, anchor, labels } = props.block;
1886
+ return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, page: page, anchor: anchor, labels: labels, ...content }, `${type}-${i}`));
1887
+ },
1888
+ }, `block-${i}`);
1889
+ }
1890
+
1891
+ function joinList(sep) {
1892
+ return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
1893
+ }
1894
+
1895
+ exports.Blocks = Blocks;
1896
+ exports.ContentPage = ContentPage;
1897
+ exports.DaDataAPI = DaDataAPI;
1898
+ exports.LikeAPI = LikeAPI;
1899
+ exports.joinList = joinList;
1900
+ exports.projectSettings = projectSettings;
1901
+ exports.setup = setup;
1902
+ exports.setupHooks = setupHooks;
1903
+ exports.url = url;
1904
+
1905
+ Object.defineProperty(exports, '__esModule', { value: true });
1803
1906
 
1804
1907
  }));