@redneckz/wildless-cms-uni-blocks 0.3.70 → 0.3.71

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 (1071) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +388 -416
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
  5. package/dist/components/Blocks.d.ts +0 -1
  6. package/dist/components/Blocks.js +0 -2
  7. package/dist/components/Blocks.js.map +1 -1
  8. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  9. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  10. package/dist/components/Calculator/Calculator.js +7 -3
  11. package/dist/components/Calculator/Calculator.js.map +1 -1
  12. package/dist/components/Calculator/getCalculatorParams.js +2 -1
  13. package/dist/components/Calculator/getCalculatorParams.js.map +1 -1
  14. package/dist/components/Calculator/getCreditRate.js +2 -1
  15. package/dist/components/Calculator/getCreditRate.js.map +1 -1
  16. package/dist/components/Calculator/getMonthlyPayment.js +2 -1
  17. package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
  18. package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  19. package/dist/components/ComparisonTable/HeaderCell.mobile.js +4 -2
  20. package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
  21. package/dist/components/ComparisonTable/TableCell.js +3 -1
  22. package/dist/components/ComparisonTable/TableCell.js.map +1 -1
  23. package/dist/components/ComparisonTable/TableCell.mobile.js +3 -1
  24. package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
  25. package/dist/components/ComparisonTable/TableRow.js +2 -1
  26. package/dist/components/ComparisonTable/TableRow.js.map +1 -1
  27. package/dist/components/ContentPage/ContentPageContext.d.ts +14 -3
  28. package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  29. package/dist/components/ExchangeRateTile/CurrencyProps.js +9 -0
  30. package/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  31. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  32. package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  33. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  34. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  35. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +68 -9
  36. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  37. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  38. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  39. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  40. package/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  41. package/dist/components/ExchangeRateTile/calculateResult.js +11 -0
  42. package/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
  43. package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  44. package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +17 -0
  45. package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  46. package/dist/components/ExchangeRateTile/formatCurrency.js +5 -1
  47. package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  48. package/dist/components/ExchangeRateTile/renderButton.d.ts +1 -0
  49. package/dist/components/ExchangeRateTile/renderButton.js +9 -0
  50. package/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
  51. package/dist/components/ExchangeRateTile/renderInput.d.ts +12 -0
  52. package/dist/components/ExchangeRateTile/renderInput.js +12 -0
  53. package/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
  54. package/dist/components/Footer/Footer.js +1 -1
  55. package/dist/components/Footer/Footer.js.map +1 -1
  56. package/dist/components/Footer/MediaButton.js +4 -13
  57. package/dist/components/Footer/MediaButton.js.map +1 -1
  58. package/dist/components/Footer/TextInformation.js +1 -1
  59. package/dist/components/Footer/TextInformation.js.map +1 -1
  60. package/dist/components/Gallery/Gallery.mobile.js +2 -2
  61. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  62. package/dist/components/Gallery/GalleryCardInner.js +2 -2
  63. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  64. package/dist/components/Gallery/GalleryInner.js +7 -2
  65. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  66. package/dist/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  67. package/dist/components/GroupBlock/GroupBlock.js +3 -3
  68. package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
  69. package/dist/components/GroupBlock/GroupBlockTabs.js +2 -2
  70. package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  71. package/dist/components/GroupBlock/GroupBlocksItem.js +1 -1
  72. package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  73. package/dist/components/Header/DropdownMenu.d.ts +13 -0
  74. package/dist/components/Header/DropdownMenu.js +18 -0
  75. package/dist/components/Header/DropdownMenu.js.map +1 -0
  76. package/dist/components/Header/HeaderSubMenu.js +19 -32
  77. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  78. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +8 -4
  79. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  80. package/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  81. package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  82. package/dist/components/Placeholder/Placeholder.js +1 -1
  83. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  84. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  85. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  86. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  87. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  88. package/dist/components/ProductTile/ProductTile.js +2 -2
  89. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  90. package/dist/components/Recommendation/Recommendation.js +7 -2
  91. package/dist/components/Recommendation/Recommendation.js.map +1 -1
  92. package/dist/components/Tile/Tile.js +4 -4
  93. package/dist/components/Tile/Tile.js.map +1 -1
  94. package/dist/components/Tile/TileContent.d.ts +5 -0
  95. package/dist/content-page-repository/mapJSON.d.ts +1 -1
  96. package/dist/content-page-repository/mapJSON.js +9 -7
  97. package/dist/content-page-repository/mapJSON.js.map +1 -1
  98. package/dist/content-page-repository/transformMarkdown.js +2 -1
  99. package/dist/content-page-repository/transformMarkdown.js.map +1 -1
  100. package/dist/content-page-repository/transformPicture.js +6 -3
  101. package/dist/content-page-repository/transformPicture.js.map +1 -1
  102. package/dist/hooks/useCreditCalculatorData.d.ts +1 -2
  103. package/dist/hooks/useCreditCalculatorData.js.map +1 -1
  104. package/dist/hooks/useExchangeRates.d.ts +2 -8
  105. package/dist/hooks/useExchangeRates.js +52 -3
  106. package/dist/hooks/useExchangeRates.js.map +1 -1
  107. package/dist/hooks/useTableArrowScrollControl.js +3 -3
  108. package/dist/hooks/useTableArrowScrollControl.js.map +1 -1
  109. package/dist/react/IntersectionObserverTag.d.ts +3 -0
  110. package/dist/react/IntersectionObserverTag.js +17 -0
  111. package/dist/react/IntersectionObserverTag.js.map +1 -0
  112. package/dist/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  113. package/{mobile/dist → dist/react}/setup-fixture.js +3 -1
  114. package/dist/react/setup-fixture.js.map +1 -0
  115. package/dist/services/sitemap/isHrefActive.d.ts +1 -1
  116. package/dist/services/sitemap/isHrefActive.js +1 -1
  117. package/dist/services/sitemap/isHrefActive.js.map +1 -1
  118. package/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
  119. package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
  120. package/dist/ui-kit/Button/ButtonSection.js +2 -1
  121. package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  122. package/dist/ui-kit/Button/renderArrows.d.ts +10 -0
  123. package/dist/ui-kit/Button/renderArrows.js +9 -0
  124. package/dist/ui-kit/Button/renderArrows.js.map +1 -0
  125. package/dist/ui-kit/Img/Img.mobile.js +1 -1
  126. package/dist/ui-kit/Img/Img.mobile.js.map +1 -1
  127. package/dist/ui-kit/Input/Input.js +6 -2
  128. package/dist/ui-kit/Input/Input.js.map +1 -1
  129. package/dist/ui-kit/Input/InputProps.d.ts +3 -0
  130. package/dist/ui-kit/InputRange/InputRange.js +10 -6
  131. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  132. package/dist/ui-kit/SVG.js +1 -1
  133. package/dist/ui-kit/SVG.js.map +1 -1
  134. package/dist/ui-kit/SearchBar.mobile.js +1 -1
  135. package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
  136. package/dist/ui-kit/Select/Select.d.ts +2 -0
  137. package/dist/ui-kit/Select/Select.js +2 -2
  138. package/dist/ui-kit/Select/Select.js.map +1 -1
  139. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  140. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  141. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  142. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  143. package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  144. package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  145. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +9 -3
  146. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  147. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  148. package/dist/ui-kit/Tabs/Tabs.js +2 -1
  149. package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
  150. package/dist/ui-kit/TopItem/TopItem.js +6 -8
  151. package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  152. package/dist/utils/changeHashOnScroll.js +2 -1
  153. package/dist/utils/changeHashOnScroll.js.map +1 -1
  154. package/dist/utils/getCurrentDate.js +1 -1
  155. package/dist/utils/roundTo.d.ts +1 -0
  156. package/dist/utils/roundTo.js +8 -0
  157. package/dist/utils/roundTo.js.map +1 -0
  158. package/lib/common.css +1 -1
  159. package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
  160. package/lib/components/Blocks.d.ts +0 -1
  161. package/lib/components/Blocks.js +0 -2
  162. package/lib/components/Blocks.js.map +1 -1
  163. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  164. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  165. package/lib/components/Calculator/Calculator.js +8 -4
  166. package/lib/components/Calculator/Calculator.js.map +1 -1
  167. package/lib/components/Calculator/getCalculatorParams.js +2 -1
  168. package/lib/components/Calculator/getCalculatorParams.js.map +1 -1
  169. package/lib/components/Calculator/getCreditRate.js +2 -1
  170. package/lib/components/Calculator/getCreditRate.js.map +1 -1
  171. package/lib/components/Calculator/getMonthlyPayment.js +2 -1
  172. package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
  173. package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  174. package/lib/components/ComparisonTable/HeaderCell.mobile.js +4 -2
  175. package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
  176. package/lib/components/ComparisonTable/TableCell.js +3 -1
  177. package/lib/components/ComparisonTable/TableCell.js.map +1 -1
  178. package/lib/components/ComparisonTable/TableCell.mobile.js +3 -1
  179. package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
  180. package/lib/components/ComparisonTable/TableRow.js +2 -1
  181. package/lib/components/ComparisonTable/TableRow.js.map +1 -1
  182. package/lib/components/ContentPage/ContentPageContext.d.ts +14 -3
  183. package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  184. package/lib/components/ExchangeRateTile/CurrencyProps.js +7 -0
  185. package/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  186. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  187. package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  188. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  189. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  190. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +69 -10
  191. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  192. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  193. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  194. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  195. package/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  196. package/lib/components/ExchangeRateTile/calculateResult.js +7 -0
  197. package/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
  198. package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  199. package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +14 -0
  200. package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  201. package/lib/components/ExchangeRateTile/formatCurrency.js +5 -1
  202. package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  203. package/lib/components/ExchangeRateTile/renderButton.d.ts +1 -0
  204. package/lib/components/ExchangeRateTile/renderButton.js +6 -0
  205. package/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
  206. package/lib/components/ExchangeRateTile/renderInput.d.ts +12 -0
  207. package/lib/components/ExchangeRateTile/renderInput.js +9 -0
  208. package/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
  209. package/lib/components/Footer/Footer.js +1 -1
  210. package/lib/components/Footer/Footer.js.map +1 -1
  211. package/lib/components/Footer/MediaButton.js +4 -13
  212. package/lib/components/Footer/MediaButton.js.map +1 -1
  213. package/lib/components/Footer/TextInformation.js +1 -1
  214. package/lib/components/Footer/TextInformation.js.map +1 -1
  215. package/lib/components/Gallery/Gallery.mobile.js +2 -2
  216. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  217. package/lib/components/Gallery/GalleryCardInner.js +2 -2
  218. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  219. package/lib/components/Gallery/GalleryInner.js +7 -2
  220. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  221. package/lib/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  222. package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +1 -0
  223. package/lib/components/GroupBlock/GroupBlock.js +3 -3
  224. package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
  225. package/lib/components/GroupBlock/GroupBlockTabs.js +2 -2
  226. package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  227. package/lib/components/GroupBlock/GroupBlocksItem.js +1 -1
  228. package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  229. package/lib/components/Header/DropdownMenu.d.ts +13 -0
  230. package/lib/components/Header/DropdownMenu.js +16 -0
  231. package/lib/components/Header/DropdownMenu.js.map +1 -0
  232. package/lib/components/Header/HeaderSubMenu.js +19 -32
  233. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  234. package/lib/components/Headline/Headline.fixture.d.ts +9 -3
  235. package/lib/components/Headline/Headline.fixture.mobile.d.ts +13 -3
  236. package/lib/components/Insurance/Insurance.fixture.d.ts +2 -1
  237. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +8 -4
  238. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  239. package/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  240. package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  241. package/lib/components/Placeholder/Placeholder.js +1 -1
  242. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  243. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +10 -2
  244. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  245. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  246. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  247. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  248. package/lib/components/ProductTile/ProductTile.js +2 -2
  249. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  250. package/lib/components/Recommendation/Recommendation.fixture.d.ts +3 -0
  251. package/lib/components/Recommendation/Recommendation.js +7 -2
  252. package/lib/components/Recommendation/Recommendation.js.map +1 -1
  253. package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +7 -1
  254. package/lib/components/TextBlock/TextBlock.fixture.d.ts +3 -1
  255. package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +3 -1
  256. package/lib/components/Tile/Tile.js +4 -4
  257. package/lib/components/Tile/Tile.js.map +1 -1
  258. package/lib/components/Tile/TileContent.d.ts +5 -0
  259. package/lib/content-page-repository/mapJSON.d.ts +1 -1
  260. package/lib/content-page-repository/mapJSON.js +9 -7
  261. package/lib/content-page-repository/mapJSON.js.map +1 -1
  262. package/lib/content-page-repository/transformMarkdown.js +2 -1
  263. package/lib/content-page-repository/transformMarkdown.js.map +1 -1
  264. package/lib/content-page-repository/transformPicture.js +6 -3
  265. package/lib/content-page-repository/transformPicture.js.map +1 -1
  266. package/lib/hooks/useCreditCalculatorData.d.ts +1 -2
  267. package/lib/hooks/useCreditCalculatorData.js.map +1 -1
  268. package/lib/hooks/useExchangeRates.d.ts +2 -8
  269. package/lib/hooks/useExchangeRates.js +52 -3
  270. package/lib/hooks/useExchangeRates.js.map +1 -1
  271. package/lib/hooks/useTableArrowScrollControl.js +3 -3
  272. package/lib/hooks/useTableArrowScrollControl.js.map +1 -1
  273. package/lib/react/IntersectionObserverTag.d.ts +3 -0
  274. package/lib/react/IntersectionObserverTag.js +14 -0
  275. package/lib/react/IntersectionObserverTag.js.map +1 -0
  276. package/lib/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  277. package/{mobile/lib → lib/react}/setup-fixture.js +3 -1
  278. package/lib/react/setup-fixture.js.map +1 -0
  279. package/lib/services/sitemap/isHrefActive.d.ts +1 -1
  280. package/lib/services/sitemap/isHrefActive.js +1 -1
  281. package/lib/services/sitemap/isHrefActive.js.map +1 -1
  282. package/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
  283. package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
  284. package/lib/ui-kit/Button/Button.fixture.d.ts +1 -1
  285. package/lib/ui-kit/Button/Button.fixture.mobile.d.ts +1 -1
  286. package/lib/ui-kit/Button/ButtonSection.js +2 -1
  287. package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  288. package/lib/ui-kit/Button/renderArrows.d.ts +10 -0
  289. package/lib/ui-kit/Button/renderArrows.js +6 -0
  290. package/lib/ui-kit/Button/renderArrows.js.map +1 -0
  291. package/lib/ui-kit/HeaderItem/HeaderItem.fixture.d.ts +1 -1
  292. package/lib/ui-kit/Icon/Icon.fixture.d.ts +1 -1
  293. package/lib/ui-kit/Img/Img.mobile.js +1 -1
  294. package/lib/ui-kit/Img/Img.mobile.js.map +1 -1
  295. package/lib/ui-kit/Input/Input.js +6 -2
  296. package/lib/ui-kit/Input/Input.js.map +1 -1
  297. package/lib/ui-kit/Input/InputProps.d.ts +3 -0
  298. package/lib/ui-kit/InputRange/InputRange.js +10 -6
  299. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  300. package/lib/ui-kit/List/List.fixture.d.ts +1 -1
  301. package/lib/ui-kit/Logo/Logo.fixture.d.ts +1 -1
  302. package/lib/ui-kit/SVG.js +1 -1
  303. package/lib/ui-kit/SVG.js.map +1 -1
  304. package/lib/ui-kit/SearchBar.mobile.js +1 -1
  305. package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
  306. package/lib/ui-kit/Select/Select.d.ts +2 -0
  307. package/lib/ui-kit/Select/Select.js +2 -2
  308. package/lib/ui-kit/Select/Select.js.map +1 -1
  309. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  310. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  311. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  312. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  313. package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  314. package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  315. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +10 -4
  316. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  317. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  318. package/lib/ui-kit/Tabs/Tabs.js +2 -1
  319. package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
  320. package/lib/ui-kit/TopItem/TopItem.fixture.d.ts +1 -1
  321. package/lib/ui-kit/TopItem/TopItem.js +6 -8
  322. package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  323. package/lib/utils/changeHashOnScroll.js +2 -1
  324. package/lib/utils/changeHashOnScroll.js.map +1 -1
  325. package/lib/utils/getCurrentDate.js +1 -1
  326. package/lib/utils/roundTo.d.ts +1 -0
  327. package/lib/utils/roundTo.js +5 -0
  328. package/lib/utils/roundTo.js.map +1 -0
  329. package/mobile/bundle/bundle.umd.js +214 -69
  330. package/mobile/bundle/bundle.umd.min.js +1 -1
  331. package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
  332. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  333. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  334. package/mobile/dist/components/Calculator/Calculator.js +7 -3
  335. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  336. package/mobile/dist/components/Calculator/getCalculatorParams.js +2 -1
  337. package/mobile/dist/components/Calculator/getCalculatorParams.js.map +1 -1
  338. package/mobile/dist/components/Calculator/getCreditRate.js +2 -1
  339. package/mobile/dist/components/Calculator/getCreditRate.js.map +1 -1
  340. package/mobile/dist/components/Calculator/getMonthlyPayment.js +2 -1
  341. package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
  342. package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  343. package/mobile/dist/components/ComparisonTable/HeaderCell.js +4 -2
  344. package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  345. package/mobile/dist/components/ComparisonTable/TableCell.js +3 -1
  346. package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
  347. package/mobile/dist/components/ComparisonTable/TableRow.js +2 -1
  348. package/mobile/dist/components/ComparisonTable/TableRow.js.map +1 -1
  349. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +14 -3
  350. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  351. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +9 -0
  352. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  353. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  354. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  355. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  356. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  357. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +68 -9
  358. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  359. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  360. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  361. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  362. package/mobile/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  363. package/mobile/dist/components/ExchangeRateTile/calculateResult.js +11 -0
  364. package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
  365. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  366. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +17 -0
  367. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  368. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +5 -1
  369. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  370. package/mobile/dist/components/ExchangeRateTile/renderButton.d.ts +1 -0
  371. package/mobile/dist/components/ExchangeRateTile/renderButton.js +9 -0
  372. package/mobile/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
  373. package/mobile/dist/components/ExchangeRateTile/renderInput.d.ts +12 -0
  374. package/mobile/dist/components/ExchangeRateTile/renderInput.js +12 -0
  375. package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
  376. package/mobile/dist/components/Footer/MediaButton.js +4 -13
  377. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  378. package/mobile/dist/components/Gallery/Gallery.js +2 -2
  379. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  380. package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
  381. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  382. package/mobile/dist/components/Gallery/GalleryInner.js +7 -2
  383. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  384. package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  385. package/mobile/dist/components/GroupBlock/GroupBlock.js +3 -3
  386. package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
  387. package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +2 -2
  388. package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  389. package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +1 -1
  390. package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  391. package/mobile/dist/components/Header/DropdownMenu.d.ts +13 -0
  392. package/mobile/dist/components/Header/DropdownMenu.js +18 -0
  393. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -0
  394. package/mobile/dist/components/Header/HeaderSubMenu.js +19 -32
  395. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  396. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +8 -4
  397. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  398. package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  399. package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  400. package/mobile/dist/components/Placeholder/Placeholder.js +1 -1
  401. package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
  402. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  403. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  404. package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
  405. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  406. package/mobile/dist/components/Recommendation/Recommendation.js +7 -2
  407. package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
  408. package/mobile/dist/components/Tile/Tile.js +4 -4
  409. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  410. package/mobile/dist/components/Tile/TileContent.d.ts +5 -0
  411. package/mobile/dist/content-page-repository/mapJSON.d.ts +1 -1
  412. package/mobile/dist/content-page-repository/mapJSON.js +9 -7
  413. package/mobile/dist/content-page-repository/mapJSON.js.map +1 -1
  414. package/mobile/dist/content-page-repository/transformMarkdown.js +2 -1
  415. package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
  416. package/mobile/dist/content-page-repository/transformPicture.js +6 -3
  417. package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
  418. package/mobile/dist/hooks/useCreditCalculatorData.d.ts +1 -2
  419. package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
  420. package/mobile/dist/hooks/useExchangeRates.d.ts +2 -8
  421. package/mobile/dist/hooks/useExchangeRates.js +52 -3
  422. package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
  423. package/mobile/dist/hooks/useTableArrowScrollControl.js +3 -3
  424. package/mobile/dist/hooks/useTableArrowScrollControl.js.map +1 -1
  425. package/mobile/dist/react/IntersectionObserverTag.d.ts +3 -0
  426. package/mobile/dist/react/IntersectionObserverTag.js +17 -0
  427. package/mobile/dist/react/IntersectionObserverTag.js.map +1 -0
  428. package/mobile/dist/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  429. package/{dist → mobile/dist/react}/setup-fixture.js +3 -1
  430. package/mobile/dist/react/setup-fixture.js.map +1 -0
  431. package/mobile/dist/services/sitemap/isHrefActive.d.ts +1 -1
  432. package/mobile/dist/services/sitemap/isHrefActive.js +1 -1
  433. package/mobile/dist/services/sitemap/isHrefActive.js.map +1 -1
  434. package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
  435. package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
  436. package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -1
  437. package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  438. package/mobile/dist/ui-kit/Button/renderArrows.d.ts +10 -0
  439. package/mobile/dist/ui-kit/Button/renderArrows.js +9 -0
  440. package/mobile/dist/ui-kit/Button/renderArrows.js.map +1 -0
  441. package/mobile/dist/ui-kit/Img/Img.js +1 -1
  442. package/mobile/dist/ui-kit/Img/Img.js.map +1 -1
  443. package/mobile/dist/ui-kit/Input/Input.js +6 -2
  444. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  445. package/mobile/dist/ui-kit/Input/InputProps.d.ts +3 -0
  446. package/mobile/dist/ui-kit/InputRange/InputRange.js +10 -6
  447. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  448. package/mobile/dist/ui-kit/SVG.js +1 -1
  449. package/mobile/dist/ui-kit/SVG.js.map +1 -1
  450. package/mobile/dist/ui-kit/Select/Select.d.ts +2 -0
  451. package/mobile/dist/ui-kit/Select/Select.js +2 -2
  452. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  453. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  454. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  455. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  456. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  457. package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  458. package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  459. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +9 -3
  460. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  461. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  462. package/mobile/dist/ui-kit/Tabs/Tabs.js +2 -1
  463. package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
  464. package/mobile/dist/ui-kit/TopItem/TopItem.js +6 -8
  465. package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  466. package/mobile/dist/utils/changeHashOnScroll.js +2 -1
  467. package/mobile/dist/utils/changeHashOnScroll.js.map +1 -1
  468. package/mobile/dist/utils/getCurrentDate.js +1 -1
  469. package/mobile/dist/utils/roundTo.d.ts +1 -0
  470. package/mobile/dist/utils/roundTo.js +8 -0
  471. package/mobile/dist/utils/roundTo.js.map +1 -0
  472. package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
  473. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  474. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  475. package/mobile/lib/components/Calculator/Calculator.js +8 -4
  476. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  477. package/mobile/lib/components/Calculator/getCalculatorParams.js +2 -1
  478. package/mobile/lib/components/Calculator/getCalculatorParams.js.map +1 -1
  479. package/mobile/lib/components/Calculator/getCreditRate.js +2 -1
  480. package/mobile/lib/components/Calculator/getCreditRate.js.map +1 -1
  481. package/mobile/lib/components/Calculator/getMonthlyPayment.js +2 -1
  482. package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
  483. package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  484. package/mobile/lib/components/ComparisonTable/HeaderCell.js +4 -2
  485. package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  486. package/mobile/lib/components/ComparisonTable/TableCell.js +3 -1
  487. package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
  488. package/mobile/lib/components/ComparisonTable/TableRow.js +2 -1
  489. package/mobile/lib/components/ComparisonTable/TableRow.js.map +1 -1
  490. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +14 -3
  491. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  492. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +7 -0
  493. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  494. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  495. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  496. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  497. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  498. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +69 -10
  499. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  500. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  501. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  502. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  503. package/mobile/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  504. package/mobile/lib/components/ExchangeRateTile/calculateResult.js +7 -0
  505. package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
  506. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  507. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +14 -0
  508. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  509. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +5 -1
  510. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  511. package/mobile/lib/components/ExchangeRateTile/renderButton.d.ts +1 -0
  512. package/mobile/lib/components/ExchangeRateTile/renderButton.js +6 -0
  513. package/mobile/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
  514. package/mobile/lib/components/ExchangeRateTile/renderInput.d.ts +12 -0
  515. package/mobile/lib/components/ExchangeRateTile/renderInput.js +9 -0
  516. package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
  517. package/mobile/lib/components/Footer/MediaButton.js +4 -13
  518. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  519. package/mobile/lib/components/Gallery/Gallery.js +2 -2
  520. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  521. package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
  522. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  523. package/mobile/lib/components/Gallery/GalleryInner.js +7 -2
  524. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  525. package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  526. package/mobile/lib/components/GroupBlock/GroupBlock.js +3 -3
  527. package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
  528. package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +2 -2
  529. package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  530. package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +1 -1
  531. package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  532. package/mobile/lib/components/Header/DropdownMenu.d.ts +13 -0
  533. package/mobile/lib/components/Header/DropdownMenu.js +16 -0
  534. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -0
  535. package/mobile/lib/components/Header/HeaderSubMenu.js +19 -32
  536. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  537. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +8 -4
  538. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  539. package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  540. package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  541. package/mobile/lib/components/Placeholder/Placeholder.js +1 -1
  542. package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
  543. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  544. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  545. package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
  546. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  547. package/mobile/lib/components/Recommendation/Recommendation.js +7 -2
  548. package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
  549. package/mobile/lib/components/Tile/Tile.js +4 -4
  550. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  551. package/mobile/lib/components/Tile/TileContent.d.ts +5 -0
  552. package/mobile/lib/content-page-repository/mapJSON.d.ts +1 -1
  553. package/mobile/lib/content-page-repository/mapJSON.js +9 -7
  554. package/mobile/lib/content-page-repository/mapJSON.js.map +1 -1
  555. package/mobile/lib/content-page-repository/transformMarkdown.js +2 -1
  556. package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
  557. package/mobile/lib/content-page-repository/transformPicture.js +6 -3
  558. package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
  559. package/mobile/lib/hooks/useCreditCalculatorData.d.ts +1 -2
  560. package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
  561. package/mobile/lib/hooks/useExchangeRates.d.ts +2 -8
  562. package/mobile/lib/hooks/useExchangeRates.js +52 -3
  563. package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
  564. package/mobile/lib/hooks/useTableArrowScrollControl.js +3 -3
  565. package/mobile/lib/hooks/useTableArrowScrollControl.js.map +1 -1
  566. package/mobile/lib/react/IntersectionObserverTag.d.ts +3 -0
  567. package/mobile/lib/react/IntersectionObserverTag.js +14 -0
  568. package/mobile/lib/react/IntersectionObserverTag.js.map +1 -0
  569. package/mobile/lib/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  570. package/{lib → mobile/lib/react}/setup-fixture.js +3 -1
  571. package/mobile/lib/react/setup-fixture.js.map +1 -0
  572. package/mobile/lib/services/sitemap/isHrefActive.d.ts +1 -1
  573. package/mobile/lib/services/sitemap/isHrefActive.js +1 -1
  574. package/mobile/lib/services/sitemap/isHrefActive.js.map +1 -1
  575. package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
  576. package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
  577. package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -1
  578. package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  579. package/mobile/lib/ui-kit/Button/renderArrows.d.ts +10 -0
  580. package/mobile/lib/ui-kit/Button/renderArrows.js +6 -0
  581. package/mobile/lib/ui-kit/Button/renderArrows.js.map +1 -0
  582. package/mobile/lib/ui-kit/Img/Img.js +1 -1
  583. package/mobile/lib/ui-kit/Img/Img.js.map +1 -1
  584. package/mobile/lib/ui-kit/Input/Input.js +6 -2
  585. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  586. package/mobile/lib/ui-kit/Input/InputProps.d.ts +3 -0
  587. package/mobile/lib/ui-kit/InputRange/InputRange.js +10 -6
  588. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  589. package/mobile/lib/ui-kit/SVG.js +1 -1
  590. package/mobile/lib/ui-kit/SVG.js.map +1 -1
  591. package/mobile/lib/ui-kit/Select/Select.d.ts +2 -0
  592. package/mobile/lib/ui-kit/Select/Select.js +2 -2
  593. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  594. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  595. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  596. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  597. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  598. package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  599. package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  600. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +10 -4
  601. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  602. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  603. package/mobile/lib/ui-kit/Tabs/Tabs.js +2 -1
  604. package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
  605. package/mobile/lib/ui-kit/TopItem/TopItem.js +6 -8
  606. package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  607. package/mobile/lib/utils/changeHashOnScroll.js +2 -1
  608. package/mobile/lib/utils/changeHashOnScroll.js.map +1 -1
  609. package/mobile/lib/utils/getCurrentDate.js +1 -1
  610. package/mobile/lib/utils/roundTo.d.ts +1 -0
  611. package/mobile/lib/utils/roundTo.js +5 -0
  612. package/mobile/lib/utils/roundTo.js.map +1 -0
  613. package/mobile/src/components/Accordion/Accordion.tsx +1 -3
  614. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
  615. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +4 -8
  616. package/mobile/src/components/Calculator/Calculator.tsx +8 -22
  617. package/mobile/src/components/Calculator/getCalculatorParams.ts +3 -1
  618. package/mobile/src/components/Calculator/getCreditRate.ts +3 -1
  619. package/mobile/src/components/Calculator/getMonthlyPayment.ts +3 -1
  620. package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +0 -7
  621. package/mobile/src/components/ComparisonTable/HeaderCell.tsx +7 -13
  622. package/mobile/src/components/ComparisonTable/TableCell.tsx +7 -8
  623. package/mobile/src/components/ComparisonTable/TableRow.tsx +6 -9
  624. package/mobile/src/components/ContentPage/ContentPage.page.json +0 -5
  625. package/mobile/src/components/ContentPage/ContentPageContext.tsx +20 -4
  626. package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +5 -0
  627. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +4 -4
  628. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +120 -35
  629. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -28
  630. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
  631. package/mobile/src/components/ExchangeRateTile/calculateResult.ts +8 -0
  632. package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +21 -0
  633. package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +6 -1
  634. package/mobile/src/components/ExchangeRateTile/renderButton.tsx +14 -0
  635. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +43 -0
  636. package/mobile/src/components/Footer/MediaButton.tsx +7 -17
  637. package/mobile/src/components/Gallery/Gallery.tsx +2 -2
  638. package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
  639. package/mobile/src/components/Gallery/GalleryInner.tsx +10 -20
  640. package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +4 -1
  641. package/mobile/src/components/GroupBlock/GroupBlock.example.json +8 -7
  642. package/mobile/src/components/GroupBlock/GroupBlock.tsx +9 -4
  643. package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
  644. package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +1 -1
  645. package/mobile/src/components/Header/DropdownMenu.tsx +72 -0
  646. package/mobile/src/components/Header/HeaderSubMenu.tsx +45 -87
  647. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +14 -24
  648. package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -1
  649. package/mobile/src/components/Placeholder/Placeholder.tsx +6 -2
  650. package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -5
  651. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  652. package/mobile/src/components/ProductTile/ProductTile.tsx +2 -2
  653. package/mobile/src/components/Recommendation/Recommendation.tsx +7 -15
  654. package/mobile/src/components/TariffsTable/TariffsTable.example.json +1 -5
  655. package/mobile/src/components/Tile/Tile.example.json +1 -0
  656. package/mobile/src/components/Tile/Tile.tsx +4 -2
  657. package/mobile/src/components/Tile/TileContent.ts +5 -0
  658. package/mobile/src/content-page-repository/mapJSON.ts +11 -7
  659. package/mobile/src/content-page-repository/transformMarkdown.ts +3 -1
  660. package/mobile/src/content-page-repository/transformPicture.ts +8 -3
  661. package/mobile/src/hooks/useCreditCalculatorData.ts +2 -3
  662. package/mobile/src/hooks/useExchangeRates.ts +70 -10
  663. package/mobile/src/hooks/useTableArrowScrollControl.ts +3 -3
  664. package/mobile/src/react/IntersectionObserverTag.tsx +23 -0
  665. package/mobile/src/{setup-fixture.ts → react/setup-fixture.ts} +5 -2
  666. package/mobile/src/services/sitemap/isHrefActive.ts +2 -1
  667. package/mobile/src/ui-kit/Button/ArrowButton.tsx +1 -1
  668. package/mobile/src/ui-kit/Button/ButtonSection.tsx +3 -1
  669. package/mobile/src/ui-kit/Button/renderArrows.tsx +41 -0
  670. package/mobile/src/ui-kit/Img/Img.tsx +1 -0
  671. package/mobile/src/ui-kit/Input/Input.tsx +21 -5
  672. package/mobile/src/ui-kit/Input/InputProps.ts +3 -0
  673. package/mobile/src/ui-kit/InputRange/InputRange.tsx +14 -6
  674. package/mobile/src/ui-kit/SVG.tsx +2 -2
  675. package/mobile/src/ui-kit/Select/Select.tsx +17 -7
  676. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +9 -4
  677. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -1
  678. package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +6 -2
  679. package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +9 -18
  680. package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +6 -4
  681. package/mobile/src/ui-kit/Tabs/Tabs.tsx +4 -3
  682. package/mobile/src/ui-kit/TopItem/TopItem.tsx +8 -9
  683. package/mobile/src/utils/changeHashOnScroll.ts +3 -1
  684. package/mobile/src/utils/getCurrentDate.ts +1 -1
  685. package/mobile/src/utils/roundTo.ts +4 -0
  686. package/package.json +3 -3
  687. package/src/components/Accordion/Accordion.fixture.mobile.tsx +1 -1
  688. package/src/components/Accordion/Accordion.fixture.tsx +11 -11
  689. package/src/components/Accordion/Accordion.mobile.tsx +1 -3
  690. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +1 -1
  691. package/src/components/Blocks.ts +0 -2
  692. package/src/components/Bonus/Bonus.fixture.tsx +1 -1
  693. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
  694. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +1 -1
  695. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +4 -8
  696. package/src/components/Calculator/Calculator.fixture.tsx +4 -4
  697. package/src/components/Calculator/Calculator.tsx +8 -22
  698. package/src/components/Calculator/getCalculatorParams.ts +3 -1
  699. package/src/components/Calculator/getCreditRate.ts +3 -1
  700. package/src/components/Calculator/getMonthlyPayment.ts +3 -1
  701. package/src/components/Calculator/renderCalculatorBlock.tsx +0 -7
  702. package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +2 -26
  703. package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +1 -1
  704. package/src/components/ComparisonTable/HeaderCell.mobile.tsx +7 -13
  705. package/src/components/ComparisonTable/TableCell.mobile.tsx +7 -8
  706. package/src/components/ComparisonTable/TableCell.tsx +7 -10
  707. package/src/components/ComparisonTable/TableRow.tsx +6 -9
  708. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
  709. package/src/components/ContentPage/ContentPage.fixture.tsx +1 -1
  710. package/src/components/ContentPage/ContentPage.page.json +0 -5
  711. package/src/components/ContentPage/ContentPageContext.tsx +20 -4
  712. package/src/components/ExchangeRateTile/CurrencyProps.ts +5 -0
  713. package/src/components/ExchangeRateTile/CurrencyTable.tsx +4 -4
  714. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +120 -35
  715. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  716. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -28
  717. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
  718. package/src/components/ExchangeRateTile/calculateResult.ts +8 -0
  719. package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +21 -0
  720. package/src/components/ExchangeRateTile/formatCurrency.ts +6 -1
  721. package/src/components/ExchangeRateTile/renderButton.tsx +14 -0
  722. package/src/components/ExchangeRateTile/renderInput.tsx +43 -0
  723. package/src/components/Footer/Footer.fixture.mobile.tsx +1 -1
  724. package/src/components/Footer/Footer.fixture.tsx +1 -1
  725. package/src/components/Footer/Footer.tsx +1 -1
  726. package/src/components/Footer/MediaButton.tsx +7 -17
  727. package/src/components/Footer/TextInformation.tsx +2 -2
  728. package/src/components/Gallery/Gallery.fixture.mobile.tsx +2 -24
  729. package/src/components/Gallery/Gallery.fixture.tsx +1 -1
  730. package/src/components/Gallery/Gallery.mobile.tsx +2 -2
  731. package/src/components/Gallery/GalleryCardInner.tsx +2 -2
  732. package/src/components/Gallery/GalleryInner.tsx +10 -20
  733. package/src/components/GracePeriod/GracePeriod.fixture.tsx +1 -1
  734. package/src/components/GroupBlock/BlocksTypeProps.ts +4 -1
  735. package/src/components/GroupBlock/GroupBlock.example.json +8 -7
  736. package/src/components/GroupBlock/GroupBlock.fixture.tsx +19 -3
  737. package/src/components/GroupBlock/GroupBlock.tsx +9 -4
  738. package/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
  739. package/src/components/GroupBlock/GroupBlocksItem.tsx +1 -1
  740. package/src/components/Header/DropdownMenu.tsx +72 -0
  741. package/src/components/Header/Header.fixture.mobile.tsx +1 -1
  742. package/src/components/Header/Header.fixture.tsx +1 -1
  743. package/src/components/Header/HeaderSubMenu.tsx +45 -87
  744. package/src/components/Headline/Headline.fixture.mobile.tsx +45 -4
  745. package/src/components/Headline/Headline.fixture.tsx +31 -7
  746. package/src/components/Insurance/Insurance.fixture.tsx +6 -2
  747. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +1 -1
  748. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +14 -24
  749. package/src/components/LikeControl/LikeControl.fixture.tsx +1 -1
  750. package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +2 -2
  751. package/src/components/LinkDocs/LinkDocs.fixture.tsx +2 -2
  752. package/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -1
  753. package/src/components/LinkList/LinkList.fixture.tsx +1 -1
  754. package/src/components/MiniGallery/MiniGallery.fixture.tsx +1 -1
  755. package/src/components/MobileAppTile/MobileAppTile.fixture.mobile.tsx +1 -1
  756. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -1
  757. package/src/components/Navigation/Navigation.fixture.tsx +1 -1
  758. package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +1 -1
  759. package/src/components/OtherProducts/OtherProducts.fixture.tsx +1 -1
  760. package/src/components/PictureText/PictureText.fixture.tsx +1 -1
  761. package/src/components/Placeholder/Placeholder.fixture.mobile.tsx +1 -1
  762. package/src/components/Placeholder/Placeholder.fixture.tsx +1 -1
  763. package/src/components/Placeholder/Placeholder.tsx +6 -2
  764. package/src/components/ProductBlock/ProductBlock.example.json +1 -5
  765. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +2 -2
  766. package/src/components/ProductBlock/ProductBlock.fixture.tsx +35 -5
  767. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +1 -1
  768. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  769. package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +1 -1
  770. package/src/components/ProductGallery/ProductGallery.fixture.tsx +2 -2
  771. package/src/components/ProductTile/ProductTile.fixture.tsx +1 -1
  772. package/src/components/ProductTile/ProductTile.tsx +2 -2
  773. package/src/components/PromoTile/PromoTile.fixture.tsx +2 -2
  774. package/src/components/Recommendation/Recommendation.fixture.tsx +18 -13
  775. package/src/components/Recommendation/Recommendation.tsx +7 -15
  776. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +38 -3
  777. package/src/components/StepsBlock/StepsBlock.fixture.tsx +1 -1
  778. package/src/components/TariffsTable/TariffsTable.example.json +1 -5
  779. package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +2 -30
  780. package/src/components/TariffsTable/TariffsTable.fixture.tsx +1 -1
  781. package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +106 -103
  782. package/src/components/TextBlock/TextBlock.fixture.tsx +65 -87
  783. package/src/components/Tile/Tile.example.json +1 -0
  784. package/src/components/Tile/Tile.fixture.tsx +2 -1
  785. package/src/components/Tile/Tile.tsx +4 -2
  786. package/src/components/Tile/TileContent.ts +5 -0
  787. package/src/content-page-repository/mapJSON.ts +11 -7
  788. package/src/content-page-repository/transformMarkdown.ts +3 -1
  789. package/src/content-page-repository/transformPicture.ts +8 -3
  790. package/src/hooks/useCreditCalculatorData.ts +2 -3
  791. package/src/hooks/useExchangeRates.ts +70 -10
  792. package/src/hooks/useTableArrowScrollControl.ts +3 -3
  793. package/src/react/IntersectionObserverTag.tsx +23 -0
  794. package/src/{setup-fixture.ts → react/setup-fixture.ts} +5 -2
  795. package/src/services/sitemap/isHrefActive.ts +2 -1
  796. package/src/ui-kit/Button/ArrowButton.tsx +1 -1
  797. package/src/ui-kit/Button/Button.fixture.mobile.tsx +1 -1
  798. package/src/ui-kit/Button/Button.fixture.tsx +1 -1
  799. package/src/ui-kit/Button/ButtonSection.tsx +3 -1
  800. package/src/ui-kit/Button/renderArrows.tsx +41 -0
  801. package/src/ui-kit/HeaderItem/HeaderItem.fixture.tsx +1 -1
  802. package/src/ui-kit/Icon/Icon.fixture.tsx +2 -2
  803. package/src/ui-kit/Img/Img.mobile.tsx +1 -0
  804. package/src/ui-kit/Input/Input.tsx +21 -5
  805. package/src/ui-kit/Input/InputProps.ts +3 -0
  806. package/src/ui-kit/InputRange/InputRange.tsx +14 -6
  807. package/src/ui-kit/List/List.fixture.tsx +1 -1
  808. package/src/ui-kit/Logo/Logo.fixture.tsx +1 -1
  809. package/src/ui-kit/SVG.tsx +2 -2
  810. package/src/ui-kit/SearchBar.mobile.tsx +1 -3
  811. package/src/ui-kit/Select/Select.tsx +17 -7
  812. package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +1 -1
  813. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +9 -4
  814. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -1
  815. package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +6 -2
  816. package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +9 -18
  817. package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +6 -4
  818. package/src/ui-kit/Tabs/Tabs.tsx +4 -3
  819. package/src/ui-kit/TopItem/TopItem.fixture.tsx +1 -1
  820. package/src/ui-kit/TopItem/TopItem.tsx +8 -9
  821. package/src/utils/changeHashOnScroll.ts +3 -1
  822. package/src/utils/getCurrentDate.ts +1 -1
  823. package/src/utils/roundTo.ts +4 -0
  824. package/dist/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  825. package/dist/components/CreditCalculator/CreditCalculator.js +0 -14
  826. package/dist/components/CreditCalculator/CreditCalculator.js.map +0 -1
  827. package/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  828. package/dist/components/CreditCalculator/CreditCalculatorContent.js +0 -2
  829. package/dist/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  830. package/dist/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  831. package/dist/components/CreditCalculator/CreditCalculatorForm.js +0 -53
  832. package/dist/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  833. package/dist/components/CreditCalculator/constants.d.ts +0 -7
  834. package/dist/components/CreditCalculator/constants.js +0 -10
  835. package/dist/components/CreditCalculator/constants.js.map +0 -1
  836. package/dist/components/CreditCalculator/defaultTabs.d.ts +0 -2
  837. package/dist/components/CreditCalculator/defaultTabs.js +0 -23
  838. package/dist/components/CreditCalculator/defaultTabs.js.map +0 -1
  839. package/dist/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  840. package/dist/components/CreditCalculator/getCalculatorParams.js +0 -11
  841. package/dist/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  842. package/dist/components/CreditCalculator/getCreditRate.d.ts +0 -7
  843. package/dist/components/CreditCalculator/getCreditRate.js +0 -13
  844. package/dist/components/CreditCalculator/getCreditRate.js.map +0 -1
  845. package/dist/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  846. package/dist/components/CreditCalculator/getCreditTermYears.js +0 -15
  847. package/dist/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  848. package/dist/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  849. package/dist/components/CreditCalculator/getDefaultMonths.js +0 -8
  850. package/dist/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  851. package/dist/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  852. package/dist/components/CreditCalculator/getDefaultSum.js +0 -8
  853. package/dist/components/CreditCalculator/getDefaultSum.js.map +0 -1
  854. package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  855. package/dist/components/CreditCalculator/getMonthlyPayment.js +0 -19
  856. package/dist/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  857. package/dist/components/CreditCalculator/renderButton.d.ts +0 -1
  858. package/dist/components/CreditCalculator/renderButton.js +0 -15
  859. package/dist/components/CreditCalculator/renderButton.js.map +0 -1
  860. package/dist/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  861. package/dist/components/CreditCalculator/renderMonthsInput.js +0 -11
  862. package/dist/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  863. package/dist/components/CreditCalculator/renderProposal.d.ts +0 -1
  864. package/dist/components/CreditCalculator/renderProposal.js +0 -9
  865. package/dist/components/CreditCalculator/renderProposal.js.map +0 -1
  866. package/dist/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  867. package/dist/components/CreditCalculator/renderTermsButton.js +0 -9
  868. package/dist/components/CreditCalculator/renderTermsButton.js.map +0 -1
  869. package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  870. package/dist/components/CreditCalculator/renderWantedSumInput.js +0 -18
  871. package/dist/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  872. package/dist/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  873. package/dist/components/Header/HeaderSubMenuObserver.js +0 -36
  874. package/dist/components/Header/HeaderSubMenuObserver.js.map +0 -1
  875. package/dist/setup-fixture.js.map +0 -1
  876. package/lib/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  877. package/lib/components/CreditCalculator/CreditCalculator.fixture.d.ts +0 -4
  878. package/lib/components/CreditCalculator/CreditCalculator.js +0 -12
  879. package/lib/components/CreditCalculator/CreditCalculator.js.map +0 -1
  880. package/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  881. package/lib/components/CreditCalculator/CreditCalculatorContent.js +0 -2
  882. package/lib/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  883. package/lib/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  884. package/lib/components/CreditCalculator/CreditCalculatorForm.js +0 -51
  885. package/lib/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  886. package/lib/components/CreditCalculator/constants.d.ts +0 -7
  887. package/lib/components/CreditCalculator/constants.js +0 -8
  888. package/lib/components/CreditCalculator/constants.js.map +0 -1
  889. package/lib/components/CreditCalculator/defaultTabs.d.ts +0 -2
  890. package/lib/components/CreditCalculator/defaultTabs.js +0 -21
  891. package/lib/components/CreditCalculator/defaultTabs.js.map +0 -1
  892. package/lib/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  893. package/lib/components/CreditCalculator/getCalculatorParams.js +0 -8
  894. package/lib/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  895. package/lib/components/CreditCalculator/getCreditRate.d.ts +0 -7
  896. package/lib/components/CreditCalculator/getCreditRate.js +0 -10
  897. package/lib/components/CreditCalculator/getCreditRate.js.map +0 -1
  898. package/lib/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  899. package/lib/components/CreditCalculator/getCreditTermYears.js +0 -12
  900. package/lib/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  901. package/lib/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  902. package/lib/components/CreditCalculator/getDefaultMonths.js +0 -5
  903. package/lib/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  904. package/lib/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  905. package/lib/components/CreditCalculator/getDefaultSum.js +0 -5
  906. package/lib/components/CreditCalculator/getDefaultSum.js.map +0 -1
  907. package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  908. package/lib/components/CreditCalculator/getMonthlyPayment.js +0 -16
  909. package/lib/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  910. package/lib/components/CreditCalculator/renderButton.d.ts +0 -1
  911. package/lib/components/CreditCalculator/renderButton.js +0 -12
  912. package/lib/components/CreditCalculator/renderButton.js.map +0 -1
  913. package/lib/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  914. package/lib/components/CreditCalculator/renderMonthsInput.js +0 -8
  915. package/lib/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  916. package/lib/components/CreditCalculator/renderProposal.d.ts +0 -1
  917. package/lib/components/CreditCalculator/renderProposal.js +0 -6
  918. package/lib/components/CreditCalculator/renderProposal.js.map +0 -1
  919. package/lib/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  920. package/lib/components/CreditCalculator/renderTermsButton.js +0 -6
  921. package/lib/components/CreditCalculator/renderTermsButton.js.map +0 -1
  922. package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  923. package/lib/components/CreditCalculator/renderWantedSumInput.js +0 -15
  924. package/lib/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  925. package/lib/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  926. package/lib/components/Header/HeaderSubMenuObserver.js +0 -34
  927. package/lib/components/Header/HeaderSubMenuObserver.js.map +0 -1
  928. package/lib/setup-fixture.js.map +0 -1
  929. package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  930. package/mobile/dist/components/CreditCalculator/CreditCalculator.js +0 -14
  931. package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +0 -1
  932. package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  933. package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.js +0 -2
  934. package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  935. package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  936. package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.js +0 -53
  937. package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  938. package/mobile/dist/components/CreditCalculator/constants.d.ts +0 -7
  939. package/mobile/dist/components/CreditCalculator/constants.js +0 -10
  940. package/mobile/dist/components/CreditCalculator/constants.js.map +0 -1
  941. package/mobile/dist/components/CreditCalculator/defaultTabs.d.ts +0 -2
  942. package/mobile/dist/components/CreditCalculator/defaultTabs.js +0 -23
  943. package/mobile/dist/components/CreditCalculator/defaultTabs.js.map +0 -1
  944. package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  945. package/mobile/dist/components/CreditCalculator/getCalculatorParams.js +0 -11
  946. package/mobile/dist/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  947. package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +0 -7
  948. package/mobile/dist/components/CreditCalculator/getCreditRate.js +0 -13
  949. package/mobile/dist/components/CreditCalculator/getCreditRate.js.map +0 -1
  950. package/mobile/dist/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  951. package/mobile/dist/components/CreditCalculator/getCreditTermYears.js +0 -15
  952. package/mobile/dist/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  953. package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  954. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +0 -8
  955. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  956. package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  957. package/mobile/dist/components/CreditCalculator/getDefaultSum.js +0 -8
  958. package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +0 -1
  959. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  960. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.js +0 -19
  961. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  962. package/mobile/dist/components/CreditCalculator/renderButton.d.ts +0 -1
  963. package/mobile/dist/components/CreditCalculator/renderButton.js +0 -15
  964. package/mobile/dist/components/CreditCalculator/renderButton.js.map +0 -1
  965. package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  966. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +0 -11
  967. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  968. package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +0 -1
  969. package/mobile/dist/components/CreditCalculator/renderProposal.js +0 -9
  970. package/mobile/dist/components/CreditCalculator/renderProposal.js.map +0 -1
  971. package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  972. package/mobile/dist/components/CreditCalculator/renderTermsButton.js +0 -9
  973. package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +0 -1
  974. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  975. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +0 -18
  976. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  977. package/mobile/dist/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  978. package/mobile/dist/components/Header/HeaderSubMenuObserver.js +0 -36
  979. package/mobile/dist/components/Header/HeaderSubMenuObserver.js.map +0 -1
  980. package/mobile/dist/setup-fixture.js.map +0 -1
  981. package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  982. package/mobile/lib/components/CreditCalculator/CreditCalculator.js +0 -12
  983. package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +0 -1
  984. package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  985. package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.js +0 -2
  986. package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  987. package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  988. package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.js +0 -51
  989. package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  990. package/mobile/lib/components/CreditCalculator/constants.d.ts +0 -7
  991. package/mobile/lib/components/CreditCalculator/constants.js +0 -8
  992. package/mobile/lib/components/CreditCalculator/constants.js.map +0 -1
  993. package/mobile/lib/components/CreditCalculator/defaultTabs.d.ts +0 -2
  994. package/mobile/lib/components/CreditCalculator/defaultTabs.js +0 -21
  995. package/mobile/lib/components/CreditCalculator/defaultTabs.js.map +0 -1
  996. package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  997. package/mobile/lib/components/CreditCalculator/getCalculatorParams.js +0 -8
  998. package/mobile/lib/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  999. package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +0 -7
  1000. package/mobile/lib/components/CreditCalculator/getCreditRate.js +0 -10
  1001. package/mobile/lib/components/CreditCalculator/getCreditRate.js.map +0 -1
  1002. package/mobile/lib/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  1003. package/mobile/lib/components/CreditCalculator/getCreditTermYears.js +0 -12
  1004. package/mobile/lib/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  1005. package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  1006. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +0 -5
  1007. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  1008. package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  1009. package/mobile/lib/components/CreditCalculator/getDefaultSum.js +0 -5
  1010. package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +0 -1
  1011. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  1012. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.js +0 -16
  1013. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  1014. package/mobile/lib/components/CreditCalculator/renderButton.d.ts +0 -1
  1015. package/mobile/lib/components/CreditCalculator/renderButton.js +0 -12
  1016. package/mobile/lib/components/CreditCalculator/renderButton.js.map +0 -1
  1017. package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  1018. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +0 -8
  1019. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  1020. package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +0 -1
  1021. package/mobile/lib/components/CreditCalculator/renderProposal.js +0 -6
  1022. package/mobile/lib/components/CreditCalculator/renderProposal.js.map +0 -1
  1023. package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  1024. package/mobile/lib/components/CreditCalculator/renderTermsButton.js +0 -6
  1025. package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +0 -1
  1026. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  1027. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +0 -15
  1028. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  1029. package/mobile/lib/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  1030. package/mobile/lib/components/Header/HeaderSubMenuObserver.js +0 -34
  1031. package/mobile/lib/components/Header/HeaderSubMenuObserver.js.map +0 -1
  1032. package/mobile/lib/setup-fixture.js.map +0 -1
  1033. package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +0 -25
  1034. package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +0 -31
  1035. package/mobile/src/components/CreditCalculator/CreditCalculatorContent.ts +0 -34
  1036. package/mobile/src/components/CreditCalculator/CreditCalculatorForm.tsx +0 -92
  1037. package/mobile/src/components/CreditCalculator/constants.ts +0 -8
  1038. package/mobile/src/components/CreditCalculator/defaultTabs.ts +0 -22
  1039. package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +0 -16
  1040. package/mobile/src/components/CreditCalculator/getCreditRate.ts +0 -18
  1041. package/mobile/src/components/CreditCalculator/getCreditTermYears.spec.ts +0 -10
  1042. package/mobile/src/components/CreditCalculator/getCreditTermYears.ts +0 -15
  1043. package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +0 -7
  1044. package/mobile/src/components/CreditCalculator/getDefaultSum.ts +0 -7
  1045. package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +0 -32
  1046. package/mobile/src/components/CreditCalculator/renderButton.tsx +0 -23
  1047. package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +0 -29
  1048. package/mobile/src/components/CreditCalculator/renderProposal.tsx +0 -13
  1049. package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +0 -16
  1050. package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +0 -36
  1051. package/mobile/src/components/Header/HeaderSubMenuObserver.ts +0 -48
  1052. package/src/components/CreditCalculator/CreditCalculator.example.json +0 -25
  1053. package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +0 -32
  1054. package/src/components/CreditCalculator/CreditCalculator.tsx +0 -31
  1055. package/src/components/CreditCalculator/CreditCalculatorContent.ts +0 -34
  1056. package/src/components/CreditCalculator/CreditCalculatorForm.tsx +0 -92
  1057. package/src/components/CreditCalculator/constants.ts +0 -8
  1058. package/src/components/CreditCalculator/defaultTabs.ts +0 -22
  1059. package/src/components/CreditCalculator/getCalculatorParams.ts +0 -16
  1060. package/src/components/CreditCalculator/getCreditRate.ts +0 -18
  1061. package/src/components/CreditCalculator/getCreditTermYears.spec.ts +0 -10
  1062. package/src/components/CreditCalculator/getCreditTermYears.ts +0 -15
  1063. package/src/components/CreditCalculator/getDefaultMonths.ts +0 -7
  1064. package/src/components/CreditCalculator/getDefaultSum.ts +0 -7
  1065. package/src/components/CreditCalculator/getMonthlyPayment.ts +0 -32
  1066. package/src/components/CreditCalculator/renderButton.tsx +0 -23
  1067. package/src/components/CreditCalculator/renderMonthsInput.tsx +0 -29
  1068. package/src/components/CreditCalculator/renderProposal.tsx +0 -13
  1069. package/src/components/CreditCalculator/renderTermsButton.tsx +0 -16
  1070. package/src/components/CreditCalculator/renderWantedSumInput.tsx +0 -36
  1071. package/src/components/Header/HeaderSubMenuObserver.ts +0 -48
