@redneckz/wildless-cms-uni-blocks 0.15.338 → 0.15.340

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 (609) hide show
  1. package/bin/migration-scripts/0.14.213.js +1 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +199 -135
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  6. package/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +1 -2
  7. package/bundle/components/CalculatorCredit/CalculatorCreditContent.d.ts +22 -1
  8. package/bundle/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.d.ts +1 -2
  9. package/bundle/components/CalculatorCredit/defaultCreditCalculatorParams.d.ts +2 -0
  10. package/bundle/components/CalculatorCredit/getCreditCalculatorLimitParams.d.ts +1 -2
  11. package/bundle/components/CalculatorCredit/getCreditCalculatorParams.d.ts +1 -24
  12. package/bundle/components/CalculatorCredit/getCreditCalculatorRateParams.d.ts +1 -2
  13. package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +1 -1
  14. package/bundle/components/ContentPage/computeAPIFallback.d.ts +1 -2
  15. package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  16. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
  17. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
  18. package/bundle/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
  19. package/bundle/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
  20. package/bundle/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
  21. package/bundle/components/OfficesAtmsMap/useOffices.d.ts +5 -2
  22. package/bundle/components/ProductGallery/ProductGallery.d.ts +1 -1
  23. package/bundle/content-page-repository/ContentPageRepository.d.ts +6 -2
  24. package/bundle/content-page-repository/TransformationOptions.d.ts +1 -0
  25. package/bundle/content-page-repository/copy.d.ts +1 -0
  26. package/bundle/data/FooterData.d.ts +0 -1
  27. package/bundle/data/SitemapData.d.ts +1 -10
  28. package/bundle/icons/IconName.d.ts +4 -2
  29. package/bundle/model/Fallback.d.ts +0 -1
  30. package/bundle/ui-kit/Calculator/renderMonthsInput.d.ts +1 -1
  31. package/bundle/ui-kit/CookiePopup/CookiePopup.d.ts +1 -0
  32. package/bundle/ui-kit/Heading/HeadingProps.d.ts +1 -3
  33. package/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -2
  34. package/bundle/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  35. package/bundle/ui-kit/YandexMap/YandexMap.d.ts +1 -1
  36. package/bundle/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
  37. package/bundle/utils/getVersion.d.ts +1 -0
  38. package/cosmos-static/icons/MapMarkerClusterYellowIcon.svg +1 -0
  39. package/cosmos-static/icons/sprites.svg +1 -0
  40. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  41. package/dist/components/CalculatorCredit/CalculatorCredit.d.ts +1 -2
  42. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  43. package/dist/components/CalculatorCredit/CalculatorCreditContent.d.ts +22 -1
  44. package/dist/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.d.ts +1 -2
  45. package/dist/components/CalculatorCredit/defaultCreditCalculatorParams.d.ts +2 -0
  46. package/dist/components/CalculatorCredit/defaultCreditCalculatorParams.js +17 -0
  47. package/dist/components/CalculatorCredit/defaultCreditCalculatorParams.js.map +1 -0
  48. package/dist/components/CalculatorCredit/getCreditCalculatorLimitParams.d.ts +1 -2
  49. package/dist/components/CalculatorCredit/getCreditCalculatorLimitParams.js.map +1 -1
  50. package/dist/components/CalculatorCredit/getCreditCalculatorParams.d.ts +1 -24
  51. package/dist/components/CalculatorCredit/getCreditCalculatorParams.js +3 -16
  52. package/dist/components/CalculatorCredit/getCreditCalculatorParams.js.map +1 -1
  53. package/dist/components/CalculatorCredit/getCreditCalculatorRateParams.d.ts +1 -2
  54. package/dist/components/CalculatorCredit/getCreditCalculatorRateParams.js +2 -2
  55. package/dist/components/CalculatorCredit/getCreditCalculatorRateParams.js.map +1 -1
  56. package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +1 -1
  57. package/dist/components/ContactsBlock/ContactsBlock.js +1 -1
  58. package/dist/components/ContentPage/ContentPage.js +1 -1
  59. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  60. package/dist/components/ContentPage/computeAPIFallback.d.ts +1 -2
  61. package/dist/components/ContentPage/computeAPIFallback.js +2 -16
  62. package/dist/components/ContentPage/computeAPIFallback.js.map +1 -1
  63. package/dist/components/Footer/Footer.js +2 -9
  64. package/dist/components/Footer/Footer.js.map +1 -1
  65. package/dist/components/Footer/Footer.mobile.js +1 -9
  66. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  67. package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  68. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  69. package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  70. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
  71. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +30 -20
  72. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  73. package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
  74. package/dist/components/OfficesAtmsMap/OfficesMap.js +12 -9
  75. package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  76. package/dist/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
  77. package/dist/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
  78. package/dist/components/OfficesAtmsMap/renderDescriptionBlock.js +9 -0
  79. package/dist/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
  80. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
  81. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  82. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
  83. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +35 -0
  84. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
  85. package/dist/components/OfficesAtmsMap/useOffices.d.ts +5 -2
  86. package/dist/components/OfficesAtmsMap/useOffices.js +4 -2
  87. package/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
  88. package/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
  89. package/dist/components/ProductGallery/ProductGallery.js +12 -5
  90. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  91. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +8 -1
  92. package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  93. package/dist/components/TabsLayout/TabsLayout.js +17 -11
  94. package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  95. package/dist/components/TabsLayout/renderTabsLayout.js +14 -12
  96. package/dist/components/TabsLayout/renderTabsLayout.js.map +1 -1
  97. package/dist/content-page-repository/ContentPageRepository.d.ts +6 -2
  98. package/dist/content-page-repository/ContentPageRepository.js +27 -5
  99. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  100. package/dist/content-page-repository/TransformationOptions.d.ts +1 -0
  101. package/dist/content-page-repository/copy.d.ts +1 -0
  102. package/dist/content-page-repository/copy.js +16 -0
  103. package/dist/content-page-repository/copy.js.map +1 -0
  104. package/dist/content-page-repository/transformAttachmentLink.js +8 -7
  105. package/dist/content-page-repository/transformAttachmentLink.js.map +1 -1
  106. package/dist/content-page-repository/transformDocument.js +3 -5
  107. package/dist/content-page-repository/transformDocument.js.map +1 -1
  108. package/dist/content-page-repository/transformImg.js +4 -1
  109. package/dist/content-page-repository/transformImg.js.map +1 -1
  110. package/dist/data/FooterData.d.ts +0 -1
  111. package/dist/data/SitemapData.d.ts +1 -10
  112. package/dist/icons/IconName.d.ts +4 -2
  113. package/dist/icons/IconName.js +3 -1
  114. package/dist/icons/IconName.js.map +1 -1
  115. package/dist/model/Fallback.d.ts +0 -1
  116. package/dist/ui-kit/Badge/Badge.js +1 -3
  117. package/dist/ui-kit/Badge/Badge.js.map +1 -1
  118. package/dist/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  119. package/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  120. package/dist/ui-kit/BenefitItem/renderBenefitIcon.js +1 -1
  121. package/dist/ui-kit/BenefitItem/renderBenefitIcon.js.map +1 -1
  122. package/dist/ui-kit/Calculator/renderMonthsInput.d.ts +1 -1
  123. package/dist/ui-kit/Calculator/renderMonthsInput.js +1 -1
  124. package/dist/ui-kit/Calculator/renderMonthsInput.js.map +1 -1
  125. package/dist/ui-kit/CookiePopup/CookiePopup.d.ts +1 -0
  126. package/dist/ui-kit/CookiePopup/CookiePopup.js +2 -2
  127. package/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  128. package/dist/ui-kit/Heading/HeadingProps.d.ts +1 -3
  129. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  130. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  131. package/dist/ui-kit/TabsControl/TabItem.d.ts +1 -2
  132. package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  133. package/dist/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  134. package/dist/ui-kit/TabsControl/TabItemInner.js +4 -2
  135. package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  136. package/dist/ui-kit/YandexMap/YandexMap.d.ts +1 -1
  137. package/dist/ui-kit/YandexMap/YandexMap.js +2 -2
  138. package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
  139. package/dist/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
  140. package/dist/ui-kit/YandexMap/renderClusterer.js +33 -14
  141. package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
  142. package/dist/utils/getVersion.d.ts +1 -0
  143. package/dist/utils/getVersion.js +5 -0
  144. package/dist/utils/getVersion.js.map +1 -0
  145. package/lib/common.css +1 -1
  146. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  147. package/lib/components/CalculatorCredit/CalculatorCredit.d.ts +1 -2
  148. package/lib/components/CalculatorCredit/CalculatorCredit.js +1 -1
  149. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  150. package/lib/components/CalculatorCredit/CalculatorCreditContent.d.ts +22 -1
  151. package/lib/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.d.ts +1 -2
  152. package/lib/components/CalculatorCredit/defaultCreditCalculatorParams.d.ts +2 -0
  153. package/lib/components/CalculatorCredit/defaultCreditCalculatorParams.js +15 -0
  154. package/lib/components/CalculatorCredit/defaultCreditCalculatorParams.js.map +1 -0
  155. package/lib/components/CalculatorCredit/getCreditCalculatorLimitParams.d.ts +1 -2
  156. package/lib/components/CalculatorCredit/getCreditCalculatorLimitParams.js.map +1 -1
  157. package/lib/components/CalculatorCredit/getCreditCalculatorParams.d.ts +1 -24
  158. package/lib/components/CalculatorCredit/getCreditCalculatorParams.js +1 -14
  159. package/lib/components/CalculatorCredit/getCreditCalculatorParams.js.map +1 -1
  160. package/lib/components/CalculatorCredit/getCreditCalculatorRateParams.d.ts +1 -2
  161. package/lib/components/CalculatorCredit/getCreditCalculatorRateParams.js +1 -1
  162. package/lib/components/CalculatorCredit/getCreditCalculatorRateParams.js.map +1 -1
  163. package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +1 -1
  164. package/lib/components/ContactsBlock/ContactsBlock.js +1 -1
  165. package/lib/components/ContentPage/ContentPage.js +1 -1
  166. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  167. package/lib/components/ContentPage/computeAPIFallback.d.ts +1 -2
  168. package/lib/components/ContentPage/computeAPIFallback.js +2 -16
  169. package/lib/components/ContentPage/computeAPIFallback.js.map +1 -1
  170. package/lib/components/Footer/Footer.js +2 -9
  171. package/lib/components/Footer/Footer.js.map +1 -1
  172. package/lib/components/Footer/Footer.mobile.js +1 -9
  173. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  174. package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  175. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  176. package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  177. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
  178. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +30 -20
  179. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  180. package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
  181. package/lib/components/OfficesAtmsMap/OfficesMap.js +12 -9
  182. package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  183. package/lib/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
  184. package/lib/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +2 -0
  185. package/lib/components/OfficesAtmsMap/renderDescriptionBlock.js +6 -0
  186. package/lib/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
  187. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
  188. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  189. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +6 -0
  190. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +31 -0
  191. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
  192. package/lib/components/OfficesAtmsMap/useOffices.d.ts +5 -2
  193. package/lib/components/OfficesAtmsMap/useOffices.js +4 -2
  194. package/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
  195. package/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
  196. package/lib/components/ProductGallery/ProductGallery.js +12 -5
  197. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  198. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +8 -1
  199. package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  200. package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +4 -3
  201. package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +4 -2
  202. package/lib/components/TabsLayout/TabsLayout.js +17 -11
  203. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  204. package/lib/components/TabsLayout/renderTabsLayout.js +14 -12
  205. package/lib/components/TabsLayout/renderTabsLayout.js.map +1 -1
  206. package/lib/content-page-repository/ContentPageRepository.d.ts +6 -2
  207. package/lib/content-page-repository/ContentPageRepository.js +26 -4
  208. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  209. package/lib/content-page-repository/TransformationOptions.d.ts +1 -0
  210. package/lib/content-page-repository/copy.d.ts +1 -0
  211. package/lib/content-page-repository/copy.js +10 -0
  212. package/lib/content-page-repository/copy.js.map +1 -0
  213. package/lib/content-page-repository/transformAttachmentLink.js +8 -7
  214. package/lib/content-page-repository/transformAttachmentLink.js.map +1 -1
  215. package/lib/content-page-repository/transformDocument.js +3 -5
  216. package/lib/content-page-repository/transformDocument.js.map +1 -1
  217. package/lib/content-page-repository/transformImg.js +4 -1
  218. package/lib/content-page-repository/transformImg.js.map +1 -1
  219. package/lib/data/FooterData.d.ts +0 -1
  220. package/lib/data/SitemapData.d.ts +1 -10
  221. package/lib/icons/IconName.d.ts +4 -2
  222. package/lib/icons/IconName.js +3 -1
  223. package/lib/icons/IconName.js.map +1 -1
  224. package/lib/model/Fallback.d.ts +0 -1
  225. package/lib/ui-kit/Badge/Badge.js +1 -3
  226. package/lib/ui-kit/Badge/Badge.js.map +1 -1
  227. package/lib/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  228. package/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  229. package/lib/ui-kit/BenefitItem/renderBenefitIcon.js +1 -1
  230. package/lib/ui-kit/BenefitItem/renderBenefitIcon.js.map +1 -1
  231. package/lib/ui-kit/Calculator/renderMonthsInput.d.ts +1 -1
  232. package/lib/ui-kit/Calculator/renderMonthsInput.js +1 -1
  233. package/lib/ui-kit/Calculator/renderMonthsInput.js.map +1 -1
  234. package/lib/ui-kit/CookiePopup/CookiePopup.d.ts +1 -0
  235. package/lib/ui-kit/CookiePopup/CookiePopup.js +2 -2
  236. package/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  237. package/lib/ui-kit/Heading/HeadingProps.d.ts +1 -3
  238. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  239. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  240. package/lib/ui-kit/TabsControl/TabItem.d.ts +1 -2
  241. package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  242. package/lib/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  243. package/lib/ui-kit/TabsControl/TabItemInner.js +4 -2
  244. package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  245. package/lib/ui-kit/YandexMap/YandexMap.d.ts +1 -1
  246. package/lib/ui-kit/YandexMap/YandexMap.js +2 -2
  247. package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
  248. package/lib/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
  249. package/lib/ui-kit/YandexMap/renderClusterer.js +32 -13
  250. package/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -1
  251. package/lib/utils/getVersion.d.ts +1 -0
  252. package/lib/utils/getVersion.js +2 -0
  253. package/lib/utils/getVersion.js.map +1 -0
  254. package/mobile/bundle/bundle.umd.js +194 -128
  255. package/mobile/bundle/bundle.umd.min.js +1 -1
  256. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  257. package/mobile/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +1 -2
  258. package/mobile/bundle/components/CalculatorCredit/CalculatorCreditContent.d.ts +22 -1
  259. package/mobile/bundle/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.d.ts +1 -2
  260. package/mobile/bundle/components/CalculatorCredit/defaultCreditCalculatorParams.d.ts +2 -0
  261. package/mobile/bundle/components/CalculatorCredit/getCreditCalculatorLimitParams.d.ts +1 -2
  262. package/mobile/bundle/components/CalculatorCredit/getCreditCalculatorParams.d.ts +1 -24
  263. package/mobile/bundle/components/CalculatorCredit/getCreditCalculatorRateParams.d.ts +1 -2
  264. package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +1 -1
  265. package/mobile/bundle/components/ContentPage/computeAPIFallback.d.ts +1 -2
  266. package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  267. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
  268. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
  269. package/mobile/bundle/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
  270. package/mobile/bundle/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
  271. package/mobile/bundle/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
  272. package/mobile/bundle/components/OfficesAtmsMap/useOffices.d.ts +5 -2
  273. package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +6 -2
  274. package/mobile/bundle/content-page-repository/TransformationOptions.d.ts +1 -0
  275. package/mobile/bundle/content-page-repository/copy.d.ts +1 -0
  276. package/mobile/bundle/data/FooterData.d.ts +0 -1
  277. package/mobile/bundle/data/SitemapData.d.ts +1 -10
  278. package/mobile/bundle/icons/IconName.d.ts +4 -2
  279. package/mobile/bundle/model/Fallback.d.ts +0 -1
  280. package/mobile/bundle/ui-kit/Calculator/renderMonthsInput.d.ts +1 -1
  281. package/mobile/bundle/ui-kit/CookiePopup/CookiePopup.d.ts +1 -0
  282. package/mobile/bundle/ui-kit/Heading/HeadingProps.d.ts +1 -3
  283. package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +1 -2
  284. package/mobile/bundle/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  285. package/mobile/bundle/ui-kit/YandexMap/YandexMap.d.ts +1 -1
  286. package/mobile/bundle/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
  287. package/mobile/bundle/utils/getVersion.d.ts +1 -0
  288. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  289. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.d.ts +1 -2
  290. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  291. package/mobile/dist/components/CalculatorCredit/CalculatorCreditContent.d.ts +22 -1
  292. package/mobile/dist/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.d.ts +1 -2
  293. package/mobile/dist/components/CalculatorCredit/defaultCreditCalculatorParams.d.ts +2 -0
  294. package/mobile/dist/components/CalculatorCredit/defaultCreditCalculatorParams.js +17 -0
  295. package/mobile/dist/components/CalculatorCredit/defaultCreditCalculatorParams.js.map +1 -0
  296. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorLimitParams.d.ts +1 -2
  297. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorLimitParams.js.map +1 -1
  298. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorParams.d.ts +1 -24
  299. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorParams.js +3 -16
  300. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorParams.js.map +1 -1
  301. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorRateParams.d.ts +1 -2
  302. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorRateParams.js +2 -2
  303. package/mobile/dist/components/CalculatorCredit/getCreditCalculatorRateParams.js.map +1 -1
  304. package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +1 -1
  305. package/mobile/dist/components/ContactsBlock/ContactsBlock.js +1 -1
  306. package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
  307. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  308. package/mobile/dist/components/ContentPage/computeAPIFallback.d.ts +1 -2
  309. package/mobile/dist/components/ContentPage/computeAPIFallback.js +2 -16
  310. package/mobile/dist/components/ContentPage/computeAPIFallback.js.map +1 -1
  311. package/mobile/dist/components/Footer/Footer.js +1 -9
  312. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  313. package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  314. package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  315. package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  316. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
  317. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +30 -20
  318. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  319. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
  320. package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +12 -9
  321. package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  322. package/mobile/dist/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
  323. package/mobile/dist/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
  324. package/mobile/dist/components/OfficesAtmsMap/renderDescriptionBlock.js +9 -0
  325. package/mobile/dist/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
  326. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
  327. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  328. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
  329. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +35 -0
  330. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
  331. package/mobile/dist/components/OfficesAtmsMap/useOffices.d.ts +5 -2
  332. package/mobile/dist/components/OfficesAtmsMap/useOffices.js +4 -2
  333. package/mobile/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
  334. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +8 -1
  335. package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  336. package/mobile/dist/components/TabsLayout/TabsLayout.js +17 -11
  337. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  338. package/mobile/dist/components/TabsLayout/renderTabsLayout.js +14 -12
  339. package/mobile/dist/components/TabsLayout/renderTabsLayout.js.map +1 -1
  340. package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +6 -2
  341. package/mobile/dist/content-page-repository/ContentPageRepository.js +27 -5
  342. package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  343. package/mobile/dist/content-page-repository/TransformationOptions.d.ts +1 -0
  344. package/mobile/dist/content-page-repository/copy.d.ts +1 -0
  345. package/mobile/dist/content-page-repository/copy.js +16 -0
  346. package/mobile/dist/content-page-repository/copy.js.map +1 -0
  347. package/mobile/dist/content-page-repository/transformAttachmentLink.js +8 -7
  348. package/mobile/dist/content-page-repository/transformAttachmentLink.js.map +1 -1
  349. package/mobile/dist/content-page-repository/transformDocument.js +3 -5
  350. package/mobile/dist/content-page-repository/transformDocument.js.map +1 -1
  351. package/mobile/dist/content-page-repository/transformImg.js +4 -1
  352. package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
  353. package/mobile/dist/data/FooterData.d.ts +0 -1
  354. package/mobile/dist/data/SitemapData.d.ts +1 -10
  355. package/mobile/dist/icons/IconName.d.ts +4 -2
  356. package/mobile/dist/icons/IconName.js +3 -1
  357. package/mobile/dist/icons/IconName.js.map +1 -1
  358. package/mobile/dist/model/Fallback.d.ts +0 -1
  359. package/mobile/dist/ui-kit/Badge/Badge.js +1 -3
  360. package/mobile/dist/ui-kit/Badge/Badge.js.map +1 -1
  361. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  362. package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  363. package/mobile/dist/ui-kit/BenefitItem/renderBenefitIcon.js +1 -1
  364. package/mobile/dist/ui-kit/BenefitItem/renderBenefitIcon.js.map +1 -1
  365. package/mobile/dist/ui-kit/Calculator/renderMonthsInput.d.ts +1 -1
  366. package/mobile/dist/ui-kit/Calculator/renderMonthsInput.js +1 -1
  367. package/mobile/dist/ui-kit/Calculator/renderMonthsInput.js.map +1 -1
  368. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.d.ts +1 -0
  369. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js +2 -2
  370. package/mobile/dist/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  371. package/mobile/dist/ui-kit/Heading/HeadingProps.d.ts +1 -3
  372. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  373. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  374. package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +1 -2
  375. package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  376. package/mobile/dist/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  377. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +4 -2
  378. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  379. package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +1 -1
  380. package/mobile/dist/ui-kit/YandexMap/YandexMap.js +2 -2
  381. package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
  382. package/mobile/dist/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
  383. package/mobile/dist/ui-kit/YandexMap/renderClusterer.js +33 -14
  384. package/mobile/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
  385. package/mobile/dist/utils/getVersion.d.ts +1 -0
  386. package/mobile/dist/utils/getVersion.js +5 -0
  387. package/mobile/dist/utils/getVersion.js.map +1 -0
  388. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +4 -1
  389. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.d.ts +1 -2
  390. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +1 -1
  391. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  392. package/mobile/lib/components/CalculatorCredit/CalculatorCreditContent.d.ts +22 -1
  393. package/mobile/lib/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.d.ts +1 -2
  394. package/mobile/lib/components/CalculatorCredit/defaultCreditCalculatorParams.d.ts +2 -0
  395. package/mobile/lib/components/CalculatorCredit/defaultCreditCalculatorParams.js +15 -0
  396. package/mobile/lib/components/CalculatorCredit/defaultCreditCalculatorParams.js.map +1 -0
  397. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorLimitParams.d.ts +1 -2
  398. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorLimitParams.js.map +1 -1
  399. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorParams.d.ts +1 -24
  400. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorParams.js +1 -14
  401. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorParams.js.map +1 -1
  402. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorRateParams.d.ts +1 -2
  403. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorRateParams.js +1 -1
  404. package/mobile/lib/components/CalculatorCredit/getCreditCalculatorRateParams.js.map +1 -1
  405. package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +1 -1
  406. package/mobile/lib/components/ContactsBlock/ContactsBlock.js +1 -1
  407. package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
  408. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  409. package/mobile/lib/components/ContentPage/computeAPIFallback.d.ts +1 -2
  410. package/mobile/lib/components/ContentPage/computeAPIFallback.js +2 -16
  411. package/mobile/lib/components/ContentPage/computeAPIFallback.js.map +1 -1
  412. package/mobile/lib/components/Footer/Footer.js +1 -9
  413. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  414. package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  415. package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  416. package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -2
  417. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
  418. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +30 -20
  419. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  420. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
  421. package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +12 -9
  422. package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
  423. package/mobile/lib/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
  424. package/mobile/lib/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
  425. package/mobile/lib/components/OfficesAtmsMap/renderDescriptionBlock.js +6 -0
  426. package/mobile/lib/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
  427. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
  428. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  429. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
  430. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +31 -0
  431. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
  432. package/mobile/lib/components/OfficesAtmsMap/useOffices.d.ts +5 -2
  433. package/mobile/lib/components/OfficesAtmsMap/useOffices.js +4 -2
  434. package/mobile/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
  435. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +8 -1
  436. package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
  437. package/mobile/lib/components/TabsLayout/TabsLayout.js +17 -11
  438. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  439. package/mobile/lib/components/TabsLayout/renderTabsLayout.js +14 -12
  440. package/mobile/lib/components/TabsLayout/renderTabsLayout.js.map +1 -1
  441. package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +6 -2
  442. package/mobile/lib/content-page-repository/ContentPageRepository.js +26 -4
  443. package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  444. package/mobile/lib/content-page-repository/TransformationOptions.d.ts +1 -0
  445. package/mobile/lib/content-page-repository/copy.d.ts +1 -0
  446. package/mobile/lib/content-page-repository/copy.js +10 -0
  447. package/mobile/lib/content-page-repository/copy.js.map +1 -0
  448. package/mobile/lib/content-page-repository/transformAttachmentLink.js +8 -7
  449. package/mobile/lib/content-page-repository/transformAttachmentLink.js.map +1 -1
  450. package/mobile/lib/content-page-repository/transformDocument.js +3 -5
  451. package/mobile/lib/content-page-repository/transformDocument.js.map +1 -1
  452. package/mobile/lib/content-page-repository/transformImg.js +4 -1
  453. package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
  454. package/mobile/lib/data/FooterData.d.ts +0 -1
  455. package/mobile/lib/data/SitemapData.d.ts +1 -10
  456. package/mobile/lib/icons/IconName.d.ts +4 -2
  457. package/mobile/lib/icons/IconName.js +3 -1
  458. package/mobile/lib/icons/IconName.js.map +1 -1
  459. package/mobile/lib/model/Fallback.d.ts +0 -1
  460. package/mobile/lib/ui-kit/Badge/Badge.js +1 -3
  461. package/mobile/lib/ui-kit/Badge/Badge.js.map +1 -1
  462. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js +3 -3
  463. package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -1
  464. package/mobile/lib/ui-kit/BenefitItem/renderBenefitIcon.js +1 -1
  465. package/mobile/lib/ui-kit/BenefitItem/renderBenefitIcon.js.map +1 -1
  466. package/mobile/lib/ui-kit/Calculator/renderMonthsInput.d.ts +1 -1
  467. package/mobile/lib/ui-kit/Calculator/renderMonthsInput.js +1 -1
  468. package/mobile/lib/ui-kit/Calculator/renderMonthsInput.js.map +1 -1
  469. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.d.ts +1 -0
  470. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js +2 -2
  471. package/mobile/lib/ui-kit/CookiePopup/CookiePopup.js.map +1 -1
  472. package/mobile/lib/ui-kit/Heading/HeadingProps.d.ts +1 -3
  473. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +9 -4
  474. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  475. package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +1 -2
  476. package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  477. package/mobile/lib/ui-kit/TabsControl/TabItemInner.d.ts +1 -0
  478. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +4 -2
  479. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  480. package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +1 -1
  481. package/mobile/lib/ui-kit/YandexMap/YandexMap.js +2 -2
  482. package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
  483. package/mobile/lib/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
  484. package/mobile/lib/ui-kit/YandexMap/renderClusterer.js +32 -13
  485. package/mobile/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -1
  486. package/mobile/lib/utils/getVersion.d.ts +1 -0
  487. package/mobile/lib/utils/getVersion.js +2 -0
  488. package/mobile/lib/utils/getVersion.js.map +1 -0
  489. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +4 -1
  490. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +3 -5
  491. package/mobile/src/components/CalculatorCredit/CalculatorCreditContent.ts +31 -0
  492. package/mobile/src/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.ts +2 -2
  493. package/mobile/src/components/CalculatorCredit/defaultCreditCalculatorParams.ts +19 -0
  494. package/mobile/src/components/CalculatorCredit/getCreditCalculatorLimitParams.ts +3 -3
  495. package/mobile/src/components/CalculatorCredit/getCreditCalculatorParams.ts +7 -53
  496. package/mobile/src/components/CalculatorCredit/getCreditCalculatorRateParams.ts +4 -4
  497. package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +1 -1
  498. package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +1 -1
  499. package/mobile/src/components/ContactsBlock/ContactsBlock.ui.json +36 -1
  500. package/mobile/src/components/ContentPage/ContentPage.tsx +1 -0
  501. package/mobile/src/components/ContentPage/computeAPIFallback.ts +3 -35
  502. package/mobile/src/components/Footer/Footer.tsx +0 -16
  503. package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
  504. package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +0 -4
  505. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +37 -47
  506. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +15 -0
  507. package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +28 -12
  508. package/mobile/src/components/OfficesAtmsMap/YandexMapProps.ts +1 -0
  509. package/mobile/src/components/OfficesAtmsMap/renderDescriptionBlock.tsx +29 -0
  510. package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +2 -1
  511. package/mobile/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +86 -0
  512. package/mobile/src/components/OfficesAtmsMap/useOffices.ts +11 -4
  513. package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +9 -1
  514. package/mobile/src/components/TabsLayout/TabsLayout.tsx +21 -11
  515. package/mobile/src/components/TabsLayout/renderTabsLayout.tsx +24 -20
  516. package/mobile/src/content-page-repository/ContentPageRepository.ts +36 -4
  517. package/mobile/src/content-page-repository/TransformationOptions.ts +1 -0
  518. package/mobile/src/content-page-repository/copy.ts +11 -0
  519. package/mobile/src/content-page-repository/transformAttachmentLink.ts +7 -8
  520. package/mobile/src/content-page-repository/transformDocument.ts +3 -5
  521. package/mobile/src/content-page-repository/transformImg.ts +6 -1
  522. package/mobile/src/data/FooterData.ts +0 -1
  523. package/mobile/src/data/SitemapData.ts +1 -11
  524. package/mobile/src/icons/IconName.ts +5 -5
  525. package/mobile/src/icons/MapMarkerClusterYellowIcon.svg +1 -0
  526. package/mobile/src/model/Fallback.ts +0 -1
  527. package/mobile/src/ui-kit/Badge/Badge.tsx +13 -15
  528. package/mobile/src/ui-kit/BaseFiltration/useHotFilters.tsx +3 -7
  529. package/mobile/src/ui-kit/BenefitItem/renderBenefitIcon.tsx +1 -1
  530. package/mobile/src/ui-kit/Calculator/renderMonthsInput.tsx +2 -2
  531. package/mobile/src/ui-kit/CookiePopup/CookiePopup.tsx +52 -42
  532. package/mobile/src/ui-kit/Heading/HeadingProps.ts +1 -3
  533. package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +13 -16
  534. package/mobile/src/ui-kit/TabsControl/TabItem.tsx +1 -2
  535. package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +9 -2
  536. package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +3 -3
  537. package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +62 -16
  538. package/mobile/src/utils/getVersion.ts +1 -0
  539. package/package.json +1 -1
  540. package/src/components/ApplicationForm/ApplicationFormContent.ts +4 -1
  541. package/src/components/CalculatorCredit/CalculatorCredit.tsx +3 -5
  542. package/src/components/CalculatorCredit/CalculatorCreditContent.ts +31 -0
  543. package/src/components/CalculatorCredit/checkCreditSourceBookRowCommonParams.ts +2 -2
  544. package/src/components/CalculatorCredit/defaultCreditCalculatorParams.ts +19 -0
  545. package/src/components/CalculatorCredit/getCreditCalculatorLimitParams.ts +3 -3
  546. package/src/components/CalculatorCredit/getCreditCalculatorParams.ts +7 -53
  547. package/src/components/CalculatorCredit/getCreditCalculatorRateParams.ts +4 -4
  548. package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +1 -1
  549. package/src/components/ContactsBlock/ContactsBlock.tsx +1 -1
  550. package/src/components/ContactsBlock/ContactsBlock.ui.json +36 -1
  551. package/src/components/ContentPage/ContentPage.tsx +1 -0
  552. package/src/components/ContentPage/computeAPIFallback.ts +3 -35
  553. package/src/components/Footer/Footer.mobile.tsx +0 -16
  554. package/src/components/Footer/Footer.tsx +0 -19
  555. package/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
  556. package/src/components/MobileAppTile/MobileAppTileContent.ts +0 -4
  557. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +37 -47
  558. package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +15 -0
  559. package/src/components/OfficesAtmsMap/OfficesMap.tsx +28 -12
  560. package/src/components/OfficesAtmsMap/YandexMapProps.ts +1 -0
  561. package/src/components/OfficesAtmsMap/renderDescriptionBlock.tsx +29 -0
  562. package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +2 -1
  563. package/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +86 -0
  564. package/src/components/OfficesAtmsMap/useOffices.ts +11 -4
  565. package/src/components/ProductGallery/ProductGallery.tsx +37 -7
  566. package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +9 -1
  567. package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +70 -24
  568. package/src/components/TabsLayout/TabsLayout.fixture.tsx +33 -29
  569. package/src/components/TabsLayout/TabsLayout.tsx +21 -11
  570. package/src/components/TabsLayout/renderTabsLayout.tsx +24 -20
  571. package/src/content-page-repository/ContentPageRepository.ts +36 -4
  572. package/src/content-page-repository/TransformationOptions.ts +1 -0
  573. package/src/content-page-repository/copy.ts +11 -0
  574. package/src/content-page-repository/transformAttachmentLink.ts +7 -8
  575. package/src/content-page-repository/transformDocument.ts +3 -5
  576. package/src/content-page-repository/transformImg.ts +6 -1
  577. package/src/data/FooterData.ts +0 -1
  578. package/src/data/SitemapData.ts +1 -11
  579. package/src/icons/IconName.ts +5 -5
  580. package/src/icons/MapMarkerClusterYellowIcon.svg +1 -0
  581. package/src/model/Fallback.ts +0 -1
  582. package/src/ui-kit/Badge/Badge.tsx +13 -15
  583. package/src/ui-kit/BaseFiltration/useHotFilters.tsx +3 -7
  584. package/src/ui-kit/BenefitItem/renderBenefitIcon.tsx +1 -1
  585. package/src/ui-kit/Calculator/renderMonthsInput.tsx +2 -2
  586. package/src/ui-kit/CookiePopup/CookiePopup.tsx +52 -42
  587. package/src/ui-kit/Heading/HeadingProps.ts +1 -3
  588. package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +13 -16
  589. package/src/ui-kit/TabsControl/TabItem.tsx +1 -2
  590. package/src/ui-kit/TabsControl/TabItemInner.tsx +9 -2
  591. package/src/ui-kit/YandexMap/YandexMap.tsx +3 -3
  592. package/src/ui-kit/YandexMap/renderClusterer.ts +62 -16
  593. package/src/utils/getVersion.ts +1 -0
  594. package/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
  595. package/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
  596. package/dist/components/ContentPage/loadModuleFallback.js +0 -36
  597. package/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
  598. package/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
  599. package/lib/components/ContentPage/loadModuleFallback.js +0 -10
  600. package/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
  601. package/mobile/bundle/components/ContentPage/loadModuleFallback.d.ts +0 -2
  602. package/mobile/dist/components/ContentPage/loadModuleFallback.d.ts +0 -2
  603. package/mobile/dist/components/ContentPage/loadModuleFallback.js +0 -36
  604. package/mobile/dist/components/ContentPage/loadModuleFallback.js.map +0 -1
  605. package/mobile/lib/components/ContentPage/loadModuleFallback.d.ts +0 -2
  606. package/mobile/lib/components/ContentPage/loadModuleFallback.js +0 -10
  607. package/mobile/lib/components/ContentPage/loadModuleFallback.js.map +0 -1
  608. package/mobile/src/components/ContentPage/loadModuleFallback.ts +0 -11
  609. package/src/components/ContentPage/loadModuleFallback.ts +0 -11
