@redneckz/wildless-cms-uni-blocks 0.13.9 → 0.13.11

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 (485) hide show
  1. package/bundle/ProjectSettings.d.ts +4 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +68 -38
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Header/HeaderSubMenu.d.ts +5 -1
  6. package/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  7. package/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  8. package/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  9. package/bundle/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  10. package/bundle/components/StickyBottomMenu/StickyBottomMenu.fallback.d.ts +1 -0
  11. package/bundle/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
  12. package/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  13. package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  14. package/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  15. package/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  16. package/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  17. package/bundle/hooks/fallbackWCMSResource.d.ts +1 -1
  18. package/bundle/hooks/useActiveRoute.d.ts +2 -0
  19. package/bundle/hooks/useSWRResource.d.ts +1 -1
  20. package/bundle/icons/IconName.d.ts +10 -6
  21. package/bundle/services/sitemap/SitemapData.d.ts +5 -1
  22. package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  23. package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  24. package/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  25. package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  26. package/cosmos-static/icons/BurgerIcon.svg +1 -1
  27. package/cosmos-static/icons/ChartIcon.svg +1 -0
  28. package/cosmos-static/icons/MapOpenedIcon.svg +1 -0
  29. package/dist/ProjectSettings.d.ts +4 -0
  30. package/dist/ProjectSettings.js +6 -0
  31. package/dist/ProjectSettings.js.map +1 -1
  32. package/dist/components/ApplicationForm/ResponseNotification.js +1 -1
  33. package/dist/components/Blocks.js +2 -0
  34. package/dist/components/Blocks.js.map +1 -1
  35. package/dist/components/Blocks.mobile.js +2 -0
  36. package/dist/components/Blocks.mobile.js.map +1 -1
  37. package/dist/components/ContentPage/ContentPage.js +3 -2
  38. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  39. package/dist/components/ContentPage/ContentPage.page.json +37 -0
  40. package/dist/components/ContentPage/useContentPageData.js +1 -1
  41. package/dist/components/ContentPage/useContentPageData.js.map +1 -1
  42. package/dist/components/Header/Header.js +6 -5
  43. package/dist/components/Header/Header.js.map +1 -1
  44. package/dist/components/Header/HeaderSubMenu.d.ts +5 -1
  45. package/dist/components/Header/HeaderSubMenu.js +8 -7
  46. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  47. package/dist/components/PictureText/PictureText.js +1 -1
  48. package/dist/components/PictureText/PictureText.js.map +1 -1
  49. package/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  50. package/dist/components/StickyBottomMenu/ActiveSubMenu.js +9 -0
  51. package/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  52. package/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  53. package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +12 -0
  54. package/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  55. package/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  56. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +38 -0
  57. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  58. package/dist/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  59. package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.d.ts +1 -0
  60. package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js +7 -0
  61. package/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -0
  62. package/dist/components/StickyBottomMenu/StickyBottomMenu.js +6 -0
  63. package/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  64. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
  65. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +30 -0
  66. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -0
  67. package/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  68. package/dist/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  69. package/dist/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  70. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  71. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  72. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  73. package/dist/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  74. package/dist/components/StickyBottomMenu/TopItemMobile.js +12 -0
  75. package/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  76. package/dist/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  77. package/dist/components/StickyBottomMenu/renderMenuItems.js +13 -0
  78. package/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  79. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  80. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +26 -0
  81. package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  82. package/dist/hooks/fallbackWCMSResource.d.ts +1 -1
  83. package/dist/hooks/fallbackWCMSResource.js +3 -2
  84. package/dist/hooks/fallbackWCMSResource.js.map +1 -1
  85. package/dist/hooks/useActiveRoute.d.ts +2 -0
  86. package/dist/hooks/useActiveRoute.js +11 -0
  87. package/dist/hooks/useActiveRoute.js.map +1 -0
  88. package/dist/hooks/useSWRResource.d.ts +1 -1
  89. package/dist/hooks/useSWRResource.js +3 -2
  90. package/dist/hooks/useSWRResource.js.map +1 -1
  91. package/dist/icons/IconName.d.ts +10 -6
  92. package/dist/icons/IconName.js +9 -5
  93. package/dist/icons/IconName.js.map +1 -1
  94. package/dist/services/sitemap/SitemapData.d.ts +5 -1
  95. package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  96. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  97. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  98. package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  99. package/dist/ui-kit/BaseTile/BaseTile.js +8 -5
  100. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  101. package/dist/ui-kit/DialogManager/Dialog.js +1 -1
  102. package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  103. package/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  104. package/dist/ui-kit/DialogManager/isDialogOpen.js +5 -0
  105. package/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  106. package/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
  107. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  108. package/dist/ui-kit/SearchBar/SearchBar.js +2 -1
  109. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  110. package/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
  111. package/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  112. package/dist/ui-kit/Sitemap/Sitemap.js +3 -1
  113. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  114. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  115. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  116. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  117. package/lib/ProjectSettings.d.ts +4 -0
  118. package/lib/ProjectSettings.js +6 -0
  119. package/lib/ProjectSettings.js.map +1 -1
  120. package/lib/common.css +1 -1
  121. package/lib/components/ApplicationForm/ResponseNotification.js +1 -1
  122. package/lib/components/Blocks.js +2 -0
  123. package/lib/components/Blocks.js.map +1 -1
  124. package/lib/components/Blocks.mobile.js +2 -0
  125. package/lib/components/Blocks.mobile.js.map +1 -1
  126. package/lib/components/ContentPage/ContentPage.js +3 -2
  127. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  128. package/lib/components/ContentPage/ContentPage.page.json +37 -0
  129. package/lib/components/ContentPage/useContentPageData.js +1 -1
  130. package/lib/components/ContentPage/useContentPageData.js.map +1 -1
  131. package/lib/components/Header/Header.js +6 -5
  132. package/lib/components/Header/Header.js.map +1 -1
  133. package/lib/components/Header/HeaderSubMenu.d.ts +5 -1
  134. package/lib/components/Header/HeaderSubMenu.js +8 -7
  135. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  136. package/lib/components/PictureText/PictureText.js +1 -1
  137. package/lib/components/PictureText/PictureText.js.map +1 -1
  138. package/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  139. package/lib/components/StickyBottomMenu/ActiveSubMenu.js +7 -0
  140. package/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  141. package/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  142. package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +10 -0
  143. package/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  144. package/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  145. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +36 -0
  146. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  147. package/lib/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  148. package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.d.ts +1 -0
  149. package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js +4 -0
  150. package/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -0
  151. package/lib/components/StickyBottomMenu/StickyBottomMenu.fixture.d.ts +8 -0
  152. package/lib/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.d.ts +6 -0
  153. package/lib/components/StickyBottomMenu/StickyBottomMenu.js +4 -0
  154. package/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  155. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.d.ts +2 -0
  156. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +28 -0
  157. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -0
  158. package/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  159. package/lib/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  160. package/lib/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  161. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  162. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  163. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  164. package/lib/components/StickyBottomMenu/TopItemMobile.d.ts +8 -0
  165. package/lib/components/StickyBottomMenu/TopItemMobile.js +9 -0
  166. package/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  167. package/lib/components/StickyBottomMenu/renderMenuItems.d.ts +2 -0
  168. package/lib/components/StickyBottomMenu/renderMenuItems.js +10 -0
  169. package/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  170. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  171. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +23 -0
  172. package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  173. package/lib/hooks/fallbackWCMSResource.d.ts +1 -1
  174. package/lib/hooks/fallbackWCMSResource.js +3 -2
  175. package/lib/hooks/fallbackWCMSResource.js.map +1 -1
  176. package/lib/hooks/useActiveRoute.d.ts +2 -0
  177. package/lib/hooks/useActiveRoute.js +8 -0
  178. package/lib/hooks/useActiveRoute.js.map +1 -0
  179. package/lib/hooks/useSWRResource.d.ts +1 -1
  180. package/lib/hooks/useSWRResource.js +3 -2
  181. package/lib/hooks/useSWRResource.js.map +1 -1
  182. package/lib/icons/IconName.d.ts +10 -6
  183. package/lib/icons/IconName.js +9 -5
  184. package/lib/icons/IconName.js.map +1 -1
  185. package/lib/services/sitemap/SitemapData.d.ts +5 -1
  186. package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  187. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  188. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  189. package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  190. package/lib/ui-kit/BaseTile/BaseTile.js +8 -5
  191. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  192. package/lib/ui-kit/DialogManager/Dialog.js +1 -1
  193. package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  194. package/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  195. package/lib/ui-kit/DialogManager/isDialogOpen.js +2 -0
  196. package/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  197. package/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
  198. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  199. package/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +0 -1
  200. package/lib/ui-kit/LocationDialog/renderRegion.d.ts +0 -1
  201. package/lib/ui-kit/LocationDialog/renderRegionGroup.d.ts +0 -1
  202. package/lib/ui-kit/SearchBar/SearchBar.js +2 -1
  203. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  204. package/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
  205. package/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  206. package/lib/ui-kit/Sitemap/Sitemap.js +3 -1
  207. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  208. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  209. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  210. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  211. package/mobile/bundle/ProjectSettings.d.ts +4 -0
  212. package/mobile/bundle/bundle.umd.js +446 -68
  213. package/mobile/bundle/bundle.umd.min.js +1 -1
  214. package/mobile/bundle/components/Header/HeaderSubMenu.d.ts +5 -1
  215. package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  216. package/mobile/bundle/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  217. package/mobile/bundle/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  218. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  219. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenu.fallback.d.ts +1 -0
  220. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  221. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  222. package/mobile/bundle/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  223. package/mobile/bundle/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  224. package/mobile/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  225. package/mobile/bundle/hooks/fallbackWCMSResource.d.ts +1 -1
  226. package/mobile/bundle/hooks/useActiveRoute.d.ts +2 -0
  227. package/mobile/bundle/hooks/useSWRResource.d.ts +1 -1
  228. package/mobile/bundle/icons/IconName.d.ts +10 -6
  229. package/mobile/bundle/services/sitemap/SitemapData.d.ts +5 -1
  230. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  231. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  232. package/mobile/bundle/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  233. package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  234. package/mobile/dist/ProjectSettings.d.ts +4 -0
  235. package/mobile/dist/ProjectSettings.js +6 -0
  236. package/mobile/dist/ProjectSettings.js.map +1 -1
  237. package/mobile/dist/components/ApplicationForm/ResponseNotification.js +1 -1
  238. package/mobile/dist/components/Blocks.js +2 -0
  239. package/mobile/dist/components/Blocks.js.map +1 -1
  240. package/mobile/dist/components/ContentPage/ContentPage.js +3 -2
  241. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  242. package/mobile/dist/components/ContentPage/ContentPage.page.json +37 -0
  243. package/mobile/dist/components/ContentPage/useContentPageData.js +1 -1
  244. package/mobile/dist/components/ContentPage/useContentPageData.js.map +1 -1
  245. package/mobile/dist/components/Header/HeaderSubMenu.d.ts +5 -1
  246. package/mobile/dist/components/Header/HeaderSubMenu.js +8 -7
  247. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  248. package/mobile/dist/components/PictureText/PictureText.js +1 -1
  249. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  250. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  251. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js +9 -0
  252. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  253. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  254. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js +12 -0
  255. package/mobile/dist/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  256. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  257. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +38 -0
  258. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  259. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  260. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.d.ts +1 -0
  261. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js +7 -0
  262. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -0
  263. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +30 -0
  264. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  265. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  266. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  267. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  268. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  269. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  270. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  271. package/mobile/dist/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  272. package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js +12 -0
  273. package/mobile/dist/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  274. package/mobile/dist/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  275. package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js +13 -0
  276. package/mobile/dist/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  277. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  278. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +26 -0
  279. package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  280. package/mobile/dist/hooks/fallbackWCMSResource.d.ts +1 -1
  281. package/mobile/dist/hooks/fallbackWCMSResource.js +3 -2
  282. package/mobile/dist/hooks/fallbackWCMSResource.js.map +1 -1
  283. package/mobile/dist/hooks/useActiveRoute.d.ts +2 -0
  284. package/mobile/dist/hooks/useActiveRoute.js +11 -0
  285. package/mobile/dist/hooks/useActiveRoute.js.map +1 -0
  286. package/mobile/dist/hooks/useSWRResource.d.ts +1 -1
  287. package/mobile/dist/hooks/useSWRResource.js +3 -2
  288. package/mobile/dist/hooks/useSWRResource.js.map +1 -1
  289. package/mobile/dist/icons/IconName.d.ts +10 -6
  290. package/mobile/dist/icons/IconName.js +9 -5
  291. package/mobile/dist/icons/IconName.js.map +1 -1
  292. package/mobile/dist/services/sitemap/SitemapData.d.ts +5 -1
  293. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  294. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  295. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  296. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  297. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +8 -5
  298. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  299. package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -1
  300. package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
  301. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  302. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js +5 -0
  303. package/mobile/dist/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  304. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +1 -1
  305. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  306. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +2 -1
  307. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  308. package/mobile/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
  309. package/mobile/dist/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  310. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +3 -1
  311. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  312. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  313. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  314. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  315. package/mobile/lib/ProjectSettings.d.ts +4 -0
  316. package/mobile/lib/ProjectSettings.js +6 -0
  317. package/mobile/lib/ProjectSettings.js.map +1 -1
  318. package/mobile/lib/common.css +1 -1
  319. package/mobile/lib/components/ApplicationForm/ResponseNotification.js +1 -1
  320. package/mobile/lib/components/Blocks.js +2 -0
  321. package/mobile/lib/components/Blocks.js.map +1 -1
  322. package/mobile/lib/components/ContentPage/ContentPage.js +3 -2
  323. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  324. package/mobile/lib/components/ContentPage/ContentPage.page.json +37 -0
  325. package/mobile/lib/components/ContentPage/useContentPageData.js +1 -1
  326. package/mobile/lib/components/ContentPage/useContentPageData.js.map +1 -1
  327. package/mobile/lib/components/Header/HeaderSubMenu.d.ts +5 -1
  328. package/mobile/lib/components/Header/HeaderSubMenu.js +8 -7
  329. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  330. package/mobile/lib/components/PictureText/PictureText.js +1 -1
  331. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  332. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.d.ts +6 -0
  333. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js +7 -0
  334. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenu.js.map +1 -0
  335. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.d.ts +7 -0
  336. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js +10 -0
  337. package/mobile/lib/components/StickyBottomMenu/ActiveSubMenuItem.js.map +1 -0
  338. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.d.ts +7 -0
  339. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +36 -0
  340. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -0
  341. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.d.ts +2 -0
  342. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.d.ts +1 -0
  343. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js +4 -0
  344. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.fallback.js.map +1 -0
  345. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +28 -0
  346. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -0
  347. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.d.ts +22 -0
  348. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.js +2 -0
  349. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuContent.js.map +1 -0
  350. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +8 -0
  351. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.js +2 -0
  352. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.js.map +1 -0
  353. package/mobile/lib/components/StickyBottomMenu/TopItemMobile.d.ts +9 -0
  354. package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js +9 -0
  355. package/mobile/lib/components/StickyBottomMenu/TopItemMobile.js.map +1 -0
  356. package/mobile/lib/components/StickyBottomMenu/renderMenuItems.d.ts +3 -0
  357. package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js +10 -0
  358. package/mobile/lib/components/StickyBottomMenu/renderMenuItems.js.map +1 -0
  359. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +6 -0
  360. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +23 -0
  361. package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -0
  362. package/mobile/lib/hooks/fallbackWCMSResource.d.ts +1 -1
  363. package/mobile/lib/hooks/fallbackWCMSResource.js +3 -2
  364. package/mobile/lib/hooks/fallbackWCMSResource.js.map +1 -1
  365. package/mobile/lib/hooks/useActiveRoute.d.ts +2 -0
  366. package/mobile/lib/hooks/useActiveRoute.js +8 -0
  367. package/mobile/lib/hooks/useActiveRoute.js.map +1 -0
  368. package/mobile/lib/hooks/useSWRResource.d.ts +1 -1
  369. package/mobile/lib/hooks/useSWRResource.js +3 -2
  370. package/mobile/lib/hooks/useSWRResource.js.map +1 -1
  371. package/mobile/lib/icons/IconName.d.ts +10 -6
  372. package/mobile/lib/icons/IconName.js +9 -5
  373. package/mobile/lib/icons/IconName.js.map +1 -1
  374. package/mobile/lib/services/sitemap/SitemapData.d.ts +5 -1
  375. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +0 -1
  376. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -2
  377. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  378. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
  379. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +8 -5
  380. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  381. package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -1
  382. package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
  383. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.d.ts +2 -0
  384. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js +2 -0
  385. package/mobile/lib/ui-kit/DialogManager/isDialogOpen.js.map +1 -0
  386. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +1 -1
  387. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  388. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +2 -1
  389. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  390. package/mobile/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
  391. package/mobile/lib/ui-kit/SearchDialog/SearchInput.js.map +1 -1
  392. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +3 -1
  393. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  394. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -0
  395. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -0
  396. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  397. package/mobile/src/ProjectSettings.ts +8 -0
  398. package/mobile/src/components/ApplicationForm/ResponseNotification.tsx +2 -2
  399. package/mobile/src/components/Blocks.ts +2 -0
  400. package/mobile/src/components/ContentPage/ContentPage.page.json +37 -0
  401. package/mobile/src/components/ContentPage/ContentPage.tsx +3 -1
  402. package/mobile/src/components/ContentPage/useContentPageData.ts +1 -1
  403. package/mobile/src/components/Header/HeaderSubMenu.tsx +16 -8
  404. package/mobile/src/components/PictureText/PictureText.tsx +1 -1
  405. package/mobile/src/components/StickyBottomMenu/ActiveSubMenu.tsx +16 -0
  406. package/mobile/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +32 -0
  407. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +102 -0
  408. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.example.json +35 -0
  409. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.fallback.ts +8 -0
  410. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +44 -0
  411. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.ui.json +11 -0
  412. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +24 -0
  413. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +10 -0
  414. package/mobile/src/components/StickyBottomMenu/TopItemMobile.tsx +32 -0
  415. package/mobile/src/components/StickyBottomMenu/renderMenuItems.tsx +32 -0
  416. package/mobile/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +34 -0
  417. package/mobile/src/hooks/fallbackWCMSResource.ts +8 -3
  418. package/mobile/src/hooks/useActiveRoute.ts +12 -0
  419. package/mobile/src/hooks/useSWRResource.ts +3 -1
  420. package/mobile/src/icons/BurgerIcon.svg +4 -4
  421. package/mobile/src/icons/ChartIcon.svg +7 -0
  422. package/mobile/src/icons/IconName.ts +5 -5
  423. package/mobile/src/icons/MapOpenedIcon.svg +5 -0
  424. package/mobile/src/services/sitemap/SitemapData.ts +5 -1
  425. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +17 -12
  426. package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
  427. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +16 -7
  428. package/mobile/src/ui-kit/DialogManager/Dialog.tsx +2 -2
  429. package/mobile/src/ui-kit/DialogManager/isDialogOpen.ts +4 -0
  430. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +1 -1
  431. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +3 -2
  432. package/mobile/src/ui-kit/SearchDialog/SearchInput.tsx +2 -2
  433. package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +5 -3
  434. package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +11 -0
  435. package/package.json +1 -1
  436. package/src/ProjectSettings.ts +8 -0
  437. package/src/components/ApplicationForm/ResponseNotification.tsx +2 -2
  438. package/src/components/Blocks.mobile.ts +2 -0
  439. package/src/components/Blocks.ts +2 -0
  440. package/src/components/ContentPage/ContentPage.page.json +37 -0
  441. package/src/components/ContentPage/ContentPage.tsx +3 -1
  442. package/src/components/ContentPage/useContentPageData.ts +1 -1
  443. package/src/components/Header/Header.tsx +12 -6
  444. package/src/components/Header/HeaderSubMenu.tsx +16 -8
  445. package/src/components/PictureText/PictureText.tsx +1 -1
  446. package/src/components/StickyBottomMenu/ActiveSubMenu.tsx +16 -0
  447. package/src/components/StickyBottomMenu/ActiveSubMenuItem.tsx +32 -0
  448. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +102 -0
  449. package/src/components/StickyBottomMenu/StickyBottomMenu.example.json +35 -0
  450. package/src/components/StickyBottomMenu/StickyBottomMenu.fallback.ts +8 -0
  451. package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.mobile.tsx +36 -0
  452. package/src/components/StickyBottomMenu/StickyBottomMenu.fixture.tsx +36 -0
  453. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +44 -0
  454. package/src/components/StickyBottomMenu/StickyBottomMenu.tsx +4 -0
  455. package/src/components/StickyBottomMenu/StickyBottomMenu.ui.json +11 -0
  456. package/src/components/StickyBottomMenu/StickyBottomMenuContent.ts +24 -0
  457. package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +10 -0
  458. package/src/components/StickyBottomMenu/TopItemMobile.tsx +32 -0
  459. package/src/components/StickyBottomMenu/renderMenuItems.tsx +32 -0
  460. package/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +34 -0
  461. package/src/hooks/fallbackWCMSResource.ts +8 -3
  462. package/src/hooks/useActiveRoute.ts +12 -0
  463. package/src/hooks/useSWRResource.ts +3 -1
  464. package/src/icons/BurgerIcon.svg +4 -4
  465. package/src/icons/ChartIcon.svg +7 -0
  466. package/src/icons/IconName.ts +6 -389
  467. package/src/icons/MapOpenedIcon.svg +5 -0
  468. package/src/services/sitemap/SitemapData.ts +5 -1
  469. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +17 -12
  470. package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
  471. package/src/ui-kit/BaseTile/BaseTile.tsx +16 -7
  472. package/src/ui-kit/DialogManager/Dialog.tsx +2 -2
  473. package/src/ui-kit/DialogManager/isDialogOpen.ts +4 -0
  474. package/src/ui-kit/LocationDialog/LocationDialog.tsx +1 -1
  475. package/src/ui-kit/SearchBar/SearchBar.tsx +3 -2
  476. package/src/ui-kit/SearchDialog/SearchInput.tsx +2 -2
  477. package/src/ui-kit/Sitemap/Sitemap.tsx +5 -3
  478. package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +11 -0
  479. package/bin/migration-scripts/0.13.9.js +0 -59
  480. /package/cosmos-static/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
  481. /package/cosmos-static/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
  482. /package/mobile/src/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
  483. /package/mobile/src/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
  484. /package/src/icons/{ResponceFailIcon.svg → ResponseFailIcon.svg} +0 -0
  485. /package/src/icons/{ResponceOKIcon.svg → ResponseOKIcon.svg} +0 -0
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),s=l("useMemo"),r=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,s=n||i&&i();return e(Object.assign(a,s&&{children:s}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=r(null),i=s((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:s="p-xl",padding:r,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",r||s,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[s,o]=n(!1),[c,d]=n({}),m=r({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:s||c[e],onChange:m.current[e]}}),[l,s,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:s||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},M=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],P=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const r=s((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(r)?r:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!r.some(P)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(P(n))return n;const a=e(l);return P(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...r));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,r]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function D(e,t){try{return e?await E(e,t):null}catch(e){console.error(e)}return null}async function E(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const L=[];function $(){const{data:e}=j("/api/v1/regions",E);return e||L}const O=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:H});const W=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||X(t,d.CDN))return t;const n=t.startsWith("/");return H(X(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},X=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function J(){return J._impl()}function Y(e={}){const{isRemote:t,basePath:l}=e,n=J(),{closeAll:a}=O();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return s=>{i&&i(s),e&&!t&&U(e,l)&&(a(),s?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},J._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),J.setup=e=>{J._impl=e};const q={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",Q={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},ee="text-center font-sans select-none",te={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},le=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ne(e),"flex gap-xs"),children:[n?u("div",{className:te[i],children:n}):null,ae(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:te[i],children:a}):null]})})),ne=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",ae(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ae=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",ee,l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[ee,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...l})=>{const n=Y()(l),a=t??u(le,{...n});return u(e?ce:oe,{...n,children:a})})),oe=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:s,onClick:r,children:o})=>u("a",{className:se({className:e,version:i,rounded:s}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:r,children:o}))),ce=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a}))),de=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({link:e})=>p(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(me,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(me,{children:e.text})}):null]}))),ue=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},pe=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:s="text",label:r,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[r?u("div",{className:"mb-xs",children:u(me,{size:"text-m",font:"font-light",children:r})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:s,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),ge=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(pe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),xe=e=>"_"===e,fe=e=>/\d/.test(e),be=e=>xe(e)||fe(e),ye=[..."+7 (___) ___-__-__"],ve=ye.findIndex(xe),Ne=ye.map(((e,t)=>be(e)?ye.slice(0,t).filter(be).length:-1));const we=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ye.map(((e,l)=>fe(e)?e:t.charAt(Ne[l])||e)),n=Ne.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ve,n)):l).join("")}(e))),[t]);return u(pe,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Se=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(we,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ke="Некорректно заполненное поле",Ce=_((e=>null!=e&&""!==e))(ke),Ie=_((e=>"string"==typeof e&&e.length>1))(ke),Te=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(ke),Be=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Re.test(e))))(ke);var Re;const Me=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),s=i((()=>l(!1)),[]),r=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:s,toggle:r}]}const Pe=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let s=0;s<e.length;s++){const r=Math.max(0,s-l),o=Math.min(s+l,t.length-1);for(let l=r;l<=o;l++)n[s]||a[l]||e[s]!==t[l]||(i++,n[s]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,s=0;i<e.length;i++){if(!l[i])continue;let r=s;for(;r<t.length;r++)if(n[r]){s=r+1;break}e[i]!==t[r]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),s=(l/e.length+l/t.length+(l-i/2)/l)/3,r=s>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return s+r*(1-s)};const ze={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...s})=>{const r=J(),o=W(r)(H(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(De,{className:e,children:p("svg",{className:w(Ae(s.width),ze[i],"white"===i?"invert":"",t),...s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(s.style={height:`${s.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...s}))})),Ae=e=>e?"":"w-full h-full",De=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ee=g((({className:e="",label:t,options:l=[],value:s,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=_e(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=r(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[Le(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",He(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ue(s)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Oe(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:$e(l,b).map(Fe(S,g,(e=>e.key===s?.key)))})}):null]})]})})),Le=e=>e?u("div",{className:"mb-xs",children:u(me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,$e=(e,t)=>t?e.filter((e=>Pe(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Oe=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(pe,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Fe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:Ue(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),Ue=e=>e?.text||e?.key||"",He=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ke=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Ee,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(me,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),We=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...ue(t("acquiringType"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)})})]}),Xe=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ge=e=>p("div",{children:[u(Xe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Xe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Je=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ye={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},qe=M({acquiringType:Ce,region:Ce,fullName:Ce,inn:Te,name:Ie,phone:Be}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:s,phone:r,onlineCheckout:o,posTerminal:c}=e;V(qe(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:s,phone:r})}),[n]),[,{field:s,...r}]=R(Ye,a),o=$();return p("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),We({regions:o,field:s}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Me(s),Ge(s),Je(t),u(he,{link:l})]})})),Qe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...ue(e("mail"),Ce)})]})]}),et=({regions:e,field:t})=>u(Ke,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(t("region"),Ce)}),tt={name:"",phone:"",inn:"",mail:""},lt=M({region:Ce,name:Ie,phone:Be,inn:Te,mail:Ce}),nt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:s}=e;V(lt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:s})}),[n]),[,{field:s,...r}]=R(tt,a),o=$();return p("form",{className:"container space-y-s",onSubmit:r.onSubmit,children:[et({regions:o,field:s}),Qe(s),Je(t),u(he,{link:l})]})})),at=[];const it=async e=>await D(e,{method:"GET"})||at,st=["От 1 000 ₽","До 1 000 000 000 ₽"],rt=["От 1 мес","До 15 лет"],ot=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...ue(e("fullName"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...ue(e("inn"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(e("phone"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...ue(e("annualRevenue"),Ce)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...ue(e("name"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),ct=(e,{normalize:t,format:l})=>{const{value:a,onFocus:s,onBlur:r,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),s&&s(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),r&&r()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},dt=(e,t,l)=>Math.max(t,Math.min(e,l)),mt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function ht(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ut({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:s}){const r=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(r>t?r-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(r<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:r,disabled:i,onInput:t=>{const l=ht(t.target?.value),n=e.length?e[l]:l;s&&s(n||0)}})})]})}const pt=1,gt=100,xt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:s=(a.length?0:pt),max:r=(a.length?a.length-1:gt),step:o=1,value:c=a[0]||s,disabled:d=!1,onChange:m}=e,h=ct(e,{normalize:(e=0)=>a.length?ft(a)(e):dt(e,s,r),format:mt()}),g=i((e=>{m&&m(ht(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(me,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ut({list:a,min:s,max:r,step:o,disabled:d,value:c,onChange:m})]}),bt(n)]})})),ft=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),bt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),yt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(xt,{items:st,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(me,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(xt,{items:rt,min:1,max:180,...e("term")})]})]}),vt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ue(l("region"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...ue(l("department"),Ce)})})]}),Nt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},wt=M({fullName:Ce,annualRevenue:Ce,inn:Te,name:Ie,phone:Be,region:Ce,department:Ce}),St=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:s,phone:r,mail:o,region:c,department:d,annualRevenue:m}=e;V(wt(e))&&l({typeForm:"cred",fullName:a,inn:i,name:s,phone:r,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:s,...r}]=R(Nt,n),o=$(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,it);return t||at}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),yt(s),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),ot(s),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),vt({regions:o,branches:c,field:s}),Je(e),u(he,{link:t})]})})),kt={name:"",phone:""},Ct=M({name:Ie,phone:Be}),It=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(Ct(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:s,...r}]=R(kt,a);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...ue(s("name"),Ie)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...ue(s("phone"),Be)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(he,{link:l})}),Je(t)]})]})})),Tt={};function Bt(e,t=Tt){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,E,{fallback:t});return l||Tt}const Rt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Bt(l||"regions-grant-support"),[i,s]=n({key:""}),r=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Ke,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:s}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",r),children:t?.text?t.text:"Перейти"})}):null]})})),Mt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Vt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=J();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Mt).map((({src:e,format:l,media:i},s)=>u("source",{srcSet:Pt(a,n)(e),type:zt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${s}_${e}`))):null,t?.src?_t({...t,src:Pt(a,n)(t.src)},l):null]})})),_t=(e,t="")=>u("img",{src:e.src,className:w("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},...e.size}),Pt=(e,t)=>l=>l&&!F(l)?W(e)(H(t,l)):l,zt=e=>e?`image/${String(e)}`:void 0,jt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Vt,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),At=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...s})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...s,...l},n)))}))),Dt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Et=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:s})=>{const r=i((e=>{n||(e.preventDefault(),s&&s(!t))}),[s,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(At,{paths:Dt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:r,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Lt(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(me,{size:"text-l",font:"font-light",children:l})}):null]})})})),Lt=e=>w("rounded border",e?"bg-primary-main":""),$t=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Et,{text:"Валютный контроль",...e("currencyControl")}),u(Et,{text:"Документарные операции",...e("documentaryOperations")}),u(Et,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ot=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...ue(e("fullName"),Ce)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"ФИО",...ue(e("name"),Ie)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(Se,{className:"shrink-0 w-full mb-s",label:"Телефон",...ue(e("phone"),Be)})}),u("div",{className:"sm:w-1/2",children:u(ge,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...ue(e("mail"),Ce)})})]})]}),Ft={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Ut=M({fullName:Ce,name:Ie,phone:Be,mail:Ce}),Ht={ApplicationFormBusinessCard:nt,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:s,documentaryOperations:r,conversionOperations:o,text:c}=e;V(Ut(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${s}/Документарные операции=${r}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:s,...r}]=R(Ft,a);return p("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ot(s),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),$t(s),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Je(t),u(he,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(jt,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(jt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:It,ApplicationFormCredit:St,ApplicationFormAcquiring:Ze,ApplicationFormGrantSupport:Rt},Kt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(jt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Wt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Xt=g((e=>{const{className:t,formBlock:l,...a}=e,[s,r]=n(""),o=i((async e=>{const t=await Wt.send(e)?"OK":"Fail";return r(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Gt(l,o):null,s?u(Kt,{responseType:s}):null]})})})),Gt=(e,t)=>{const l=e?.formType;if(!l||!(l in Ht))return null;return u(Ht[l],{...e,onSubmit:t})},Jt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Yt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const s=String(n?.width||t);return a?u("div",{style:{width:`${s}px`,height:`${s}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Jt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),qt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Zt)}):null]}))),Zt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Yt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(jt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Qt(e.description)]}):null]},String(t)),Qt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?tl(e):el(e)}):null},el=e=>e?.name||null,tl=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},ll=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(nl(l))}):null,nl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:s,...r}=t||{},o="secondary"===s?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:al({...a,iconVersion:c}),appendRight:al({...i,iconVersion:c}),version:s,text:n,...r},l?String(l):""):null},al=e=>e?.icon||e?.src?u(jt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,il={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},sl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},rl=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:s,isEmbedded:r=!1,isTheme:o=!1,...c})=>{const d=il[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(r?"@container-normal":"",e),defaultPadding:r?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:s||d?.title.as,title:n}):null,a?u(de,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),ol=g((({className:e="",title:t,description:l,bonusItems:n=[],...a})=>u(k,{className:e,defaultPadding:"p-6xl",...a,children:p("div",{className:"container",children:[u(rl,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m",children:[u("div",{className:"grow",children:u(rl,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:ll(e?.buttons)}),e.bonusItemContent?.bonusType?cl(e.bonusItemContent):null]})]},String(t)))):null})]})}))),cl=e=>"count"===e.bonusType?dl(e):ml(e),dl=e=>p("div",{className:"w-full pt-default mt-s flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-10",children:u("span",{className:"font-mohave text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(me,{size:"text-h2",children:e.bonusName})}):null]}),ml=e=>e.image?u(jt,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,hl=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),ul=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:s,onIntersection:r})=>{const o=y(i((e=>{e.length&&r&&r(l||0,e[e.length-1])}),[r,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:s})})),pl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],gl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:s=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=r([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(fl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?xl(s,b):{},...y?hl(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(ul,{className:w(c,n?pl[n-1]:"",y?"h-full":""),style:v?xl(s/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),xl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),fl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),bl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},yl={"horizontal-list":"w-6","vertical-list":"h-6"},vl=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",bl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?yl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),Nl=e=>e,wl=(e=Nl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Sl=wl(),kl=(e=Nl)=>wl((t=>-e(t))),Cl=kl(),Il=e=>t=>e.scrollWidth/t,Tl=e=>(t,l)=>{e.scrollBy({left:l*Il(e)(t),behavior:"smooth"})},Bl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=r(null),[a,s]=n([]),o=i((e=>{s((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[kl()(a),wl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Tl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Tl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Rl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:s,onVisibleIndicesChange:r,listType:o="horizontal-list"})=>{const c=Array.isArray(s)?s.length:0,[d,m]=Bl({itemCount:c,onVisibleIndicesChange:r}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(gl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:s}),a?u(vl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Ml="text-left",Vl=(e,t,l)=>u(Rl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(me,{size:"text-h6",font:"font-normal",align:Ml,children:t}):null,e?u(jt,{image:e,height:"180",className:"w-auto"}):null,l?u(me,{size:"text-h6",font:"font-normal",align:Ml,children:l}):null]},String(n)))({...e},t)))}),_l=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...s})=>p(k,{className:l,defaultPadding:"p-6xl",...s,children:[u(rl,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?Vl(e):null]}))),Pl={start:"justify-start",center:"justify-center",end:"justify-end"},zl=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",Pl[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:ll(e)})})),jl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:s})=>{const[r,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:r,onToggle:c}),m=s?s({isUnfolded:r,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Al=g((({className:e="",isUnfolded:t,children:l})=>{const n=r(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Dl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(me,{size:"text-h3",children:[n," ",mt(2)(Math.round(t))," ",l]})}:{children:u(me,{size:"text-h3",children:"-"})})]}))),El=Math.round(23.5),Ll={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},$l={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ol={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ul={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Hl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:s=2})=>p("div",{children:[u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(s)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Kl=e=>e?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Wl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${mt(2)(l.min||0)} ₽`,`До ${mt(2)(l.max||0)} ₽`];return u(xt,{items:e?n:[],step:t,...l})}function Xl(e){const{data:t}=j(`/wcms-resources/${e}.json`,E);return t}const Gl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Xl(t||"bonus-calculator-data")||Ol,[i,s]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:s,prefTravelBonusRate:r,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(r*t)+Math.round(o*l),i);return[m,m*s+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-s)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:s}},Jl=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:s,maxSumTravel:r,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Gl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма покупок в категории путешествия, ₽",min:s,max:r,step:500,isShowItems:!1,...i("travelExpenseValue")}),Wl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Hl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Dl,{title:"Баллов за год",value:m}):null,ll(l,{isVertical:!0}),Kl(n)]})]})})),Yl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ql={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Zl=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${ql[a]}`,l),children:e?.map((({id:e,text:l})=>u(Et,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ql=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(me,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Zl,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),en=e=>Ql({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),tn=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{children:[u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:t?p(de,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(de,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ln=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n})=>u(Hl,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,rateBlockClassName:"tracking-[-25px]",unit:"%"}),nn=({rate:e})=>u(Dl,{title:"Ставка",value:e,postfix:"%"}),an=e=>0===e.rate?u(tn,{isUnavailableByTerm:e.isUnavailableByTerm}):p("div",{children:[u("div",{className:"hidden md:block",children:ln(e)}),u("div",{className:"md:hidden",children:nn(e)})]}),sn=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},rn=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:on([e,t],n),on=([e,t],l=[])=>({[e]:l.length?Cl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Sl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),cn=(e,[t,l],n)=>e>=n[t]&&e<=n[l],dn=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,mn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},hn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[s,{field:r}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:s,isMonthlyInterestPayment:r}=e,o=Xl(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...Ul,...e,isDisabledOperatingDeposit:d,isUnavailableByTerm:!0};const m=o?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&s===e.isSmallBusiness&&dn(c,e)&&cn(n,["minSum","maxSum"],e)&&cn(l,["minDays","maxDays"],e)))||Ul,{rate:h}=m,u=mn(h,e),p=n+u,g=o?.rateRows||[Ul];return{...m,...on(["minSum","maxSum"],g),...on(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(s,t),{income:c,finalSum:d,rate:m,isUnavailableByTerm:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...r("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...r("daysValue"),value:o.daysValue},u(xt,{items:[`От ${Yl(x.min||0)}`,`До ${Yl(x.max||0)}`],step:1,...x})),un(o,r),en({title:"Выплата процентов",orientation:"vertical",...r("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),an({rate:m,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[pn(d,c),ll(l,{isVertical:!0}),Kl(n),Kl(a)]})]});var x})),un=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Et,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Et,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Et,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),pn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Dl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Dl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),gn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(xt,{items:[`От ${xn(e)}`,`До ${xn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),xn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,fn=e=>bn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&bn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&bn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&bn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),bn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],yn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},vn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Xl(t||"credit-calculator-data"),r=i?.rateRows||[Ll],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>fn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=rn(["minSum","maxSum"],o,r),{minMonths:m,maxMonths:h}=rn(["minMonths","maxMonths"],o,r),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>fn({row:e,userInputParams:t,paramsViewSettings:l})&&cn(n,["minSum","maxSum"],e)&&cn(a,["minMonths","maxMonths"],e)))||Ll)({rateRows:r,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=yn(p,e);return s((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},Nn=e=>Ql({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),wn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[s,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:El}),o=vn(s,t,a),c=Nn({title:i?"Тип платежа":"",orientation:"vertical",...r("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...r("moneyValue"),value:o.moneyValue}),gn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...r("monthsValue"),value:o.monthsValue}),Sn({...o,...a},r),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),an({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Dl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),ll(l,{isVertical:!0}),Kl(n)]})]})})),Sn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Et,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Et,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Et,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Et,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),kn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Xl(t||"deposit-calculator-data"),s=i?.rateRows?.[0]?Tn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,r=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>In({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&In({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&cn(n,["minSum","maxSum"],t)&&cn(a||s,["minMonths","maxMonths"],t)))||Fl,{rate:d}=c,m=Cn(d,e),h=n+m,u=i?.rateRows||[Fl];return{...c,...on(["minSum","maxSum"],u),...on(["minMonths","maxMonths"],u),availableMonths:sn(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:s,income:m,finalSum:h}},Cn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},In=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Tn=(e,t)=>e+Math.round((t-e)/2),Bn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[s,{field:r}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=kn(s,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=r("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...r("moneyValue"),value:o.moneyValue}),gn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...r("monthsValue"),value:o.monthsValue}),Rn({...o,...i},r)]}),u("div",{className:"border-b border-main-divider md:hidden"}),an({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Dl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Dl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),ll(l,{isVertical:!0}),Kl(n)]})]})})),Rn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?en({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ql({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Mn=e=>Vn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Vn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Vn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Vn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],_n=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,o=Xl(t||"refinancing-calculator-data"),c=o?.rateRows||[$l],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Mn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=rn(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=rn(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s})=>e?.find((e=>Mn({row:e,userInputParams:t,paramsViewSettings:l})&&cn(n,["minSum","maxSum"],e)&&cn(i,["minSumOld","maxSumOld"],e)&&cn(s,["minSumExtra","maxSumExtra"],e)&&cn(a,["minMonths","maxMonths"],e)))||$l)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:x}=g,f=yn(x,e),b=e.oldMonthlyPayment-f;return s((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:f,benefit:b})),[e,o])},Pn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),r=_n(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Wl({title:"Остаток долга в других банках, ₽ ",step:500,min:r.minSum,max:r.maxSum,...s("moneyValue"),value:r.moneyValue}),Wl({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:r.minSumOld,max:r.maxSumOld,...s("oldMonthlyPayment"),value:r.oldMonthlyPayment}),gn({title:"Новый срок кредита, месяцев",min:r.minMonths,max:r.maxMonths,...s("monthsValue"),value:r.monthsValue}),zn({...r,...a},s),r.isExtraMoney?Wl({title:"Дополнительная сумма, ₽ ",step:500,min:r.minSumExtra,max:r.maxSumExtra,...s("moneyExtra"),value:r.moneyExtra}):null]}),an({rate:r.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Dl,{title:"Ежемесячный платеж",value:r.monthlyPayment,postfix:"₽"}),r.benefit>0?u(Dl,{title:"Выгода в месяц",value:r.benefit,postfix:"₽"}):null,Nn({orientation:"vertical",...s("isAnnuity")}),ll(l,{isVertical:!0}),Kl(n)]})]})})),zn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Et,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Et,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(Et,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),jn={CreditCalculatorForm:wn,DepositCalculatorForm:Bn,BusinessDepositCalculatorForm:hn,BonusCalculatorForm:Jl,RefinancingCalculatorForm:Pn},An=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:En(t)}))),Dn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in jn))return null;return u(jn[t],{...e.calculatorBlock,isMobile:!0})},En=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Dn(e[0])}):e.map(((e,t)=>u(jl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Al,{isUnfolded:t,children:u(k,{children:Dn(e)})}),renderFoldButton:Ln(e)},t.toString())))},Ln=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(me,{align:"text-left",color:"text-white",children:e.nav?.title}),u(me,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),$n=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:s=0,...r}=e,o=ct(e,{normalize:(e=a)=>l&&n?String(dt(Number(On(e)),l,n)):On(e),format:mt(s)}),c=i((e=>t&&t(On(e))),[t]);return u(pe,{onChange:c,...r,...o})})),On=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Fn=g((e=>u($n,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(me,{size:"text-xl",font:"font-light",children:"₽"})})}))),Un={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Hn={amount:1500,_amount:1500},Kn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...s})=>{const[{amount:r,_amount:o},{field:c}]=R(Hn),d=r<=0,m=d?ie({version:a?.version}):se({className:"text-white",version:a?.version}),h=Y();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Un[i],children:[u(Fn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Wn=g((({className:e,disabled:t,...l})=>u(re,{rounded:!0,className:`group/btn 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 ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(jt,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Xn=g((e=>u(Wn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Gn=g((e=>u(Wn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Jn="absolute top-[calc(50%-24px)] z-40",Yn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",qn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:s,onScrollRight:r})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),s()):d()}),[d,s,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),r()):m()}),[m,r,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Zn(e),h?u(Xn,{className:w(Jn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Gn,{className:w(Jn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Zn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Yn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Yn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Qn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),ea=[];function ta(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Qn,blocksRegistry:s={},ancestors:r=ea}=t,{type:o}=e;o&&o in s||console.warn(`No block with "${o}" is registered`);const c=o&&s[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:r,render:({block:l,blockClassName:i})=>{const{content:s}=l;return c?u(c,{className:i,block:e,options:t,...s,...n},a):null}},a)}const la=[],na=(e,{key:t,ancestors:l=la,slotName:n=null,extraProps:a,renderProps:i=ta,...s})=>{const r=a?(e,t)=>ta(e,t,a):i;return(e||[]).map(((e,a)=>r(e,{...s,key:`${t||e.type}-${a}`,ancestors:s.parent?[...l||la,[s.parent,n]]:l},a)))};function aa({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?na(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const ia=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(de,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),sa="relative h-full",ra={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},oa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ma);return aa({...n,renderProps:(n,a,s)=>p("div",{className:ca(n,{someCardsHighlighted:i}),children:[ta(n,a,{className:da(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:s,isActive:s===t}),ma(n)?ia({className:"absolute top-0 -right-4 z-40"}):null]})})},ca=(e,{someCardsHighlighted:t})=>w(sa,t&&(ma(e)?"pt-3xl":"pt-3xl sm:pt-16")),da=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(sa,"min-w-80",ra[n],t&&(ma(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ma=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ha=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:s,showDots:r,arrowsPadded:o=!0,isGap:c=!0,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},g=t||h?.length,[x,{inc:f,dec:b}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[s,r]=n(t),o=i((()=>r((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>r((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&s<l-a:s<l-1,m=s>0;return[s,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:g,visibleItemCount:l},Math.floor(l/2)),[y,v]=Bl({itemCount:g}),[N]=v.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...m,children:p("div",{className:w(s?"flex justify-center":"","relative max-w-full"),children:[u(gl,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:oa({noCardBorder:a,activeIndex:x,cardSize:d,...m})}),u(qn,{scroll:v,arrowsPadded:o,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:S,activeIndex:x,itemCount:g}),r?u(vl,{containerRef:y,activeIndex:N,dotCount:g,listType:"horizontal-list"}):null]})})}));ha.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ha.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ua=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(rl,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),pa="z-10 border border-solid w-full h-full",ga=w(pa,"absolute hidden sm:block border-transparent"),xa=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(ga,"top-9 right-12 bg-green-dark")}),u("div",{className:w(ga,"top-6 right-8 bg-green")}),u("div",{className:w(ga,"top-3 right-4 bg-green-light")}),p("div",{className:w(pa,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(rl,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),ll([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),fa={black:"bg-black",white:"bg-white"},ba=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:s,...r})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...r,children:[n?.src?u(jt,{className:"flex justify-center mb-xl",image:n}):null,u(rl,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),s?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),s.map(ya)]}):null,a?p(me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,ll([i],{buttonClassName:"w-full mt-lg"})]}))),ya=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${fa[e]}`},String(t)),va="bg-transparent border-white border h-[70px] absolute w-80 top-0",Na=g((({text:e,href:t="",target:l="",className:n=""})=>{const a=Y()({href:t,target:l});return e?p("div",{className:w("flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m",n),children:[p("a",{className:w("absolute border border-primary-main px-xl py-lg\n text-l font-light bg-white text-primary-text flex\n justify-between items-center group-hover/link:text-primary-main z-10","rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto"),role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6 hidden sm:block",children:u(jt,{className:"w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:va+" hidden sm:block mx-1.5 mt-1.5"}),u("div",{className:va+" hidden sm:block mt-3 mr-3"})]}):null})),wa=g((({className:e,additionalDescription:t,description:l,links:n,title:a,maxLinksCount:i=10,...s})=>p(k,{className:w("flex flex-col sm:flex-row w-full overflow-hidden",e),...s,children:[p("div",{className:"mr-xl flex-auto",children:[u(rl,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u(rl,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?Sa(n,i):null]}))),Sa=(e,t)=>{const l=Math.ceil(e.length/t);return u(ha,{className:"@container-normal sm:w-2/3 w-full p-0 sm:p-xs",version:"secondary",itemCount:l,arrowsPadded:!1,showDots:!1,children:new Array(l).fill(null).map(((l,n)=>u("div",{className:w("flex flex-wrap self-start w-full sm:w-[672px]"),children:e.slice(n*t,(n+1)*t).map(((e,t)=>u(Na,{className:"sm:m-2xs",...e},String(t))))},String(n))))})},ka=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=Y({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),Ca={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},Ia=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Ca[n])})}):null,u("span",{children:l})]}))),Ta={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Ba={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Ra=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Ta[a],t?Ba[a]:"",e),role:"list",children:n.map(((e,t)=>u(Ia,{isDotted:l,size:a,children:e},String(t))))}):null)),Ma=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:s,icon:r,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(ka,{className:"p-m flex flex-col gap-xs",href:s,target:u,children:[_a(i,g),Pa(a),ja(h,o,x),za(e),Va(r,d,m)]}),ll([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Va=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(jt,{className:"shrink-0",image:e}):null,e?.icon?u(jt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),_a=(e,t)=>t?u(me,{size:sl[e],children:t}):null,Pa=e=>e?u(de,{size:"text-l",children:e}):null,za=e=>e?u(me,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,ja=(e,t,l="primary")=>e?.length?u(Ra,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Aa={start:"self-start",center:"self-center",end:"self-end"},Da=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:s,rightImage:r,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Ea(s,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",s?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Ea(r,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Ea=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("md:flex-shrink-0",l&&Aa[l],t),children:e}):null,La=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,$a=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(jt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Oa=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Fa=(e,t)=>e?u(de,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ua=(e,t)=>e?u(me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ha=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Oa,{...e},`rte-${t}`):["label"in e?Ua(e.label,t):null,"description"in e?Fa(e.description,t):null],Ka=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?$a(l.icon,t):null,u("div",{children:Ha(l)})]}))),Wa=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Xa=e=>{return((t=e.map(Wa))?.length?Math.sqrt(Math.abs(La(t.map((e=>e**2)))-La(t)**2)):0)>16;var t},Ga=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ja=e=>!e.some(Ga),Ya=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Xa(l)||Ja(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ka,{benefitsVersion:t,...e},String(l))))}):null)),qa=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Ha)}):null)),Za=g((({isTabularBenefits:e,...t})=>u(e?qa:Ya,{...t}))),Qa=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(ei)}):null)),ei=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(me,{size:"text-m",font:"font-light",children:e})},String(t)),ti=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:s="text-left",isInsetTitle:r=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(jt,{image:y}):null,C=u(rl,{title:n,description:a,headlineVersion:i,align:s,isEmbedded:!0});return u(Da,{className:e,padding:t,defaultPadding:l,...r?{insetTitle:C}:{title:C},...w?{backImage:k}:li(k,N),imageAlign:v,buttons:ll(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Za,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Oa,{__html:m}):null,h?.length?u(Ra,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Qa,{tags:f}):null]})})})),li=(e,t)=>t?{rightImage:e}:{leftImage:e},ni=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...s})=>u(k,{className:e,defaultPadding:"p-3xl",...s,children:u(ka,{className:"flex items-center h-full",href:a,target:i,children:u(ti,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),ai={default:"w-14 h-14",stretched:"flex-1 h-14"},ii=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",ai[t]),si=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],ri=e=>si.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},oi=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:s=""}=n,{iconMapped:r,label:o}=ri(a),c=ci(l)??r;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",ii(s,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:s,version:i,...n,children:c&&!s?u(jt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),ci=e=>e?.src||e?.icon?e:void 0,di=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(oi,{buttonSize:n,...e},String(t))))})]}))),mi=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:s,title:r,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(ka,{href:l,target:s,className:"space-y-lg",children:[u(rl,{title:r,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Ra,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,hi(n),i.length?u(di,{media:i}):null]})}))),hi=e=>e?.src||e?.icon?u("div",{children:u(jt,{image:e})}):null,ui=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(me,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(me,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:ll(a)}):null]},String(t))},pi=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...s})=>{const r=i.map(ui),o=r.slice(0,1),c=r.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...s,children:[gi(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(re,{className:"w-full mt-m",...a}):null,i.length?u(jl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Al,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?xi:null}):null]})})),gi=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(jt,{image:e}):null}),xi=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),fi=(e=!1)=>e?"text-white":"",bi=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),yi=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(jt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(jt,{image:t})}),l?u(T,{headingType:"h4",className:fi(a),title:l}):null,n?u("div",{className:bi(a),children:n}):null]}))),vi=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Ni(l,t))})}))),Ni=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),wi=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const s=t?.slice(0,a?t.length:l),r=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(yi,{...e,isFillGradient:n}),s?.length?s.map((({rowHeader:e,cell:t},l)=>u(vi,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:r,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Si({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Si=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),ki=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Ci,{...e})})]})})),Ci=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:s,...r})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(wi,{visibleRowLength:a,showRow:o[i],header:n,columnData:(s=e,s?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...r},String(i));var s}));return"horizontal"===s?u(Rl,{onVisibleIndicesChange:m,children:h}):h}));var Ii;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Ii||(Ii={}));const Ti=new Intl.NumberFormat("ru",{style:"currency",currency:Ii.RUB}),Bi=e=>e?Ti.format(e):"",Ri="text-left text-m font-light text-secondary-text",Mi=`${Ri} pl-5xl`,Vi={USD:"DollarIcon",EUR:"EuroIcon"},_i=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ri,children:u(me,{size:"text-m",children:"Валюта"})}),u("th",{className:Mi,children:u(me,{size:"text-m",children:"Купить"})}),u("th",{className:Mi,children:u(me,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Pi)})]}))),Pi=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(jt,{image:{icon:Vi[t]},width:"24",height:"24"}):null,u(me,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:Bi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(me,{size:"text-h6",children:Bi(e?.buyExchangeRate)})})]},t)},zi={icon:"GpsIcon"},ji=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Yt,{...zi,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Ai=(e,t,l)=>{const n=Number(Di(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Di=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ei=e=>{return(t=[[e=>e.value!==Ii.RUB&&e.oppositeValue!==Ii.RUB,()=>e.handleConvert(e.value,Ii.RUB)],[e=>e.value===Ii.RUB&&e.oppositeValue===Ii.RUB,()=>e.handleConvert(e.value,Ii.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Li(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:s}=e,r=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(pe,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),r.length?u(Ee,{isBorder:!1,onChange:e=>s(e.key),options:r,value:o}):null]})}const $i=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[s,r]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ii.RUB,selectBuy:l?.[0]?.currency?.currency||Ii.USD}),o=i((e=>r((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Li({placeholder:"Хочу продать",rates:l,selected:s.selectSell,setSelected:Oi(s,o,l),value:s.inputSell,setValue:e=>Ui(o,l)(e,s.selectSell,s.selectBuy)}),Li({placeholder:"Получу",rates:t,selected:s.selectBuy,setSelected:Fi(s,o,t),value:s.inputBuy,setValue:e=>Hi(o,t)(e,s.selectBuy,s.selectSell)}),a?.text?u(re,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Oi=(e,t,l)=>n=>{t({selectSell:n}),Ei({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Ui(t,l)(e.inputSell,n,a)}})},Fi=(e,t,l)=>n=>{t({selectBuy:n}),Ei({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Hi(t,l)(e.inputBuy,n,a)})},Ui=(e,t)=>(l,n,a)=>{e({inputSell:Di(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ai(l,i,n===Ii.RUB)||"")})},Hi=(e,t)=>(l,n,a)=>{e({inputBuy:Di(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ai(l,i,n===Ii.RUB)||"")})};const Ki=async e=>{const t=await Wi(),l=t?.code||"000";return{region:t,exchangeRates:await Xi(e,l)}},Wi=async()=>{try{return await E("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Xi=async(e,t)=>{try{return await E(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Gi=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Ki);return e||{}}(),i=Ji(a?.exchangeRate?.currencies),s=i.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ii.RUB}});const r=i.filter((e=>e.saleExchangeRate));return r.push({currency:{currency:Ii.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(Da,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(_i,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(ji,{address:a?.address})]}),i.length&&s.length&&r.length?u($i,{className:"grow",currencyRatesBuy:s,currencyRatesSell:r,button:l}):null]})})})})),Ji=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Yi=e=>Bt(d.SITEMAP||"sitemap",e),qi=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Zi)}):null)),Zi=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Qi=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(jt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),es=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",ts=(e,t)=>u(Yt,{...e,iconBgVersion:t,className:"shrink-0"}),ls=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:s="primary",...r})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...r,children:u(jl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Al,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:aa({...r,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ns({version:s,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));ls.childrenTypes={exclude:["RollupItem"]};const ns=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const s=t||(a?"Скрыть":"Развернуть");return"primary"===e?as({label:s,labelIcon:l,labelIconBgVersion:n,icon:es(a),onToggle:i}):u(Qi,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},as=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ts(a,t),e?u(me,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),is=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(ss):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),ss=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(me,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(rs)})]},String(t)),rs=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:os(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),os=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${cs(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},cs=e=>e.replaceAll(/\D/g,""),ds=g((({className:e="",index:t,text:l,...n})=>{const a=Y(),{href:i,target:s,onClick:r}=a(n);return u("a",{className:w("",e),href:i,target:s,onClick:r,children:l||`Документ ${t}`})})),ms=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(me,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(ds,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),hs=g((({className:e="",index:t,...l})=>{const n=Y({isRemote:!0}),{href:a,target:i,text:s,onClick:r}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:r,children:s||`Документ ${t}`})})),us=g((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(me,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @lg:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(hs,{index:t,...e},String(t))))}):null]}))),ps=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Yi(l),{relatedEnterprises:a,contacts:i,socialMedia:s,mobileApps:r,horizontalNavigationTitle:o,documents:c}=Bt(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(ls,{label:e?.text,labelIcon:e?.icon,children:u(qi,{items:e.items})},String(t))))}),u(is,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(di,{className:"mb-xl",media:s,buttonSize:"stretched",children:"Соцсети"}),u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:r?.map(gs)})]}),u(ms,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(us,{links:c})]})})),gs=({href:e="/"},t)=>{const{label:l}=ri(e);return u(re,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},xs={"bg-white":"color",transparent:"white"},fs={"bg-white":"text-primary-main",transparent:"text-white"},bs=(e,t,l)=>u(jt,t?.src?{image:t,className:fs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:xs[e]},className:fs[e],width:l?.width,height:l?.height}),ys={"bg-white":"text-primary-text",transparent:"text-white"},vs=(e,t,l)=>u("span",{className:`${ys[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),Ns=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:s})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:s?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[bs(e,a?.image,{width:"34",height:"34"}),i?vs(t||a?.title,e,"text-s"):null]}))),ws={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Ss=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=J(),s=d.BASE_PATH?.startsWith(a.pathname),r=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[s?u(Ns,{className:"mt-2xs",bgColor:e,logo:t}):ks(r),l?u(re,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",ws["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),ks=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(jt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),Cs={"bg-white":"primary",transparent:"transparent"},Is=g((({bgColor:e="bg-white",version:t=Cs[e],...l})=>{const{logo:n,internetBankUrl:a}=Yi(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Ss,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Ts={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Bs=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...s})=>u(k,{className:w("relative flex flex-col",Ts[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...s,children:aa({...s,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));Bs.childrenTypes=[];const Rs=g((e=>u(Bs,{...e})));Rs.childrenTypes=[];const Ms=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(jt,{image:l})})})),Vs=["байт","Кб","Мб","Гб","Тб","Пб"],_s=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(me,{size:"text-l",font:"font-light",children:[t,u(me,{color:"text-secondary-text",children:n?.href&&Ps(zs(n.href),l)})]}):null]}))),Ps=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),zs=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},js={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},As=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:s="double",...r})=>{const o=J();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...r,children:[u(rl,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===s?"@md:grid-cols-2":"grid-cols-1",js[s]),role:"list",children:a.map(Ds(o,s,i))}):null]})})),Ds=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?W(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Vs[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(_s,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(jt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Es={left:"text-left",center:"text-center",right:"text-right"},Ls=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(me,{size:"text-xl","font-weight":"light",children:e})}):null,$s=e=>e?.length?u(Ra,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Os=e=>{const t=e.length>2;return ll(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Fs=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:s,items:r,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Da,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Es[l])}):null,rightImage:s?.src?u(jt,{className:"hidden lg:block",image:s}):null,buttons:Os(n),children:[Ls(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(jt,{className:"w-fit",image:o})}):null,$s(r),s?.src?u(jt,{className:"lg:hidden",image:s}):null]})]})})})),Us=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Hs("Страховая сумма:",e):null,Number(t)>0?Hs("Ежемесячный лимит:",t):null]}):null,Hs=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(me,{font:"font-light",size:"text-l",children:e}),p(me,{size:"text-h6",color:"text-primary-text",children:[mt(2)(t)," ₽"]})]}),Ks=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:s,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(ti,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...s},...r,children:Us(Number(a),Number(i))})}))),Ws=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(rl,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Xs()})]}))),Xs=(e=3)=>Js(100,e).map((e=>Math.floor(e))).map(Gs),Gs=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Js=(e,t)=>[e].concat(t>0?Js(e/1.618,t-1):[]);function Ys({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",s={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...s,children:u(jt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(re,{version:"link",...s})]})}const qs=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?Ys(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(ti,{className:"grow h-full",...n})]}))),Zs=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(Rl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(ti,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Qs=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(ti,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...s,children:a?u(de,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),er=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:s,title:r,version:o="primary",...c})=>p(k,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[tr(s),r?u(T,{headingType:"h4",as:"h3",title:r}):null]}),p("div",{className:"w-full space-y-m",children:[i?lr(i):null,nr("Адрес",e,"GeolocationIcon"),nr("Телефон",l,"PhoneIcon"),nr("E-mail",t,"MailIcon"),n?.text?ll([n]):null]})]}))),tr=e=>u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:e?.src||e?.icon?u(jt,{image:e}):null}),lr=e=>u("div",{className:"border-b border-main-divider",children:u(Oa,{__html:e})}),nr=(e,t,l)=>p("div",{className:"flex gap-m",children:[u(je,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col",children:[u(me,{size:"text-m",font:"font-light",children:e}),t?u(me,{size:"text-h6",color:"text-green",children:t}):null]})]}),ar=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Oa,{__html:t,richVersion:l})})})),ir=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function sr(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const rr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},or=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(rr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),cr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},dr=(e,t,l)=>p("div",{className:`${Object.values(cr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),mr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},hr=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(mr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ur=e=>globalThis[e];const pr=()=>function(e,t){const[l,s]=n(),r=i((()=>s(ur(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",r),document.head.appendChild(e),()=>{document.head.removeChild(e),s(void 0)}}if(!ur(e))return l.addEventListener("load",r),()=>{l.removeEventListener("load",r)};r()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),gr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},xr=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(gr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),fr={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},br=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const s=r(null),o=pr(),[c,d]=n(),[m,h]=n(wr(ir)),g=yr(e);if(a((()=>{s?.current||o?.ready((()=>{s.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),sr(o,s.current,m)}))}),[o,s,m]),a((()=>{if(s.current&&m&&o){const e=m.length<1?wr(ir):m;sr(o,s.current,e)}}),[s,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?dr(ir,0,(e=>{if(e){const t=wr(e);h(t)}})):or(g)}),u("div",{className:`${Object.values(fr).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=s.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(xr,{yandexMaps:s}),u(xr,{yandexMaps:s,direction:"out"})]}),hr(s.current,o,`right-2 top-80 ${x}`)]})})),yr=e=>[Nr(vr(e,0)),Nr(vr(e,1))],vr=(e,t)=>e.map((e=>e[t])),Nr=e=>e.reduce(((e,t)=>e+t))/e.length,wr=e=>e?e.map((e=>e.coords)):null,Sr=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:s})=>{const r=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=r.find((e=>e.key===n));return u(Ee,{options:r,label:s,placeholder:a||n,onChange:e=>i(e.key),value:o})})),kr=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Cr=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),Ir=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(Cr,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Cr,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Tr=["От 1 дня","До 365 дней"],Br=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(me,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(xt,{min:1,max:365,value:e,items:Tr,onChange:t})]}))),Rr=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Sr,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Mr=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:s,safeBoxCases:r,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(kr,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Vr(c)}),u(Br,{days:a,setDays:e=>c({days:e})}),u(Rr,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:_r(c),safeBoxCases:r,selectedBoxSize:s,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(Ir,{}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Vr=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},_r=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Pr=g((({days:e,tariffs:t=[]})=>{const l=jr(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[zr("Аренда за",e),zr("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(jt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),zr=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),jr=(e,t)=>{const l=Ar(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Ar=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Dr=(e,t)=>e.find((e=>e.branchCode===t)),Er=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:s}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const r=Dr(n,l.selectedBranch),o=Lr(r?.safeBoxCaseVolumes),c=$r(r?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Or(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(Mr,{...l,regions:t,onClick:s,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Pr,{days:l.days,tariffs:d})]})})),Lr=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],$r=(e,t)=>e?.find((e=>e.volume===t)),Or=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Fr=[];const Ur=async e=>await D(e,{method:"GET"})||Fr,Hr=g((({title:e,footnote:t,className:l="",...a})=>{const[s,r]=n(!1),o=i((()=>r((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=$(),h=Kr(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ur);return t||Fr}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Dr(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Er,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(de,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&s?u(br,{points:f,className:"h-[640px]"}):null]})})),Kr=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Wr(e){throw new Error(e)}const Xr=e=>Boolean(e?.icon||e?.src),Gr={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Jr={normal:"",small:"min-h-6xl"},Yr={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},qr=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:s="primary",...r})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...r,children:[u(rl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Zr(i,s))})}):null,ll(a,{isVertical:!0})]}))),Zr=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Qr(e,t)(l,n);case"rte":return u(Oa,{__html:l.__html});default:Wr(l)}},Qr=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:eo(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Jr[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Yr.description),children:l.description}):null]})]})},String(n)),eo=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",s=Boolean(l?.icon?.src),r=Gr[e][s?"image":"icon"];return u("div",{className:w(r,s?"":`rounded-md ${Yr.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Xr(l?.icon)?u(jt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},to={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},lo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},no={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},ao={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},io=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:s,appendRight:r,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",to[n],l?ao[n]:no[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?lo[n]:"text-secondary-text hover:text-primary-main"),children:[u(me,{size:"text-m",children:s}),r?u("div",{className:"ml-xs",children:r}):null]})})})),so=g((e=>u(e?.item?.href?ro:oo,{...e}))),ro=g((e=>{const t=Y(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(io,{...e,tag:"a",item:a,onClick:n})})),oo=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(io,{item:e,onClick:n,...l})})),co=(e,t,l)=>(n,a)=>u(so,{isActive:n===e,onClick:t,type:l,item:n},String(a)),mo="hidden sm:flex absolute z-40 top-0",ho=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,s]=Bl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(gl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,children:t.map(co(l,n,a))}),s.canScrollLeft?u(Xn,{className:w("left-6",mo),onClick:s.scrollLeft}):null,s.canScrollRight?u(Gn,{className:w("right-6",mo),onClick:s.scrollRight}):null]})})),uo=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(co(n,a,t))}))),po=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(uo,{...t});case"centered":return u("div",{className:"flex",children:u(uo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(ho,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},go=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:r,...o})=>{const c=s((()=>l.map(fo)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&xo(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),xo(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:po({items:c,value:c[d],tabsMode:r,onChange:h})})})),xo=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},fo=e=>"group"===e?.type?{text:e.title}:e,bo={Buttons:({buttons:e})=>ll(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(jt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Ra,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},yo=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(me,{size:"text-l",font:"font-light",children:e}):null,t?u(jt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),vo=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(yo,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:No(e,t)},String(l)))):null]})));function No(e,t){if(!e||!e.tableCellType||!(e.tableCellType in bo))return null;const l=bo[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const wo=g((({tiles:e,...t})=>e?.length?u(Rl,{...t,padding:void 0,children:e.map(((e,l)=>u(vo,{tile:e,...t},String(l))))}):null)),So=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(vo,{tile:e,...t},String(l))))}):null)),ko=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...s})=>{const r=Co(n),o=Io(a,r);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(rl,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?So:wo,{tiles:o,...s})]})})),Co=e=>e?.[0]?.data?e[0].data:[],Io=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),To=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:s=[],...r})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===n?Bo():null,"big"===n?Ro(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Mo(l):null,s?.length?Vo(s,!0):null,i?u(Oa,{__html:i}):null]})]}))),Bo=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Ro=e=>e?.src?u(jt,{className:"h-fit flex-shrink-0",image:e}):null,Mo=e=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Vo=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(me,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),_o=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(ti,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),Po={ApplicationForm:Xt,BenefitsBlock:qt,Bonus:ol,BonusBenefitsBlock:_l,ButtonsBlock:zl,Calculator:An,CardTransfer:Kn,Carousel:ha,CarouselBankHistoryCard:ua,CarouselCard:xa,CarouselCatalogCard:ba,CarouselLinks:wa,CarouselProductCard:Ma,CarouselProgramsCard:ni,CarouselRecommendationCard:mi,CarouselTariffsCard:pi,ComparisonTable:ki,ExchangeRateTile:Gi,Footer:ps,Header:Is,Headline:rl,HorizontalLayout:Rs,ImgBlock:Ms,LinkDocs:As,MobileAppTile:Fs,PictureText:Ks,Placeholder:Ws,ProductBlock:qs,ProductGallery:Zs,ProductTile:Qs,RepresentativeOfficeInfo:er,RichTextBlock:ar,RollupItem:ls,SafeDepositRental:Hr,StepsBlock:qr,Tabs:go,TariffsTable:ko,TextBlock:To,Tile:_o,VerticalLayout:Bs};const zo=["Header","Footer"],jo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Ao(e=globalThis){const t=r(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!zo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?kl(jo)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Do=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(jt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Eo="cookie",Lo=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:s}]=_e();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(Eo)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Eo,"true"),s()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(de,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(ka,{isRemote:!0,className:$o(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(ka,{isRemote:!0,className:$o(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Do,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),$o=e=>w("inline mx-2xs",e?"text-green-dark":"");const Oo=({onCloseAll:e,onClose:t}={})=>{const[l,{push:s,pop:r,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),s=i((()=>l((e=>e.slice(0,-1)))),[]),r=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:s,remove:r,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),r()}),[l,t]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":s(e);break;case"close":e.all?c():d();break;default:Wr(e)}}))),[c,d]),l},Fo=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Oo({onCloseAll:e,onClose:t}),{close:n}=O();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),a((()=>{l.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Uo=h();const Ho=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Ko()}))),Ko=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Wo=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Uo.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Uo.like(e))}),[e]),dislike:i((async()=>{l(await Uo.dislike(e))}),[e])}}(J().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Ho,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Ho,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Xo=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:s,colorPalette:r="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Ao(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":r,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:na(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[aa({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),na(i?.footer,{...o,slotName:"footer"})]}),s?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Wo,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Fo,{}),u(Lo,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Xo.childrenTypes=[],Xo.slots=()=>["header","footer"];e.Blocks=Po,e.ContentPage=Xo,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.9",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=J,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,M=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},R=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],P=e=>null!=e,z=new Map;function A(e,t,{fallback:l,cache:i}={}){const s=r((()=>j(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(P)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(P(n))return n;const a=e(l);return P(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function j(e){return Array.isArray(e)?e:e instanceof Function?j(e()):[e]}async function E(e,t){try{return e?await L(e,t):null}catch(e){console.error(e)}return null}async function L(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const D=[];function O(){const{data:e}=A("/api/v1/regions",L);return e||D}const $=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),K=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var W=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:K});const X=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||G(t,d.CDN))return t;const n=t.startsWith("/");return K(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),J=(e,t)=>J._impl(e,t);function Y(){return Y._impl()}function q(e={}){const{isRemote:t,basePath:l}=e,n=Y(),{closeAll:a}=$();return e=>({...e,href:t&&!l?e.href:X(n)(e.href,l),"aria-label":e.text,onClick:J(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}J._impl=e=>e,J.setup=e=>{J._impl=e},Y._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),Y.setup=e=>{Y._impl=e};const Q={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",ee={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},te="text-center font-sans select-none",le={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ne=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ae(e),"flex gap-xs"),children:[n?u("div",{className:le[i],children:n}):null,ie(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:le[i],children:a}):null]})})),ae=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",ie(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ie=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),re=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=g((({disabled:e,children:t,...l})=>{const n=q()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:re({className:e,rounded:n,version:l}),children:a}))),me=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),ue=g((({link:e})=>p(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(he,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(oe,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(he,{children:e.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},ge=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),xe=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ge,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),fe=e=>"_"===e,be=e=>/\d/.test(e),ye=e=>fe(e)||be(e),ve=[..."+7 (___) ___-__-__"],Ne=ve.findIndex(fe),we=ve.map(((e,t)=>ye(e)?ve.slice(0,t).filter(ye).length:-1));const Se=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ve.map(((e,l)=>be(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(ge,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),ke=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Se,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ce="Некорректно заполненное поле",Ie=_((e=>null!=e&&""!==e))(Ce),Te=_((e=>"string"==typeof e&&e.length>1))(Ce),Be=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ce),Me=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Re.test(e))))(Ce);var Re;const Ve=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]})]}),_e=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Pe(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const ze=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Ae={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=Y(),o=X(s)(K(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Le,{className:e,children:p("svg",{className:w(Ee(r.width),Ae[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),Ee=e=>e?"":"w-full h-full",Le=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),De=g((({className:e="",label:t,options:l=[],value:r,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=Pe(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[Oe(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Ke(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:He(r)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Fe(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:$e(l,b).map(Ue(S,g,(e=>e.key===r?.key)))})}):null]})]})})),Oe=e=>e?u("div",{className:"mb-xs",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,$e=(e,t)=>t?e.filter((e=>ze(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Fe=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(ge,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Ue=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:He(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),He=e=>e?.text||e?.key||"",Ke=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),We=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(De,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Xe=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(We,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:_e.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(We,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Ge=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Je=e=>p("div",{children:[u(Ge,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Ge,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Ye=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},qe={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Qe=R({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:Me}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;V(Qe(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=M(qe,a),o=O();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),Xe({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ve(r),Je(r),Ye(t),u(ue,{link:l})]})})),et=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)}),u(xe,{className:"shrink-0 w-full",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),tt=({regions:e,field:t})=>u(We,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)}),lt={name:"",phone:"",inn:"",mail:""},nt=R({region:Ie,name:Te,phone:Me,inn:Be,mail:Ie}),at=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;V(nt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=M(lt,a),o=O();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[tt({regions:o,field:r}),et(r),Ye(t),u(ue,{link:l})]})})),it=[];const rt=async e=>await E(e,{method:"GET"})||it,st=["От 1 000 ₽","До 1 000 000 000 ₽"],ot=["От 1 мес","До 15 лет"],ct=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(xe,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),dt=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},mt=(e,t,l)=>Math.max(t,Math.min(e,l)),ht=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function ut(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function pt({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=ut(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const gt=1,xt=100,ft=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:gt),max:s=(a.length?a.length-1:xt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=dt(e,{normalize:(e=0)=>a.length?bt(a)(e):mt(e,r,s),format:ht()}),g=i((e=>{m&&m(ut(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),pt({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),yt(n)]})})),bt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),yt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),vt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(ft,{items:st,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(ft,{items:ot,min:1,max:180,...e("term")})]})]}),Nt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(We,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(We,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),wt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},St=R({fullName:Ie,annualRevenue:Ie,inn:Be,name:Te,phone:Me,region:Ie,department:Ie}),kt=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;V(St(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=M(wt,n),o=O(),c=function(e){const{data:t}=A(e?`/api/v1/branches?regionCode=${e}`:null,rt);return t||it}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),vt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),ct(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),Nt({regions:o,branches:c,field:r}),Ye(e),u(ue,{link:t})]})})),Ct={name:"",phone:""},It=R({name:Te,phone:Me}),Tt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(It(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=M(Ct,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Имя",...pe(r("name"),Te)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(r("phone"),Me)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:l})}),Ye(t)]})]})})),Bt={};function Mt(e,t=Bt,l="wcms-resources"){const{data:n}=A(e?`/${l}/${e}.json`:null,L,{fallback:t});return n||Bt}const Rt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Mt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(We,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(oe,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Vt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,_t=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=Y();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Vt).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:zt(a,n)(e),type:At(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?Pt({...t,src:zt(a,n)(t.src)},l):null]})})),Pt=(e,t="")=>u("img",{src:e.src,className:w("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},...e.size}),zt=(e,t)=>l=>l&&!F(l)?X(e)(K(t,l)):l,At=e=>e?`image/${String(e)}`:void 0,jt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(_t,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),Et=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Lt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Dt=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Et,{paths:Lt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ot(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(he,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ot=e=>w("rounded border",e?"bg-primary-main":""),$t=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Dt,{text:"Валютный контроль",...e("currencyControl")}),u(Dt,{text:"Документарные операции",...e("documentaryOperations")}),u(Dt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ft=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...pe(e("fullName"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"ФИО",...pe(e("name"),Te)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(ke,{className:"shrink-0 w-full mb-s",label:"Телефон",...pe(e("phone"),Me)})}),u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...pe(e("mail"),Ie)})})]})]}),Ut={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Ht=R({fullName:Ie,name:Te,phone:Me,mail:Ie}),Kt={ApplicationFormBusinessCard:at,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;V(Ht(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=M(Ut,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ft(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),$t(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Ye(t),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(jt,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(jt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Tt,ApplicationFormCredit:kt,ApplicationFormAcquiring:Ze,ApplicationFormGrantSupport:Rt},Wt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(jt,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Xt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Gt=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Xt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Jt(l,o):null,r?u(Wt,{responseType:r}):null]})})})),Jt=(e,t)=>{const l=e?.formType;if(!l||!(l in Kt))return null;return u(Kt[l],{...e,onSubmit:t})},Yt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},qt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Yt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),Qt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Zt)}):null]}))),Zt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(qt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(jt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),el(e.description)]}):null]},String(t)),el=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?ll(e):tl(e)}):null},tl=e=>e?.name||null,ll=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},nl=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(al(l))}):null,al=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(oe,{className:w("basis-full sm:basis-auto",e),appendLeft:il({...a,iconVersion:c}),appendRight:il({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},il=e=>e?.icon||e?.src?u(jt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,rl={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},sl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},ol=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=rl[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(me,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),cl=g((({className:e="",title:t,description:l,bonusItems:n=[],...a})=>u(k,{className:e,defaultPadding:"p-6xl",...a,children:p("div",{className:"container",children:[u(ol,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m",children:[u("div",{className:"grow",children:u(ol,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:nl(e?.buttons)}),e.bonusItemContent?.bonusType?dl(e.bonusItemContent):null]})]},String(t)))):null})]})}))),dl=e=>"count"===e.bonusType?ml(e):hl(e),ml=e=>p("div",{className:"w-full pt-default mt-s flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-10",children:u("span",{className:"font-mohave text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(he,{size:"text-h2",children:e.bonusName})}):null]}),hl=e=>e.image?u(jt,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,ul=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),pl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),gl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],xl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(bl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?fl(r,b):{},...y?ul(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(pl,{className:w(c,n?gl[n-1]:"",y?"h-full":""),style:v?fl(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),fl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),bl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),yl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},vl={"horizontal-list":"w-6","vertical-list":"h-6"},Nl=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",yl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?vl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),wl=e=>e,Sl=(e=wl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),kl=Sl(),Cl=(e=wl)=>Sl((t=>-e(t))),Il=Cl(),Tl=e=>t=>e.scrollWidth/t,Bl=e=>(t,l)=>{e.scrollBy({left:l*Tl(e)(t),behavior:"smooth"})},Ml=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Cl()(a),Sl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Bl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Bl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView()}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Rl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Ml({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(xl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Nl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Vl="text-left",_l=(e,t,l)=>u(Rl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(he,{size:"text-h6",font:"font-normal",align:Vl,children:t}):null,e?u(jt,{image:e,height:"180",className:"w-auto"}):null,l?u(he,{size:"text-h6",font:"font-normal",align:Vl,children:l}):null]},String(n)))({...e},t)))}),Pl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(ol,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?_l(e):null]}))),zl={start:"justify-start",center:"justify-center",end:"justify-end"},Al=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",zl[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:nl(e)})})),jl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),El=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Ll=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",ht(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),Dl=Math.round(23.5),Ol={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},$l={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Fl={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ul={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Hl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Kl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Wl=e=>e?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Xl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${ht(2)(l.min||0)} ₽`,`До ${ht(2)(l.max||0)} ₽`];return u(ft,{items:e?n:[],step:t,...l})}function Gl(e){const{data:t}=A(`/wcms-resources/${e}.json`,L);return t}const Jl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Gl(t||"bonus-calculator-data")||Fl,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},Yl=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=M({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Jl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Xl({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Xl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Kl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Ll,{title:"Баллов за год",value:m}):null,nl(l,{isVertical:!0}),Wl(n)]})]})})),ql=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ql={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Zl=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Ql[a]}`,l),children:e?.map((({id:e,text:l})=>u(Dt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),en=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Zl,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),tn=e=>en({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ln=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:t?p(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),nn=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n})=>u(Kl,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,rateBlockClassName:"tracking-[-25px]",unit:"%"}),an=({rate:e})=>u(Ll,{title:"Ставка",value:e,postfix:"%"}),rn=e=>0===e.rate?u(ln,{isUnavailableByTerm:e.isUnavailableByTerm}):p("div",{children:[u("div",{className:"hidden md:block",children:nn(e)}),u("div",{className:"md:hidden",children:an(e)})]}),sn=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},on=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:cn([e,t],n),cn=([e,t],l=[])=>({[e]:l.length?Il(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?kl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),dn=(e,[t,l],n)=>e>=n[t]&&e<=n[l],mn=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,hn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},un=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=M({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=Gl(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...Hl,...e,isDisabledOperatingDeposit:d,isUnavailableByTerm:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&mn(c,e)&&dn(n,["minSum","maxSum"],e)&&dn(l,["minDays","maxDays"],e)))||Hl,{rate:h}=m,u=hn(h,e),p=n+u,g=o?.rateRows||[Hl];return{...m,...cn(["minSum","maxSum"],g),...cn(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isUnavailableByTerm:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Xl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(ft,{items:[`От ${ql(x.min||0)}`,`До ${ql(x.max||0)}`],step:1,...x})),pn(o,s),tn({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),rn({rate:m,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[gn(d,c),nl(l,{isVertical:!0}),Wl(n),Wl(a)]})]});var x})),pn=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Dt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Dt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Dt,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),gn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Ll,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Ll,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),xn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(ft,{items:[`От ${fn(e)}`,`До ${fn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),fn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,bn=e=>yn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&yn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&yn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&yn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),yn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],vn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Nn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Gl(t||"credit-calculator-data"),s=i?.rateRows||[Ol],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>bn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=on(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=on(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>bn({row:e,userInputParams:t,paramsViewSettings:l})&&dn(n,["minSum","maxSum"],e)&&dn(a,["minMonths","maxMonths"],e)))||Ol)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=vn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},wn=e=>en({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Sn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Dl}),o=Nn(r,t,a),c=wn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Xl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),xn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),kn({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),rn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Ll,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),nl(l,{isVertical:!0}),Wl(n)]})]})})),kn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Dt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Dt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Cn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Gl(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Bn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Tn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Tn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&dn(n,["minSum","maxSum"],t)&&dn(a||r,["minMonths","maxMonths"],t)))||Ul,{rate:d}=c,m=In(d,e),h=n+m,u=i?.rateRows||[Ul];return{...c,...cn(["minSum","maxSum"],u),...cn(["minMonths","maxMonths"],u),availableMonths:sn(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},In=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Tn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Bn=(e,t)=>e+Math.round((t-e)/2),Mn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=M({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=Cn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Xl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),xn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Rn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),rn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Ll,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Ll,{title:"Сумма в конце срока",value:h,postfix:"₽"}),nl(l,{isVertical:!0}),Wl(n)]})]})})),Rn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?tn({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},en({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Vn=e=>_n({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&_n({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&_n({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),_n=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Pn=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=Gl(t||"refinancing-calculator-data"),c=o?.rateRows||[$l],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Vn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=on(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=on(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Vn({row:e,userInputParams:t,paramsViewSettings:l})&&dn(n,["minSum","maxSum"],e)&&dn(i,["minSumOld","maxSumOld"],e)&&dn(r,["minSumExtra","maxSumExtra"],e)&&dn(a,["minMonths","maxMonths"],e)))||$l)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:x}=g,f=vn(x,e),b=e.oldMonthlyPayment-f;return r((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},zn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Pn(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Xl({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Xl({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),xn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),An({...s,...a},r),s.isExtraMoney?Xl({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),rn({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Ll,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Ll,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,wn({orientation:"vertical",...r("isAnnuity")}),nl(l,{isVertical:!0}),Wl(n)]})]})})),An=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(Dt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),jn={CreditCalculatorForm:Sn,DepositCalculatorForm:Mn,BusinessDepositCalculatorForm:un,BonusCalculatorForm:Yl,RefinancingCalculatorForm:zn},En=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Dn(t)}))),Ln=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in jn))return null;return u(jn[t],{...e.calculatorBlock,isMobile:!0})},Dn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Ln(e[0])}):e.map(((e,t)=>u(jl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(El,{isUnfolded:t,children:u(k,{children:Ln(e)})}),renderFoldButton:On(e)},t.toString())))},On=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(he,{align:"text-left",color:"text-white",children:e.nav?.title}),u(he,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),$n=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=dt(e,{normalize:(e=a)=>l&&n?String(mt(Number(Fn(e)),l,n)):Fn(e),format:ht(r)}),c=i((e=>t&&t(Fn(e))),[t]);return u(ge,{onChange:c,...s,...o})})),Fn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Un=g((e=>u($n,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),Hn={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Kn={amount:1500,_amount:1500},Wn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=M(Kn),d=s<=0,m=d?re({version:a?.version}):se({className:"text-white",version:a?.version}),h=q();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Hn[i],children:[u(Un,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Xn=g((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:`group/btn 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 ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(jt,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Gn=g((e=>u(Xn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Jn=g((e=>u(Xn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Yn="absolute top-[calc(50%-24px)] z-40",qn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Qn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Zn(e),h?u(Gn,{className:w(Yn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Jn,{className:w(Yn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Zn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(qn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(qn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ea=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),ta=[];function la(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=ea,blocksRegistry:r={},ancestors:s=ta}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const na=[],aa=(e,{key:t,ancestors:l=na,slotName:n=null,extraProps:a,renderProps:i=la,...r})=>{const s=a?(e,t)=>la(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||na,[r.parent,n]]:l},a)))};function ia({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?aa(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const ra=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),sa="relative h-full",oa={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},ca=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ha);return ia({...n,renderProps:(n,a,r)=>p("div",{className:da(n,{someCardsHighlighted:i}),children:[la(n,a,{className:ma(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),ha(n)?ra({className:"absolute top-0 -right-4 z-40"}):null]})})},da=(e,{someCardsHighlighted:t})=>w(sa,t&&(ha(e)?"pt-3xl":"pt-3xl sm:pt-16")),ma=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(sa,"min-w-80",oa[n],t&&(ha(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ha=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ua=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},g=t||h?.length,[x,{inc:f,dec:b}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:g,visibleItemCount:l},Math.floor(l/2)),[y,v]=Ml({itemCount:g}),[N]=v.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...m,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(xl,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:ca({noCardBorder:a,activeIndex:x,cardSize:d,...m})}),u(Qn,{scroll:v,arrowsPadded:o,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:S,activeIndex:x,itemCount:g}),s?u(Nl,{containerRef:y,activeIndex:N,dotCount:g,listType:"horizontal-list"}):null]})})}));ua.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ua.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const pa=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(ol,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),ga="z-10 border border-solid w-full h-full",xa=w(ga,"absolute hidden sm:block border-transparent"),fa=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(xa,"top-9 right-12 bg-green-dark")}),u("div",{className:w(xa,"top-6 right-8 bg-green")}),u("div",{className:w(xa,"top-3 right-4 bg-green-light")}),p("div",{className:w(ga,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(ol,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),nl([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ba={black:"bg-black",white:"bg-white"},ya=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(jt,{className:"flex justify-center mb-xl",image:n}):null,u(ol,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(va)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,nl([i],{buttonClassName:"w-full mt-lg"})]}))),va=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ba[e]}`},String(t)),Na="bg-transparent border-white border h-[70px] absolute w-80 top-0",wa=g((({text:e,href:t="",target:l="",className:n=""})=>{const a=q()({href:t,target:l});return e?p("div",{className:w("flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m",n),children:[p("a",{className:w("absolute border border-primary-main px-xl py-lg\n text-l font-light bg-white text-primary-text flex\n justify-between items-center group-hover/link:text-primary-main z-10","rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto"),role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6 hidden sm:block",children:u(jt,{className:"w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:Na+" hidden sm:block mx-1.5 mt-1.5"}),u("div",{className:Na+" hidden sm:block mt-3 mr-3"})]}):null})),Sa=g((({className:e,additionalDescription:t,description:l,links:n,title:a,maxLinksCount:i=10,...r})=>p(k,{className:w("flex flex-col sm:flex-row w-full overflow-hidden",e),...r,children:[p("div",{className:"mr-xl flex-auto",children:[u(ol,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u(ol,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?ka(n,i):null]}))),ka=(e,t)=>{const l=Math.ceil(e.length/t);return u(ua,{className:"@container-normal sm:w-2/3 w-full p-0 sm:p-xs",version:"secondary",itemCount:l,arrowsPadded:!1,showDots:!1,children:new Array(l).fill(null).map(((l,n)=>u("div",{className:w("flex flex-wrap self-start w-full sm:w-[672px]"),children:e.slice(n*t,(n+1)*t).map(((e,t)=>u(wa,{className:"sm:m-2xs",...e},String(t))))},String(n))))})},Ca=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=q({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),Ia={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},Ta=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Ia[n])})}):null,u("span",{children:l})]}))),Ba={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Ma={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Ra=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Ba[a],t?Ma[a]:"",e),role:"list",children:n.map(((e,t)=>u(Ta,{isDotted:l,size:a,children:e},String(t))))}):null)),Va=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(Ca,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[Pa(i,g),za(a),ja(h,o,x),Aa(e),_a(s,d,m)]}),nl([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),_a=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(jt,{className:"shrink-0",image:e}):null,e?.icon?u(jt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),Pa=(e,t)=>t?u(he,{size:sl[e],children:t}):null,za=e=>e?u(me,{size:"text-l",children:e}):null,Aa=e=>e?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,ja=(e,t,l="primary")=>e?.length?u(Ra,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Ea={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},La=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-col @xl:flex-row justify-around @xl:justify-between items-stretch gap-3xl",children:[Da(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"justify-center mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Da(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Da=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("md:flex-shrink-0 self-center",l&&Ea[l],t),children:e}):null,Oa=(e=[])=>e.reduce(((e,t)=>e+t),0),$a=(e=[])=>e?.length?Oa(e)/e.length:0,Fa=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(jt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ua=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Ha=(e,t)=>e?u(me,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ka=(e,t)=>e?u(he,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Wa=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ua,{...e},`rte-${t}`):["label"in e?Ka(e.label,t):null,"description"in e?Ha(e.description,t):null],Xa=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?Fa(l.icon,t):null,u("div",{children:Wa(l)})]}))),Ga=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ja=e=>{return((t=e.map(Ga))?.length?Math.sqrt(Math.abs($a(t.map((e=>e**2)))-$a(t)**2)):0)>16;var t},Ya=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),qa=e=>!e.some(Ya),Qa=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Ja(l)||qa(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Xa,{benefitsVersion:t,...e},String(l))))}):null)),Za=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Wa)}):null)),ei=g((({isTabularBenefits:e,...t})=>u(e?Za:Qa,{...t}))),ti=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(li)}):null)),li=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(he,{size:"text-m",font:"font-light",children:e})},String(t)),ni=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m=!0,items:h,isDotted:g=!0,listItemSize:x,tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(jt,{image:y}):null,C=u(ol,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),I=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(La,{className:e,padding:t,defaultPadding:l,...m?{insetTitle:C}:{title:C},...w?{backImage:k}:ai(k,N),imageAlign:v,buttons:nl(b),children:p("div",{className:"flex flex-col gap-xl",children:[I?.length?u(ei,{benefitsVersion:s,isTabularBenefits:o,benefits:I}):null,d?u(Ua,{__html:d}):null,h?.length?u(Ra,{items:h,isDotted:g,listItemSize:x}):null,S,ii(f)]})})})),ai=(e,t)=>t?{rightImage:e}:{leftImage:e},ii=e=>e?.length?u(ti,{tags:e}):null,ri=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(Ca,{className:"flex items-center h-full",href:a,target:i,children:u(ni,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),si={default:"w-14 h-14",stretched:"flex-1 h-14"},oi=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",si[t]),ci=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],di=e=>ci.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},mi=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=di(a),c=hi(l)??s;return u(oe,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",oi(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(jt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),hi=e=>e?.src||e?.icon?e:void 0,ui=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(mi,{buttonSize:n,...e},String(t))))})]}))),pi=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(Ca,{href:l,target:r,className:"space-y-lg",children:[u(ol,{title:s,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Ra,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,gi(n),i.length?u(ui,{media:i}):null]})}))),gi=e=>e?.src||e?.icon?u("div",{children:u(jt,{image:e})}):null,xi=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(he,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:nl(a)}):null]},String(t))},fi=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(xi),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[bi(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-m",...a}):null,i.length?u(jl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(El,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?yi:null}):null]})})),bi=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(jt,{image:e}):null}),yi=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),vi=(e=!1)=>e?"text-white":"",Ni=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),wi=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(jt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(jt,{image:t})}),l?u(T,{headingType:"h4",className:vi(a),title:l}):null,n?u("div",{className:Ni(a),children:n}):null]}))),Si=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ki(l,t))})}))),ki=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),Ci=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(wi,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(Si,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(oe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Ii({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Ii=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),Ti=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Bi,{...e})})]})})),Bi=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Ci,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(Rl,{onVisibleIndicesChange:m,children:h}):h}));var Mi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Mi||(Mi={}));const Ri=new Intl.NumberFormat("ru",{style:"currency",currency:Mi.RUB}),Vi=e=>e?Ri.format(e):"",_i="text-left text-m font-light text-secondary-text",Pi=`${_i} pl-5xl`,zi={USD:"DollarIcon",EUR:"EuroIcon"},Ai=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:_i,children:u(he,{size:"text-m",children:"Валюта"})}),u("th",{className:Pi,children:u(he,{size:"text-m",children:"Купить"})}),u("th",{className:Pi,children:u(he,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(ji)})]}))),ji=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(jt,{image:{icon:zi[t]},width:"24",height:"24"}):null,u(he,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:Vi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:Vi(e?.buyExchangeRate)})})]},t)},Ei={icon:"GpsIcon"},Li=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(qt,{...Ei,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Di=(e,t,l)=>{const n=Number(Oi(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Oi=e=>e.replace(/[^\d.,]/g,"").replace(",","."),$i=e=>{return(t=[[e=>e.value!==Mi.RUB&&e.oppositeValue!==Mi.RUB,()=>e.handleConvert(e.value,Mi.RUB)],[e=>e.value===Mi.RUB&&e.oppositeValue===Mi.RUB,()=>e.handleConvert(e.value,Mi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Fi(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(ge,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(De,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ui=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Mi.RUB,selectBuy:l?.[0]?.currency?.currency||Mi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Fi({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Hi(r,o,l),value:r.inputSell,setValue:e=>Wi(o,l)(e,r.selectSell,r.selectBuy)}),Fi({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ki(r,o,t),value:r.inputBuy,setValue:e=>Xi(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(oe,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Hi=(e,t,l)=>n=>{t({selectSell:n}),$i({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Wi(t,l)(e.inputSell,n,a)}})},Ki=(e,t,l)=>n=>{t({selectBuy:n}),$i({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Xi(t,l)(e.inputBuy,n,a)})},Wi=(e,t)=>(l,n,a)=>{e({inputSell:Oi(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Di(l,i,n===Mi.RUB)||"")})},Xi=(e,t)=>(l,n,a)=>{e({inputBuy:Oi(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Di(l,i,n===Mi.RUB)||"")})};const Gi=async e=>{const t=await Ji(),l=t?.code||"000";return{region:t,exchangeRates:await Yi(e,l)}},Ji=async()=>{try{return await L("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Yi=async(e,t)=>{try{return await L(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},qi=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=A("/api/v1/exchangerates",Gi);return e||{}}(),i=Qi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:Mi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Mi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(La,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(Ai,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(Li,{address:a?.address})]}),i.length&&r.length&&s.length?u(Ui,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),Qi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Zi=e=>Mt(d.SITEMAP||"sitemap",e),er=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(tr)}):null)),tr=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},lr=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(jt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),nr=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",ar=(e,t)=>u(qt,{...e,iconBgVersion:t,className:"shrink-0"}),ir=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(jl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(El,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:ia({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>rr({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));ir.childrenTypes={exclude:["RollupItem"]};const rr=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?sr({label:r,labelIcon:l,labelIconBgVersion:n,icon:nr(a),onToggle:i}):u(lr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},sr=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ar(a,t),e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),or=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(cr):null,u(oe,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),cr=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(he,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(dr)})]},String(t)),dr=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:mr(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),mr=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${hr(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},hr=e=>e.replaceAll(/\D/g,""),ur=g((({className:e="",index:t,text:l,...n})=>{const a=q(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),pr=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(he,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(ur,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),gr=g((({className:e="",index:t,...l})=>{const n=q({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),xr=g((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(he,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @lg:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(gr,{index:t,...e},String(t))))}):null]}))),fr=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Zi(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=Mt(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(ir,{label:e?.text,labelIcon:e?.icon,children:u(er,{items:e.items})},String(t))))}),u(or,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(ui,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(br)})]}),u(pr,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(xr,{links:c})]})})),br=({href:e="/"},t)=>{const{label:l}=di(e);return u(oe,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},yr={"bg-white":"color",transparent:"white"},vr={"bg-white":"text-primary-main",transparent:"text-white"},Nr=(e,t,l)=>u(jt,t?.src?{image:t,className:vr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:yr[e]},className:vr[e],width:l?.width,height:l?.height}),wr={"bg-white":"text-primary-text",transparent:"text-white"},Sr=(e,t,l)=>u("span",{className:`${wr[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),kr=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[Nr(e,a?.image,{width:"34",height:"34"}),i?Sr(t||a?.title,e,"text-s"):null]}))),Cr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Ir=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=Y(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u(kr,{className:"mt-2xs",bgColor:e,logo:t}):Tr(s),l?u(oe,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Cr["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),Tr=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(jt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),Br={"bg-white":"primary",transparent:"transparent"},Mr=g((({bgColor:e="bg-white",version:t=Br[e],...l})=>{const{logo:n,internetBankUrl:a}=Zi(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Ir,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Rr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Vr=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",Rr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:ia({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));Vr.childrenTypes=[];const _r=g((e=>u(Vr,{...e})));_r.childrenTypes=[];const Pr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(jt,{image:l})})})),zr=["байт","Кб","Мб","Гб","Тб","Пб"],Ar=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(he,{size:"text-l",font:"font-light",children:[t,u(he,{color:"text-secondary-text",children:n?.href&&jr(Er(n.href),l)})]}):null]}))),jr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Er=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Lr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Dr=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=Y();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(ol,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Lr[r]),role:"list",children:a.map(Or(o,r,i))}):null]})})),Or=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?X(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${zr[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(Ar,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(jt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},$r={left:"text-left",center:"text-center",right:"text-right"},Fr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(he,{size:"text-xl","font-weight":"light",children:e})}):null,Ur=e=>e?.length?u(Ra,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Hr=e=>{const t=e.length>2;return nl(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Kr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(La,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",$r[l])}):null,rightImage:r?.src?u(jt,{className:"hidden lg:block",image:r}):null,buttons:Hr(n),children:[Fr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(jt,{className:"w-fit",image:o})}):null,Ur(s),r?.src?u(jt,{className:"lg:hidden",image:r}):null]})]})})})),Wr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Xr("Страховая сумма:",e):null,Number(t)>0?Xr("Ежемесячный лимит:",t):null]}):null,Xr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(he,{font:"font-light",size:"text-l",children:e}),p(he,{size:"text-h6",color:"text-primary-text",children:[ht(2)(t)," ₽"]})]}),Gr=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(ni,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isFullWidthTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Wr(Number(a),Number(i))})}))),Jr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(ol,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Yr()})]}))),Yr=(e=3)=>Qr(100,e).map((e=>Math.floor(e))).map(qr),qr=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Qr=(e,t)=>[e].concat(t>0?Qr(e/1.618,t-1):[]);function Zr({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(oe,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(jt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(oe,{version:"link",...r})]})}const es=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?Zr(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(ni,{className:"grow h-full",...n})]}))),ts=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(Rl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(ni,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),ls=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(ni,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),ns=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[as(r),s?u(T,{headingType:"h4",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?is(i):null,rs("Адрес",e,"GeolocationIcon"),rs("Телефон",l,"PhoneIcon"),rs("E-mail",t,"MailIcon"),n?.text?nl([n]):null]})]}))),as=e=>u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:e?.src||e?.icon?u(jt,{image:e}):null}),is=e=>u("div",{className:"border-b border-main-divider",children:u(Ua,{__html:e})}),rs=(e,t,l)=>p("div",{className:"flex gap-m",children:[u(je,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col",children:[u(he,{size:"text-m",font:"font-light",children:e}),t?u(he,{size:"text-h6",color:"text-green",children:t}):null]})]}),ss=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Ua,{__html:t,richVersion:l})})})),os=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function cs(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ds={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ms=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(ds).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),hs={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},us=(e,t,l)=>p("div",{className:`${Object.values(hs).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),ps={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},gs=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(ps).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),xs=e=>globalThis[e];const fs=()=>function(e,t){const[l,r]=n(),s=i((()=>r(xs(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!xs(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),bs={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},ys=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(bs).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),vs={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Ns=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=fs(),[c,d]=n(),[m,h]=n(Cs(os)),g=ws(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),cs(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?Cs(os):m;cs(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?us(os,0,(e=>{if(e){const t=Cs(e);h(t)}})):ms(g)}),u("div",{className:`${Object.values(vs).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(ys,{yandexMaps:r}),u(ys,{yandexMaps:r,direction:"out"})]}),gs(r.current,o,`right-2 top-80 ${x}`)]})})),ws=e=>[ks(Ss(e,0)),ks(Ss(e,1))],Ss=(e,t)=>e.map((e=>e[t])),ks=e=>e.reduce(((e,t)=>e+t))/e.length,Cs=e=>e?e.map((e=>e.coords)):null,Is=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(De,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Ts=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Is,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Is,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Bs=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),Ms=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(Bs,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Bs,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Rs=["От 1 дня","До 365 дней"],Vs=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(he,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(ft,{min:1,max:365,value:e,items:Rs,onChange:t})]}))),_s=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Is,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Is,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ps=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(Ts,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:zs(c)}),u(Vs,{days:a,setDays:e=>c({days:e})}),u(_s,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:As(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(Ms,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),zs=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},As=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},js=g((({days:e,tariffs:t=[]})=>{const l=Ls(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[Es("Аренда за",e),Es("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(jt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),Es=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),Ls=(e,t)=>{const l=Ds(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Ds=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Os=(e,t)=>e.find((e=>e.branchCode===t)),$s=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Os(n,l.selectedBranch),o=Fs(s?.safeBoxCaseVolumes),c=Us(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Hs(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(Ps,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(js,{days:l.days,tariffs:d})]})})),Fs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Us=(e,t)=>e?.find((e=>e.volume===t)),Hs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ks=[];const Ws=async e=>await E(e,{method:"GET"})||Ks,Xs=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=O(),h=Gs(c.selectedRegion,m),g=function(e){const{data:t}=A(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ws);return t||Ks}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Os(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u($s,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(me,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Ns,{points:f,className:"h-[640px]"}):null]})})),Gs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Js(e){throw new Error(e)}const Ys=e=>Boolean(e?.icon||e?.src),qs={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Qs={normal:"",small:"min-h-6xl"},Zs={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},eo=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(ol,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(to(i,r))})}):null,nl(a,{isVertical:!0})]}))),to=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return lo(e,t)(l,n);case"rte":return u(Ua,{__html:l.__html});default:Js(l)}},lo=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:no(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Qs[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Zs.description),children:l.description}):null]})]})},String(n)),no=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=qs[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Zs.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Ys(l?.icon)?u(jt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},ao="location";function io(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(b,"location",so()??{name:e}),r=i((e=>{oo(e),l(e)}),[]),{data:s}=A("/api/v1/region",L);return a((()=>{s&&!ro()&&l(s)}),[s]),[t??{name:e},r]}const ro=()=>Boolean(globalThis.localStorage?.getItem(ao)),so=()=>{try{const e=globalThis.localStorage?.getItem(ao);return e&&JSON.parse(e)}catch(e){return null}},oo=e=>{try{globalThis.localStorage?.setItem(ao,JSON.stringify(e))}catch(e){}},co=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(jt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),mo=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a})=>{const r=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(jt,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:w("h-12 w-full px-10 text-l text-black outline-none box-border","border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:l,onChange:r,onFocus:a})]})})),ho=(e,t,l=300)=>a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t);function uo(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const po=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},go=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),xo=e=>t=>e.map((([e,l])=>[ze(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>bo(t,e))).reduce(po(Math.max,0),new Map),fo=e=>t=>{return uo(t,t.map((({title:e})=>e)).map((e=>t=>{const l=go(t||"");return l.length?Oa(e.map((e=>kl(l.map(ze(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},bo=(e,t)=>new Map(e.map((e=>[e,t]))),yo=["/"],vo=({basePathList:e=yo,initialQuery:t="",wasOpened:l})=>{const[i,s]=n(t||"");a((()=>{null!=t&&s(t)}),[t]);const o=r((()=>e.map((e=>l?e:null))),[l,e]),{data:c}=A(o,No),[d,m]=n(null);return ho((()=>{c&&m(c.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=go(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(xo(i)).reduce(po(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return fo(a)(r)})(i)))}),[c,i]),[d,{value:i,onChange:s}]},No=async(...e)=>(await Promise.allSettled(e.map((e=>E(K(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),wo=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=$(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:w("relative min-h-full bg-white p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(co,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),So=g((({className:e,topItems:t})=>{const l=q({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(ko)})})),ko=(e,t)=>{const{text:l,items:n,href:a,target:i,onClick:r}=e;return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),n?.filter((e=>!e.displayArea||"Footer"===e.displayArea)).map(((e,t)=>u(Co,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Co=g((({text:e,index:t,basePath:l,...n})=>{const a=q({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Io=g((({initialQuery:e})=>{const{topItems:t}=Zi(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=vo({basePathList:l,initialQuery:e,wasOpened:!1}),s=r((()=>To(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(wo,{head:u(mo,{autoFocus:!0,...i}),children:u(So,{topItems:s})})})),To=e=>t=>e?.length&&t?.length?uo(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:K("/",t)})))}))):[];const Bo=g((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=$();return{open:(t={},l={})=>e(u(Io,{...t}),l),close:t}})(),s=i((e=>{l(e),Mo(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:w("relative",e),children:[u(mo,{value:t,onChange:s}),u(co,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),Mo=e=>e&&e.length>=3;const Ro=e=>e?.length?p("div",{className:"border-t border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-5xl",children:e.map(((e,t)=>u(Vo,{...e},String(t))))})]}):null,Vo=g((({icon:e,...t})=>{const l=q(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s",children:[e?u(jt,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:n}):null]})})),_o=e=>t=>u("div",{className:"mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),Po=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),zo=g((()=>{const{defaultLocation:e,foreignOffices:t}=Zi(),[l,a]=io(e),[r,s]=n(""),o=jo(function(){const{data:e}=A("/api/v1/regions",L);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,Ao),{close:d}=$(),m=i((e=>{a(e),d()}),[]);return p(wo,{head:p("div",{children:[l?p("div",{className:"mb-s",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(he,{color:"text-primary-main",children:l.name})})]}):null,u(Po,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&ze(e.toLowerCase())(r.toLowerCase())>=.8)).map(_o(m))}):u("div",{className:"columns-2 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(he,{size:"text-h6",children:e})}),t.map(_o(h))]},e)))}),Ro(t)]});var h})),Ao=e=>e.name?.charAt(0)||"",jo=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Eo=({item:e,i:t,isActive:l})=>{const n=q(),{href:a,target:i,onClick:r}=n(e);return p("a",{href:a,target:i,onClick:r,className:"relative","aria-label":e.text,children:[u("span",{className:w("whitespace-nowrap",l?"text-primary-main":""),children:e.text}),l?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]},String(t))},Lo=g((({item:e,i:t})=>{const l=q(),{href:n,target:a,onClick:i}=l(e);return p("a",{className:"py-3 text-h5 font-light flex justify-between cursor-pointer",href:n,target:a,onClick:i,children:[e.text,u(jt,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]},`subItems-${String(t)}`)})),Do=g((({activeMenuSubItems:e})=>e?u("div",{className:"mb-5",children:e.map(((e,t)=>u(Lo,{item:e,i:t})))}):null)),Oo=e=>(e=>({href:t})=>H(F(t)?e.href:e.pathname).startsWith(H(t)))(d.BASE_PATH?{pathname:d.BASE_PATH}:e);const $o=g((e=>{const{topItems:t,officesLink:l,defaultLocation:n}=Zi(e.options?.page?.fallback),[r]=io(n),s=(()=>{const{open:e,close:t}=$();return{open:(t={})=>e(u(zo,{}),t),close:t}})(),o=i((()=>s.open()),[]),c=Array.isArray(t)?t.length:0,[d,m]=Ml({itemCount:c}),[h,g]=function(e=[]){const t=Y(),l=e.findIndex(Oo(t));return[l,e[l]]}(t),x=g?.items||[];return a((()=>{h>0&&m.scrollTo(h)}),[h,m]),u(wo,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(xl,{containerRef:d,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Eo,{item:e,i:t,isActive:h===t})))})}),p("div",{className:"relative grow overflow-auto",children:[u(Do,{activeMenuSubItems:x}),u(Bo,{className:"grow mb-5"}),Fo(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:o,children:[u(jt,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(he,{size:"text-h5",children:r.name}),u(he,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Fo=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(jt,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Uo=(e,t)=>u(k,{className:"sticky bottom-0 left-0 right-0 bg-transparent z-[100]",padding:"p-0",children:u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,l)=>Ho(e,l,t)))})}),Ho=(e,t,l)=>p("div",{className:w(e.isActive?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-[10px] cursor-pointer"),onClick:()=>"BurgerIcon"===e?.icon?.icon&&l?l():void 0,children:[u(jt,{className:"w-6 h-6",image:{icon:e.icon?.icon,iconVersion:e.icon?.iconVersion||"black"}}),e.title]},`menuItems-${String(t)}`);const Ko=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Js(e)}}))),[c,d]),l},Wo="burgerMenuDialog",Xo=g((({...e})=>{const{menuItems:t=[]}=Mt(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",e.options?.page?.fallback,"portal-resources"),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=$(),n=Ko(),a=((e,t)=>t.find((t=>t.id===e),e))(Wo,n),r=i((()=>e(u($o,{}),{id:Wo})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return p("div",{className:"contents",children:[Uo(o,n),l?u($o,{}):null]})})),Go={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Jo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Yo={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},qo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Qo=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Go[n],l?qo[n]:Yo[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Jo[n]:"text-secondary-text hover:text-primary-main"),children:[u(he,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Zo=g((e=>u(e?.item?.href?ec:tc,{...e}))),ec=g((e=>{const t=q(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Qo,{...e,tag:"a",item:a,onClick:n})})),tc=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Qo,{item:e,onClick:n,...l})})),lc=(e,t,l)=>(n,a)=>u(Zo,{isActive:n===e,onClick:t,type:l,item:n},String(a)),nc="hidden sm:flex absolute z-40 top-0",ac=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ml({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(xl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(lc(l,n,a))}),r.canScrollLeft?u(Gn,{className:w("left-6",nc),onClick:r.scrollLeft}):null,r.canScrollRight?u(Jn,{className:w("right-6",nc),onClick:r.scrollRight}):null]})})),ic=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(lc(n,a,t))}))),rc=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(ic,{...t});case"centered":return u("div",{className:"flex",children:u(ic,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(ac,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},sc=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(cc)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&oc(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),oc(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:rc({items:c,value:c[d],tabsMode:s,onChange:h})})})),oc=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},cc=e=>"group"===e?.type?{text:e.title}:e,dc={Buttons:({buttons:e})=>nl(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(jt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Ra,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},mc=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(he,{size:"text-l",font:"font-light",children:e}):null,t?u(jt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),hc=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(mc,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:uc(e,t)},String(l)))):null]})));function uc(e,t){if(!e||!e.tableCellType||!(e.tableCellType in dc))return null;const l=dc[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const pc=g((({tiles:e,...t})=>e?.length?u(Rl,{...t,padding:void 0,children:e.map(((e,l)=>u(hc,{tile:e,...t},String(l))))}):null)),gc=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(hc,{tile:e,...t},String(l))))}):null)),xc=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=fc(n),o=bc(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(ol,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?gc:pc,{tiles:o,...r})]})})),fc=e=>e?.[0]?.data?e[0].data:[],bc=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),yc=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?vc():null,"big"===n?Nc(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(he,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?wc(l):null,r?.length?Sc(r,!0):null,i?u(Ua,{__html:i}):null]})]}))),vc=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Nc=e=>e?.src?u(jt,{className:"h-fit flex-shrink-0",image:e}):null,wc=e=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Sc=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),kc=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(ni,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),Cc={ApplicationForm:Gt,BenefitsBlock:Qt,Bonus:cl,BonusBenefitsBlock:Pl,ButtonsBlock:Al,Calculator:En,CardTransfer:Wn,Carousel:ua,CarouselBankHistoryCard:pa,CarouselCard:fa,CarouselCatalogCard:ya,CarouselLinks:Sa,CarouselProductCard:Va,CarouselProgramsCard:ri,CarouselRecommendationCard:pi,CarouselTariffsCard:fi,ComparisonTable:Ti,ExchangeRateTile:qi,Footer:fr,Header:Mr,Headline:ol,HorizontalLayout:_r,ImgBlock:Pr,LinkDocs:Dr,MobileAppTile:Kr,PictureText:Gr,Placeholder:Jr,ProductBlock:es,ProductGallery:ts,ProductTile:ls,RepresentativeOfficeInfo:ns,RichTextBlock:ss,RollupItem:ir,SafeDepositRental:Xs,StepsBlock:eo,StickyBottomMenu:Xo,Tabs:sc,TariffsTable:xc,TextBlock:yc,Tile:kc,VerticalLayout:Vr};const Ic=["Header","Footer"],Tc=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Bc(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Ic.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Cl(Tc)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Mc="cookie",Rc=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Pe();ho((()=>{globalThis.localStorage?.getItem(Mc)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Mc,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(me,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Ca,{isRemote:!0,className:Vc(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Ca,{isRemote:!0,className:Vc(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(co,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Vc=e=>w("inline mx-2xs",e?"text-green-dark":""),_c=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Ko({onCloseAll:e,onClose:t}),{close:n}=$();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),a((()=>{l.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Pc=h();const zc=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Ac()}))),Ac=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},jc=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Pc.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Pc.like(e))}),[e]),dislike:i((async()=>{l(await Pc.dislike(e))}),[e])}}(Y().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(zc,{onClick:J(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(zc,{onClick:J(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Ec=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Bc(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:aa(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[ia({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),aa(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(jc,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Xo,{}),u(_c,{}),u(Rc,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Ec.childrenTypes=[],Ec.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=Cc,e.ContentPage=Ec,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=J,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.11",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=W,e.useRouter=Y,Object.defineProperty(e,"__esModule",{value:!0})}));