@@ -489,8 +489,9 @@
489
489
  return prefix + extension + size;
490
490
  };
491
491
  const getExtFromHref = (href) => {
492
- if (!href)
492
+ if (!href) {
493
493
  return '';
494
+ }
494
495
  const index = href.lastIndexOf('.');
495
496
  return index !== -1 ? href.substring(index + 1) : '';
496
497
  };
@@ -654,8 +655,9 @@
654
655
  return buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton$2(useLink({ router, handlerDecorator }, button), index)) })) : null;
655
656
  });
656
657
  function renderButton$2({ icon, ...button }, i) {
657
- if (!button?.text)
658
+ if (!button?.text) {
658
659
  return;
660
+ }
659
661
  return icon ? (jsx(Button, { appendLeft: jsx(Img, { image: icon, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
660
662
  }
661
663
 
@@ -735,7 +737,7 @@
735
737
 
736
738
  const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
737
739
  const textColor = version === 'secondary' ? 'text-white' : 'text-primary-text';
738
- return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description ? (jsx(Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })) : null, benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((benefit, i) => renderBenefit$1({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
740
+ return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description ? (jsx(Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })) : null, benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((benefit, i) => renderBenefit$1({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
739
741
  });
740
742
  const getTitle = (title, headingType) => {
741
743
  return title ? (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })) : null;
@@ -787,9 +789,9 @@
787
789
  };
788
790
  const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className, anchor = null, }) => {
789
791
  const textBlockStyleMap = textBlockStyleMaps[blockVersion];
790
- return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, id: anchor, children: [iconVersion === 'small' ? renderIcon$1(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null] })] }));
792
+ return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, id: anchor, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null] })] }));
791
793
  });