@@ -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"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=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};const h=new class{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}};function u(){return u._impl()}u._impl=()=>({pathname:globalThis.location?.pathname||"/",push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={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","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{"group"!==e.type||e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=d((({children:e})=>f?e:null)),y=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:v(t)}))),v=(e=3)=>w(100,e).map((e=>Math.floor(e))).map(N),N=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),w=(e,t)=>[e].concat(t>0?w(e/1.618,t-1):[]),k={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},S={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},C=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",S[t],e),children:n||a})})),T=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),I={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"}},B=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=I[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(C,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(T,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function P(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=R}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const V=[],z=(e,{key:t,ancestors:l=V,slotName:n=null,extraProps:a,renderProps:i=P,...r})=>{const s=a?(e,t)=>P(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||V,[r.parent,n]]:l},a)))};function D({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const A=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?A(l):l}}),$=e=>Boolean(e?.includes(":")),L=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var F=Object.freeze({__proto__:null,isURL:$,isLocalURL:L,isHash:O,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:_});const U="/api/",H=`${U}v1/storage`,W=e=>(t,l=E.BASE_PATH)=>{if([!t,$(t),O(t),[E.CDN,U].some((e=>K(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${H}/${t}/attachment`;const n=t?.startsWith("/");return _(K(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},K=(e,t)=>t&&e&&e.startsWith(t),G={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},q=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=W(d)(_(E.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:Y(e,s)}):o(J,{className:e,children:c("svg",{className:p(X(r),G[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},X=e=>e?"":"w-full h-full",J=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=(e,t)=>l=>l&&!$(l)?W(e)(_(t,l)):l,Q=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ee=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Q).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Z(a,n)(e),type:le(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?te({...t,src:Z(a,n)(t.src)},l):null]})})),te=(e,t="")=>o("img",{src:e.src,className:p("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"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(ee,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ae={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:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ie="bg-main-divider text-main-disabled",re={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},se="text-center font-sans select-none",oe={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:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ce=({className:e,rounded:t,version:l})=>[se,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ae[l]:"",t?"rounded-full":"rounded-md",e].join(" "),de=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=de();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:me(i(e))});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&L(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)?"hidden lg:block":"";return c("div",{className:p(ge(e),"flex gap-xs"),children:[n?o("div",{className:p(r,oe[i]),children:n}):null,xe(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,oe[i]),children:a}):null]})})),ge=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 p("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),fe=({className:e,rounded:t,version:l})=>["inline-block",se,l?re[l]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=he()({onClick:r,href:n,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:ce({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:n,version:l}),children:a})));function Ne(e,t,l=!1){const n="primary"===e?"white":"black",a="Вернуться назад";return c("div",{className:p(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:ce({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),o(be,{version:"link",className:"group-data-secondary:text-white/80",text:a,ariaLabel:a,onClick:t,type:"button"})]})}const we={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ke=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,insetTitle:r,buttons:s,leftImage:o,rightImage:d,imageAlign:m,isImageAlwaysOnRight:h=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=u(),v=i((()=>{y.back()}),[]);return c("div",{className:Ce(n,l,e),children:[x?Ne(t,v):null,Se(a),c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Re(o,{imageAlign:m,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",d?"@xl:grid-cols-2 auto-cols-fr":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,f]}),Me(D({...b,extraProps:{className:"@container-normal"}})),Re(d,{className:p("@xl:justify-self-end @xl:col-start-2",s?Te(h):"",Ie(h),Pe(g)),imageAlign:m}),Be(s)]})]})]})})),Se=e=>e?o("div",{className:"relative h-full",children:e}):null,Ce=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Te=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Be=e=>e?o("div",{className:"self-end",children:e}):null,Me=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&we[l],t),children:e}):null,Pe=e=>e?"hidden @xl:block":"",Ve=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Ve(e)/e.length:0,De=(e,t="normal")=>e?o("div",{className:p("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 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:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ae=d((e=>{const{__html:t,richVersion:l=""}=e;return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),je=(e,t)=>e?o(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(Ae,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:je(e.description,t)},String(t)):null],Oe=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?De(l.icon,t):null,o("div",{children:Le(l)})]}))),_e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Fe=e=>{return((t=e.map(_e))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Ue=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),He=e=>!e.some(Ue),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Fe(l)||He(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Oe,{benefitsVersion:t,...e},String(l))))}):null)),Ke=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Ge=d((({isTabularBenefits:e,...t})=>o(e?Ke:We,{...t}))),qe=e=>Boolean(e?.src||e?.icon),Ye=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Je(a,r),d=Je(i,r);return n||a?.icon?o(be,{className:p("basis-full @lg:basis-auto",e),appendLeft:Ze({...a,iconVersion:c}),appendRight:Ze({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Je=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ze=e=>qe(e)?o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),et={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},tt=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=et[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Qe,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),lt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),nt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(at)}):null)),at=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[lt(2)(t)," ₽"]}):null]},String(l)),it=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),st={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},ot=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...T})=>{const I=y?.src?o(ne,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(ke,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ct(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ye(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Ge,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(Ae,{__html:h}):null,p?.length?o(tt,{items:p,isDotted:g,listItemSize:st[i]}):null,C,x?.length?o(nt,{priceList:x}):null,dt(f)]})})})),ct=(e,t)=>t?{rightImage:e}:{leftImage:e},dt=e=>e?.length?o(it,{tags:e}):null,mt=e=>Boolean(e&&Array.isArray(e)),ht=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ut=(e,t)=>{return l=e,Boolean(ht(l)&&"string"==typeof l.$ref)?t.ref(e):ht(e)?t.record(e):mt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(gt,e),gt=(e,t)=>e&&t?ht(e)?e[t]:mt(e)?e[parseInt(t,10)]:e:e,xt=(e,t)=>ut(e,{ref:({$ref:e,...l})=>xt(e?pt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:xt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>xt(e,t)))}),ft=(e,t,l=[])=>{ut(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)ft(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)ft(e[n],t,[...l,n])}})};async function bt(e,t){try{return e?await yt(e,t):null}catch(e){console.error(e)}return null}const yt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),vt=e=>[...new Set(e)],Nt={},wt=["/portal-resources"],kt=(e,t)=>xt(e,(e=>t?.[e])),St=(e,t)=>{const l=(e=>{const t=[];return ft(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(vt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,Nt[e]||=await yt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?kt(e,{...t,...i}):e};function Ct(e,t={}){const l=d((t=>{const l=St((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Tt=Ct((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(ot,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Bt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Tt,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Bt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Mt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Rt=e=>e?.replace(/[^+\d]/g,"");const Pt=e=>e?{phone:Rt(e)}:{},Vt=e=>e?{birthday:Mt(e)}:{},zt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Dt=(e,t=!0)=>({[t?"email":"mail"]:e}),At=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Rt(e)}:{},jt=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},Et="rshb-query-params";function $t(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Et)||"";return e&&globalThis.sessionStorage?.setItem(Et,e),e}function Lt(e){if(!e)throw new Error("Value should be fulfilled");return e}const Ot=e=>t=>{const[,l]=Lt(e.find((([e])=>e(t))));return l(t)},_t=e=>Ot(e.map((([e,t])=>[e,()=>t])));_t.if=e=>new Ft(void 0,e);class Ft{parent;predicate;unit;get entry(){return[Lt(this.predicate),Lt(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Ft(this,e)}then(e){return new Ft(this.parent,this.predicate,e)}else(e){return Ot([...Ut(this),[()=>!0,e]])}}const Ut=e=>[...e?.parent?Ut(e.parent):[],e.entry],Ht=e=>{const t=e.target?.closest("a");if($(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=$t();if(!$(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Wt(t?.target)?.(l)}}},Wt=_t([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Kt(){return Kt._impl()}Kt._impl=()=>({forwardQuery:Ht}),Kt.setup=e=>{Kt._impl=e};const Gt=e=>e,qt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=Gt,format:n=Gt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Yt=d((({responseType:e})=>{const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon";return c("div",{className:p("flex items-center p-lg rounded-md space-x-m",t?"bg-ok":"bg-fail"),children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(C,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Xt=d((e=>{const{className:t,title:l,responseType:n,children:a,...i}=e;return o(x,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(C,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(Yt,{responseType:n}):null]})})})),Jt=e=>t=>l=>e(l)?[]:[t],Zt=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Qt=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("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)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),el=[{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"}],tl=d((({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]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Qt,{paths:el,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":nl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ll(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:l})}):null]})})})),ll=e=>e?"radio":"checkbox",nl=e=>p("rounded border",e?"bg-primary-main":""),al=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(tl,{text:t,value:l,disabled:a,onChange:r},n),Zt(i)]})));function il(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 rl=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,sl=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=ol(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[rl(d),N?o("textarea",{className:p("block resize-y min-h-24",S,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),ol=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",cl=e=>e?.text||e?.key||"";function dl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function ml(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return dl(globalThis.document,"click",l),t}const hl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,ul=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:hl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:cl(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function pl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=ml(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(ul,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const gl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=il(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=pl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[rl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",fl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:cl(a)||d}),xl(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(sl,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),xl=(e,t)=>o(q,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),fl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),bl=()=>{},yl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=vl(t,e),c=Nl(t,i,r);h.push(o("td",{children:o("div",{className:wl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},vl=(e,t)=>t&&e.toDateString()===t.toDateString(),Nl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),wl=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),kl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Sl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=bl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:kl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:yl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Cl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Tl=Cl.map((e=>({key:e}))),Il=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Bl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ml={className:"min-w-32",iconVersion:"black",isBorder:!1},Rl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=il(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=ml(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Cl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Tl,yearsOptions:Il,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[rl(t),c("div",{className:"relative",children:[Pl(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(q,{...Bl,className:"-rotate-90 cursor-pointer"})}),o(gl,{onChange:v,value:{key:Cl[u]},options:w,...Ml}),o(gl,{onChange:N,value:{key:String(x)},options:k,...Ml}),o("div",{className:"my-auto",onClick:y,children:o(q,{...Bl,className:"rotate-90 cursor-pointer"})})]}),o(Sl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Pl=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(T,{children:t&&Mt(t)}),o(q,{...Bl,name:"CalendarIcon"})]}),Vl=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Rl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),Zt(l)]}))),zl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(sl,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),Zt(a)]}))),Dl=e=>"_"===e,Al=e=>/\d/.test(e),jl=e=>Dl(e)||Al(e),El=[..."+7 (___) ___-__-__"],$l=El.findIndex(Dl),Ll=El.map(((e,t)=>jl(e)?El.slice(0,t).filter(jl).length:-1));const Ol=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=El.map(((e,l)=>Al(e)?e:t.charAt(Ll[l])||e)),n=Ll.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max($l,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(sl,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),_l=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Ol,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Zt(n)]}))),Fl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(gl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Zt(l)]}))),Ul="Некорректно заполненное поле",Hl=Jt((e=>null!=e&&""!==e))(Ul),Wl=Jt((e=>e?.key&&""!==e?.key))(Ul),Kl=Jt((e=>"string"==typeof e&&e.length>1))(Ul),Gl=Jt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ul),ql=(Yl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Jt((e=>"string"==typeof e&&Yl.test(e))))(Ul);var Yl;const Xl=Jt((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Jl={typeForm:Hl,surname:Kl,name:Kl,region:Wl,addressBranch:Wl,phone:ql,secondaryPhone:ql,birthday:Hl,email:Hl,fullName:Kl,inn:Gl,partnerComments:Hl,collectionCount:Hl,comment:Hl,acquiringType:Wl,feedbackType:Wl,feedbackMethod:Wl,serviceType:Wl,serviceDirection:Wl,consentDataProcessing:Xl,annualRevenue:Hl},Zl=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Jl?.[e]])))},Ql=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},en=(e,t,l=!1)=>l?Ql(e,t):e,tn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],ln=d((({field:e,input:t})=>o(Fl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:tn,...en(e("acquiringType"),Jl.acquiringType,t?.required)}))),nn=(e="")=>Boolean("trade"===e||"all"===e),an=e=>null!=e,rn=new Map,sn=e=>Boolean(e?.every((e=>Array.isArray(e)?sn(e):!e||"string"==typeof e))),on=e=>sn(e)?e.toString():"";function cn(e,t,{fallback:l,cache:i}={}){const s=r((()=>dn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(an))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=rn)=>l=>{const n=on(l),a=t.get(n);if(n&&an(a))return a;const i=e(...l);return n&&an(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function dn(e){return Array.isArray(e)?e:e instanceof Function?dn(e()):[e]}const mn=[];const hn=async e=>await bt(e,{method:"GET"})||mn;function un(){const{data:e}=cn("/api/v1/branchesByRegions",yt);return Array.isArray(e)?e:[]}const pn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?un()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=cn(e?`/api/v1/branches?regionCode=${e}`:null,hn);return t||mn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Fl,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...en(e("addressBranch"),Jl.addressBranch,t?.required)})})),gn=(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}},xn=(e,t,l)=>Math.max(t,Math.min(e,l));function fn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function bn({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,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=fn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const yn=1,vn=100,Nn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:yn),max:s=(a.length?a.length-1:vn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=gn(e,{normalize:(e=0)=>a.length?wn(a)(e):xn(e,r,s),format:lt()}),x=i((e=>{u&&u(fn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:h,onInput:x,...g}),bn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),kn(n)]})})),wn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),kn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Sn=["От 1 000 ₽","До 1 000 000 000 ₽"],Cn=d((({field:e})=>o(Nn,{title:"Сумма, ₽",items:Sn,min:1e3,max:1e9,...e("amount")}))),Tn=d((({field:e,input:t})=>o(zl,{className:"col-span-2",...en(e("comment"),Jl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),In=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Bn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Mn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Rn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Pn=d((({field:e})=>o(Fl,{label:"Способ получения ответа",options:Rn,...Ql(e("feedbackMethod"),Jl.feedbackMethod)}))),Vn=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(Bn[0])}),[t?.value]),o(Fl,{label:"Тема",placeholder:"Выберите тему",options:Mn,...Ql(t,Jl.feedbackType)})})),zn=d((({field:e})=>o(al,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Dn=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),An=d((({field:e})=>nn(e("acquiringType")?.value?.key)?o(Dn,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),jn=d((({field:e})=>{const t=e("secondaryPhone");return o(_l,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Ql(t,Jl.secondaryPhone):t})})),En=d((({field:e})=>nn(e("acquiringType")?.value?.key)?o(Dn,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function $n(){const{data:e}=cn("/api/v1/regions",yt);return Array.isArray(e)?e:[]}const Ln=d((({field:e,input:t})=>{const l=$n();return o(Fl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...en(e("region"),Jl.region,t?.required)})})),On=d((({field:e,input:t})=>{const l=un(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Fl,{label:"Регион",placeholder:"Выберите регион",options:n,...en(e("region"),Jl.region,t?.required)})})),_n=d((({field:e})=>o(Fl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Bn,...Ql(e("serviceDirection"),Jl.serviceDirection)}))),Fn=["От 1 мес","До 15 лет"],Un=d((({field:e})=>o(Nn,{title:"Срок, месяцев",items:Fn,min:1,max:180,...e("term")}))),Hn=d((({field:e})=>o(Fl,{label:"Тип обслуживания",options:In,...Ql(e("serviceType"),Jl.serviceType)}))),Wn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("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),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),Kn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Gn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Wn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Wn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Wn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Wn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),qn=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(zl,{label:"Фамилия",...en(e("surname"),Jl.surname,a)}),name:o(zl,{label:"Имя",...en(e("name"),Jl.name,a),...i}),middleName:o(zl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(_l,{label:"Телефон",...en(e("phone"),Jl.phone,a)}),email:o(zl,{label:"Электронная почта",...en(e("email"),Jl.email,a)}),fullName:o(zl,{label:"ФИО",...en(e("fullName"),Jl.fullName,a),...i}),inn:o(zl,{label:"ИНН",type:"number",...en(e("inn"),Jl.inn,a)}),comment:o(Tn,{field:e,input:l}),region:r?o(On,{field:e}):o(Ln,{field:e,input:l}),addressBranch:o(pn,{field:e,input:l,isPremium:r}),birthday:o(Vl,{label:"Дата рождения",...en(e("birthday"),Jl.birthday,a)}),isClient:o(zn,{field:e}),consentToReceiveMaterials:o(al,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(zl,{...en(e("partnerComments"),Jl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(zl,{label:"Количество объектов инкассации",type:"number",...en(e("collectionCount"),Jl.collectionCount,a)}),acquiringType:o(ln,{field:e,input:l}),onlineCheckout:o(An,{field:e}),posTerminal:o(En,{field:e}),serviceType:o(Hn,{field:e}),term:o(Un,{field:e}),amount:o(Cn,{field:e}),annualRevenue:o(zl,{label:"Годовая выручка, ₽",...en(e("annualRevenue"),Jl.annualRevenue,a)}),vedTypes:o(Gn,{field:e}),feedbackType:o(Vn,{field:e}),feedbackMethod:o(Pn,{field:e}),serviceDirection:o(_n,{field:e}),bankEmpolee:o(zl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(zl,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(jn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const Yn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${nn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...Jn(c),...Xn(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Xn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Jn=e=>e?{vedTypes:Object.fromEntries(Kn.map((t=>[t,t===e])))}:{},Zn={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:tn[0],serviceType:In[0],feedbackType:Mn[0],feedbackMethod:Rn[0],serviceDirection:Bn[0],vedTypes:Kn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Qn=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Zn[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=In[1]),{...l,typeForm:{key:t,text:""}}},ea=d((({text:e,link:t})=>c(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ee,{children:e}),t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ee,{children:t.text})}):null]})));function ta({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const la={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"},na={primary:p("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:p("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},aa=d((({children:e,...t})=>{const l=e=>({...e,onClick:me(ta(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(la[a],na[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),ia=(e,t)=>o(aa,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ra=(e,t,l)=>c("div",{className:"flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3",children:[o(tl,{...e}),o(ea,{link:t})]}),Zt(Ql(e,Xl).error)]}):o(ea,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ia(l)]}),sa={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...zt(n,g),...Dt(i,g),...Pt(a),...g?Vt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...At(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},oa=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=Qn(f,l),[y,v]=n(""),N=i((async(e,t)=>{const l=ha(f,e),n=(a=Zl(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=Yn({...e,...h}),r=await sa.send(i,"lead"===m)?"OK":"Fail";if(v(r),"OK"===r&&g){const e=Kt();jt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:w,onSubmit:k,reset:S}]=qt(b,{onSubmit:N}),T=ma(f)?.name;return a((()=>{"OK"===y&&S()}),[y]),c(Xt,{className:p("container space-y-m",e),title:t,responseType:y,...x,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:p(da(e.columns),"grid gap-x-m"),children:[ca(e.title),(e?.inputs||[])?.map(qn(w,l))]},`section-${t}`))),ra(T?w("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(C,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex gap-xl",children:[c("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:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ca=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,da=e=>2===e?"@xl:grid-cols-2":"",ma=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ha=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),ua="text-left",pa=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:ua})]}))),ga=(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}]},xa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function fa(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ba=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:fa(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}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),ya=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],va=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(wa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Na(c,v):{},...N?xa(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(ba,{className:p(m,a?ya[a-1]:"",N?"h-full":"",t),style:w?Na(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Na=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),wa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ka={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Sa={"horizontal-list":"w-6","vertical-list":"h-6"},Ca=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",ka[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Sa[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ta=e=>e,Ia=(e=Ta)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ba=Ia(),Ma=(e=Ta)=>Ia((t=>-e(t))),Ra=Ma(),Pa=e=>t=>e.scrollWidth/t,Va=e=>(t,l)=>{e.scrollBy({left:l*Pa(e)(t),behavior:"smooth"})},za=({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?[Ma()(a),Ia()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Va(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Va(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Da=d((({className:e,disabled:t,...l})=>o(be,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(ne,{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"})}))),Aa=d((e=>o(Da,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ja=d((e=>o(Da,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ea="absolute top-[calc(50%-24px)] z-40",$a="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",La=d((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:d,canScrollRight:m,scrollLeft:h,scrollRight:u}=e,g=a?t>0:d,x=a?t<l-1:m,f=i((()=>{a?(d&&t!==l-1&&h(),r()):h()}),[h,r,a,d,t,l]),b=i((()=>{a?(m&&0!==t&&u(),s()):u()}),[u,s,a,d,t,l]);return c("div",{className:"m:hidden block",children:[Oa(e),g?o(Aa,{className:p(Ea,n?"left-1 m:left-8":"left-0"),onClick:f}):null,x?o(ja,{className:p(Ea,n?"right-1 m:right-8":"right-0"),onClick:b}):null]})})),Oa=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p($a,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p($a,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),_a=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Fa=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ua="relative h-full",Ha={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Wa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(qa);return D({...n,renderProps:(n,a,r)=>c("div",{className:Ka(n,{someCardsHighlighted:i}),children:[P(n,a,{className:Ga(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),qa(n)?Fa({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Ka=(e,{someCardsHighlighted:t})=>p(Ua,t&&(qa(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ga=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Ua,"min-w-80",Ha[n],t&&(qa(e)?"pt-3xl sm:pt-16":"pt-3xl"),_a(l),l&&"h-full"),qa=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ya=Ct((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,isEmbedded:s=!1,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},u=t||h?.length,[g,{inc:f,dec:b}]=ga({itemCount:u,visibleItemCount:l},Math.floor(l/2)),[y,v]=za({itemCount:u}),[N]=v.visibleIndicesRange,w=h&&"CarouselBankHistoryCard"===h[0]?.type;return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:"p-6xl",...m,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(va,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:Wa({noCardBorder:n,activeIndex:g,cardSize:d,...m})}),o(La,{scroll:v,arrowsPadded:i,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:w,activeIndex:g,itemCount:u})]}),o(Ca,{className:"@5xl:hidden",containerRef:y,activeIndex:N,dotCount:u,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Xa=({blocksToRender:e,...t})=>o(Ya,{padding:"p-0",isEmbedded:!0,itemCount:e?.length,visibleItemCount:0,isAlignCenter:!0,isGap:!1,children:z(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",_a(!0)),children:P(e,t)},String(l))})}),Ja=e=>e%2!=0,Za=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Qa=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Za,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ee,{size:"text-h4",children:t}),iconNode:l?o(ne,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ei=({isUnfolded:e,onToggle:t})=>o(Qa,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ti=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const li=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),ni=["ArrowDownIcon","ArrowUpIcon"],ai="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ii=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(ai),children:[z(i,{...a.options,parent:l}),Ja(i.length)?o(It,{className:"col-span-6",...a}):null]}),o(ti,{renderFoldableSection:({isUnfolded:e})=>c(li,{className:p(ai),isUnfolded:e,children:[z(r,{...a.options,parent:l}),Ja(r.length)?o(It,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Qa,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:ni[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ri=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[si(l,t),ii({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{children:[si(l,t),Xa({...n,blocksToRender:t})]});default:return null}})),si=(e,t)=>e&&!t.length?o(pa,{...e}):null,oi=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ci=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Dn,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),di=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,oi(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(mi(n)).filter(Boolean))]}),l?o("div",{children:o(aa,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),mi=e=>([t,l])=>{const n=l?.type;return"array"===n?hi(t,e)(l):null},hi=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ci,{items:n,multiple:!l?.single,...t(e)})]},e)};function ui(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const pi=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,gi=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>pi(t[e])||pi(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>pi(t[e])||pi(l[e])||xi(t[e])<=xi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>pi(t[e])||pi(l[e])||xi(t[e]?.min)>=xi(l[e]?.min)&&xi(t[e]?.min)<=xi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>pi(t[e])||pi(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>pi(t[e])||pi(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),xi=e=>Number(e||0),fi=(e,{block:t,page:l,normalize:n=Gt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=qt(e),d=r((()=>ui(a,a.map((e=>kt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Gt)=>e?.filter((([,e])=>gi(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},bi={},yi={},vi=Ct((({className:e,filtrationSchema:t=bi,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=fi(yi,{block:a.block,page:a.options?.page}),d=o(gl,{className:"w-64",label:l?.title,options:Ni(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ni(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(di,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(aa,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ri,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ni=e=>ui(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),wi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},ki=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",wi[l],e),children:o(q,{...i,width:"54%",height:"54%",name:a})}):null})),Si=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(C,{headingType:"h3",as:"h2",className:ua,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Ci)}):null]}))),Ci=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(ki,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ne,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(C,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(tt,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ti=d((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:d="horizontal-list"})=>{const m=Array.isArray(r)?r.length:0,[h,u]=za({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(va,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(Ca,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),Ii=(e,t,l)=>{return o(Ti,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Bi=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Ii(e,0,t):null]}))),Mi={start:"justify-start",center:"justify-center",end:"justify-end"},Ri=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Mi[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ye(e)})})),Pi=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(C,{className:"text-center",title:t}):null,l]}))),Vi="flex flex-col justify-between @4xl:flex-row gap-x-m gap-y-4xl",zi="flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",Di="flex flex-col gap-y-xl @xl:w-96",Ai=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ee,{size:"text-h3",children:[i,lt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ee,{size:"text-h3",children:"-"})})]}))),ji=e=>e?o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Ei=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:lt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),$i=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Li=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o($i,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Ei,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(Ai,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Oi({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${lt(2)(l.min||0)} ₽`,`До ${lt(2)(l.max||0)} ₽`];return o(Nn,{items:e?n:[],step:t,...l})}const _i={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fi={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ui=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=_i.prefMonthsNum,prefTravelBonusRate:i=_i.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Fi,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Hi=Ct((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=qt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=Ui(r,l);return o(Pi,{className:e,title:t,...i,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Oi({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),g>=0?Li({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,c("div",{className:Di,children:[x>=0?o(Ai,{title:"Баллов за год",value:x}):null,Ye(n,{isVertical:!0}),ji(a)]})]})})})),Wi=Math.round(29.5),Ki=(e,t=0)=>e?.sum?e.sum:t,Gi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,qi=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Yi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Xi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${Yi[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(tl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ji=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Xi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Zi=e=>Ji({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Qi=({income:e,finalSum:t,buttons:l,footnotes:n=[]})=>c("div",{className:Di,children:[o(Ai,{title:"Доход в конце срока",value:e,postfix:"₽",prefix:"+"}),o(Ai,{title:"Сумма в конце срока",value:t,postfix:"₽"}),Ye(l,{isVertical:!0}),n?.map((e=>e?ji(e):null))]}),er=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:tr([e,t],n),tr=([e,t],l=[])=>({[e]:l.length?Ra(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ba(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),lr=(e,[t,l],n)=>e>=n[t]&&e<=n[l],nr={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ar={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ir=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?nr[e?.rateType]:"",{data:l}=cn(t?`/api/v1/depositrates/${t}`:null,yt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...ar,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&rr(s,e)&&lr(n,["minSum","maxSum"],e)&&lr(l,["minDays","maxDays"],e)))||ar,{rate:m}=d,h=sr(m,e),u=n+h,p=c||[ar];return{...d,...tr(["minSum","maxSum"],p),...tr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},rr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,sr=(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)},or=Ct((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=qt({moneyValue:Ki(r,1e5),daysValue:Gi(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),u=ir(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=u;return o(Pi,{className:e,title:t,...d,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),(v={title:"Срок, дней",min:u.minDays,max:u.maxDays,...h("daysValue"),value:u.daysValue},o(Nn,{items:[`От ${qi(v.min||0)}`,`До ${qi(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[cr(u,h),Zi({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),Li({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Qi({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),cr=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(tl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(tl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),dr=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Nn,{items:[`От ${mr(e)}`,`До ${mr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),mr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,hr=e=>Ji({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ur=(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)},pr=e=>gr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&gr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&gr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&gr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),gr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],xr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},fr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[xr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>pr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=er(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=er(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>pr({row:e,userInputParams:t,paramsViewSettings:l})&&lr(n,["minSum","maxSum"],e)&&lr(a,["minMonths","maxMonths"],e)))||xr)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=ur(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},br=Ct((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const[m,{field:h}]=qt({moneyValue:Ki(s,2e5),monthsValue:Gi(s,Wi),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),u=fr(m,l,r),g=hr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...h("isAnnuity")}),{onChange:x}=h("moneyValue"),{onChange:f}=h("monthsValue");return a((()=>{x&&x(xn(m.moneyValue,u.minSum,u.maxSum))}),[u.minSum,u.maxSum]),a((()=>{f&&f(xn(m.monthsValue,u.minMonths,u.maxMonths))}),[u.minMonths,u.maxMonths]),o(Pi,{className:e,title:t,...d,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма кредита, ₽",step:500,min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),dr({title:"Срок кредита, месяцев",min:u.minMonths,max:u.maxMonths,...h("monthsValue"),value:u.monthsValue}),yr({...u,...r},h),o("div",{className:"sm:hidden",children:g})]}),Li({rate:u.rate}),c("div",{className:Di,children:[o(Ai,{title:"Ежемесячный платёж",value:u.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:g}),Ye(n,{isVertical:!0}),ji(i)]})]})})})),yr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(tl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(tl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(tl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(tl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),vr=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},Nr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},wr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Cr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Sr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Sr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&lr(n,["minSum","maxSum"],t)&&lr(a||i,["minMonths","maxMonths"],t)))||Nr,{rate:c}=o,d=kr(c,e),m=n+d,h=t?.rateRows||[Nr];return{...o,...tr(["minSum","maxSum"],h),...tr(["minMonths","maxMonths"],h),availableMonths:vr(h.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:i,income:d,finalSum:m}},kr=(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)},Sr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Cr=(e,t)=>e+Math.round((t-e)/2),Tr=Ct((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const[m,{field:h}]=qt({moneyValue:Ki(s,2e4),monthsValue:Gi(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),u=wr(m,l,r),{defaultMonth:g,rate:x,income:f,finalSum:b}=u,{onChange:y}=h("monthsValue"),{onChange:v}=h("moneyValue");return a((()=>{!m.monthsValue&&y&&y(g)}),[g]),a((()=>{v&&v(xn(m.moneyValue,u.minSum,u.maxSum))}),[u.minSum,u.maxSum]),o(Pi,{className:e,title:t,...d,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),dr({title:"Срок, месяцев",min:u.minMonths,max:u.maxMonths,availableMonths:u.availableMonths,...h("monthsValue"),value:u.monthsValue}),Ir({...u,...r},h)]}),Li({rate:x}),Qi({income:f,finalSum:b,buttons:n,footnotes:[i]})]})})})),Ir=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Zi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ji({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Br=e=>Mr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Mr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Mr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Rr={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Pr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Rr],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Br({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=er(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=er(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Br({row:e,userInputParams:t,paramsViewSettings:l})&&lr(n+r,["minSum","maxSum"],e)&&lr(i,["minSumOld","maxSumOld"],e)&&lr(r,["minSumExtra","maxSumExtra"],e)&&lr(a,["minMonths","maxMonths"],e)))||Rr)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=ur(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Vr=Ct((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=qt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Pr(s,l,i),h=hr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Pi,{className:e,title:t,...r,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Oi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),dr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),zr({...m,...i},d),m.isExtraMoney?Oi({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),Li({rate:m.rate,fractionDigits:1}),c("div",{className:Di,children:[o(Ai,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Ai,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ye(n,{isVertical:!0}),ji(a)]})]})})})),zr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(tl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(tl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(tl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Dr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=gn(e,{normalize:(e=a)=>l&&n?String(xn(Number(Ar(e)),l,n)):Ar(e),format:lt(r)}),d=i((e=>t&&t(Ar(e))),[t]);return o(sl,{onChange:d,...s,...c})})),Ar=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),jr=d((e=>o(Dr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Er={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},$r={amount:1500},Lr=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=qt($r),[u,g]=n(!1);return a((()=>{g(m<=0)}),[m]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(C,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Er[s],children:[o(jr,{valid:!u,placeholder:i,label:l,max:3e5,min:1,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(aa,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),Or=d((({title:e,description:t,className:l})=>o(x,{className:l,defaultPadding:"p-6xl",children:o(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),_r="z-10 border border-solid w-full h-full",Fr=p(_r,"absolute hidden @xl:block border-transparent"),Ur=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Fr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Fr,"top-6 right-8 bg-green")}),o("div",{className:p(Fr,"top-3 right-4 bg-green-light")}),c("div",{className:p(_r,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ye([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Hr={black:"bg-black",white:"bg-white"},Wr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(ke,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ye([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Kr)]}):null,a?c(Ee,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Kr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Hr[e]}`},String(t)),Gr="20",qr="absolute w-full h-full border border-white",Yr=d((({className:e="",icon:t,...l})=>{const n=he(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full pb-lg sm:pb-0",children:[c("a",{className:p("absolute border\n bg-white flex items-center justify-between group-hover/link:text-primary-main","flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10"),role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ne,{imageClassName:"text-green-dark",image:t,width:Gr,height:Gr}):null,o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(ne,{className:"group-hover/link:brightness-100 sm:ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"color"},imageClassName:"group-hover/link:text-primary-main",width:Gr,height:Gr})]}),o("div",{className:p(qr,"-bottom-1 -left-1")}),o("div",{className:p(qr,"-bottom-2 -left-2")})]})}):null})),Xr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row sm:items-center gap-s justify-between",children:[c("div",{children:[o(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Jr(n,"sm:self-end sm:pt-s"):null]})}))),Jr=(e,t="")=>{const l=Math.ceil(e.length/3);return o(Ya,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",visibleItemCount:0,isEmbedded:!0,children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:"flex flex-wrap gap-2xs sm:gap-0 sm:justify-center",children:e.slice(3*l,3*(l+1)).map(((e,t)=>o(Yr,{...e},String(t))))},String(l))))})},Zr=d((({className:e="",href:t,target:l,isRemote:n=!1,onClick:a,data:i,children:r})=>{const s=he({isRemote:n})({href:t,target:l,onClick:a});return o(t?"a":"div",{className:p("block",e),...t?s:{},role:t?"link":"none",...ue(i),children:r})})),Qr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],es=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Qr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=qe(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",ts(a));return c("div",{className:p("flex flex-col gap-m xl:gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ye(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ts=e=>e?"flex-1 justify-center":"",ls=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(Zr,{href:a,target:m,className:"h-full",children:c(ke,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ct(qe(i)?o(ne,{image:i}):null,f),buttons:d.length?o(es,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Ge,{benefits:g}),o(tt,{items:r,isDotted:s,listItemSize:"S"}),ns(n,u)]})})}))),ns=(e,t)=>e?o(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,as=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ye(a)}):null]},String(t))},is=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...g})=>{const f=d.map(as),[b,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[v,N]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&N(e.isUnfolded)}))),[]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...g,children:[qe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(C,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(ti,{renderFoldableSection:()=>c("div",{children:[b,o(li,{isUnfolded:v,children:y})]}),renderFoldButton:d.length>1?rs(v,m?.parent,u):null}):o("div",{children:b})]})})),rs=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(q,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ss=(e=!1)=>e?"text-white":"",os=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),cs=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(ne,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ne,{image:t})}),l?o(C,{headingType:"h4",className:ss(a),title:l}):null,n?o("div",{className:os(a),children:n}):null]}))),ds=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(us(l,t)):null})}))),ms=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),hs=(e=!1)=>""+(e?"text-white":""),us=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(T,{size:"text-s",color:ms(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(T,{size:"text-s",align:"text-right",color:hs(e),children:l})}):null,n?o("div",{className:"text-right",children:o(T,{size:"text-s",color:ms(e),children:n})}):null]})]},String(a)),ps=d((({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 o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(cs,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(ds,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(be,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,gs({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),gs=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ee,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),xs=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(C,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(fs,{...e})})]})})),fs=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(ps,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return o("tbody","horizontal"===r?{children:o(Ti,{onVisibleIndicesChange:h,children:u})}:{children:u})})),bs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ys=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),vs=1e9,Ns={sum:{min:1e4,max:vs},period:3},ws=Ct((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=fi(Ns,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:ks(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ss(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(di,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs",children:[o(jr,{label:n?.title,min:500,max:vs,...d("sum",{parse:e=>({min:Number(e),max:vs}),format:({min:e})=>String(e)})}),o(Nn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(ri,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ks=e=>vt((e?.paramsSource?.rateRows||[]).filter(bs).flatMap((e=>ys(e.minMonths,e.maxMonths)))),Ss=e=>vt(e.flatMap((e=>e||[])).filter(bs).flatMap((e=>ys(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Cs=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Ts=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Cs(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Is="location";function Bs(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])]})(h,"location",Rs()??{name:e}),r=i((e=>{Ps(e),l(e)}),[]),{data:s}=cn(Ms()?null:"/api/v1/region",yt);return a((()=>{s&&!Ms()&&l(s)}),[s]),[t??{name:e},r]}const Ms=()=>Boolean(globalThis.localStorage?.getItem(Is)),Rs=()=>{try{const e=globalThis.localStorage?.getItem(Is);return e&&JSON.parse(e)}catch(e){return null}},Ps=e=>{try{globalThis.localStorage?.setItem(Is,JSON.stringify(e))}catch(e){}};var Vs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Vs||(Vs={}));const zs=new Intl.NumberFormat("ru",{style:"currency",currency:Vs.RUB}),Ds=e=>e?zs.format(e):"",As="text-m font-light text-secondary-text ",js=`${As} text-left`,Es=`${As} pl-5xl text-center`,$s=`${As} pl-5xl text-right`,Ls={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Os=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:js,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:Es,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:$s,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(_s)})]}))),_s=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:Ls[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ee,{size:"text-h6",children:Ds(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:Ds(e?.buyExchangeRate)})})]},t)},Fs={icon:"GpsIcon"},Us=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(ki,{...Fs,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(T,{size:"text-l",color:"text-primary-main",children:t}):null,o(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Hs=(e,t,l)=>{const n=Number(Ws(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)},Ws=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ks=e=>_t([[e=>e.value!==Vs.RUB&&e.oppositeValue!==Vs.RUB,()=>e.handleConvert(e.value,Vs.RUB)],[e=>e.value===Vs.RUB&&e.oppositeValue===Vs.RUB,()=>e.handleConvert(e.value,Vs.USD)],[e=>e.value===Vs.RUB&&e.oppositeValue===Vs.RUB,()=>e.handleConvert(e.value,Vs.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Gs(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??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(sl,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(gl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const qs=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Vs.RUB,selectBuy:l?.[0]?.currency?.currency||Vs.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Gs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ys(r,d,l),value:r.inputSell,setValue:e=>Js(d,l)(e,r.selectSell,r.selectBuy)}),Gs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Xs(r,d,t),value:r.inputBuy,setValue:e=>Zs(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Ys=(e,t,l)=>n=>{t({selectSell:n}),Ks({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Js(t,l)(e.inputSell,n,a)}})},Xs=(e,t,l)=>n=>{t({selectBuy:n}),Ks({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Zs(t,l)(e.inputBuy,n,a)})},Js=(e,t)=>(l,n,a)=>{e({inputSell:Ws(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Hs(l,i,n===Vs.RUB)||"")})},Zs=(e,t)=>(l,n,a)=>{e({inputBuy:Ws(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Hs(l,i,n===Vs.RUB)||"")})};const Qs=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Bs(),i=function(e){const t=e?.code||"000",{data:l}=cn(`/api/v1/exchangerates?regionCode=${t}`,yt);return l||{}}(a),r=eo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Vs.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Vs.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(ke,{className:"h-full",title:o(C,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Os,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Us,{address:i?.address})]}),r.length&&s.length&&d.length?o(qs,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),eo=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],to=(e,t)=>o(ki,{...e,iconBgVersion:t,className:"shrink-0"}),lo=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Za,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[to(a,t),e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(q,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),no=Ct((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(ti,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(li,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:D({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ao({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),ao=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(lo,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Qa,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},io=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:p("space-y-m",e),children:t.map(ro)}):null)),ro=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(so)})]},String(t)),so=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:oo(e.type,e.text)}),o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),oo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${co(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},co=e=>e.replaceAll(/\D/g,""),mo=["split_version","New","Old"],ho=d((({className:e="",index:t,text:l,...n})=>{const a=he(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),uo=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(Ee,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(ho,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),po=d((({className:e="",items:t,basePath:l})=>{const n=he({isRemote:!(!E.BASE_PATH||!l)&&!E.BASE_PATH.startsWith(l),basePath:l});return o("ul",{className:p("flex flex-col",e),children:t?.map(go(n))})})),go=e=>(t,l)=>{const{text:n,...a}=t,{href:i,target:r,onClick:s}=e(a);return o("li",{className:"list-none my-xs",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,children:n||null})},`list_item_${String(l)}`)},xo=d((({className:e="",index:t,...l})=>{const n=he({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return o("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}`})})),fo=d((({className:e="",links:t,license:l})=>c("div",{className:p("@container space-y-lg",e),children:[l?o("div",{children:o(Ee,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(xo,{index:t,...e},String(t))))}):null]}))),bo="border-t border-main-divider",yo=Ct((({className:e,footer:t,...l})=>{const{topItems:n}=l.options?.page?.sitemap??{},{relatedEnterprises:a,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,documents:m,feedbackButton:h,license:u}=t||{},g=i((()=>{const[e,t,l]=mo;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return c(x,{tag:"footer",className:p("space-y-lg",e),defaultPadding:"p-4xl pb-24",...l,children:[o("div",{role:"menu",children:vo(n)}),o("div",{className:bo}),o(io,{className:"overflow-hidden",items:r}),h?o(be,{className:"w-full",version:"primary",...h}):null,s.map(((e,t)=>o(es,{media:e?.links??[],stretched:!0,showButtonText:!1,children:e?.title},String(t)))),o("div",{className:bo}),o(ho,{text:"Вернуться на прежнюю версию сайта",className:"flex text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:g}),o("div",{className:bo}),o(uo,{title:d,links:a}),o("div",{className:bo}),o(fo,{links:m,license:u})]})})),vo=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(no,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(po,{items:e.items,basePath:A(e.href)}):null},String(t)))),No=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),wo=Ct((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],h=ce({className:"text-white",version:l?.version||"primary"}),u=m?.find((e=>e.name===s.key))?.href,g=l?.text?l.text:"Перейти";return o(x,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(C,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Fl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(be,{href:u,target:"_blank",className:p("p-m w-full @xl:w-auto",h),data:No(i,s?.key),children:g})}):null]})})})),ko={width:"34",height:"34"},So={"bg-white":"color",transparent:"white"},Co={"bg-white":"text-primary-main",transparent:"text-white"},To=(e,t,l)=>o(ne,t?.src?{image:t,className:Co[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:So[e]},className:Co[e],width:l?.width,height:l?.height}),Io={"bg-white":"text-primary-text",transparent:"text-white"},Bo=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...ue(s),children:[To(i,l?.image,ko),r?n??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:Io[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Mo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Ro=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=E.BASE_PATH?.startsWith(r.pathname),d=i((()=>{r.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[l||s?o("div",{children:o(Bo,{className:"my-2xs",bgColor:e,logo:t})}):Po(d),n?o("div",{children:o(be,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Mo["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),Po=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ne,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Vo={"bg-white":"primary",transparent:"transparent"},zo=Ct((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Vo[e],portal:n,...a})=>{const{logo:i}=a.options?.page?.sitemap??{},{internetBankUrl:r}=n||{};return o(x,{tag:"header",defaultPadding:"",version:l,...a,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Ro,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),Do=(e=!1)=>e?{}:{padding:"p-0"},Ao={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},jo=Ct((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",Ao[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Z(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:D({...c,extraProps:{className:p("w-full",_a(r)),...Do(n)}})})}),{childrenTypes:[]}),Eo=Ct((e=>o(jo,{...e})),{childrenTypes:[]}),$o=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Mi[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:n})})})),Lo=["байт","Кб","Мб","Гб","Тб","Пб"],Oo=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...ue(i),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",_o(d,m),o(Ee,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),_o=(e,t)=>e||t?o("span",{children:", "}):"",Fo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Uo=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Fo[r]),role:"list",children:a.map(Ho(d,i))}):null]})})),Ho=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a=W(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.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))} ${Lo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Wo(a):l?.fileFormat;return o("div",{role:"listitem",children:o(Oo,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null,data:l?.data})},String(n))},Wo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Ko=Ct((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,headingType:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(ke,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(C,{headingType:d,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ye(n,{className:"flex-wrap"}),children:[a?o(Ee,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(tt,{items:r,listItemSize:"M"}),o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:s})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Go={primary:"bg-white/30",secondary:"bg-main-divider"},qo={primary:"text-white",secondary:"text-secondary-text"},Yo=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Go[t]),role:"status",children:o(Ee,{size:"text-xs",color:qo[t],children:e})}))),Xo=(e=[],t={})=>e.filter((({content:e={}})=>gi(t,e))).length,Jo=(e,t)=>e===t;const Zo=(Qo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Jo,((e=Jo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Qo(l,t[e])))));var Qo;const ec=[],tc={},lc=({text:e,description:t,icon:l,isActive:n,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(n);return c("div",{className:p("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,role:"tab",children:[l?o(ne,{className:p("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},nc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},ac={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},ic={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},rc={default:"sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},sc=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,appendRight:m,...h}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",nc[n],l?rc[n]:ic[n]),role:"tablist",onClick:a,...h,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?ac[n]:"text-secondary-text hover:text-primary-main"),children:[lc({text:r,description:s,icon:d,isActive:l,type:n}),m?o("div",{className:"ml-xs",children:m}):null]})})})),oc=d((e=>o(e?.item?.href?cc:dc,{...e}))),cc=d((e=>{const t=he(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(sc,{...e,tag:"a",item:a,onClick:n})})),dc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(sc,{item:e,onClick:n,...l})})),mc=(e,t,l)=>(n,a)=>o(oc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),hc=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel",children:l.map(mc(n,a,t))}))),uc={categories:[],extraOptions:[],propertyType:[],stage:[]},pc=Ct((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=fi(uc,{block:a.block,page:a.options?.page}),g=i(((e=uc)=>u(e)),[]),f=(({hotFilters:e=ec,filtrationState:t=tc,blocks:l=ec,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Zo(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Yo,{version:t===e[a]?"primary":"secondary",count:Xo(l,t.filter)})})))),[e,l,a]),c=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:c}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(hc,{...f}),o(di,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(ri,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function gc(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((({coords:t,content:l})=>new e.Placemark(t,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{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.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const xc={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"},fc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(xc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),bc=e=>globalThis[e];function yc(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=bc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(bc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(bc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const vc={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"},Nc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(vc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:l,width:"20",height:"16"})})})),wc=[55.753995,37.614069],kc=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=yc("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{n?.current?i&&(gc(i,n.current,e),e?.length||n.current.setCenter(wc)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?Sc(e):wc,zoom:l,controls:[],suppressMapOpenBlock:!0}),gc(i,n.current,e))}))}),[i,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(Nc,{yandexMaps:n}),o(Nc,{yandexMaps:n,direction:"out"})]}),fc(n,i,p("right-2 top-80",r))]})})),Sc=e=>[Tc(Cc(e,0)),Tc(Cc(e,1))],Cc=(e,t)=>e.map((e=>e.coords[t])),Tc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Ic={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему"},Bc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Mc=(e,{field:t,reset:l},n)=>{const a=n?3:4,i=(e||[]).map((e=>o(tl,{text:Ic[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(ti,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Bc,children:r}),o(li,{className:Bc,isUnfolded:e,children:s})]}),renderFoldButton:Rc(l,n)})}):null})},Rc=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(q,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(q,{name:"CloseIcon",width:"16",height:"16"})})]}),Pc=()=>{},Vc=()=>[],zc=e=>"all"===e?"block":"hidden",Dc=d((({className:e,data:t=[],renderCard:l=Pc,filterItems:a=Vc,getBalloon:i=Pc,initFilterState:s={},descriptionData:d,title:m})=>{const h=m?.includes("Офис"),[u,{field:g,reset:x}]=qt(s),[f,y,v]=r((()=>{const e=a(t,u),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,u]),[N,w]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(C,{headingType:"h2",children:[m,v?o(Ee,{size:"text-h2",color:"text-secondary-text",children:` (${v})`}):null]})}),d?jc(d):null,h&&Ac(t,N,w),o("div",{className:p("pb-2xl",zc(N)),children:Mc(Object.keys(s),{field:g,reset:x},h)})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(kc,{points:y,className:"h-full"})})})]}),f.map(l)]})})),Ac=(e,t,l)=>{const n="business"===t?"primary":"secondary",a=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(aa,{"data-id":"all",onClick:t=>a(t,"all",e),version:"all"===t?"primary":"secondary",children:"Для физических лиц"}),o(aa,{"data-id":"business",onClick:t=>a(t,"business",e),version:n,children:"Для юридических лиц"})]})},jc=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Ae,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Ec={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},$c=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-green rounded-md flex items-center",Ec[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ee,{size:"text-m",color:Ec[l].text,children:t})]}))),Lc=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Oc({textItems:a,subText:t,children:l,...n})})),Oc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ee,{size:"text-l",children:e.trim()},String(t)))),a?o(Ee,{color:n,size:"text-m",children:a}):null]}),_c=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Fc=["ArrowDownIcon","ArrowUpIcon"],Uc=["Подробнее","Скрыть"],Hc=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Uc[Number(e)]}),o(q,{className:"text-primary-text",name:Fc[Number(e)],width:"16",height:"16"})]}),Wc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:qc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:qc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o($c,{color:"green",children:qc(s)})})]}),o("div",{className:"hidden sm:block",children:o(_c,{className:"flex-wrap",children:m?.map(Gc)})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:o(_c,{className:"flex-wrap",children:m?.map(Gc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hc({isUnfolded:e,onToggle:t})})]},String(d))},Kc=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${qc(t)} №${l}`,body:e.toUpperCase()}),Gc=(e,t)=>o(Lc,{...e},String(t)),qc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Yc=[];const Xc=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:Yc},Jc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Zc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Qc=d((({data:e,className:t})=>{const[l]=Bs(),n=function(e){const{data:t=Yc}=cn(`/api/v1/atms?regionCode=${e}`,Xc);return t}(l?.code??"000");return o(Dc,{className:t,filterItems:ed,data:n,initFilterState:Jc,renderCard:Wc,getBalloon:Kc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),ed=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Zc[t](e))),l=!n.length||n.some((t=>Zc[t](e)));return t&&l}))},td=e=>{const t=nd(e);return o(Lc,{label:"Режим работы",value:t,className:"max-w-none"})},ld=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",nd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[ld({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),ld({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},ad=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],id=e=>ad.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),rd=e=>{if(!e)return null;const t=sd(e);return c(_c,{className:"border-none",children:[o(Lc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(od)})}),o(Lc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},sd=e=>{const t=ad.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},od=({short:e,status:t},l)=>o("div",{className:p("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Ee,{size:"text-xs",children:e})},String(l)),cd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Lc,{label:"Валюта",value:e.currency}):null,t?o(Lc,{label:"Купить",value:String(t)}):null,l?o(Lc,{label:"Продать",value:String(l)}):null]},String(n)),dd=(new Date).getDay(),md=e=>{const[t]=e?.slice(dd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o($c,{color:"green",children:a}):null,l&&i?o($c,{color:"yellow",children:`перерыв: ${l}`}):null]}):o($c,{color:"red",children:"Выходной"})},hd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",ud=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Lc,{label:e,value:t&&l?l:"",subText:hd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),pd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,gd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,xd=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,fd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=id(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),md(u)]}),o("div",{className:"hidden sm:block",children:bd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:bd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hc({isUnfolded:e,onToggle:t})})]},String(h))},bd=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=id(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(_c,{className:"flex-wrap",children:[o(Lc,{label:"Факс",value:t}),o(Lc,{label:"Телефон филиала",value:e}),o(Lc,{label:"Для обращений юридических лиц",value:l}),o(Lc,{label:"Обслуживание физических лиц",value:n}),o(Lc,{label:"Для консультаций по валютному контролю",value:i}),o(Lc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(_c,{children:o(Lc,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(ud)})})}):c(_c,{children:[o(Lc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(od)})}),td(d)]}),r?.businessScheduleVisibleTag?rd(r?.businessScheduleDescription):null,s?.currencies?.length?o(_c,{className:"flex-wrap",children:s?.currencies?.map(cd)}):null]})},yd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=id(e),l=e?nd(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?pd(l):xd(l,n):gd(l):null})(l)}`;return{header:n,body:i}},vd=[];const Nd=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:vd},wd={workingSaturday:!1,premiumService:!1,privateBanking:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},kd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday),premiumService:e=>Boolean(e.premiumService),privateBanking:e=>Boolean(e.privateBanking),sellingCoins:e=>Boolean(e.sellingCoins),buyingCoins:e=>Boolean(e.buyingCoins),bullionOperations:e=>Boolean(e.bullionOperations),preciousMetalsOperations:e=>Boolean(e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean(e.transferringDataToBiometricSystem)},Sd=d((({className:e})=>{const[t]=Bs(),l=function(e){const{data:t=vd}=cn(`/api/v1/branches?regionCode=${e}`,Nd);return t}(t?.code??"000");return o(Dc,{className:e,filterItems:Cd,data:l,initFilterState:wd,renderCard:fd,getBalloon:yd,title:`Офисы филиала ${t?.name}`})})),Cd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>kd[t](e)))))},Td=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(Sd,{}):o(Qc,{data:e})})})),Id=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(y,{})]}))),Bd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Ti,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(ot,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Md=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[qe(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:r})}):null,s?o(C,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Rd(i):null,Pd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Pd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Pd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ye([n]):null]})]}))),Rd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Ae,{__html:e})}),Pd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:n,children:t})]})]}):null,Vd=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(Ae,{__html:t,richVersion:l})})})),zd=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Wn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Wn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Dd=d((({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]}))),c=s.find((e=>e.key===n));return o(gl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Ad=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Dd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Dd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),jd=["От 1 дня","До 365 дней"],Ed=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Nn,{min:1,max:365,value:e,items:jd,onChange:t})]}))),$d=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Dd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Dd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ld=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Ad,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Od(m)}),o(Ed,{days:a,setDays:e=>m({days:e})}),o($d,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:_d(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(zd,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Od=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},_d=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Fd=d((({days:e,tariffs:t=[]})=>{const l=Hd(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Ud("Аренда за",e),Ud("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Ud=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Hd=(e,t)=>{const l=Wd(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Wd=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},Kd=(e,t)=>e.find((e=>e.branchCode===t)),Gd=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Kd(n,l.selectedBranch),d=qd(s?.safeBoxCaseVolumes),m=Yd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Xd(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Ld,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Fd,{days:l.days,tariffs:h})]})})),qd=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Yd=(e,t)=>e?.find((e=>e.volume===t)),Xd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Jd=[];const Zd=async e=>await bt(e,{method:"GET"})||Jd,Qd=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=$n(),p=em(m.selectedRegion,u),g=function(e){const{data:t}=cn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Zd);return t||Jd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Kd(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(C,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Gd,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(T,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(kc,{points:b,className:"h-[640px]"}):null]})})),em=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function tm(e){throw new Error(e)}const lm={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},nm={normal:"",small:"min-h-6xl"},am={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"},im=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(rm(i,r))})}):null,Ye(a,{isVertical:!0})]}))),rm=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return sm(e,t)(l,n);case"rte":return o(Ae,{__html:l.__html});default:tm(l)}},sm=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:om(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",nm[e]),children:[l.label?o(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",am.description),children:l.description}):null]})]})},String(n)),om=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=lm[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:qe(l?.icon)?o(ne,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:cm(e),height:cm(e)}):o("span",{className:p("text-h4","transparent"===t?am.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},cm=e=>"normal"===e?"38":"24",dm=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),mm=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(ne,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),hm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(mm,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),um=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(hm,{onClick:e=>e.stopPropagation(),onClose:l,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center px-xl",children:o(C,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];const pm=({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((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:tm(e)}}))),[c,d]),l},gm=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=Array.from({length:e.length}),a=Array.from({length: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 xm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(mm,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),fm=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(bm,{...e},String(t))))})]}):null,bm=d((({icon:e,...t})=>{const l=he(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),ym=(e,t)=>l=>l.name?o(Zr,{isRemote:!0,href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>{t&&t(l)},data:No(e,l.name),children:o(Ee,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,vm=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("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"})]}))),Nm=d((({foreignOffices:e,branches:t})=>{const[l,a]=Bs(t?.default),r=he({isRemote:!0}),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=km($n()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((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})(h,wm),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(xm,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(T,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Zr,{isRemote:!0,href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(vm,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&gm(e.toLowerCase())(d.toLowerCase())>=.8)).map(ym(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(ym(f,x))]},e)))}),fm(e)]});var x,f})),wm=e=>e.name?.charAt(0)||"",km=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Sm=d((({menuRef:e,menuItem:t,locationDialogProps:l,closeAll:n})=>{const r=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(Nm,{...e}),l),close:l}})(l||{}),s=e?.current?.getBoundingClientRect(),c=i((()=>{const e=globalThis?.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px";const[,l]=globalThis?.location?.pathname?.split("/")||[];e.postMessage(l,"*")}),[]);return a((()=>{const e=e=>{if("location"===e.data.type&&r.open(),"reload"===e.data.type&&n(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(hm,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center px-xl",children:o(C,{as:"h4",title:t?.title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:c,src:t?.src,width:s?.width||0})})})})),Cm="burgerMenuDialog",Tm=({menuRef:e,centralMenuItem:t,closeAll:l,openDialog:n,locationDialogProps:a})=>{const i=pm(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Cm,i);return[r,{toggle:()=>{r?l():n(o(Sm,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:l}),{id:Cm})}}]},Im=[],Bm=Ct((({sticky:e,...t})=>{const{menuItems:l=Im}=e??{},a=l.find((e=>"Меню"===e.title)),r=l.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=n(-1),[g,f]=n(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),N=ml(v),w=s(null),[k,{toggle:S}]=Tm({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.options?.page?.sitemap}),[{openBottomMenuItemDialog:C}]=um({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Mm(I,"left",{activeIndex:u,currentItemPosition:g})),o(dm,{item:a,isActive:k,onClick:e=>T(e)}),h.map(Mm(I,"right",{activeIndex:u,currentItemPosition:g}))]})})})),Mm=(e,t,l)=>(n,a,i)=>o(dm,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),Rm="hidden sm:flex absolute z-40",Pm={animated:{itemClassName:"flex",gap:8,buttonTop:"top-5"},underlined:{itemClassName:"",gap:0,buttonTop:"top-0"}},Vm=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a="default"})=>{const[i,r]=za({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),children:[o(va,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,itemClassName:Pm[a].itemClassName,gap:Pm[a].gap,children:t.map(mc(l,n,a))}),r.canScrollLeft?o(Aa,{className:p("left-6",Rm,Pm[a].buttonTop),onClick:r.scrollLeft}):null,r.canScrollRight?o(ja,{className:p("right-6",Rm,Pm[a].buttonTop),onClick:r.scrollRight}):null]})})),zm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(hc,{...t});case"scrollable":return o("div",{className:"flex",children:o(Vm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Dm="tab",Am=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),m=r((()=>l.map(Em)),[l]),[g,f]=n(0);a((()=>{if(!l||!l[0])return;const e=new URLSearchParams(globalThis?.location?.search||""),t=e.get(Dm)&&l.findIndex((t=>"group"===t.type&&t.ref===e.get(Dm)))||0,n=l[t]||l[0];f(t),jm(n)}),[]),a((()=>{const e=l[g];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,g]);const b=i((e=>{const t=m.indexOf(e),n=l[t];f(t),jm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(globalThis?.location?.search||"");e.name?t.set(Dm,e.name):t.delete(Dm),d.replace(`${d.pathname}?${t}`,{scroll:!1})})(e)}),[l,m]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:zm({items:m,value:m[g],tabsMode:s,onChange:b})})})),jm=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},Em=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,$m=({tabsType:e="animated",...t})=>{switch(e){case"default":return o(hc,{...t});case"underlined":return o("div",{className:"flex",children:o(hc,{className:"m-auto",tabsType:"underlined",...t})});case"animated":return o("div",{className:"border-b-8 border-primary-main",children:o(Vm,{className:"m-auto",...t,tabsType:"animated"})});default:return null}},Lm="tab",Om=Ct((({className:e="",tabs:t=[],block:l,tabsType:r,...s})=>{const d=u(),[m,h]=n(Fm(t)),g=t.findIndex((e=>Boolean(e.selected)));a((()=>{const e=new URLSearchParams(globalThis?.location?.search||""),l=e.get(Lm)?t.findIndex(((t,l)=>"group"===t.type&&String(l)===e.get(Lm))):g;h(-1===l?0:l)}),[g]);const f=_m(t[m],m),b=i((e=>{const l=t.indexOf(e),n=t[l];h(l),"group"===n.type&&((e,t)=>{const l=new URLSearchParams(globalThis?.location?.search||"");e.text?l.set(Lm,String(t)):l.delete(Lm),d.replace(`${d.pathname}?${l}`,{scroll:!1})})(e,l)}),[t]);return c(x,{className:p(e),defaultPadding:"p-0",...s,children:[$m({items:t,value:t[m],tabsType:r,onChange:b}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:z(l?.slots?.[f],{...s?.options,slotName:f,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>"group"===e.type)).map(_m)||[],childrenTypes:{exclude:["TabsLayout"]}}),_m=(e,t)=>e?.text||`Слот №${t}`,Fm=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),Um={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Hm=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Um[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Wm=d((({className:e="",isOpen:t,onClick:l})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Km={Buttons:({buttons:e})=>Ye(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,List:({isDotted:e,...t})=>o(tt,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ee,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ee,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(Wm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Gm=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return qm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),qm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Km))return null;return o(Km[l],{...t,...n})},Ym=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Gm,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Xm=(e,t)=>140*Ve(e.slice(0,t).map((e=>e?.cols?.length??1))),Jm=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Zm=d((({rows:e})=>{return o(va,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=p("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Xm(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Jm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Qm=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ee,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Zm,{rows:t.rowsData})})})]},n)}))}))),eh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),th=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ee,{size:"text-xl",font:"font-light",color:eh(t===l),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function lh(e){const t=await fetch(e);return await t.json()}const nh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=cn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),lh);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(th,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Qm,{activeTabIndex:r,items:m}),o(Wm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Wm,{onClick:l,isOpen:!0})]})})),ah=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(nh,{...t,onClick:l})}):null]}))),ih=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(ah,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Hm,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Ym,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function rh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Da,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Da,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const sh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,rh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),oh=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=ga({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(ih,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(ti,{renderFoldableSection:({isUnfolded:e})=>c(sh,{controls:u,children:[f,o(li,{isUnfolded:e,children:b})]}),renderFoldButton:ei}):o(sh,{controls:u,children:g})})]})})),ch=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?dh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?mh(l):null,a?o(Ae,{__html:a}):null]})]}))),dh=()=>o("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"}),mh=e=>o(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),hh=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:l})}):null]}))),uh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(hh,{prefix:t,unit:l,suffix:n})})})),ph={AdTile:It,ApplicationForm:oa,BankAccountFiltration:vi,BenefitsBlock:Si,BonusBenefitsBlock:Bi,ButtonsBlock:Ri,CalculatorBonus:Hi,CalculatorBusinessDeposit:or,CalculatorCredit:br,CalculatorDeposit:Tr,CalculatorRefinancing:Vr,CardTransfer:Lr,Carousel:Ya,CarouselBankHistoryCard:Or,CarouselCard:Ur,CarouselCatalogCard:Wr,CarouselLinks:Xr,CarouselRecommendationCard:ls,CarouselTariffsCard:is,ComparisonTable:xs,DepositFiltration:ws,ErrorBlock:Ts,ExchangeRateTile:Qs,Footer:yo,GrantSupport:wo,Header:zo,Headline:B,HorizontalLayout:Eo,ImgBlock:$o,LinkDocs:Uo,MobileAppTile:Ko,MortgageFiltration:pc,OfficesAtmsMap:Td,Placeholder:Id,ProductBlock:Tt,ProductGallery:Bd,RepresentativeOfficeInfo:Md,RichTextBlock:Vd,RollupItem:no,SafeDepositRental:Qd,StepsBlock:im,StickyBottomMenu:Bm,Tabs:Am,TabsLayout:Om,TariffsTable:oh,TextBlock:ch,UnitBlock:uh,VerticalLayout:jo},gh=me((()=>{a((()=>{$t()}),[]);const e=Kt();dl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");jt({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const xh="cookie",fh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:r}]=il();!function(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(xh)||n()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(xh,"true"),r()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:c(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(Zr,{isRemote:!0,className:bh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(Zr,{isRemote:!0,className:bh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(mm,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),bh=e=>p("inline mx-2xs",e?"text-green-dark":""),yh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=pm({onCloseAll:e,onClose:t}),{close:n}=de(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return dl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),vh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:tm(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return dl(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Nh="header",wh="footer",kh="sticky-footer",Sh={},Ch=d((({className:e,data:t=Sh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=St(s,r);gh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(a?.header,{...m,slotName:Nh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),z(a?.footer,{...m,slotName:wh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(a?.["sticky-footer"],{...m,slotName:kh})}):null,o(yh,{}),o(vh,{}),o(fh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Ch,{childrenTypes:[],slots:()=>[Nh,wh,kh]});e.Blocks=ph,e.ContentPage=Ch,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.handlerDecorator=me,e.joinList=oi,e.packageVersion="0.15.337",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=F,e.useRouter=u,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)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=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};const h=new class{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}};function u(){return u._impl()}u._impl=()=>({pathname:globalThis.location?.pathname||"/",push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={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","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{"group"!==e.type||e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=d((({children:e})=>f?e:null)),y=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:v(t)}))),v=(e=3)=>w(100,e).map((e=>Math.floor(e))).map(N),N=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),w=(e,t)=>[e].concat(t>0?w(e/1.618,t-1):[]),k={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},S={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},C=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",S[t],e),children:n||a})})),T=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),I={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"}},B=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=I[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(C,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(T,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function P(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=R}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const V=[],z=(e,{key:t,ancestors:l=V,slotName:n=null,extraProps:a,renderProps:i=P,...r})=>{const s=a?(e,t)=>P(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||V,[r.parent,n]]:l},a)))};function D({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const A=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?A(l):l}}),L=e=>Boolean(e?.includes(":")),$=(e,t)=>Boolean(e&&!L(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var F=Object.freeze({__proto__:null,isURL:L,isLocalURL:$,isHash:O,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:_});const U="/api/",H=`${U}v1/storage`,W=e=>(t,l=E.BASE_PATH)=>{if([!t,L(t),O(t),[E.CDN,U].some((e=>K(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${H}/${t}/attachment`;const n=t?.startsWith("/");return _(K(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},K=(e,t)=>t&&e&&e.startsWith(t),G={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},Y=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=W(d)(_(E.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(J,{className:e,children:c("svg",{className:p(X(r),G[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},X=e=>e?"":"w-full h-full",J=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=(e,t)=>l=>l&&!L(l)?W(e)(_(t,l)):l,Q=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ee=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Q).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Z(a,n)(e),type:le(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?te({...t,src:Z(a,n)(t.src)},l):null]})})),te=(e,t="")=>o("img",{src:e.src,className:p("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"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(Y,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(ee,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ae={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:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ie="bg-main-divider text-main-disabled",re={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},se="text-center font-sans select-none",oe={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:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ce=({className:e,rounded:t,version:l})=>[se,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ae[l]:"",t?"rounded-full":"rounded-md",e].join(" "),de=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=de();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:me(i(e))});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&$(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)?"hidden lg:block":"";return c("div",{className:p(ge(e),"flex gap-xs"),children:[n?o("div",{className:p(r,oe[i]),children:n}):null,xe(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,oe[i]),children:a}):null]})})),ge=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 p("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),fe=({className:e,rounded:t,version:l})=>["inline-block",se,l?re[l]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=he()({onClick:r,href:n,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:ce({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:n,version:l}),children:a})));function Ne(e,t,l=!1){const n="primary"===e?"white":"black",a="Вернуться назад";return c("div",{className:p(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:ce({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),o(be,{version:"link",className:"group-data-secondary:text-white/80",text:a,ariaLabel:a,onClick:t,type:"button"})]})}const we={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ke=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,insetTitle:r,buttons:s,leftImage:o,rightImage:d,imageAlign:m,isImageAlwaysOnRight:h=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=u(),v=i((()=>{y.back()}),[]);return c("div",{className:Ce(n,l,e),children:[x?Ne(t,v):null,Se(a),c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Re(o,{imageAlign:m,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",d?"@xl:grid-cols-2 auto-cols-fr":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,f]}),Me(D({...b,extraProps:{className:"@container-normal"}})),Re(d,{className:p("@xl:justify-self-end @xl:col-start-2",s?Te(h):"",Ie(h),Pe(g)),imageAlign:m}),Be(s)]})]})]})})),Se=e=>e?o("div",{className:"relative h-full",children:e}):null,Ce=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Te=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Be=e=>e?o("div",{className:"self-end",children:e}):null,Me=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&we[l],t),children:e}):null,Pe=e=>e?"hidden @xl:block":"",Ve=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Ve(e)/e.length:0,De=(e,t="normal")=>e?.icon||e?.src?o("div",{className:p("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 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:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ae=d((e=>{const{__html:t,richVersion:l=""}=e;return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),je=(e,t)=>e?o(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),Le=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,$e=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(Ae,{...e},`rte-${t}`):["label"in e?Le(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:je(e.description,t)},String(t)):null],Oe=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?De(l.icon,t):null,o("div",{children:$e(l)})]}))),_e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Fe=e=>{return((t=e.map(_e))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Ue=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),He=e=>!e.some(Ue),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Fe(l)||He(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Oe,{benefitsVersion:t,...e},String(l))))}):null)),Ke=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap($e)}):null)),Ge=d((({isTabularBenefits:e,...t})=>o(e?Ke:We,{...t}))),Ye=e=>Boolean(e?.src||e?.icon),qe=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Je(a,r),d=Je(i,r);return n||a?.icon?o(be,{className:p("basis-full @lg:basis-auto",e),appendLeft:Ze({...a,iconVersion:c}),appendRight:Ze({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Je=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ze=e=>Ye(e)?o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),et={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},tt=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=et[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Qe,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),lt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),nt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(at)}):null)),at=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[lt(2)(t)," ₽"]}):null]},String(l)),it=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),st={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},ot=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...T})=>{const I=y?.src?o(ne,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(ke,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ct(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:qe(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Ge,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(Ae,{__html:h}):null,p?.length?o(tt,{items:p,isDotted:g,listItemSize:st[i]}):null,C,x?.length?o(nt,{priceList:x}):null,dt(f)]})})})),ct=(e,t)=>t?{rightImage:e}:{leftImage:e},dt=e=>e?.length?o(it,{tags:e}):null,mt=e=>Boolean(e&&Array.isArray(e)),ht=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ut=(e,t)=>{return l=e,Boolean(ht(l)&&"string"==typeof l.$ref)?t.ref(e):ht(e)?t.record(e):mt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(gt,e),gt=(e,t)=>e&&t?ht(e)?e[t]:mt(e)?e[parseInt(t,10)]:e:e,xt=(e,t)=>ut(e,{ref:({$ref:e,...l})=>xt(e?pt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:xt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>xt(e,t)))}),ft=(e,t,l=[])=>{ut(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)ft(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)ft(e[n],t,[...l,n])}})};async function bt(e,t){try{return e?await yt(e,t):null}catch(e){console.error(e)}return null}const yt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),vt=e=>[...new Set(e)],Nt={},wt=["/portal-resources"],kt=(e,t)=>xt(e,(e=>t?.[e])),St=(e,t)=>{const l=(e=>{const t=[];return ft(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(vt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,Nt[e]||=await yt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?kt(e,{...t,...i}):e};function Ct(e,t={}){const l=d((t=>{const l=St((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Tt=Ct((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(ot,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Bt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Tt,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Bt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Mt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Rt=e=>e?.replace(/[^+\d]/g,"");const Pt=e=>e?{phone:Rt(e)}:{},Vt=e=>e?{birthday:Mt(e)}:{},zt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Dt=(e,t=!0)=>({[t?"email":"mail"]:e}),At=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Rt(e)}:{},jt=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},Et="rshb-query-params";function Lt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Et)||"";return e&&globalThis.sessionStorage?.setItem(Et,e),e}function $t(e){if(!e)throw new Error("Value should be fulfilled");return e}const Ot=e=>t=>{const[,l]=$t(e.find((([e])=>e(t))));return l(t)},_t=e=>Ot(e.map((([e,t])=>[e,()=>t])));_t.if=e=>new Ft(void 0,e);class Ft{parent;predicate;unit;get entry(){return[$t(this.predicate),$t(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Ft(this,e)}then(e){return new Ft(this.parent,this.predicate,e)}else(e){return Ot([...Ut(this),[()=>!0,e]])}}const Ut=e=>[...e?.parent?Ut(e.parent):[],e.entry],Ht=e=>{const t=e.target?.closest("a");if(L(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=Lt();if(!L(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Wt(t?.target)?.(l)}}},Wt=_t([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Kt(){return Kt._impl()}Kt._impl=()=>({forwardQuery:Ht}),Kt.setup=e=>{Kt._impl=e};const Gt=e=>e,Yt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=Gt,format:n=Gt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},qt=d((({responseType:e})=>{const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon";return c("div",{className:p("flex items-center p-lg rounded-md space-x-m",t?"bg-ok":"bg-fail"),children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(C,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Xt=d((e=>{const{className:t,title:l,responseType:n,children:a,...i}=e;return o(x,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(C,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(qt,{responseType:n}):null]})})})),Jt=e=>t=>l=>e(l)?[]:[t],Zt=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Qt=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("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)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),el=[{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"}],tl=d((({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]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Qt,{paths:el,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":nl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ll(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:l})}):null]})})})),ll=e=>e?"radio":"checkbox",nl=e=>p("rounded border",e?"bg-primary-main":""),al=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(tl,{text:t,value:l,disabled:a,onChange:r},n),Zt(i)]})));function il(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 rl=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,sl=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=ol(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[rl(d),N?o("textarea",{className:p("block resize-y min-h-24",S,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),ol=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",cl=e=>e?.text||e?.key||"";function dl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function ml(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return dl(globalThis.document,"click",l),t}const hl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,ul=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:hl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:cl(e)}),o(Y,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function pl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=ml(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(ul,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const gl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=il(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=pl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[rl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",fl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:cl(a)||d}),xl(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(sl,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),xl=(e,t)=>o(Y,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),fl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),bl=()=>{},yl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=vl(t,e),c=Nl(t,i,r);h.push(o("td",{children:o("div",{className:wl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},vl=(e,t)=>t&&e.toDateString()===t.toDateString(),Nl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),wl=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),kl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Sl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=bl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:kl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:yl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Cl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Tl=Cl.map((e=>({key:e}))),Il=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Bl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ml={className:"min-w-32",iconVersion:"black",isBorder:!1},Rl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=il(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=ml(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Cl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Tl,yearsOptions:Il,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[rl(t),c("div",{className:"relative",children:[Pl(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(Y,{...Bl,className:"-rotate-90 cursor-pointer"})}),o(gl,{onChange:v,value:{key:Cl[u]},options:w,...Ml}),o(gl,{onChange:N,value:{key:String(x)},options:k,...Ml}),o("div",{className:"my-auto",onClick:y,children:o(Y,{...Bl,className:"rotate-90 cursor-pointer"})})]}),o(Sl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Pl=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(T,{children:t&&Mt(t)}),o(Y,{...Bl,name:"CalendarIcon"})]}),Vl=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Rl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),Zt(l)]}))),zl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(sl,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),Zt(a)]}))),Dl=e=>"_"===e,Al=e=>/\d/.test(e),jl=e=>Dl(e)||Al(e),El=[..."+7 (___) ___-__-__"],Ll=El.findIndex(Dl),$l=El.map(((e,t)=>jl(e)?El.slice(0,t).filter(jl).length:-1));const Ol=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=El.map(((e,l)=>Al(e)?e:t.charAt($l[l])||e)),n=$l.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ll,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(sl,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),_l=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Ol,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Zt(n)]}))),Fl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(gl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Zt(l)]}))),Ul="Некорректно заполненное поле",Hl=Jt((e=>null!=e&&""!==e))(Ul),Wl=Jt((e=>e?.key&&""!==e?.key))(Ul),Kl=Jt((e=>"string"==typeof e&&e.length>1))(Ul),Gl=Jt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ul),Yl=(ql=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Jt((e=>"string"==typeof e&&ql.test(e))))(Ul);var ql;const Xl=Jt((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Jl={typeForm:Hl,surname:Kl,name:Kl,region:Wl,addressBranch:Wl,phone:Yl,secondaryPhone:Yl,birthday:Hl,email:Hl,fullName:Kl,inn:Gl,partnerComments:Hl,collectionCount:Hl,comment:Hl,acquiringType:Wl,feedbackType:Wl,feedbackMethod:Wl,serviceType:Wl,serviceDirection:Wl,consentDataProcessing:Xl,annualRevenue:Hl},Zl=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Jl?.[e]])))},Ql=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},en=(e,t,l=!1)=>l?Ql(e,t):e,tn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],ln=d((({field:e,input:t})=>o(Fl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:tn,...en(e("acquiringType"),Jl.acquiringType,t?.required)}))),nn=(e="")=>Boolean("trade"===e||"all"===e),an=e=>null!=e,rn=new Map,sn=e=>Boolean(e?.every((e=>Array.isArray(e)?sn(e):!e||"string"==typeof e))),on=e=>sn(e)?e.toString():"";function cn(e,t,{fallback:l,cache:i}={}){const s=r((()=>dn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(an))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=rn)=>l=>{const n=on(l),a=t.get(n);if(n&&an(a))return a;const i=e(...l);return n&&an(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function dn(e){return Array.isArray(e)?e:e instanceof Function?dn(e()):[e]}const mn=[];const hn=async e=>await bt(e,{method:"GET"})||mn;function un(){const{data:e}=cn("/api/v1/branchesByRegions",yt);return Array.isArray(e)?e:[]}const pn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?un()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=cn(e?`/api/v1/branches?regionCode=${e}`:null,hn);return t||mn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Fl,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...en(e("addressBranch"),Jl.addressBranch,t?.required)})})),gn=(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}},xn=(e,t,l)=>Math.max(t,Math.min(e,l));function fn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function bn({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,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=fn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const yn=1,vn=100,Nn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:yn),max:s=(a.length?a.length-1:vn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=gn(e,{normalize:(e=0)=>a.length?wn(a)(e):xn(e,r,s),format:lt()}),x=i((e=>{u&&u(fn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:h,onInput:x,...g}),bn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),kn(n)]})})),wn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),kn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Sn=["От 1 000 ₽","До 1 000 000 000 ₽"],Cn=d((({field:e})=>o(Nn,{title:"Сумма, ₽",items:Sn,min:1e3,max:1e9,...e("amount")}))),Tn=d((({field:e,input:t})=>o(zl,{className:"col-span-2",...en(e("comment"),Jl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),In=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Bn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Mn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Rn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Pn=d((({field:e})=>o(Fl,{label:"Способ получения ответа",options:Rn,...Ql(e("feedbackMethod"),Jl.feedbackMethod)}))),Vn=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(Bn[0])}),[t?.value]),o(Fl,{label:"Тема",placeholder:"Выберите тему",options:Mn,...Ql(t,Jl.feedbackType)})})),zn=d((({field:e})=>o(al,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Dn=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),An=d((({field:e})=>nn(e("acquiringType")?.value?.key)?o(Dn,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),jn=d((({field:e})=>{const t=e("secondaryPhone");return o(_l,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Ql(t,Jl.secondaryPhone):t})})),En=d((({field:e})=>nn(e("acquiringType")?.value?.key)?o(Dn,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function Ln(){const{data:e}=cn("/api/v1/regions",yt);return Array.isArray(e)?e:[]}const $n=d((({field:e,input:t})=>{const l=Ln();return o(Fl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...en(e("region"),Jl.region,t?.required)})})),On=d((({field:e,input:t})=>{const l=un(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Fl,{label:"Регион",placeholder:"Выберите регион",options:n,...en(e("region"),Jl.region,t?.required)})})),_n=d((({field:e})=>o(Fl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Bn,...Ql(e("serviceDirection"),Jl.serviceDirection)}))),Fn=["От 1 мес","До 15 лет"],Un=d((({field:e})=>o(Nn,{title:"Срок, месяцев",items:Fn,min:1,max:180,...e("term")}))),Hn=d((({field:e})=>o(Fl,{label:"Тип обслуживания",options:In,...Ql(e("serviceType"),Jl.serviceType)}))),Wn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("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),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),Kn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Gn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Wn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Wn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Wn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Wn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Yn=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(zl,{label:"Фамилия",...en(e("surname"),Jl.surname,a)}),name:o(zl,{label:"Имя",...en(e("name"),Jl.name,a),...i}),middleName:o(zl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(_l,{label:"Телефон",...en(e("phone"),Jl.phone,a)}),email:o(zl,{label:"Электронная почта",...en(e("email"),Jl.email,a)}),fullName:o(zl,{label:"ФИО",...en(e("fullName"),Jl.fullName,a),...i}),inn:o(zl,{label:"ИНН",type:"number",...en(e("inn"),Jl.inn,a)}),comment:o(Tn,{field:e,input:l}),region:r?o(On,{field:e}):o($n,{field:e,input:l}),addressBranch:o(pn,{field:e,input:l,isPremium:r}),birthday:o(Vl,{label:"Дата рождения",...en(e("birthday"),Jl.birthday,a)}),isClient:o(zn,{field:e}),consentToReceiveMaterials:o(al,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(zl,{...en(e("partnerComments"),Jl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(zl,{label:"Количество объектов инкассации",type:"number",...en(e("collectionCount"),Jl.collectionCount,a)}),acquiringType:o(ln,{field:e,input:l}),onlineCheckout:o(An,{field:e}),posTerminal:o(En,{field:e}),serviceType:o(Hn,{field:e}),term:o(Un,{field:e}),amount:o(Cn,{field:e}),annualRevenue:o(zl,{label:"Годовая выручка, ₽",...en(e("annualRevenue"),Jl.annualRevenue,a)}),vedTypes:o(Gn,{field:e}),feedbackType:o(Vn,{field:e}),feedbackMethod:o(Pn,{field:e}),serviceDirection:o(_n,{field:e}),bankEmpolee:o(zl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(zl,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(jn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const qn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${nn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...Jn(c),...Xn(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Xn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Jn=e=>e?{vedTypes:Object.fromEntries(Kn.map((t=>[t,t===e])))}:{},Zn={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:tn[0],serviceType:In[0],feedbackType:Mn[0],feedbackMethod:Rn[0],serviceDirection:Bn[0],vedTypes:Kn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Qn=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Zn[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=In[1]),{...l,typeForm:{key:t,text:""}}},ea=d((({text:e,link:t})=>c(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ee,{children:e}),t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ee,{children:t.text})}):null]})));function ta({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const la={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"},na={primary:p("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:p("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},aa=d((({children:e,...t})=>{const l=e=>({...e,onClick:me(ta(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(la[a],na[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),ia=(e,t)=>o(aa,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ra=(e,t,l)=>c("div",{className:"flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3",children:[o(tl,{...e}),o(ea,{link:t})]}),Zt(Ql(e,Xl).error)]}):o(ea,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ia(l)]}),sa={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...zt(n,g),...Dt(i,g),...Pt(a),...g?Vt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...At(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},oa=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=Qn(f,l),[y,v]=n(""),N=i((async(e,t)=>{const l=ha(f,e),n=(a=Zl(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=qn({...e,...h}),r=await sa.send(i,"lead"===m)?"OK":"Fail";if(v(r),"OK"===r&&g){const e=Kt();jt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:w,onSubmit:k,reset:S}]=Yt(b,{onSubmit:N}),T=ma(f)?.name;return a((()=>{"OK"===y&&S()}),[y]),c(Xt,{className:p("container space-y-m",e),title:t,responseType:y,...x,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:p(da(e.columns),"grid gap-x-m"),children:[ca(e.title),(e?.inputs||[])?.map(Yn(w,l))]},`section-${t}`))),ra(T?w("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(C,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex gap-xl",children:[c("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:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ca=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,da=e=>2===e?"@xl:grid-cols-2":"",ma=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ha=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),ua="text-left",pa=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:ua})]}))),ga=(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}]},xa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function fa(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ba=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:fa(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}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),ya=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],va=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(wa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Na(c,v):{},...N?xa(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(ba,{className:p(m,a?ya[a-1]:"",N?"h-full":"",t),style:w?Na(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Na=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),wa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ka={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Sa={"horizontal-list":"w-6","vertical-list":"h-6"},Ca=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",ka[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Sa[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ta=e=>e,Ia=(e=Ta)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ba=Ia(),Ma=(e=Ta)=>Ia((t=>-e(t))),Ra=Ma(),Pa=e=>t=>e.scrollWidth/t,Va=e=>(t,l)=>{e.scrollBy({left:l*Pa(e)(t),behavior:"smooth"})},za=({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?[Ma()(a),Ia()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Va(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Va(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Da=d((({className:e,disabled:t,...l})=>o(be,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(ne,{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"})}))),Aa=d((e=>o(Da,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ja=d((e=>o(Da,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ea="absolute top-[calc(50%-24px)] z-40",La="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",$a=d((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:d,canScrollRight:m,scrollLeft:h,scrollRight:u}=e,g=a?t>0:d,x=a?t<l-1:m,f=i((()=>{a?(d&&t!==l-1&&h(),r()):h()}),[h,r,a,d,t,l]),b=i((()=>{a?(m&&0!==t&&u(),s()):u()}),[u,s,a,d,t,l]);return c("div",{className:"m:hidden block",children:[Oa(e),g?o(Aa,{className:p(Ea,n?"left-1 m:left-8":"left-0"),onClick:f}):null,x?o(ja,{className:p(Ea,n?"right-1 m:right-8":"right-0"),onClick:b}):null]})})),Oa=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(La,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(La,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),_a=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Fa=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(Y,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ua="relative h-full",Ha={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Wa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Ya);return D({...n,renderProps:(n,a,r)=>c("div",{className:Ka(n,{someCardsHighlighted:i}),children:[P(n,a,{className:Ga(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ya(n)?Fa({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Ka=(e,{someCardsHighlighted:t})=>p(Ua,t&&(Ya(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ga=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Ua,"min-w-80",Ha[n],t&&(Ya(e)?"pt-3xl sm:pt-16":"pt-3xl"),_a(l),l&&"h-full"),Ya=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,qa=Ct((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,isEmbedded:s=!1,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},u=t||h?.length,[g,{inc:f,dec:b}]=ga({itemCount:u,visibleItemCount:l},Math.floor(l/2)),[y,v]=za({itemCount:u}),[N]=v.visibleIndicesRange,w=h&&"CarouselBankHistoryCard"===h[0]?.type;return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:"p-6xl",...m,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(va,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:Wa({noCardBorder:n,activeIndex:g,cardSize:d,...m})}),o($a,{scroll:v,arrowsPadded:i,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:w,activeIndex:g,itemCount:u})]}),o(Ca,{className:"@5xl:hidden",containerRef:y,activeIndex:N,dotCount:u,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Xa=({blocksToRender:e,...t})=>o(qa,{padding:"p-0",isEmbedded:!0,itemCount:e?.length,visibleItemCount:0,isAlignCenter:!0,isGap:!1,children:z(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",_a(!0)),children:P(e,t)},String(l))})}),Ja=e=>e%2!=0,Za=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Qa=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Za,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ee,{size:"text-h4",children:t}),iconNode:l?o(ne,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ei=({isUnfolded:e,onToggle:t})=>o(Qa,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ti=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const li=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),ni=["ArrowDownIcon","ArrowUpIcon"],ai="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ii=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(ai),children:[z(i,{...a.options,parent:l}),Ja(i.length)?o(It,{className:"col-span-6",...a}):null]}),o(ti,{renderFoldableSection:({isUnfolded:e})=>c(li,{className:p(ai),isUnfolded:e,children:[z(r,{...a.options,parent:l}),Ja(r.length)?o(It,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Qa,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:ni[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ri=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[si(l,t),ii({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{children:[si(l,t),Xa({...n,blocksToRender:t})]});default:return null}})),si=(e,t)=>e&&!t.length?o(pa,{...e}):null,oi=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ci=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Dn,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),di=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,oi(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(mi(n)).filter(Boolean))]}),l?o("div",{children:o(aa,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),mi=e=>([t,l])=>{const n=l?.type;return"array"===n?hi(t,e)(l):null},hi=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ci,{items:n,multiple:!l?.single,...t(e)})]},e)};function ui(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const pi=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,gi=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>pi(t[e])||pi(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>pi(t[e])||pi(l[e])||xi(t[e])<=xi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>pi(t[e])||pi(l[e])||xi(t[e]?.min)>=xi(l[e]?.min)&&xi(t[e]?.min)<=xi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>pi(t[e])||pi(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>pi(t[e])||pi(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),xi=e=>Number(e||0),fi=(e,{block:t,page:l,normalize:n=Gt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Yt(e),d=r((()=>ui(a,a.map((e=>kt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Gt)=>e?.filter((([,e])=>gi(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},bi={},yi={},vi=Ct((({className:e,filtrationSchema:t=bi,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=fi(yi,{block:a.block,page:a.options?.page}),d=o(gl,{className:"w-64",label:l?.title,options:Ni(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ni(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(di,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(aa,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ri,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ni=e=>ui(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),wi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},ki=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",wi[l],e),children:o(Y,{...i,width:"54%",height:"54%",name:a})}):null})),Si=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(C,{headingType:"h3",as:"h2",className:ua,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Ci)}):null]}))),Ci=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(ki,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ne,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(C,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(tt,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ti=d((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:d="horizontal-list"})=>{const m=Array.isArray(r)?r.length:0,[h,u]=za({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(va,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(Ca,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),Ii=(e,t,l)=>{return o(Ti,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Bi=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Ii(e,0,t):null]}))),Mi={start:"justify-start",center:"justify-center",end:"justify-end"},Ri=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Mi[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:qe(e)})})),Pi=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(C,{className:"text-center",title:t}):null,l]}))),Vi="flex flex-col justify-between @4xl:flex-row gap-x-m gap-y-4xl",zi="flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",Di="flex flex-col gap-y-xl @xl:w-96",Ai=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ee,{size:"text-h3",children:[i,lt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ee,{size:"text-h3",children:"-"})})]}))),ji=e=>e?o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Ei=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:lt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Li=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(Y,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),$i=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(Li,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Ei,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(Ai,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Oi({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${lt(2)(l.min||0)} ₽`,`До ${lt(2)(l.max||0)} ₽`];return o(Nn,{items:e?n:[],step:t,...l})}const _i={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fi={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ui=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=_i.prefMonthsNum,prefTravelBonusRate:i=_i.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Fi,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Hi=Ct((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=Yt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=Ui(r,l);return o(Pi,{className:e,title:t,...i,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Oi({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),g>=0?$i({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,c("div",{className:Di,children:[x>=0?o(Ai,{title:"Баллов за год",value:x}):null,qe(n,{isVertical:!0}),ji(a)]})]})})})),Wi=Math.round(29.5),Ki=(e,t=0)=>e?.sum?e.sum:t,Gi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Yi=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,qi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Xi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${qi[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(tl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ji=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Xi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Zi=e=>Ji({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Qi=({income:e,finalSum:t,buttons:l,footnotes:n=[]})=>c("div",{className:Di,children:[o(Ai,{title:"Доход в конце срока",value:e,postfix:"₽",prefix:"+"}),o(Ai,{title:"Сумма в конце срока",value:t,postfix:"₽"}),qe(l,{isVertical:!0}),n?.map((e=>e?ji(e):null))]}),er=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:tr([e,t],n),tr=([e,t],l=[])=>({[e]:l.length?Ra(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ba(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),lr=(e,[t,l],n)=>e>=n[t]&&e<=n[l],nr={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ar={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ir=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?nr[e?.rateType]:"",{data:l}=cn(t?`/api/v1/depositrates/${t}`:null,yt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...ar,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&rr(s,e)&&lr(n,["minSum","maxSum"],e)&&lr(l,["minDays","maxDays"],e)))||ar,{rate:m}=d,h=sr(m,e),u=n+h,p=c||[ar];return{...d,...tr(["minSum","maxSum"],p),...tr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},rr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,sr=(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)},or=Ct((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=Yt({moneyValue:Ki(r,1e5),daysValue:Gi(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),u=ir(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=u;return o(Pi,{className:e,title:t,...d,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),(v={title:"Срок, дней",min:u.minDays,max:u.maxDays,...h("daysValue"),value:u.daysValue},o(Nn,{items:[`От ${Yi(v.min||0)}`,`До ${Yi(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[cr(u,h),Zi({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),$i({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Qi({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),cr=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(tl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(tl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),dr=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Nn,{items:[`От ${mr(e)}`,`До ${mr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),mr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,hr=e=>Ji({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ur=(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)},pr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},gr=e=>xr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&xr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&xr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&xr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),xr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],fr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[pr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>gr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=er(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=er(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>gr({row:e,userInputParams:t,paramsViewSettings:l})&&lr(n,["minSum","maxSum"],e)&&lr(a,["minMonths","maxMonths"],e)))||pr)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=ur(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},br=Ct((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const[m,{field:h}]=Yt({moneyValue:Ki(s,2e5),monthsValue:Gi(s,Wi),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),u=fr(m,l,r),g=hr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...h("isAnnuity")}),{onChange:x}=h("moneyValue"),{onChange:f}=h("monthsValue");return a((()=>{x&&x(xn(m.moneyValue,u.minSum,u.maxSum))}),[u.minSum,u.maxSum]),a((()=>{f&&f(xn(m.monthsValue,u.minMonths,u.maxMonths))}),[u.minMonths,u.maxMonths]),o(Pi,{className:e,title:t,...d,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма кредита, ₽",step:500,min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),dr({title:"Срок кредита, месяцев",min:u.minMonths,max:u.maxMonths,...h("monthsValue"),value:u.monthsValue}),yr({...u,...r},h),o("div",{className:"sm:hidden",children:g})]}),$i({rate:u.rate}),c("div",{className:Di,children:[o(Ai,{title:"Ежемесячный платёж",value:u.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:g}),qe(n,{isVertical:!0}),ji(i)]})]})})})),yr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(tl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(tl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(tl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(tl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),vr=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},Nr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},wr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Cr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Sr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Sr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&lr(n,["minSum","maxSum"],t)&&lr(a||i,["minMonths","maxMonths"],t)))||Nr,{rate:c}=o,d=kr(c,e),m=n+d,h=t?.rateRows||[Nr];return{...o,...tr(["minSum","maxSum"],h),...tr(["minMonths","maxMonths"],h),availableMonths:vr(h.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:i,income:d,finalSum:m}},kr=(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)},Sr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Cr=(e,t)=>e+Math.round((t-e)/2),Tr=Ct((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const[m,{field:h}]=Yt({moneyValue:Ki(s,2e4),monthsValue:Gi(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),u=wr(m,l,r),{defaultMonth:g,rate:x,income:f,finalSum:b}=u,{onChange:y}=h("monthsValue"),{onChange:v}=h("moneyValue");return a((()=>{!m.monthsValue&&y&&y(g)}),[g]),a((()=>{v&&v(xn(m.moneyValue,u.minSum,u.maxSum))}),[u.minSum,u.maxSum]),o(Pi,{className:e,title:t,...d,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),dr({title:"Срок, месяцев",min:u.minMonths,max:u.maxMonths,availableMonths:u.availableMonths,...h("monthsValue"),value:u.monthsValue}),Ir({...u,...r},h)]}),$i({rate:x}),Qi({income:f,finalSum:b,buttons:n,footnotes:[i]})]})})})),Ir=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Zi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ji({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Br=e=>Mr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Mr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Mr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Rr={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Pr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Rr],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Br({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=er(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=er(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Br({row:e,userInputParams:t,paramsViewSettings:l})&&lr(n+r,["minSum","maxSum"],e)&&lr(i,["minSumOld","maxSumOld"],e)&&lr(r,["minSumExtra","maxSumExtra"],e)&&lr(a,["minMonths","maxMonths"],e)))||Rr)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=ur(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Vr=Ct((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Yt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Pr(s,l,i),h=hr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Pi,{className:e,title:t,...r,children:c("section",{className:p(Vi,e),children:[c("div",{className:zi,children:[Oi({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Oi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),dr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),zr({...m,...i},d),m.isExtraMoney?Oi({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),$i({rate:m.rate,fractionDigits:1}),c("div",{className:Di,children:[o(Ai,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Ai,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),qe(n,{isVertical:!0}),ji(a)]})]})})})),zr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(tl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(tl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(tl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Dr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=gn(e,{normalize:(e=a)=>l&&n?String(xn(Number(Ar(e)),l,n)):Ar(e),format:lt(r)}),d=i((e=>t&&t(Ar(e))),[t]);return o(sl,{onChange:d,...s,...c})})),Ar=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),jr=d((e=>o(Dr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Er={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Lr={amount:1500},$r=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Yt(Lr),[u,g]=n(!1);return a((()=>{g(m<=0)}),[m]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(C,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Er[s],children:[o(jr,{valid:!u,placeholder:i,label:l,max:3e5,min:1,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(aa,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),Or=d((({title:e,description:t,className:l})=>o(x,{className:l,defaultPadding:"p-6xl",children:o(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),_r="z-10 border border-solid w-full h-full",Fr=p(_r,"absolute hidden @xl:block border-transparent"),Ur=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Fr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Fr,"top-6 right-8 bg-green")}),o("div",{className:p(Fr,"top-3 right-4 bg-green-light")}),c("div",{className:p(_r,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),qe([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Hr={black:"bg-black",white:"bg-white"},Wr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(ke,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:qe([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Kr)]}):null,a?c(Ee,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Kr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Hr[e]}`},String(t)),Gr="20",Yr="absolute w-full h-full border border-white",qr=d((({className:e="",icon:t,...l})=>{const n=he(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full pb-lg sm:pb-0",children:[c("a",{className:p("absolute border\n bg-white flex items-center justify-between group-hover/link:text-primary-main","flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10"),role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ne,{imageClassName:"text-green-dark",image:t,width:Gr,height:Gr}):null,o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(ne,{className:"group-hover/link:brightness-100 sm:ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"color"},imageClassName:"group-hover/link:text-primary-main",width:Gr,height:Gr})]}),o("div",{className:p(Yr,"-bottom-1 -left-1")}),o("div",{className:p(Yr,"-bottom-2 -left-2")})]})}):null})),Xr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row sm:items-center gap-s justify-between",children:[c("div",{children:[o(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Jr(n,"sm:self-end sm:pt-s"):null]})}))),Jr=(e,t="")=>{const l=Math.ceil(e.length/3);return o(qa,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",visibleItemCount:0,isEmbedded:!0,children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:"flex flex-wrap gap-2xs sm:gap-0 sm:justify-center",children:e.slice(3*l,3*(l+1)).map(((e,t)=>o(qr,{...e},String(t))))},String(l))))})},Zr=d((({className:e="",href:t,target:l,isRemote:n=!1,onClick:a,data:i,children:r})=>{const s=he({isRemote:n})({href:t,target:l,onClick:a});return o(t?"a":"div",{className:p("block",e),...t?s:{},role:t?"link":"none",...ue(i),children:r})})),Qr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],es=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Qr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ye(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",ts(a));return c("div",{className:p("flex flex-col gap-m xl:gap-xs",e),children:[o("div",{className:"flex gap-xs",children:qe(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ts=e=>e?"flex-1 justify-center":"",ls=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(Zr,{href:a,target:m,className:"h-full",children:c(ke,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ct(Ye(i)?o(ne,{image:i}):null,f),buttons:d.length?o(es,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Ge,{benefits:g}),o(tt,{items:r,isDotted:s,listItemSize:"S"}),ns(n,u)]})})}))),ns=(e,t)=>e?o(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,as=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:qe(a)}):null]},String(t))},is=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...g})=>{const f=d.map(as),[b,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[v,N]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&N(e.isUnfolded)}))),[]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...g,children:[Ye(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(C,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(ti,{renderFoldableSection:()=>c("div",{children:[b,o(li,{isUnfolded:v,children:y})]}),renderFoldButton:d.length>1?rs(v,m?.parent,u):null}):o("div",{children:b})]})})),rs=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(Y,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ss=(e=!1)=>e?"text-white":"",os=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),cs=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(ne,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ne,{image:t})}),l?o(C,{headingType:"h4",className:ss(a),title:l}):null,n?o("div",{className:os(a),children:n}):null]}))),ds=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(us(l,t)):null})}))),ms=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),hs=(e=!1)=>""+(e?"text-white":""),us=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(T,{size:"text-s",color:ms(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(T,{size:"text-s",align:"text-right",color:hs(e),children:l})}):null,n?o("div",{className:"text-right",children:o(T,{size:"text-s",color:ms(e),children:n})}):null]})]},String(a)),ps=d((({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 o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(cs,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(ds,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(be,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,gs({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),gs=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ee,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),xs=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(C,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(fs,{...e})})]})})),fs=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(ps,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return o("tbody","horizontal"===r?{children:o(Ti,{onVisibleIndicesChange:h,children:u})}:{children:u})})),bs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ys=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),vs=1e9,Ns={sum:{min:1e4,max:vs},period:3},ws=Ct((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=fi(Ns,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:ks(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ss(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(di,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs",children:[o(jr,{label:n?.title,min:500,max:vs,...d("sum",{parse:e=>({min:Number(e),max:vs}),format:({min:e})=>String(e)})}),o(Nn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(ri,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ks=e=>vt((e?.paramsSource?.rateRows||[]).filter(bs).flatMap((e=>ys(e.minMonths,e.maxMonths)))),Ss=e=>vt(e.flatMap((e=>e||[])).filter(bs).flatMap((e=>ys(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Cs=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Ts=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Cs(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Is="location";function Bs(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])]})(h,"location",Rs()??{name:e}),r=i((e=>{Ps(e),l(e)}),[]),{data:s}=cn(Ms()?null:"/api/v1/region",yt);return a((()=>{s&&!Ms()&&l(s)}),[s]),[t??{name:e},r]}const Ms=()=>Boolean(globalThis.localStorage?.getItem(Is)),Rs=()=>{try{const e=globalThis.localStorage?.getItem(Is);return e&&JSON.parse(e)}catch(e){return null}},Ps=e=>{try{globalThis.localStorage?.setItem(Is,JSON.stringify(e))}catch(e){}};var Vs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Vs||(Vs={}));const zs=new Intl.NumberFormat("ru",{style:"currency",currency:Vs.RUB}),Ds=e=>e?zs.format(e):"",As="text-m font-light text-secondary-text ",js=`${As} text-left`,Es=`${As} pl-5xl text-center`,Ls=`${As} pl-5xl text-right`,$s={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Os=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:js,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:Es,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:Ls,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(_s)})]}))),_s=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:$s[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ee,{size:"text-h6",children:Ds(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:Ds(e?.buyExchangeRate)})})]},t)},Fs={icon:"GpsIcon"},Us=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(ki,{...Fs,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(T,{size:"text-l",color:"text-primary-main",children:t}):null,o(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Hs=(e,t,l)=>{const n=Number(Ws(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)},Ws=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ks=e=>_t([[e=>e.value!==Vs.RUB&&e.oppositeValue!==Vs.RUB,()=>e.handleConvert(e.value,Vs.RUB)],[e=>e.value===Vs.RUB&&e.oppositeValue===Vs.RUB,()=>e.handleConvert(e.value,Vs.USD)],[e=>e.value===Vs.RUB&&e.oppositeValue===Vs.RUB,()=>e.handleConvert(e.value,Vs.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Gs(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??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(sl,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(gl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ys=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Vs.RUB,selectBuy:l?.[0]?.currency?.currency||Vs.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Gs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:qs(r,d,l),value:r.inputSell,setValue:e=>Js(d,l)(e,r.selectSell,r.selectBuy)}),Gs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Xs(r,d,t),value:r.inputBuy,setValue:e=>Zs(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),qs=(e,t,l)=>n=>{t({selectSell:n}),Ks({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Js(t,l)(e.inputSell,n,a)}})},Xs=(e,t,l)=>n=>{t({selectBuy:n}),Ks({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Zs(t,l)(e.inputBuy,n,a)})},Js=(e,t)=>(l,n,a)=>{e({inputSell:Ws(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Hs(l,i,n===Vs.RUB)||"")})},Zs=(e,t)=>(l,n,a)=>{e({inputBuy:Ws(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Hs(l,i,n===Vs.RUB)||"")})};const Qs=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Bs(),i=function(e){const t=e?.code||"000",{data:l}=cn(`/api/v1/exchangerates?regionCode=${t}`,yt);return l||{}}(a),r=eo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Vs.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Vs.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(ke,{className:"h-full",title:o(C,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Os,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Us,{address:i?.address})]}),r.length&&s.length&&d.length?o(Ys,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),eo=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],to=(e,t)=>o(ki,{...e,iconBgVersion:t,className:"shrink-0"}),lo=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Za,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[to(a,t),e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(Y,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),no=Ct((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(ti,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(li,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:D({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ao({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),ao=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(lo,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Qa,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},io=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:p("space-y-m",e),children:t.map(ro)}):null)),ro=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(so)})]},String(t)),so=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:oo(e.type,e.text)}),o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),oo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${co(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},co=e=>e.replaceAll(/\D/g,""),mo=d((({className:e="",index:t,text:l,...n})=>{const a=he(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),ho=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(Ee,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(mo,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),uo=d((({className:e="",items:t,basePath:l})=>{const n=he({isRemote:!(!E.BASE_PATH||!l)&&!E.BASE_PATH.startsWith(l),basePath:l});return o("ul",{className:p("flex flex-col",e),children:t?.map(po(n))})})),po=e=>(t,l)=>{const{text:n,...a}=t,{href:i,target:r,onClick:s}=e(a);return o("li",{className:"list-none my-xs",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,children:n||null})},`list_item_${String(l)}`)},go=d((({className:e="",index:t,...l})=>{const n=he({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return o("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}`})})),xo=d((({className:e="",links:t,license:l})=>c("div",{className:p("@container space-y-lg",e),children:[l?o("div",{children:o(Ee,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(go,{index:t,...e},String(t))))}):null]}))),fo="border-t border-main-divider",bo=Ct((({className:e,footer:t,...l})=>{const{topItems:n}=l.options?.page?.sitemap??{},{relatedEnterprises:a,contacts:i,mediaLinks:r=[],horizontalNavigationTitle:s,documents:d,feedbackButton:m,license:h}=t||{};return c(x,{tag:"footer",className:p("space-y-lg",e),defaultPadding:"p-4xl pb-24",...l,children:[o("div",{role:"menu",children:yo(n)}),o("div",{className:fo}),o(io,{className:"overflow-hidden",items:i}),m?o(be,{className:"w-full",version:"primary",...m}):null,r.map(((e,t)=>o(es,{media:e?.links??[],stretched:!0,showButtonText:!1,children:e?.title},String(t)))),o("div",{className:fo}),o(ho,{title:s,links:a}),o("div",{className:fo}),o(xo,{links:d,license:h})]})})),yo=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(no,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(uo,{items:e.items,basePath:A(e.href)}):null},String(t)))),vo=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),No=Ct((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],h=ce({className:"text-white",version:l?.version||"primary"}),u=m?.find((e=>e.name===s.key))?.href,g=l?.text?l.text:"Перейти";return o(x,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(C,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Fl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(be,{href:u,target:"_blank",className:p("p-m w-full @xl:w-auto",h),data:vo(i,s?.key),children:g})}):null]})})})),wo={width:"34",height:"34"},ko={"bg-white":"color",transparent:"white"},So={"bg-white":"text-primary-main",transparent:"text-white"},Co=(e,t,l)=>o(ne,t?.src?{image:t,className:So[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:ko[e]},className:So[e],width:l?.width,height:l?.height}),To={"bg-white":"text-primary-text",transparent:"text-white"},Io=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...ue(s),children:[Co(i,l?.image,wo),r?n??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:To[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Bo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Mo=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=E.BASE_PATH?.startsWith(r.pathname),d=i((()=>{r.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[l||s?o("div",{children:o(Io,{className:"my-2xs",bgColor:e,logo:t})}):Ro(d),n?o("div",{children:o(be,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Bo["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),Ro=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ne,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Po={"bg-white":"primary",transparent:"transparent"},Vo=Ct((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Po[e],portal:n,...a})=>{const{logo:i}=a.options?.page?.sitemap??{},{internetBankUrl:r}=n||{};return o(x,{tag:"header",defaultPadding:"",version:l,...a,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Mo,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),zo=(e=!1)=>e?{}:{padding:"p-0"},Do={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Ao=Ct((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",Do[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Z(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:D({...c,extraProps:{className:p("w-full",_a(r)),...zo(n)}})})}),{childrenTypes:[]}),jo=Ct((e=>o(Ao,{...e})),{childrenTypes:[]}),Eo=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Mi[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:n})})})),Lo=["байт","Кб","Мб","Гб","Тб","Пб"],$o=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...ue(i),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Oo(d,m),o(Ee,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),Oo=(e,t)=>e||t?o("span",{children:", "}):"",_o={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Fo=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",_o[r]),role:"list",children:a.map(Uo(d,i))}):null]})})),Uo=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a=W(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.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))} ${Lo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Ho(a):l?.fileFormat;return o("div",{role:"listitem",children:o($o,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null,data:l?.data})},String(n))},Ho=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Wo=Ct((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(ke,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(C,{headingType:s,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:qe(n,{className:"flex-wrap"}),children:[a?o(Ee,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(tt,{items:r,listItemSize:"M"}),o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Ko=e=>e?"primary":"secondary",Go=(e=[],t={})=>e.filter((({content:e={}})=>gi(t,e))).length,Yo=(e,t)=>e===t;const qo=(Xo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Yo,((e=Yo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Xo(l,t[e])))));var Xo;const Jo=[],Zo={},Qo={primary:"bg-white/30",secondary:"bg-main-divider"},ec={primary:"text-white",secondary:"text-secondary-text"},tc=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Qo[t]),role:"status",children:o(Ee,{size:"text-xs",color:ec[t],children:e})}))),lc=({text:e,description:t,icon:l,isActive:n,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(n);return c("div",{className:p("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,role:"tab",children:[l?o(ne,{className:p("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},nc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},ac={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},ic={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},rc={default:"sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},sc=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,...h}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",nc[n],l?rc[n]:ic[n]),role:"tablist",onClick:a,...h,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?ac[n]:"text-secondary-text hover:text-primary-main"),children:[lc({text:r,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",children:o(tc,{count:m,version:Ko(l)})}):null]})})})),oc=d((e=>o(e?.item?.href?cc:dc,{...e}))),cc=d((e=>{const t=he(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(sc,{...e,tag:"a",item:a,onClick:n})})),dc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(sc,{item:e,onClick:n,...l})})),mc=(e,t,l)=>(n,a)=>o(oc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),hc=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel",children:l.map(mc(n,a,t))}))),uc={categories:[],extraOptions:[],propertyType:[],stage:[]},pc=Ct((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=fi(uc,{block:a.block,page:a.options?.page}),g=i(((e=uc)=>u(e)),[]),f=(({hotFilters:e=Jo,filtrationState:t=Zo,blocks:l=Jo,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>qo(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Go(l,t.filter),version:Ko(t===e[a])})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(hc,{...f}),o(di,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(ri,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),gc="/icons/MapMarkerClusterIcon.svg",xc="/icons/MapMarkerClusterYellowIcon.svg";function fc({yandexMaps:e,map:t,points:l}){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=bc("offices",e,n);if(l.length&&l.every((e=>"type"in e))){const i=bc("workplaces",e,n),r=yc(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=yc(l.filter((e=>"offices"===e.type)),"offices",e);a.add(s),i.add(r),t.geoObjects.add(i),t.geoObjects.add(a)}else{const n=yc(l,"offices",e);a.add(n),t.geoObjects.add(a)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const bc=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?gc:xc,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),yc=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?gc:xc,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),vc={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"},Nc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(vc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(Y,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),wc=e=>globalThis[e];function kc(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=wc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(wc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(wc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const Sc={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"},Cc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Sc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(Y,{name:l,width:"20",height:"16"})})})),Tc=[55.753995,37.614069],Ic=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=kc("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{n?.current?i&&(fc({yandexMaps:i,map:n.current,points:e}),e?.length||n.current.setCenter(Tc)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?Bc(e):Tc,zoom:l,controls:[],suppressMapOpenBlock:!0}),fc({yandexMaps:i,map:n.current,points:e}))}))}),[i,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(Cc,{yandexMaps:n}),o(Cc,{yandexMaps:n,direction:"out"})]}),Nc(n,i,p("right-2 top-80",r))]})})),Bc=e=>[Rc(Mc(e,0)),Rc(Mc(e,1))],Mc=(e,t)=>e.map((e=>e.coords[t])),Rc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Pc=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Ae,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Vc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",remoteWorkplace:"Удаленное рабочее место"},zc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Dc=(e,{field:t,reset:l},n)=>{const a=(e||[]).map((e=>o(tl,{text:Vc[e],...t(e)},e))),[i,r]=[a.slice(0,4),a.slice(4)];return o("div",{children:e?.length?o("div",{children:o(ti,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:zc,children:i}),o(li,{className:zc,isUnfolded:e,children:r})]}),renderFoldButton:Ac(l,n)})}):null})},Ac=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(Y,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(Y,{name:"CloseIcon",width:"16",height:"16"})})]}),jc=()=>{},Ec=()=>[],Lc=e=>"all"===e?"block":"hidden",$c=d((({className:e,data:t=[],remoteWorkplaces:l=[],renderCard:a=jc,renderRemoteWorkplaceCard:i=jc,filterItems:s=Ec,getBalloon:d=jc,getBalloonRemoteWorkplaces:m=jc,initFilterState:h={},descriptionData:u,title:g})=>{const x=g?.includes("Офис"),[f,{field:y,reset:v}]=Yt(h),[N,w,k,S]=r((()=>{const e=s(t,f),n=s(l,f),a=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,a,n,e.length+n?.length]}),[t,l,f]),[T,I]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(C,{headingType:"h2",children:[g,S?o(Ee,{size:"text-h2",color:"text-secondary-text",children:` (${S})`}):null]})}),u?Pc(u):null,x&&Oc(t,T,I),o("div",{className:p("pb-2xl",Lc(T)),children:Dc(Object.keys(h),{field:y,reset:v},x)})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(Ic,{points:w,className:"h-full"})})})]}),N.map(a),k.map(i)]})})),Oc=(e,t,l)=>{const n=Ko("all"===t),a=Ko("business"===t),i=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(aa,{"data-id":"all",onClick:t=>i(t,"all",e),version:n,children:"Для физических лиц"}),o(aa,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},_c={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Fc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-green rounded-md flex items-center",_c[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ee,{size:"text-m",color:_c[l].text,children:t})]}))),Uc=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Hc({textItems:a,subText:t,children:l,...n})})),Hc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ee,{size:"text-l",children:e.trim()},String(t)))),a?o(Ee,{color:n,size:"text-m",children:a}):null]}),Wc=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Kc=["ArrowDownIcon","ArrowUpIcon"],Gc=["Подробнее","Скрыть"],Yc=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Gc[Number(e)]}),o(Y,{className:"text-primary-text",name:Kc[Number(e)],width:"16",height:"16"})]}),qc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Zc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:Zc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Fc,{color:"green",children:Zc(s)})})]}),o("div",{className:"hidden sm:block",children:o(Wc,{className:"flex-wrap",children:m?.map(Jc)})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:o(Wc,{className:"flex-wrap",children:m?.map(Jc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Yc({isUnfolded:e,onToggle:t})})]},String(d))},Xc=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Zc(t)} №${l}`,body:e.toUpperCase()}),Jc=(e,t)=>o(Uc,{...e},String(t)),Zc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Qc=[];const ed=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:Qc},td={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},ld={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},nd=d((({data:e,className:t})=>{const[l]=Bs(),n=function(e){const{data:t=Qc}=cn(`/api/v1/atms?regionCode=${e}`,ed);return t}(l?.code??"000");return o($c,{className:t,filterItems:ad,data:n,initFilterState:td,renderCard:qc,getBalloon:Xc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),ad=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>ld[t](e))),l=!n.length||n.some((t=>ld[t](e)));return t&&l}))},id=e=>{const t=sd(e);return o(Uc,{label:"Режим работы",value:t,className:"max-w-none"})},rd=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",sd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[rd({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),rd({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},od=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],cd=e=>od.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),dd=e=>{if(!e)return null;const t=md(e);return c(Wc,{className:"border-none",children:[o(Uc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(hd)})}),o(Uc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},md=e=>{const t=od.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},hd=({short:e,status:t},l)=>o("div",{className:p("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Ee,{size:"text-xs",children:e})},String(l)),ud=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Uc,{label:"Валюта",value:e.currency}):null,t?o(Uc,{label:"Купить",value:String(t)}):null,l?o(Uc,{label:"Продать",value:String(l)}):null]},String(n)),pd=(new Date).getDay(),gd=e=>{const[t]=e?.slice(pd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Fc,{color:"green",children:a}):null,l&&i?o(Fc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Fc,{color:"red",children:"Выходной"})},xd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",fd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Uc,{label:e,value:t&&l?l:"",subText:xd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),bd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,yd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,vd=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Nd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=cd(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),gd(u)]}),o("div",{className:"hidden sm:block",children:wd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:wd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Yc({isUnfolded:e,onToggle:t})})]},String(h))},wd=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=cd(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Wc,{className:"flex-wrap",children:[o(Uc,{label:"Факс",value:t}),o(Uc,{label:"Телефон филиала",value:e}),o(Uc,{label:"Для обращений юридических лиц",value:l}),o(Uc,{label:"Обслуживание физических лиц",value:n}),o(Uc,{label:"Для консультаций по валютному контролю",value:i}),o(Uc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Wc,{children:o(Uc,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(fd)})})}):c(Wc,{children:[o(Uc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(hd)})}),id(d)]}),r?.businessScheduleVisibleTag?dd(r?.businessScheduleDescription):null,s?.currencies?.length?o(Wc,{className:"flex-wrap",children:s?.currencies?.map(ud)}):null]})},kd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=cd(e),l=e?sd(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?bd(l):vd(l,n):yd(l):null})(l)}`;return{header:n,body:i}},Sd=({address:e,workScheduleDescription:t},l)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Ee,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Cd({workScheduleDescription:t})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:Cd({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Yc({isUnfolded:e,onToggle:t})})]},String(l)):null,Cd=({workScheduleDescription:e})=>c("div",{children:[c(Wc,{className:"flex",children:[o(Uc,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Uc,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(Uc,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(Uc,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o(Uc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),Td=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Id=[];const Bd=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:Id},Md={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Rd={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Pd=d((({className:e})=>{const[t]=Bs(),l=function(e){const{data:t=Id}=cn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Bd);return t}(t?.code??"000");return o($c,{className:e,filterItems:Vd,data:l[0]?.branches,remoteWorkplaces:l[0]?.remoteWorkplaces,initFilterState:Md,renderCard:Nd,renderRemoteWorkplaceCard:Sd,getBalloon:kd,getBalloonRemoteWorkplaces:Td,title:`Офисы филиала ${t?.name}`})})),Vd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Rd[t](e)))))},zd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(Pd,{}):o(nd,{data:e})})})),Dd=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(y,{})]}))),Ad=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Ti,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(ot,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),jd=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ye(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:r})}):null,s?o(C,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Ed(i):null,Ld({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Ld({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Ld({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?qe([n]):null]})]}))),Ed=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Ae,{__html:e})}),Ld=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(Y,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:n,children:t})]})]}):null,$d=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(Ae,{__html:t,richVersion:l})})})),Od=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Wn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Wn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),_d=d((({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]}))),c=s.find((e=>e.key===n));return o(gl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Fd=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(_d,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(_d,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ud=["От 1 дня","До 365 дней"],Hd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Nn,{min:1,max:365,value:e,items:Ud,onChange:t})]}))),Wd=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(_d,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(_d,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Kd=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Fd,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Gd(m)}),o(Hd,{days:a,setDays:e=>m({days:e})}),o(Wd,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Yd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Od,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Gd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Yd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},qd=d((({days:e,tariffs:t=[]})=>{const l=Jd(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Xd("Аренда за",e),Xd("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Xd=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Jd=(e,t)=>{const l=Zd(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Zd=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},Qd=(e,t)=>e.find((e=>e.branchCode===t)),em=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Qd(n,l.selectedBranch),d=tm(s?.safeBoxCaseVolumes),m=lm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=nm(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Kd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(qd,{days:l.days,tariffs:h})]})})),tm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],lm=(e,t)=>e?.find((e=>e.volume===t)),nm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,am=[];const im=async e=>await bt(e,{method:"GET"})||am,rm=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ln(),p=sm(m.selectedRegion,u),g=function(e){const{data:t}=cn(e?`/api/v1/safeboxes?regionCode=${e}`:null,im);return t||am}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Qd(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(C,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(em,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(T,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Ic,{points:b,className:"h-[640px]"}):null]})})),sm=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function om(e){throw new Error(e)}const cm={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},dm={normal:"",small:"min-h-6xl"},mm={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"},hm=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(um(i,r))})}):null,qe(a,{isVertical:!0})]}))),um=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return pm(e,t)(l,n);case"rte":return o(Ae,{__html:l.__html});default:om(l)}},pm=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:gm(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",dm[e]),children:[l.label?o(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",mm.description),children:l.description}):null]})]})},String(n)),gm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=cm[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:Ye(l?.icon)?o(ne,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:xm(e),height:xm(e)}):o("span",{className:p("text-h4","transparent"===t?mm.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},xm=e=>"normal"===e?"38":"24",fm=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(Y,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),bm=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(ne,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),ym=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(bm,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),vm=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(ym,{onClick:e=>e.stopPropagation(),onClose:l,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center px-xl",children:o(C,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];const Nm=({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((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:om(e)}}))),[c,d]),l},wm=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=Array.from({length:e.length}),a=Array.from({length: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 km=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(bm,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),Sm=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Cm,{...e},String(t))))})]}):null,Cm=d((({icon:e,...t})=>{const l=he(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Tm=(e,t)=>l=>l.name?o(Zr,{isRemote:!0,href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>{t&&t(l)},data:vo(e,l.name),children:o(Ee,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,Im=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("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"})]}))),Bm=d((({foreignOffices:e,branches:t})=>{const[l,a]=Bs(t?.default),r=he({isRemote:!0}),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=Rm(Ln()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((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})(h,Mm),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(km,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(T,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Zr,{isRemote:!0,href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(Im,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&wm(e.toLowerCase())(d.toLowerCase())>=.8)).map(Tm(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(Tm(f,x))]},e)))}),Sm(e)]});var x,f})),Mm=e=>e.name?.charAt(0)||"",Rm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Pm=d((({menuRef:e,menuItem:t,locationDialogProps:l,closeAll:n})=>{const r=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(Bm,{...e}),l),close:l}})(l||{}),[{name:s}]=Bs(),c=e?.current?.getBoundingClientRect(),d=i((()=>{const e=globalThis?.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px";const[,l]=globalThis?.location?.pathname?.split("/")||[];e.postMessage({type:"currentTab",data:l},"*"),e.postMessage({type:"currentLocation",data:s},"*")}),[]);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:s},"*")}),[s]),a((()=>{const e=e=>{if("location"===e.data.type&&r.open(),"reload"===e.data.type&&n(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(ym,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center px-xl",children:o(C,{as:"h4",title:t?.title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:d,src:t?.src,width:c?.width||0})})})})),Vm="burgerMenuDialog",zm=({menuRef:e,centralMenuItem:t,closeAll:l,openDialog:n,locationDialogProps:a})=>{const i=Nm(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Vm,i);return[r,{toggle:()=>{r?l():n(o(Pm,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:l}),{id:Vm})}}]},Dm=[],Am=Ct((({sticky:e,...t})=>{const{menuItems:l=Dm}=e??{},a=l.find((e=>"Меню"===e.title)),r=l.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=n(-1),[g,f]=n(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),N=ml(v),w=s(null),[k,{toggle:S}]=zm({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.options?.page?.sitemap}),[{openBottomMenuItemDialog:C}]=vm({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(jm(I,"left",{activeIndex:u,currentItemPosition:g})),o(fm,{item:a,isActive:k,onClick:e=>T(e)}),h.map(jm(I,"right",{activeIndex:u,currentItemPosition:g}))]})})})),jm=(e,t,l)=>(n,a,i)=>o(fm,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),Em="hidden sm:flex absolute z-40",Lm={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},$m=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a="default"})=>{const[i,r]=za({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),children:[o(va,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,itemClassName:Lm[a].item,gap:Lm[a].gap,children:t.map(mc(l,n,a))}),r.canScrollLeft?o(Aa,{className:p("left-6",Em,Lm[a].buttonTop),onClick:r.scrollLeft}):null,r.canScrollRight?o(ja,{className:p("right-6",Em,Lm[a].buttonTop),onClick:r.scrollRight}):null]})})),Om=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(hc,{...t});case"scrollable":return o("div",{className:"flex",children:o($m,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},_m="tab",Fm=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),m=r((()=>l.map(Hm)),[l]),[g,f]=n(0);a((()=>{if(!l||!l[0])return;const e=new URLSearchParams(globalThis?.location?.search||""),t=e.get(_m)&&l.findIndex((t=>"group"===t.type&&t.ref===e.get(_m)))||0,n=l[t]||l[0];f(t),Um(n)}),[]),a((()=>{const e=l[g];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,g]);const b=i((e=>{const t=m.indexOf(e),n=l[t];f(t),Um(n),"group"===n.type&&(e=>{const t=new URLSearchParams(globalThis?.location?.search||"");e.name?t.set(_m,e.name):t.delete(_m),d.replace(`${d.pathname}?${t}`,{scroll:!1})})(e)}),[l,m]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Om({items:m,value:m[g],tabsMode:s,onChange:b})})})),Um=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},Hm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Wm={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Km=({tabsType:e="animated",...t})=>e?o("div",{className:Wm[e].wrapper,children:o($m,{className:Wm[e].component,tabsType:e,...t})}):null,Gm="tab",Ym=Ct((({className:e="",tabs:t=[],block:l,tabsType:r,showCounter:s=!1,...d})=>{const m=u(),h=s?t.map((e=>({...e,count:l?.slots?.[e?.text??""]?.length??0}))):t,[g,f]=n(Xm(h)),b=h.findIndex((e=>Boolean(e.selected)));a((()=>{const e=new URLSearchParams(globalThis?.location?.search),t=e.get(Gm)?h.findIndex(((t,l)=>"group"===t.type&&String(l)===e.get(Gm))):b;f(-1===t?0:t)}),[b]);const y=qm(h[g],g),v=i((e=>{const t=h.indexOf(e),l=h[t];f(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(globalThis?.location?.search||"");e.text?l.set(Gm,String(t)):l.delete(Gm),m.replace(`${m.pathname}?${l}`,{scroll:!1})})(e,t)}),[h]);return c(x,{className:p(e),defaultPadding:"p-0",...d,children:[Km({items:h,value:h[g],tabsType:r,onChange:v}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:z(l?.slots?.[y],{...d?.options,slotName:y,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>"group"===e.type)).map(qm)||[],childrenTypes:{exclude:["TabsLayout"]}}),qm=(e,t)=>e?.text||`Слот №${t}`,Xm=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),Jm={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Zm=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Jm[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Qm=d((({className:e="",isOpen:t,onClick:l})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),eh={Buttons:({buttons:e})=>qe(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,List:({isDotted:e,...t})=>o(tt,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ee,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ee,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(Qm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},th=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return lh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),lh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in eh))return null;return o(eh[l],{...t,...n})},nh=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(th,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),ah=(e,t)=>140*Ve(e.slice(0,t).map((e=>e?.cols?.length??1))),ih=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,rh=d((({rows:e})=>{return o(va,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=p("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${ah(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?ih(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),sh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ee,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(rh,{rows:t.rowsData})})})]},n)}))}))),oh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),ch=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ee,{size:"text-xl",font:"font-light",color:oh(t===l),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(Y,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function dh(e){const t=await fetch(e);return await t.json()}const mh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=cn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),dh);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(ch,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(sh,{activeTabIndex:r,items:m}),o(Qm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Qm,{onClick:l,isOpen:!0})]})})),hh=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(mh,{...t,onClick:l})}):null]}))),uh=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(hh,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Zm,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(nh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function ph({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Da,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Da,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const gh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,ph({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),xh=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=ga({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(uh,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(ti,{renderFoldableSection:({isUnfolded:e})=>c(gh,{controls:u,children:[f,o(li,{isUnfolded:e,children:b})]}),renderFoldButton:ei}):o(gh,{controls:u,children:g})})]})})),fh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?bh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?yh(l):null,a?o(Ae,{__html:a}):null]})]}))),bh=()=>o("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"}),yh=e=>o(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),vh=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:l})}):null]}))),Nh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(vh,{prefix:t,unit:l,suffix:n})})})),wh={AdTile:It,ApplicationForm:oa,BankAccountFiltration:vi,BenefitsBlock:Si,BonusBenefitsBlock:Bi,ButtonsBlock:Ri,CalculatorBonus:Hi,CalculatorBusinessDeposit:or,CalculatorCredit:br,CalculatorDeposit:Tr,CalculatorRefinancing:Vr,CardTransfer:$r,Carousel:qa,CarouselBankHistoryCard:Or,CarouselCard:Ur,CarouselCatalogCard:Wr,CarouselLinks:Xr,CarouselRecommendationCard:ls,CarouselTariffsCard:is,ComparisonTable:xs,DepositFiltration:ws,ErrorBlock:Ts,ExchangeRateTile:Qs,Footer:bo,GrantSupport:No,Header:Vo,Headline:B,HorizontalLayout:jo,ImgBlock:Eo,LinkDocs:Fo,MobileAppTile:Wo,MortgageFiltration:pc,OfficesAtmsMap:zd,Placeholder:Dd,ProductBlock:Tt,ProductGallery:Ad,RepresentativeOfficeInfo:jd,RichTextBlock:$d,RollupItem:no,SafeDepositRental:rm,StepsBlock:hm,StickyBottomMenu:Am,Tabs:Fm,TabsLayout:Ym,TariffsTable:xh,TextBlock:fh,UnitBlock:Nh,VerticalLayout:Ao},kh=me((()=>{a((()=>{Lt()}),[]);const e=Kt();dl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");jt({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Sh="cookie",Ch=d((({termLink:e,personalDataPolicyLink:t,recommendationLink:l})=>{const[n,{setTrue:r,setFalse:s}]=il();!function(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Sh)||r()}),[],3e3);const d=i((()=>{globalThis.localStorage?.setItem(Sh,"true"),s()}),[]);return n?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:c(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(Zr,{isRemote:!0,className:Th(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(Zr,{isRemote:!0,className:Th(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных». На сайте используются рекомендательные технологии согласно",o(Zr,{isRemote:!0,className:Th(l?.href),...l,children:"Правилам применения рекомендательных технологий."})]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(bm,{className:"bg-main-gray rounded-md",onClose:d})})]})}):null})),Th=e=>p("inline mx-2xs",e?"text-green-dark":""),Ih=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Nm({onCloseAll:e,onClose:t}),{close:n}=de(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return dl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Bh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:om(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return dl(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Mh="header",Rh="footer",Ph="sticky-footer",Vh={},zh=d((({className:e,data:t=Vh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=St(s,r);kh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(a?.header,{...m,slotName:Mh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),z(a?.footer,{...m,slotName:Rh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(a?.["sticky-footer"],{...m,slotName:Ph})}):null,o(Ih,{}),o(Bh,{}),o(Ch,{termLink:{href:"/pd-policy#cookie",target:"_blank"},recommendationLink:{href:"/recommendation",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(zh,{childrenTypes:[],slots:()=>[Mh,Rh,Ph]});e.Blocks=wh,e.ContentPage=zh,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.handlerDecorator=me,e.joinList=oi,e.packageVersion="0.15.340",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=F,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));