792
- function renderIcon$1(className) {
794
+ function renderIcon(className) {
793
795
  return (jsx("div", { className: "pt-1.5 pl-1 pr-4", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
794
796
  }
795
797
  function renderImage(image) {
@@ -833,12 +835,12 @@
833
835
  secondary: 'bg-primary-main text-white',
834
836
  };
835
837
  const Tile = JSX((props) => {
836
- const { context, title, headingType = 'h3', description, items, children, buttons, image, className = '', version = 'primary', role, anchor = null, } = props;
838
+ const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary', role, anchor = null, } = props;
837
839
  return (jsx("section", { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
838
- ${version === 'primary' ? 'text-primary-text' : ''}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$1(items, version)] }) }));
840
+ ${version === 'primary' ? 'text-primary-text' : ''}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$1(items, version, isDotted)] }) }));
839
841
  });
840
- function renderList$1(items, version) {
841
- return items?.length ? (jsx(List, { items: items, itemClassName: "text-title-2xs font-light mt-2", version: version === 'primary' ? 'tile' : 'tile-white' })) : null;
842
+ function renderList$1(items, version, isDotted) {
843
+ return items?.length ? (jsx(List, { items: items, isDotted: isDotted, itemClassName: "text-title-2xs font-light mt-2", version: version === 'primary' ? 'tile' : 'tile-white' })) : null;
842
844
  }
843
845
 
844
846
  const productTileStyleMap = {
@@ -846,11 +848,11 @@
846
848
  secondary: 'bg-primary-main text-white',
847
849
  };
848
850
  const ProductTile = JSX(({ context, className = '', title, headingType = 'h3', description, additionalDescription, benefits, buttons, image, version = 'primary', anchor = null, }) => {
849
- return (jsx("section", { className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, renderBenefits(benefits, version), additionalDescription
851
+ return (jsx("section", { className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, renderBenefits(benefits || [], version), additionalDescription
850
852
  ? renderAdditionalDescription(additionalDescription, version)
851
853
  : null] }) }));
852
854
  });
853
- function renderBenefits(benefits = [], version) {
855
+ function renderBenefits(benefits, version) {
854
856
  return (jsxs("div", { className: "flex mt-5 mb-1", children: [benefits.length ? jsx("div", { className: "mr-8", children: benefits.map(renderBenefitLabel) }) : null, benefits.length ? (jsx("div", { className: "pt-1", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] }));
855
857
  }
856
858
  function renderBenefitLabel(benefit, i) {
@@ -871,10 +873,6 @@
871
873
  return jsx("div", { className: `text-sm mt-2.5 ${descStyleMap[version]}`, children: additionalDescription });
872
874
  }
873
875
 
874
- const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
875
- ? 'bg-secondary-light text-secondary-text'
876
- : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
877
-
878
876
  const cardVersionMap = {
879
877
  primary: 'bg-white text-secondary-text',
880
878
  secondary: 'bg-primary-main text-white',
@@ -894,7 +892,7 @@
894
892
 
895
893
  const GalleryCardInner = JSX(({ title, description, image, items, button, version, isDotted = true }) => {
896
894
  const titleStyleClasses = getTitleStyle(version);
897
- return (jsxs("div", { className: "h-full flex flex-col justify-between text-center", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-light text-m-md-new ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version, isDotted) : null] }), button?.text ? renderButton$1(button) : null] }));
895
+ return (jsxs("div", { className: "h-full flex flex-col justify-between text-center", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-light text-m-md-new ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, isDotted, version) : null] }), button?.text ? renderButton$1(button) : null] }));
898
896
  });
899
897
  function renderButton$1(button) {
900
898
  return (jsx(Button, { className: "mt-6 w-full", appendLeft: button.icon && jsx(Img, { image: button.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
@@ -902,7 +900,7 @@
902
900
  function renderCardTitle(title, className) {
903
901
  return jsx("div", { className: `text-xl m-0 ${className}`, children: title });
904
902
  }
905
- function renderItems(items, version = 'primary', isDotted) {
903
+ function renderItems(items, isDotted, version = 'primary') {
906
904
  return (jsx(List, { className: `max-w-[308px] mt-2 text-sm ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
907
905
  }
908
906
  function getTitleStyle(version) {
@@ -919,6 +917,14 @@
919
917
  items-stretch ${cardStyleMap[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
920
918
  }
921
919
 
920
+ const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
921
+ ? 'bg-secondary-light text-secondary-text'
922
+ : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
923
+
924
+ function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
925
+ return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
926
+ }
927
+
922
928
  const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', anchor = null, ...rest }) => {
923
929
  const [activeCardIndex, setActiveCardIndex] = context.useState(0);
924
930
  const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
@@ -927,7 +933,12 @@
927
933
  const showNextButton = isGalleryScrollAvailable &&
928
934
  cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
929
935
  const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
930
- return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton ? (jsx(ArrowButton, { className: "absolute top-1/2 left-8 z-10 mt-[25px]", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })) : null, showNextButton ? (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-[25px] rotate-180", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })) : null, jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" })] }));
936
+ return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), renderArrows({
937
+ handler: [handlePrevClick, handleNextClick],
938
+ isShown: [showPrevButton, showNextButton],
939
+ btnClass: ['left-8', 'right-8'],
940
+ className: 'top-1/2',
941
+ }), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] }));
931
942
  });
932
943
 
933
944
  const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
@@ -1053,12 +1064,21 @@
1053
1064
  const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES$1} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : 'border-b-0'}`;
1054
1065
  return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner$1(item, i, isFillGradient)) }) }));
1055
1066
  });
1056
- const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? (jsx("h4", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })) : null, description ? (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description })) : null] }, String(i)));
1067
+ const labelStyle = (isFillGradient = false) => `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`;
1068
+ const descriptionStyle = (isFillGradient = false) => `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`;
1069
+ const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? jsx("h4", { className: labelStyle(isFillGradient), children: label }) : null, description ? jsx("div", { className: descriptionStyle(isFillGradient), children: description }) : null] }, String(i)));
1057
1070
 
1058
- const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : 'border-b-0'}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
1071
+ const titleStyle = (isLastRow = false) => `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${isLastRow ? 'border-b-0' : 'border-solid'}`;
1072
+ const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? jsx("div", { className: titleStyle(isLastRow), children: header.title }) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
1059
1073
 
1060
- const TableArrowScrollControl = JSX(({ isScrollAvailable, onNextClick, onPrevClick, showNextButton, showPrevButton }) => {
1061
- return isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: onNextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" }), jsx(ArrowButton, { className: "mt-4", onClick: onPrevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })] }) })) : null;
1074
+ const TableArrowScrollControl = JSX(({ isScrollAvailable, handleNextClick, handlePrevClick, showNextButton, showPrevButton }) => {
1075
+ return isScrollAvailable ? (jsx("div", { children: renderArrows({
1076
+ handler: [handlePrevClick, handleNextClick],
1077
+ isShown: [showPrevButton, showNextButton],
1078
+ btnClass: ['top-[108px]', 'top-11'],
1079
+ className: 'right-7',
1080
+ isDisabled: true,
1081
+ }) })) : null;
1062
1082
  });
1063
1083
 
1064
1084
  const ComparisonTableRows = JSX(({ rowData, activeCardIndex, isColoredFirstColumn, ...tableArrowScrollProps }) => {
@@ -1066,12 +1086,12 @@
1066
1086
  });
1067
1087
 
1068
1088
  const useTableArrowScrollControl = ({ columnsLength, colsLengthForScroll, activeCardIndex, setActiveCardIndex, }) => {
1069
- const onNextClick = () => setActiveCardIndex(activeCardIndex + 1);
1070
- const onPrevClick = () => setActiveCardIndex(activeCardIndex - 1);
1089
+ const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
1090
+ const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
1071
1091
  const isScrollAvailable = columnsLength > colsLengthForScroll;
1072
1092
  const showNextButton = isScrollAvailable && columnsLength - activeCardIndex > colsLengthForScroll;
1073
1093
  const showPrevButton = Boolean(isScrollAvailable && activeCardIndex > 0);
1074
- return { onNextClick, onPrevClick, isScrollAvailable, showNextButton, showPrevButton };
1094
+ return { handleNextClick, handlePrevClick, isScrollAvailable, showNextButton, showPrevButton };
1075
1095
  };
1076
1096
 
1077
1097
  const ComparisonTableBody = JSX(({ context, columns, rowHeaders, isShowAllRow, visibleRowLength, isColoredFirstColumn }) => {
@@ -1120,7 +1140,7 @@
1120
1140
  }
1121
1141
 
1122
1142
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
1123
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill, ...options }, i) => (jsx("path", { d: d, fill: fill || 'currentColor', ...commonOptions, ...options }, i))) }));
1143
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
1124
1144
  });
1125
1145
 
1126
1146
  const CHECK_PATHS = [
@@ -1141,83 +1161,90 @@
1141
1161
  return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-base font-light", children: title }) : null, value ? (jsxs("div", { className: "text-title font-normal", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
1142
1162
  });
1143
1163
 
1144
- const DEFAULT_MIN_SUM$1 = 30000;
1145
- const DEFAULT_MAX_SUM$1 = 3000000;
1146
- const DEFAULT_SUM$1 = (DEFAULT_MAX_SUM$1 - DEFAULT_MIN_SUM$1) / 2;
1147
- const DEFAULT_MIN_MONTHS$1 = 1;
1148
- const DEFAULT_MAX_MONTHS$1 = 84;
1149
- const DEFAULT_MONTHS$1 = Math.round((DEFAULT_MAX_MONTHS$1 - DEFAULT_MIN_MONTHS$1) / 2);
1150
- const MONTHS_IN_YEAR$1 = 12;
1164
+ const DEFAULT_MIN_SUM = 30000;
1165
+ const DEFAULT_MAX_SUM = 3000000;
1166
+ const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
1167
+ const DEFAULT_MIN_MONTHS = 1;
1168
+ const DEFAULT_MAX_MONTHS = 84;
1169
+ const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
1170
+ const MONTHS_IN_YEAR = 12;
1151
1171
 
1152
1172
  const InputRange = JSX(({ className, title, items = [], min = 1, max = 100, step = 1, value = min, onChange }) => {
1153
- const handleChange = (value) => {
1154
- if (!onChange)
1173
+ const handleChange = (_) => {
1174
+ if (!onChange) {
1155
1175
  return;
1156
- const sanitizedValue = Number(value.replace(/\D/g, ''));
1176
+ }
1177
+ const sanitizedValue = Number(_.replace(/\D/g, ''));
1157
1178
  onChange(sanitizedValue);
1158
1179
  };
1159
1180
  const inputStyle = {
1160
1181
  backgroundSize: `${(((value - min) * 100) / (max - min)).toFixed(2)}% 100%`,
1161
1182
  };
1162
1183
  const handleBlur = () => {
1163
- if (!onChange)
1184
+ if (!onChange) {
1164
1185
  return;
1165
- if (value < min)
1186
+ }
1187
+ if (value < min) {
1166
1188
  onChange(min);
1167
- if (value > max)
1189
+ }
1190
+ if (value > max) {
1168
1191
  onChange(max);
1192
+ }
1169
1193
  };
1170
1194
  return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-base text-secondary-text pl-4", children: title }) : null, jsx("input", { className: `m-0 mt-[5px] font-sans text-title w-full h-14 border border-solid border-main-stroke rounded-md
1171
1195
  outline-none p-0 pl-4 box-border text-primary-text`, value: addSpacesBetweenNumbers(value), onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 bottom-[-4px] px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between my-3", children: items.map((item, i) => (jsx("span", { className: "text-sm leading-[14px] text-secondary-text pl-4", children: item }, String(i)))) })] }));
1172
1196
  });
1173
1197
 
1174
- const STEP_MONEY$3 = 1000;
1175
- function renderWantedSumInput$1(props) {
1198
+ const STEP_MONEY$2 = 1000;
1199
+ function renderWantedSumInput(props) {
1176
1200
  const { title, className = '', calculatorParams, moneyValue, defaultSum, setMoneyValue, isShowItems = true, } = props;
1177
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM$1;
1178
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM$1;
1201
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1202
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1179
1203
  const items = [
1180
1204
  `От ${addSpacesBetweenNumbers(minSum)} ₽`,
1181
1205
  `До ${addSpacesBetweenNumbers(maxSum)} ₽`,
1182
1206
  ];
1183
- return (jsx(InputRange, { className: className, title: title, items: isShowItems ? items : [], min: minSum, max: maxSum, step: STEP_MONEY$3, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1207
+ return (jsx(InputRange, { className: className, title: title, items: isShowItems ? items : [], min: minSum, max: maxSum, step: STEP_MONEY$2, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1184
1208
  }
1185
1209
 
1186
- const DEFAULT_RATE$1 = 10.2;
1187
- const getCreditRate$1 = (params) => {
1210
+ const DEFAULT_RATE = 10.2;
1211
+ const getCreditRate = (params) => {
1188
1212
  const { calculatorParams, isInsurance } = params;
1189
- if (!calculatorParams)
1190
- return DEFAULT_RATE$1;
1213
+ if (!calculatorParams) {
1214
+ return DEFAULT_RATE;
1215
+ }
1191
1216
  return isInsurance
1192
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE$1
1193
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE$1;
1217
+ ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
1218
+ : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
1194
1219
  };
1195
1220
 
1196
- const getCalculatorParams$1 = (params) => {
1221
+ const getCalculatorParams = (params) => {
1197
1222
  const { tableRows, isAnnuity = false } = params;
1198
- if (!tableRows)
1223
+ if (!tableRows) {
1199
1224
  return {};
1225
+ }
1200
1226
  const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
1201
1227
  return calculatorParams || {};
1202
1228
  };
1203
1229
 
1204
- const getDefaultSum$1 = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
1230
+ const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
1205
1231
  ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
1206
- : DEFAULT_SUM$1;
1232
+ : DEFAULT_SUM;
1207
1233
 
1208
- const getDefaultMonths$1 = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
1234
+ const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
1209
1235
  ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
1210
- : DEFAULT_MONTHS$1;
1236
+ : DEFAULT_MONTHS;
1211
1237
 
1212
1238
  const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
1213
1239
 
1214
- const getMonthlyPayment$1 = (params) => {
1240
+ const getMonthlyPayment = (params) => {
1215
1241
  const { calculatorParams, paymentType, rate, sum, months } = params;
1216
- if (!calculatorParams)
1242
+ if (!calculatorParams) {
1217
1243
  return 0;
1218
- const finalSum = clamp(sum, calculatorParams.minSum || DEFAULT_MIN_SUM$1, calculatorParams.maxSum || DEFAULT_MAX_SUM$1);
1244
+ }
1245
+ const finalSum = clamp(sum, calculatorParams.minSum || DEFAULT_MIN_SUM, calculatorParams.maxSum || DEFAULT_MAX_SUM);
1219
1246
  if (paymentType === 'annuity') {
1220
- const annuityCoef = Number(rate) / (MONTHS_IN_YEAR$1 * 100);
1247
+ const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
1221
1248
  return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
1222
1249
  }
1223
1250
  else {
@@ -1225,14 +1252,14 @@
1225
1252
  }
1226
1253
  };
1227
1254
 
1228
- const STEP_MONTHS$1 = 1;
1229
- function renderMonthsInput$1(props) {
1255
+ const STEP_MONTHS = 1;
1256
+ function renderMonthsInput(props) {
1230
1257
  const { title, minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
1231
1258
  const monthText = (month) => {
1232
1259
  const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
1233
1260
  return `${month} ${text}`;
1234
1261
  };
1235
- return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS$1, value: monthsValue || defaultMonths, onChange: setMonthsValue }));
1262
+ return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }));
1236
1263
  }
1237
1264
 
1238
1265
  function renderButtonSection(context, buttons) {
@@ -1244,29 +1271,29 @@
1244
1271
  return (jsxs("div", { children: [jsx("div", { className: "text-sm font-light ml-3", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `calc-rate-text font-mohave text-[200px] leading-[250px] pr-4 mt-[-16px] ${className}`, children: rateFormat }), sup ? jsx("span", { className: "calc-rate-text text-[65px] leading-[75px]", children: sup }) : ''] })] }));
1245
1272
  }
1246
1273
 
1247
- const DEFAULT_PAYMENT_TYPE$1 = 'annuity';
1248
- const CreditCalculatorForm$1 = JSX(({ context, className = '', buttons }) => {
1274
+ const DEFAULT_PAYMENT_TYPE = 'annuity';
1275
+ const CreditCalculatorForm = JSX(({ context, className = '', buttons }) => {
1249
1276
  const [moneyValue, setMoneyValue] = context.useState(undefined);
1250
1277
  const [monthsValue, setMonthsValue] = context.useState(undefined);
1251
1278
  const [isAnnuity, toggleIsAnnuity] = context.useState(false);
1252
1279
  const [isBudgetary, toggleIsBudgetary] = context.useState(false);
1253
1280
  const [isInsurance, toggleIsInsurance] = context.useState(false);
1254
1281
  const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
1255
- const calculatorParams = getCalculatorParams$1({ tableRows, isAnnuity: isAnnuity });
1256
- const defaultSum = getDefaultSum$1(calculatorParams);
1257
- const defaultMonths = getDefaultMonths$1(calculatorParams);
1258
- const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS$1;
1259
- const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS$1;
1260
- const rate = getCreditRate$1({ calculatorParams, isInsurance: isInsurance });
1261
- const monthlyPayment = getMonthlyPayment$1({
1282
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuity });
1283
+ const defaultSum = getDefaultSum(calculatorParams);
1284
+ const defaultMonths = getDefaultMonths(calculatorParams);
1285
+ const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
1286
+ const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
1287
+ const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
1288
+ const monthlyPayment = getMonthlyPayment({
1262
1289
  calculatorParams,
1263
- paymentType: DEFAULT_PAYMENT_TYPE$1,
1290
+ paymentType: DEFAULT_PAYMENT_TYPE,
1264
1291
  rate,
1265
1292
  sum: moneyValue || defaultSum,
1266
1293
  months: monthsValue || defaultMonths,
1267
1294
  });
1268
1295
  const title = 'Сумма кредита, ₽';
1269
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput$1({ title, calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput$1({
1296
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({ title, calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput({
1270
1297
  title: 'Сумма кредита, ₽',
1271
1298
  minMonths,
1272
1299
  maxMonths,
@@ -1278,23 +1305,23 @@
1278
1305
  : null }), jsxs("div", { className: "w-[351px]", children: [monthlyPayment ? (jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })) : null, renderButtonSection(context, buttons)] })] }));
1279
1306
  });
1280
1307
 
1281
- const STEP_MONEY$2 = 1000;
1308
+ const STEP_MONEY$1 = 1000;
1282
1309
  function renderRealEstateValue(props) {
1283
1310
  const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
1284
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM$1;
1285
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM$1;
1286
- return (jsx(InputRange, { title: "\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438, \u20BD ", items: [`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY$2, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1311
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1312
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1313
+ return (jsx(InputRange, { title: "\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438, \u20BD ", items: [`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1287
1314
  }
1288
1315
 
1289
- const STEP_MONEY$1 = 1000;
1316
+ const STEP_MONEY = 1000;
1290
1317
  function renderInitialFeeInput(props) {
1291
1318
  const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
1292
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM$1;
1293
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM$1;
1319
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1320
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1294
1321
  return (jsx(InputRange, { className: "mt-6", title: "\u041F\u0435\u0440\u0432\u043E\u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0439 \u0432\u0437\u043D\u043E\u0441, \u20BD ", items: [
1295
1322
  `От ${addSpacesBetweenNumbers(minSum)} рублей`,
1296
1323
  `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
1297
- ], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1324
+ ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1298
1325
  }
1299
1326
 
1300
1327
  function renderProposalMortgage({ credit, period, taxRefund }) {
@@ -1307,12 +1334,12 @@
1307
1334
  const [isInsurance, toggleIsInsurance] = context.useState(false);
1308
1335
  const [isFullInsurance, toggleIsFullInsurance] = context.useState(false);
1309
1336
  const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
1310
- const calculatorParams = getCalculatorParams$1({ tableRows, isAnnuity: isInsurance });
1311
- const defaultSum = getDefaultSum$1(calculatorParams);
1312
- const defaultMonths = getDefaultMonths$1(calculatorParams);
1313
- const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS$1;
1314
- const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS$1;
1315
- const rate = getCreditRate$1({ calculatorParams, isInsurance: isInsurance });
1337
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isInsurance });
1338
+ const defaultSum = getDefaultSum(calculatorParams);
1339
+ const defaultMonths = getDefaultMonths(calculatorParams);
1340
+ const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
1341
+ const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
1342
+ const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
1316
1343
  const monthlyPayment = 777777; // TODO: hardcode
1317
1344
  const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
1318
1345
  return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderInitialFeeInput({
@@ -1320,7 +1347,7 @@
1320
1347
  moneyValue,
1321
1348
  defaultSum,
1322
1349
  setMoneyValue,
1323
- }), renderMonthsInput$1({
1350
+ }), renderMonthsInput({
1324
1351
  title: 'Срок ипотеки, месяцев',
1325
1352
  minMonths,
1326
1353
  maxMonths,
@@ -1336,21 +1363,21 @@
1336
1363
  const [moneyValue, setMoneyValue] = context.useState(undefined);
1337
1364
  const [monthsValue, setMonthsValue] = context.useState(undefined);
1338
1365
  const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
1339
- const calculatorParams = getCalculatorParams$1({ tableRows, isAnnuity: false });
1340
- const defaultSum = getDefaultSum$1(calculatorParams);
1341
- const defaultMonths = getDefaultMonths$1(calculatorParams);
1366
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: false });
1367
+ const defaultSum = getDefaultSum(calculatorParams);
1368
+ const defaultMonths = getDefaultMonths(calculatorParams);
1342
1369
  const income = 948841;
1343
1370
  const finallySum = 1218841;
1344
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput$1({
1371
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1345
1372
  title: 'Сумма вклада, ₽',
1346
1373
  calculatorParams: { minSum, maxSum },
1347
1374
  moneyValue,
1348
1375
  defaultSum,
1349
1376
  setMoneyValue,
1350
- }), renderMonthsInput$1({
1377
+ }), renderMonthsInput({
1351
1378
  title: 'Срок вклада, месяцев',
1352
- minMonths: minMonths || DEFAULT_MIN_MONTHS$1,
1353
- maxMonths: maxMonths || DEFAULT_MAX_MONTHS$1,
1379
+ minMonths: minMonths || DEFAULT_MIN_MONTHS,
1380
+ maxMonths: maxMonths || DEFAULT_MAX_MONTHS,
1354
1381
  monthsValue,
1355
1382
  defaultMonths,
1356
1383
  setMonthsValue,
@@ -1366,19 +1393,19 @@
1366
1393
  const calculatorOtherParams = { minSum: minSumOther, maxSum: maxSumOther };
1367
1394
  const incomeBonus = 948841;
1368
1395
  const bonusOrDef = bonus || 2528;
1369
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput$1({
1396
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1370
1397
  title: 'Сумма покупок в категории путешествия, ₽',
1371
1398
  calculatorParams: calculatorTripParams,
1372
1399
  moneyValue: bonusTripValue,
1373
- defaultSum: getDefaultSum$1(calculatorTripParams),
1400
+ defaultSum: getDefaultSum(calculatorTripParams),
1374
1401
  setMoneyValue: setBonusTripValue,
1375
1402
  isShowItems: false,
1376
- }), renderWantedSumInput$1({
1403
+ }), renderWantedSumInput({
1377
1404
  className: 'mt-6',
1378
1405
  title: 'Сумма покупок в остальных категориях, ₽',
1379
1406
  calculatorParams: calculatorOtherParams,
1380
1407
  moneyValue: bonusOtherValue,
1381
- defaultSum: getDefaultSum$1(calculatorOtherParams),
1408
+ defaultSum: getDefaultSum(calculatorOtherParams),
1382
1409
  setMoneyValue: setBonusOtherValue,
1383
1410
  isShowItems: false,
1384
1411
  })] }), jsx("div", { children: bonusOrDef
@@ -1391,7 +1418,7 @@
1391
1418
  });
1392
1419
 
1393
1420
  const EmbeddableCalcBlocks = {
1394
- CreditCalculatorForm: CreditCalculatorForm$1,
1421
+ CreditCalculatorForm,
1395
1422
  MortgageCalculatorForm,
1396
1423
  DepositCalculatorForm,
1397
1424
  BonusCalculatorForm,
@@ -1406,7 +1433,6 @@
1406
1433
  return (jsx("section", { className: `box-border relative flex shrink-0 basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...blockCalcTabs, className: "flex justify-between" }) }) }, String(i)));
1407
1434
  };
1408
1435
 
1409
- const arrowBtnStyle$1 = 'absolute w-[56px] h-[56px] min-h-[56px] max-h-[56px] top-1 z-10 mt-[25px] bg-white rounded-full';
1410
1436
  const Calculator = JSX(({ className = '', context, calcTabs = [], anchor = null }) => {
1411
1437
  const tabsNav = calcTabs.map((_) => _.nav || {});
1412
1438
  const blockCalcTabs = calcTabs.map(({ calculatorBlock }) => calculatorBlock || {});
@@ -1419,7 +1445,12 @@
1419
1445
  const showPrevButton = tabsShift > 0;
1420
1446
  return (jsxs("section", { id: anchor, className: `box-border overflow-hidden relative font-sans w-100 bg-white text-primary-text ${className}`, children: [jsxs("div", { children: [tabsNav.length > 1
1421
1447
  ? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
1422
- : null, showPrevButton ? (jsx(ArrowButton, { className: `${arrowBtnStyle$1} left-3 top-3`, onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })) : null, showNextButton ? (jsx(ArrowButton, { className: `${arrowBtnStyle$1} right-3 top-3 rotate-180`, onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })) : null] }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: blockCalcTabs?.length
1448
+ : null, renderArrows({
1449
+ handler: [handlePrevClick, handleNextClick],
1450
+ isShown: [showPrevButton, showNextButton],
1451
+ btnClass: ['left-3', 'right-3'],
1452
+ className: 'top-8',
1453
+ })] }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: blockCalcTabs?.length
1423
1454
  ? blockCalcTabs.map(renderCalculatorBlock({ context, className }))
1424
1455
  : null })] }));
1425
1456
  });
@@ -1443,16 +1474,69 @@
1443
1474
  })) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
1444
1475
  }
1445
1476
 
1446
- const TAB_STYLE = 'px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke';
1447
- const ACTIVE_TAB_STYLE = 'px-2 h-16 pt-4 pb-2 text-white bg-primary-main';
1448
- const Tabs = JSX(({ tabs, currentTabIndex, onTabClick }) => {
1449
- return (jsx("div", { className: "flex items-end border-b border-main-stroke", role: "tablist", children: tabs?.map(renderTab$2(currentTabIndex, onTabClick)) }));
1450
- });
1451
- const renderTab$2 = (currentTabIndex, onTabClick) => (tab, index) => {
1452
- const isActive = currentTabIndex === index;
1453
- return (jsxs("div", { className: `flex h-full flex-1 cursor-pointer mr-2 last:mr-0 box-content ${isActive ? ACTIVE_TAB_STYLE : TAB_STYLE}`, role: "tab", onClick: () => onTabClick(index), "aria-selected": String(isActive), children: [tab?.icon ? renderIcon(tab, isActive) : null, jsxs("div", { children: [tab?.title ? jsx("h3", { className: "font-medium m-0 text-base", children: tab?.title }) : null, tab?.description ? (jsx("span", { className: `font-light text-xs ${isActive ? '' : 'text-secondary-text'}`, children: tab?.description })) : null] })] }, String(index)));
1477
+ function useExchangeRates(useAsyncData) {
1478
+ const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1479
+ const result = data?.hits?.hits?.map((_) => _._source) || [];
1480
+ return result.length ? getCurrencyListByRate(result) : result;
1481
+ }
1482
+ async function fetchExchangeRates() {
1483
+ try {
1484
+ const response = await fetch(EXCHANGE_RATES_URL, {
1485
+ method: 'POST',
1486
+ headers: {
1487
+ 'Content-Type': 'application/json',
1488
+ },
1489
+ body: JSON.stringify(EXCHANGE_RATES_BODY),
1490
+ });
1491
+ return await response.json();
1492
+ }
1493
+ catch (err) {
1494
+ console.error(err);
1495
+ }
1496
+ }
1497
+ const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
1498
+ const EXCHANGE_RATES_BODY = {
1499
+ query: {
1500
+ bool: {
1501
+ must: [
1502
+ {
1503
+ term: {
1504
+ // eslint-disable-next-line camelcase
1505
+ russian_region_code: '77',
1506
+ },
1507
+ },
1508
+ {
1509
+ term: {
1510
+ // eslint-disable-next-line camelcase
1511
+ from_volume: '0',
1512
+ },
1513
+ },
1514
+ {
1515
+ terms: {
1516
+ // eslint-disable-next-line camelcase
1517
+ currency_pair: ['USD/RUB', 'EUR/RUB'],
1518
+ },
1519
+ },
1520
+ ],
1521
+ },
1522
+ },
1454
1523
  };
1455
- const renderIcon = (tab, isActive) => (jsx("div", { className: "h-full mt-1", children: jsx(Img, { className: `w-5 h-5 mr-3 ${isActive ? 'invert' : ''}`, image: tab?.icon || 'CardIcon', asSVG: !isActive }) }));
1524
+ const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
1525
+ const currencyInfo = _['currency_first'];
1526
+ if (!validateRate(_['rate_buy']) && !validateRate(_['rate_sell'])) {
1527
+ return result;
1528
+ }
1529
+ const currencyCode = currencyInfo.code;
1530
+ if (!result.some((i) => i.code === currencyCode)) {
1531
+ result.push({
1532
+ code: currencyCode,
1533
+ buy: Number(_.rate_buy),
1534
+ sell: Number(_.rate_sell),
1535
+ });
1536
+ }
1537
+ return result;
1538
+ }, []);
1539
+ const validateRate = (value) => Math.round(value) > 0;
1456
1540
 
1457
1541
  function getTileHeadingType(className = '') {
1458
1542
  const colSpan = getColSpan(className);
@@ -1467,181 +1551,17 @@
1467
1551
  }
1468
1552
  }
1469
1553
 
1470
- const DEFAULT_MIN_SUM = 30000;
1471
- const DEFAULT_MAX_SUM = 3000000;
1472
- const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
1473
- const DEFAULT_MIN_MONTHS = 1;
1474
- const DEFAULT_MAX_MONTHS = 84;
1475
- const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
1476
- const MONTHS_IN_YEAR = 12;
1477
-
1478
- const getCalculatorParams = (params) => {
1479
- const { tableRows, isAnnuity = false } = params;
1480
- if (!tableRows)
1481
- return {};
1482
- const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
1483
- return calculatorParams || {};
1484
- };
1485
-
1486
- const DEFAULT_RATE = 5;
1487
- const getCreditRate = (params) => {
1488
- const { calculatorParams, isInsurance } = params;
1489
- if (!calculatorParams)
1490
- return DEFAULT_RATE;
1491
- return isInsurance
1492
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
1493
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
1494
- };
1495
-
1496
- const MAX_YEARS_LENGTH = 5;
1497
- const getCreditTermYears = (minMonths, maxMonths) => {
1498
- const totalYears = Math.ceil((maxMonths - minMonths) / 12);
1499
- const firstYear = Math.floor(minMonths / MONTHS_IN_YEAR) + 1;
1500
- const result = new Array(Math.min(totalYears - 1, MAX_YEARS_LENGTH))
1501
- .fill(0)
1502
- .map((_, i) => firstYear + i);
1503
- const maxYear = totalYears + firstYear - 1;
1504
- return result.concat(maxYear);
1505
- };
1506
-
1507
- const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
1508
- ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
1509
- : DEFAULT_MONTHS;
1510
-
1511
- const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
1512
- ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
1513
- : DEFAULT_SUM;
1514
-
1515
- const getMonthlyPayment = (params) => {
1516
- const { calculatorParams, paymentType, rate, sum, months } = params;
1517
- if (!calculatorParams)
1518
- return 0;
1519
- const finalSum = clamp(sum, calculatorParams.minSum || DEFAULT_MIN_SUM, calculatorParams.maxSum || DEFAULT_MAX_SUM);
1520
- if (paymentType === 'annuity') {
1521
- const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
1522
- return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
1523
- }
1524
- else {
1525
- return finalSum / months + finalSum * (Number(rate) / 12);
1526
- }
1527
- };
1528
-
1529
- const tableFunc = (table) => (input) => {
1530
- const [, output] = table.find(([predicate]) => predicate(input)) || [];
1531
- return output;
1532
- };
1533
-
1534
- const func = tableFunc([
1535
- [(_) => _ === 1, 'год'],
1536
- [(_) => _ <= 4, 'года'],
1537
- [() => true, 'лет'],
1538
- ]);
1539
- function renderButton(number, i, handleClick) {
1540
- const string = func(number);
1541
- return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", string] }) }, String(i)));
1542
- }
1543
-
1544
- const STEP_MONTHS = 1;
1545
- function renderMonthsInput(props) {
1546
- const { minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
1547
- return (jsx(InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }));
1548
- }
1554
+ var Currency;
1555
+ (function (Currency) {
1556
+ Currency["RUB"] = "RUB";
1557
+ Currency["EUR"] = "EUR";
1558
+ Currency["USD"] = "USD";
1559
+ })(Currency || (Currency = {}));
1549
1560
 
1550
- function renderProposal(monthlyPayment, rate) {
1551
- return (jsxs("div", { className: "box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(monthlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] }));
1552
- }
1553
-
1554
- function renderTermsButton() {
1555
- return (jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), jsx("div", { className: "w-80 text-2xs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] }));
1556
- }
1557
-
1558
- const STEP_MONEY = 1000;
1559
- function renderWantedSumInput(props) {
1560
- const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
1561
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1562
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1563
- return (jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
1564
- `От ${addSpacesBetweenNumbers(minSum)} рублей`,
1565
- `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
1566
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1567
- }
1568
-
1569
- const DEFAULT_PAYMENT_TYPE = 'annuity';
1570
- const BORDER_STYLE = 'border-solid border-[3px] border-primary-main rounded-md';
1571
- const CreditCalculatorForm = JSX(({ context, directoryName }) => {
1572
- const [moneyValue, setMoneyValue] = context.useState(undefined);
1573
- const [monthsValue, setMonthsValue] = context.useState(undefined);
1574
- const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
1575
- const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
1576
- const tableRows = useCreditCalculatorData(context.useAsyncData, directoryName).rows;
1577
- const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuityChecked });
1578
- const defaultSum = getDefaultSum(calculatorParams);
1579
- const defaultMonths = getDefaultMonths(calculatorParams);
1580
- const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
1581
- const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
1582
- const rate = getCreditRate({ calculatorParams, isInsurance: isInsuranceChecked });
1583
- const monthlyPayment = getMonthlyPayment({
1584
- calculatorParams,
1585
- paymentType: DEFAULT_PAYMENT_TYPE,
1586
- rate,
1587
- sum: moneyValue || defaultSum,
1588
- months: monthsValue || defaultMonths,
1589
- });
1590
- const creditTermYears = getCreditTermYears(minMonths, maxMonths);
1591
- function handleButtonClick(value) {
1592
- setMonthsValue(clamp(value * MONTHS_IN_YEAR, minMonths, maxMonths));
1593
- }
1594
- return (jsx("section", { className: "mt-7", children: jsxs("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${BORDER_STYLE}`, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "mr-[42px]", children: [renderWantedSumInput({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput({
1595
- minMonths,
1596
- maxMonths,
1597
- monthsValue,
1598
- defaultMonths,
1599
- setMonthsValue,
1600
- }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), renderProposal(monthlyPayment, rate)] }), renderTermsButton()] }) }));
1601
- });
1602
-
1603
- const DEFAULT_TABS = [
1604
- {
1605
- title: 'Кредит',
1606
- description: 'Ставка от 6% до 7 лет',
1607
- directoryName: 'credit-calculator-data',
1608
- icon: { icon: 'CardIcon' },
1609
- },
1610
- {
1611
- title: 'Кредит',
1612
- description: 'Ставка от 4% до 7 лет',
1613
- directoryName: 'credit-calculator-data1',
1614
- icon: { icon: 'ChartSquareIcon' },
1615
- },
1616
- {
1617
- title: 'Кредит',
1618
- description: 'Ставка от 3% до 6 лет',
1619
- directoryName: 'credit-calculator-data2',
1620
- icon: { icon: 'DiscountShapeIcon' },
1621
- },
1622
- ];
1623
-
1624
- const CreditCalculator = JSX(({ className = '', context, tabs = DEFAULT_TABS, anchor = null }) => {
1625
- const [currentTabIndex, setCurrentTabIndex] = context.useState(0);
1626
- return (jsxs("section", { className: `font-sans text-primary-text py-10 bg-white ${className}`, id: anchor, children: [jsx(Heading, { className: "w-full text-center mb-8", headingType: getTileHeadingType(className), title: "\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440" }), jsx(Tabs, { tabs: tabs, currentTabIndex: currentTabIndex, onTabClick: setCurrentTabIndex }), jsx(CreditCalculatorForm, { context: context, directoryName: tabs[currentTabIndex]?.directoryName })] }));
1561
+ const currencyNumberFormat = new Intl.NumberFormat('ru', {
1562
+ style: 'currency',
1563
+ currency: Currency.RUB,
1627
1564
  });
1628
-
1629
- function useExchangeRates(useAsyncData) {
1630
- const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1631
- return data || {};
1632
- }
1633
- async function fetchExchangeRates() {
1634
- try {
1635
- const response = await fetch(EXCHANGE_RATES_URL);
1636
- return await response.json();
1637
- }
1638
- catch (err) {
1639
- console.error(err);
1640
- }
1641
- }
1642
- const EXCHANGE_RATES_URL = '/api/v1/exchangerates.json';
1643
-
1644
- const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
1645
1565
  const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
1646
1566
 
1647
1567
  const TABLE_HEAD_STYLE = 'font-light text-left font-normal text-sm text-secondary-text';
@@ -1653,55 +1573,141 @@
1653
1573
  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)) })] }));
1654
1574
  });
1655
1575
  const renderCurrencyRow = (exchangeCurrencyItem) => {
1656
- const code = exchangeCurrencyItem?.currency?.currency;
1657
- return (jsxs("tr", { className: "pb-1", 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: "text-m-title-md ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.buyExchangeRate) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.saleExchangeRate) })] }, code));
1576
+ const code = exchangeCurrencyItem?.code;
1577
+ return (jsxs("tr", { className: "pb-1", 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: "text-m-title-md ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.buy) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.sell) })] }, code));
1658
1578
  };
1659
1579
 
1660
1580
  const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex text-sm ${className}`, children: [jsx(Img, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3 font-light", children: [address ? jsx("p", { className: "m-0 mb-[3px]", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0", 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] })] })));
1661
1581
 
1662
- const Input = JSX(({ className = '', id, name, type = 'text', placeholder }) => {
1663
- return (jsx("input", { className: className, id: id, name: name || id, type: type, placeholder: placeholder }));
1582
+ const roundTo = (value, precision = 2) => {
1583
+ const factor = Math.pow(10, precision);
1584
+ return Math.round(parseFloat(String(value)) * factor) / factor;
1585
+ };
1586
+
1587
+ const calculateResult = (value, rate, precision) => {
1588
+ const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
1589
+ return Number.isInteger(result) ? result : roundTo(result);
1590
+ };
1591
+ const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
1592
+
1593
+ const tableFunc = (table) => (input) => {
1594
+ const [, output] = table.find(([predicate]) => predicate(input)) || [];
1595
+ return output;
1596
+ };
1597
+
1598
+ const callbackCurrencySelect = (props) => tableFunc([
1599
+ [
1600
+ (_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
1601
+ () => props.handleConvert(props.value, Currency.RUB),
1602
+ ],
1603
+ [
1604
+ (_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
1605
+ () => props.handleConvert(props.value, Currency.USD),
1606
+ ],
1607
+ [() => true, () => props.handleConvert(props.value)],
1608
+ ])(props)?.();
1609
+
1610
+ function renderButton() {
1611
+ return (jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-full", version: "primary", href: "https://coins.rshb.ru/exchange", target: "_blank", children: "\u041A\u0443\u043F\u0438\u0442\u044C \u0432\u0430\u043B\u044E\u0442\u0443" }));
1612
+ }
1613
+
1614
+ const Input = JSX(({ className = '', id, name, type = 'text', placeholder, pattern, value, onChange }) => {
1615
+ const handleChange = (e) => {
1616
+ const validInputValue = e.target.validity.valid ? e.target.value : value;
1617
+ onChange(validInputValue);
1618
+ };
1619
+ return (jsx("input", { className: className, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: (e) => handleChange(e) }));
1664
1620
  });
1665
1621
 
1666
- const Select = JSX(({ className = '', id, name, children }) => {
1667
- return (jsx("select", { className: className, id: id, name: name || id, children: children }));
1622
+ const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
1623
+ return (jsx("select", { className: className, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
1668
1624
  });
1669
1625
 
1670
1626
  const SelectOption = JSX(({ className = '', value, selected, children }) => {
1671
1627
  return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
1672
1628
  });
1673
1629
 
1674
- const ExchangeCurrencyCalculator = JSX(({ codes, className = '' }) => {
1675
- return (jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput('Хочу продать', codes), renderInput('Получу', codes, 'USD'), jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-full", version: "primary", href: "#", children: "\u041A\u0443\u043F\u0438\u0442\u044C \u0432\u0430\u043B\u044E\u0442\u0443" })] }));
1676
- });
1677
- function renderInput(placeholder, codes, selected) {
1678
- return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12", type: "number", placeholder: `${placeholder}` }), codes.length ? (jsx(Select, { className: "h-9 -translate-x-4", children: codes.map((code, i) => (jsx(SelectOption, { value: code, selected: code === selected, children: code }, String(i)))) })) : null] }));
1630
+ function renderInput(props) {
1631
+ const { placeholder, rates, selected, value, setValue, setSelected } = props;
1632
+ return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "h-9 -translate-x-4", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
1679
1633
  }
1680
1634
 
1681
- const CURRENCY_CODES = ['USD', 'EUR'];
1682
- const EXCHANGE_CODES = ['RUB', 'USD', 'EUR'];
1683
- const DEFAULT_CURRENCY_ITEMS = [
1684
- {
1685
- buyExchangeRate: 90.6,
1686
- saleExchangeRate: 92.8,
1687
- currency: { id: 2, code: '978', currency: 'EUR', name: 'Евро' },
1688
- },
1689
- {
1690
- buyExchangeRate: 73.75,
1691
- saleExchangeRate: 75.95,
1692
- currency: { id: 1, code: '840', currency: 'USD', name: 'Американский доллар' },
1693
- },
1694
- ];
1635
+ const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell }) => {
1636
+ const [calcState, setCalcState] = context.useState({
1637
+ inputSell: '',
1638
+ inputBuy: '',
1639
+ selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
1640
+ selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
1641
+ });
1642
+ const handleSetCalcState = (newState) => {
1643
+ setCalcState((oldState) => ({ ...oldState, ...newState }));
1644
+ };
1645
+ return (jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput({
1646
+ placeholder: 'Хочу продать',
1647
+ rates: currencyRatesBuy,
1648
+ selected: calcState.selectSell,
1649
+ setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
1650
+ value: calcState.inputSell,
1651
+ setValue: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
1652
+ }), renderInput({
1653
+ placeholder: 'Получу',
1654
+ rates: currencyRatesSell,
1655
+ selected: calcState.selectBuy,
1656
+ setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
1657
+ value: calcState.inputBuy,
1658
+ setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
1659
+ }), renderButton()] }));
1660
+ });
1661
+ const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
1662
+ setCalcState({ selectSell: value });
1663
+ callbackCurrencySelect({
1664
+ value,
1665
+ oppositeValue: calcState.selectBuy,
1666
+ handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
1667
+ handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
1668
+ },
1669
+ });
1670
+ };
1671
+ const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
1672
+ setCalcState({ selectBuy: value });
1673
+ callbackCurrencySelect({
1674
+ value,
1675
+ oppositeValue: calcState.selectSell,
1676
+ handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
1677
+ });
1678
+ };
1679
+ const handleInputSell = (setCalcState, currencyRatesSell) => (value, codeFrom, codeTo) => {
1680
+ setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
1681
+ const rate = currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
1682
+ currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
1683
+ if (rate) {
1684
+ setCalcState({
1685
+ inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
1686
+ });
1687
+ }
1688
+ };
1689
+ const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, codeTo, codeFrom) => {
1690
+ setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
1691
+ const rate = currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
1692
+ currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
1693
+ if (rate) {
1694
+ setCalcState({
1695
+ inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
1696
+ });
1697
+ }
1698
+ };
1699
+
1695
1700
  const DEFAULT_LOCATION = {
1696
1701
  address: 'Москва, ул.Ленина д.28',
1697
1702
  distance: '6км',
1698
1703
  };
1699
1704
  const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', anchor = null }) => {
1700
- const data = useExchangeRates(context.useAsyncData);
1701
- const exchangeCurrencyItems = data?.exchangeRate?.currencies?.filter((item) => {
1702
- return CURRENCY_CODES.indexOf(item?.currency?.currency || '') !== -1;
1703
- }) || DEFAULT_CURRENCY_ITEMS;
1704
- return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, id: anchor, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-[43px] pt-4", children: [exchangeCurrencyItems ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: exchangeCurrencyItems })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), exchangeCurrencyItems?.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", exchangeCurrencyItems: exchangeCurrencyItems, codes: EXCHANGE_CODES })) : null] }) }) }));
1705
+ const currencyRates = useExchangeRates(context.useAsyncData);
1706
+ const currencyRatesBuy = currencyRates.filter((_) => _.buy);
1707
+ currencyRatesBuy.unshift({ code: Currency.RUB });
1708
+ const currencyRatesSell = currencyRates.filter((_) => _.sell);
1709
+ currencyRatesSell.push({ code: Currency.RUB });
1710
+ return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, id: anchor, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-[43px] pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell })) : null] }) }) }));
1705
1711
  });
1706
1712
 
1707
1713
  const LOGO_PATHS = [
@@ -1804,47 +1810,38 @@
1804
1810
  origins: ['t.me', 'telegram.org'],
1805
1811
  icon: { icon: 'TelegramIcon' },
1806
1812
  label: 'Телеграм',
1807
- width: '20px',
1808
- height: '16px',
1809
1813
  },
1810
1814
  {
1811
1815
  origins: ['vk.com'],
1812
1816
  icon: { icon: 'VKIcon' },
1813
1817
  label: 'ВКонтакте',
1814
- width: '24px',
1815
- height: '12px',
1816
1818
  },
1817
1819
  {
1818
1820
  origins: ['ok.ru'],
1819
1821
  icon: { icon: 'OkIcon' },
1820
1822
  label: 'Одноклассники',
1821
- width: '12px',
1822
- height: '20px',
1823
1823
  },
1824
1824
  {
1825
1825
  origins: ['apps.apple.com'],
1826
1826
  icon: { icon: 'AppleIcon' },
1827
1827
  label: 'App Store',
1828
- width: '20px',
1829
- height: '22px',
1830
1828
  },
1831
1829
  {
1832
1830
  origins: ['play.google.com'],
1833
1831
  icon: { icon: 'PlayMarketIcon' },
1834
1832
  label: 'Google Play',
1835
- width: '21px',
1836
- height: '21px',
1837
1833
  },
1838
1834
  ];
1839
1835
  const MediaButton = JSX(({ href, version = 'primary' }) => {
1840
- const { icon, width, height, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
1841
- if (!icon)
1836
+ const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
1837
+ if (!icon) {
1842
1838
  return null;
1839
+ }
1843
1840
  const classes = version === 'secondary'
1844
1841
  ? 'bg-secondary-light hover:bg-secondary-hover'
1845
1842
  : 'border-main-divider border-solid border-[1px] hover:bg-primary-main';
1846
1843
  const isPrimary = version === 'primary';
1847
- 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, iconVersion: 'normal' }, imageClassName: isPrimary ? 'group-hover:text-white' : '', width: width, height: height, asSVG: true })) : null }));
1844
+ 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: isPrimary ? 'group-hover:text-white' : '', width: "24", height: "24", asSVG: true })) : null }));
1848
1845
  });
1849
1846
 
1850
1847
  const SocialMedia = JSX(({ className = '', media, version, context, children }) => {
@@ -1856,13 +1853,13 @@
1856
1853
  const TextInformation = JSX(({ className, links, context }) => {
1857
1854
  const router = context.useRouter();
1858
1855
  const { handlerDecorator } = context;
1859
- return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5 pb-[5px]", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-[5px]", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1856
+ return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-2.5", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1860
1857
  });
1861
1858
  const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
1862
1859
 
1863
1860
  const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
1864
1861
  const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, anchor = null, }) => {
1865
- return (jsxs("footer", { className: `px-9 pt-9 pb-10 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
1862
+ return (jsxs("footer", { className: `p-9 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
1866
1863
  });
1867
1864
 
1868
1865
  const GracePeriod = JSX(({ className = '', title, description, calendar, anchor = null }) => {
@@ -1884,7 +1881,7 @@
1884
1881
 
1885
1882
  const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
1886
1883
 
1887
- const isHrefActive = (href, router, cmp = (href, baseHref) => baseHref.startsWith(href)) => {
1884
+ const isHrefActive = (href, router, cmp = (targetHref, baseHref) => baseHref.startsWith(targetHref)) => {
1888
1885
  return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
1889
1886
  };
1890
1887
 
@@ -1897,21 +1894,19 @@
1897
1894
  const TEXT_CLASSES$2 = 'font-sans font-light text-sm';
1898
1895
  const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
1899
1896
  const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses$1(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$2(bgColor, active, flat), children: text || children }) })));
1900
- const getLinkClasses$1 = (bgColor, active, flat) => {
1897
+ const getLinkClasses$1 = (bgColor, active = false, flat = false) => {
1901
1898
  let classes = 'border-transparent';
1902
1899
  if (active) {
1903
1900
  classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
1904
1901
  }
1905
1902
  return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
1906
1903
  };
1907
- const getTextClasses$2 = (bgColor, active, flat) => {
1908
- let classes = 'text-white';
1909
- if (bgColor === 'bg-white') {
1910
- classes = active
1911
- ? 'text-primary-main'
1912
- : `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
1904
+ const getTextClasses$2 = (bgColor, active = false, flat = false) => {
1905
+ if (bgColor !== 'bg-white') {
1906
+ return `text-white ${TEXT_CLASSES$2}`;
1913
1907
  }
1914
- return `${classes} ${TEXT_CLASSES$2}`;
1908
+ const nonActiveAtoms = `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
1909
+ return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$2}`;
1915
1910
  };
1916
1911
 
1917
1912
  const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
@@ -1960,75 +1955,41 @@
1960
1955
  return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
1961
1956
  };
1962
1957
 
1963
- const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
1964
-
1965
- const isClient$1 = !isSSR();
1966
- const headerSubMenuObserver = isClient$1
1967
- ? new IntersectionObserver((entries) => {
1968
- const createArrays = (selectors) => selectors.map((_) => Array.from(window.document.querySelectorAll(_)));
1969
- const headerSubMenuButtonElement = window.document.querySelector('[data-header-submenu-visible=toggled]');
1970
- const [headerSubMenuItems, dotsHeaderSubMenuItems] = createArrays([
1971
- '[data-item-name=header-submenu]',
1972
- '[data-item-name=dots-header-submenu]',
1973
- ]);
1974
- const visibilityList = {};
1975
- entries.forEach((_) => {
1976
- visibilityList[_.target.toString()] = _.isIntersecting;
1977
- });
1978
- const isHeaderSubMenuButtonShow = toggleVisibilityInItems(visibilityList, dotsHeaderSubMenuItems, 'hidden');
1979
- toggleVisibilityInItems(visibilityList, headerSubMenuItems, 'invisible');
1980
- if (headerSubMenuButtonElement) {
1981
- isHeaderSubMenuButtonShow
1982
- ? headerSubMenuButtonElement.classList.remove('hidden')
1983
- : headerSubMenuButtonElement.classList.add('hidden');
1984
- }
1985
- }, { root: window.document, threshold: 1.0 })
1986
- : undefined;
1987
- // TODO: add types
1988
- const toggleVisibilityInItems = (visibilityList, items, className) => {
1989
- const isReversed = className !== 'hidden';
1990
- return items.some((_) => {
1991
- const key = _.toString();
1992
- const option = isReversed ? !visibilityList[key] : visibilityList[key];
1993
- key in visibilityList ? _.classList.toggle(className, option) : null;
1994
- return isReversed ? _.classList.contains('hidden') : !_.classList.contains('hidden');
1995
- });
1996
- };
1997
-
1998
1958
  const DOT_BG_COLORS_MAP = {
1999
1959
  'bg-white': 'bg-primary-text',
2000
1960
  transparent: 'bg-white',
2001
1961
  };
2002
- const HeaderSubMenu = JSX(({ context, subItems, bgColor }) => {
2003
- const [subMenuIsShow, setHiddenMenuIsShow] = context.useState(false);
1962
+ const DropdownMenu = JSX((props) => {
1963
+ const { menuVisible, toggleMenu, menuItems, bgColor, context } = props;
1964
+ const { useRouter, handlerDecorator } = context;
1965
+ const router = useRouter();
1966
+ return (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${menuVisible ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleMenu, "aria-label": `${menuVisible ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, children: Array(3).fill(bgColor).map(renderDot) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${menuVisible ? '' : 'hidden'}`, "aria-hidden": !menuVisible, children: renderDotsSubMenuItems(menuItems, router, handlerDecorator) })] }));
1967
+ });
1968
+ const renderDotsSubMenuItems = (menuItems, router, handlerDecorator) => menuItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
1969
+ const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
1970
+
1971
+ const HeaderSubMenu = JSX(({ context, subItems = [], bgColor }) => {
1972
+ const [menuVisible, setMenuVisible] = context.useState(false);
2004
1973
  const router = context.useRouter();
2005
- const { handlerDecorator } = context;
2006
- setTimeout(() => {
2007
- if (isSSR()) {
1974
+ const { handlerDecorator, IntersectionObserverTag } = context;
1975
+ const [visibleItemsCount, setVisibleItemsCount] = context.useState(subItems.length);
1976
+ const dropDownMenuItems = subItems.slice(visibleItemsCount);
1977
+ const activeSubItem = findActiveSubItem(router)(subItems);
1978
+ const toggleMenu = () => setMenuVisible(!menuVisible);
1979
+ const observerCallback = (itemIndex) => (entries) => {
1980
+ if (!entries.length) {
2008
1981
  return;
2009
1982
  }
2010
- const headerSubMenu = globalThis.document.querySelectorAll('[data-item-name=header-submenu]');
2011
- headerSubMenu.forEach((_) => {
2012
- headerSubMenuObserver?.observe(_);
2013
- });
2014
- }, 200);
2015
- const activeSubItem = findActiveSubItem(router)(subItems);
2016
- const toggleSubMenu = () => setHiddenMenuIsShow(!subMenuIsShow);
2017
- const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), dataItemName: "header-submenu", bgColor: bgColor }, _.href)));
2018
- return (jsxs("nav", { className: "relative mt-5", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52", children: subMenu }), renderDotsSubMenu({
2019
- subMenuIsShow,
2020
- toggleSubMenu,
2021
- subItems,
2022
- bgColor,
2023
- router,
2024
- handlerDecorator,
2025
- })] }));
2026
- });
2027
- // TODO: add types
2028
- const renderDotsSubMenu = ({ subMenuIsShow, toggleSubMenu, subItems, bgColor, router, handlerDecorator, }) => (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, "data-header-submenu-visible": "toggled", children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleSubMenu, "aria-label": `${subMenuIsShow ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, children: Array(3).fill(bgColor).map(renderDot) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`, "aria-hidden": !subMenuIsShow, children: renderDotsSubMenuItems(subItems, router, handlerDecorator) })] }));
2029
- // TODO: add types
2030
- const renderDotsSubMenuItems = (subItems, router, handlerDecorator) => subItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), "data-item-name": "dots-header-submenu", className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
2031
- const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
1983
+ const entry = entries[0];
1984
+ if (entry.intersectionRatio < 1) {
1985
+ setVisibleItemsCount((prev) => Math.min(prev, itemIndex));
1986
+ }
1987
+ else {
1988
+ setVisibleItemsCount((prev) => Math.max(prev, itemIndex + 1));
1989
+ }
1990
+ };
1991
+ return (jsxs("nav", { className: "relative mt-5", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52", children: subItems.map((_, i) => (jsx(IntersectionObserverTag, { Tag: "span", observerCallback: observerCallback(i), observerOptions: { threshold: 1 }, children: jsx(HeaderItem, { className: `mr-8 ${visibleItemsCount - 1 < i ? 'invisible' : ''}`, active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }) }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { context: context, menuVisible: menuVisible, toggleMenu: toggleMenu, menuItems: dropDownMenuItems, bgColor: bgColor })) : null] }));
1992
+ });
2032
1993
 
2033
1994
  const BORDER_COLORS = {
2034
1995
  'bg-white': 'bg-main-divider',
@@ -2057,7 +2018,6 @@
2057
2018
  return (jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [jsx("span", { className: "text-secondary-text text-base", children: title }), jsxs("span", { className: "text-primary-main text-title-2xs", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
2058
2019
  }
2059
2020
 
2060
- const arrowBtnStyle = 'absolute w-12 h-12 min-h-12 max-h-12 top-1 z-10 mt-[25px] bg-white rounded-full text-primary-text';
2061
2021
  const InsuranceAmountBlockInner = JSX(({ className = '', context, cards = [], anchor = null }) => {
2062
2022
  const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
2063
2023
  const [tabsShift, setTabsShift] = context.useState(0);
@@ -2076,11 +2036,16 @@
2076
2036
  isLastShift,
2077
2037
  setActiveSlideIndex,
2078
2038
  })
2079
- : null, showPrevButton ? (jsxs("div", { children: [jsx(ArrowButton, { className: `${arrowBtnStyle} left-0 top-9`, onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" }), jsx("div", { className: "absolute top-0 left-0 h-[168px] w-[84px] bg-opacity-from-white" })] })) : null, showNextButton ? (jsxs("div", { children: [jsx(ArrowButton, { className: `${arrowBtnStyle} right-0 top-9 rotate-180`, onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" }), jsx("div", { className: "absolute top-0 right-0 h-[168px] w-[100px] bg-opacity-to-white" })] })) : null] }) }));
2039
+ : null, renderArrows({
2040
+ handler: [handlePrevClick, handleNextClick],
2041
+ isShown: [showPrevButton, showNextButton],
2042
+ btnClass: ['left-[50px]', 'right-[50px]'],
2043
+ className: 'top-[62px]',
2044
+ }), showPrevButton ? (jsx("div", { className: "absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white" })) : null, showNextButton ? (jsx("div", { className: "absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white" })) : null] }) }));
2080
2045
  });
2081
2046
  function renderGallery({ tabsShift, cards, activeSlideIndex, isLastShift, setActiveSlideIndex, }) {
2082
2047
  const tabsShiftWidth = isLastShift ? tabsShift * 460 - 240 : tabsShift * 460;
2083
- return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap gap-3.5 pb-[38px] px-[50px]", children: cards.map((slide, i) => renderSlide({
2048
+ return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000 px-[50px]", children: jsx("div", { className: "w-full flex flex-nowrap gap-3.5 pb-[38px]", children: cards.map((slide, i) => renderSlide({
2084
2049
  slide,
2085
2050
  i,
2086
2051
  activeSlideIndex,
@@ -2225,7 +2190,7 @@
2225
2190
  const renderShimmer = (size = 3) => goldenSequence(100, size)
2226
2191
  .map((_) => Math.floor(_))
2227
2192
  .map(renderShimmerItem);
2228
- const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
2193
+ const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
2229
2194
  const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
2230
2195
 
2231
2196
  const productGalleryStyleMap = {
@@ -2321,7 +2286,12 @@
2321
2286
  const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT;
2322
2287
  const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT;
2323
2288
  const showPrevButton = isUseSlider && activeCardIndex > 0;
2324
- return (jsxs("div", { children: [showPrevButton ? (jsx(ArrowButton, { className: "absolute top-1/2 left-8 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })) : null, showNextButton ? (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6 rotate-180", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })) : null] }));
2289
+ return (jsx("div", { children: renderArrows({
2290
+ handler: [handlePrevClick, handleNextClick],
2291
+ isShown: [showPrevButton, showNextButton],
2292
+ btnClass: ['left-8', 'right-8'],
2293
+ className: 'top-1/2 mt-6',
2294
+ }) }));
2325
2295
  };
2326
2296
 
2327
2297
  const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, anchor = null }) => {
@@ -2383,7 +2353,7 @@
2383
2353
  });
2384
2354
 
2385
2355
  const GroupBlockTabs = JSX((props) => {
2386
- const { tabs, currentTag, onTabClick, className = '', isShowCounter = true } = props;
2356
+ const { tabs, currentTag, onTabClick, className = '', isShowCounter } = props;
2387
2357
  return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab(onTabClick, isShowCounter, currentTag)) }));
2388
2358
  });
2389
2359
  const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
@@ -2393,7 +2363,7 @@
2393
2363
  const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
2394
2364
  const counterBlockStyle = `${badgeStyle}
2395
2365
  ${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
2396
- return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: `mr-8 ${tabText}`, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
2366
+ return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
2397
2367
  };
2398
2368
 
2399
2369
  function style2className(style) {
@@ -2406,7 +2376,7 @@
2406
2376
  };
2407
2377
 
2408
2378
  const GroupBlocksItem = JSX(({ groupBlocks, context }) => {
2409
- return (jsx("div", { className: 'grid grid-cols-12 gap-2 box-border', children: groupBlocks?.length ? groupBlocks.map(renderBlock$1(context)) : null }));
2379
+ return (jsx("div", { className: "grid grid-cols-12 gap-2 box-border", children: groupBlocks?.length ? groupBlocks.map(renderBlock$1(context)) : null }));
2410
2380
  });
2411
2381
  const renderBlock$1 = (context) => (block, i) => {
2412
2382
  const type = block?.blockType;
@@ -2422,16 +2392,16 @@
2422
2392
  return tag ? blocks.filter((block) => block?.tags?.includes(tag)) : blocks;
2423
2393
  };
2424
2394
 
2425
- const GroupBlock = JSX(({ className = '', tabs, context, anchor = null, groupBlocks = [] }) => {
2395
+ const GroupBlock = JSX(({ className = '', tabs, context, anchor = null, groupBlocks = [], isShowCounter }) => {
2426
2396
  const [currentTag, setCurrentTag] = context.useState(tabs?.[0]?.tag);
2427
2397
  const filteredBlocks = filterBlocksByTag(groupBlocks, currentTag);
2428
2398
  const tabsNewMap = tabs?.map((tab) => {
2429
2399
  const count = tab.tag
2430
- ? groupBlocks.filter((block) => block?.tags?.includes(`${tab.tag}`)).length
2400
+ ? groupBlocks.filter((block) => block?.tags?.includes(tab.tag)).length
2431
2401
  : groupBlocks.length;
2432
2402
  return { ...tab, count };
2433
2403
  });
2434
- return (jsxs("section", { id: anchor, className: `box-border gap-1 h-12 ${className}`, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap })) : null, groupBlocks.length ? (jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks })) : null] }));
2404
+ return (jsxs("section", { id: anchor, className: `box-border gap-1 ${className}`, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap, isShowCounter: isShowCounter })) : null, groupBlocks.length ? (jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks })) : null] }));
2435
2405
  });
2436
2406
 
2437
2407
  function getElementsColsValue(className = '') {
@@ -2448,10 +2418,10 @@
2448
2418
  }
2449
2419
 
2450
2420
  const BonusBenefitsBlock = JSX(({ className = '', title, subtitle, bonusBenefits, anchor = null }) => {
2451
- return (jsxs("section", { className: `font-sans text-primary-text bg-white p-50 flex flex-col ${className}`, id: anchor, children: [title ? (jsx(Heading, { headingType: "h3", className: "text-center mb-[10px]", title: title })) : null, subtitle ? jsx("span", { className: "text-md font-normal text-center", children: subtitle }) : null, bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
2421
+ return (jsxs("section", { className: `font-sans text-primary-text bg-white p-50 flex flex-col text-center ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-[10px]", title: title }) : null, subtitle ? jsx("span", { className: "text-md font-normal", children: subtitle }) : null, bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
2452
2422
  });
2453
2423
  const renderBonusBenefit = (bonusBenefit, i) => {
2454
- return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? (jsx("span", { className: "title-2xs text-center m-0", children: bonusBenefit.label })) : null })] }, String(i)));
2424
+ return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "title-2xs m-0", children: bonusBenefit.label }) : null })] }, String(i)));
2455
2425
  };
2456
2426
 
2457
2427
  const Blocks = {
@@ -2460,7 +2430,6 @@
2460
2430
  Bonus,
2461
2431
  ComparisonTable,
2462
2432
  Calculator,
2463
- CreditCalculator,
2464
2433
  ExchangeRateTile,
2465
2434
  Footer,
2466
2435
  Gallery,
@@ -2494,8 +2463,9 @@
2494
2463
  blocks?.forEach((block) => {
2495
2464
  const currentHash = globalThis.location?.hash; // TODO: remove globalThis, use href from router
2496
2465
  const anchorHash = `#${block?.id}`;
2497
- if (currentHash === anchorHash)
2466
+ if (currentHash === anchorHash) {
2498
2467
  return;
2468
+ }
2499
2469
  const position = block?.getBoundingClientRect();
2500
2470
  if (position && position.top > 0 && position.top < 150) {
2501
2471
  router.replace(`#${block?.id}`);
@@ -2503,6 +2473,8 @@
2503
2473
  });
2504
2474
  };
2505
2475
 
2476
+ const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
2477
+
2506
2478
  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() })));
2507
2479
  const renderLikeIcon = () => {
2508
2480
  const params = {