@redneckz/wildless-cms-uni-blocks 0.14.752 → 0.14.753

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 (559) hide show
  1. package/bundle/api/RetailAPI/getTraceId.d.ts +1 -0
  2. package/bundle/bundle.umd.js +116 -130
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
  5. package/bundle/components/RollupItem/RollupItem.d.ts +0 -4
  6. package/bundle/ui-kit/Button/Button.d.ts +7 -3
  7. package/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -0
  8. package/bundle/ui-kit/Button/SubmitButton.d.ts +5 -0
  9. package/bundle/ui-kit/ControlStateProps.d.ts +0 -1
  10. package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
  11. package/bundle/ui-kit/Foldable/Foldable.d.ts +2 -1
  12. package/bundle/ui-kit/Icon/IconProps.d.ts +12 -0
  13. package/bundle/ui-kit/Icon/ToggleIcon.d.ts +6 -0
  14. package/bundle/ui-kit/Input/InputPopup.d.ts +2 -1
  15. package/dist/api/RetailAPI/doRequest.js +5 -0
  16. package/dist/api/RetailAPI/doRequest.js.map +1 -1
  17. package/dist/api/RetailAPI/getGenderFromName.js +7 -5
  18. package/dist/api/RetailAPI/getGenderFromName.js.map +1 -1
  19. package/dist/api/RetailAPI/getTraceId.d.ts +1 -0
  20. package/dist/api/RetailAPI/getTraceId.js +9 -0
  21. package/dist/api/RetailAPI/getTraceId.js.map +1 -0
  22. package/dist/components/ApplicationForm/renderAgreementSubmit.js +2 -2
  23. package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  24. package/dist/components/ApplicationLeadForm/GroupedConsents.js +3 -2
  25. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  26. package/dist/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
  27. package/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  28. package/dist/components/CardTransfer/CardTransfer.js +2 -2
  29. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  30. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
  31. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  32. package/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -1
  33. package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  34. package/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
  35. package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  36. package/dist/components/Depository/DepositoryItem.js +2 -2
  37. package/dist/components/Depository/DepositoryItem.js.map +1 -1
  38. package/dist/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
  39. package/dist/components/OfficesAtmsMap/FiltrationForm.js +5 -6
  40. package/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
  41. package/dist/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
  42. package/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
  43. package/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -2
  44. package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  45. package/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  46. package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  47. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
  48. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  49. package/dist/components/RollupItem/RollupItem.d.ts +0 -4
  50. package/dist/components/RollupItem/RollupItem.js +4 -20
  51. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  52. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
  53. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  54. package/dist/components/TariffsTable/TariffsTable.js +1 -1
  55. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  56. package/dist/ui-kit/BaseFiltration/GridBlocks.js +2 -2
  57. package/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
  58. package/dist/ui-kit/Button/Button.d.ts +7 -3
  59. package/dist/ui-kit/Button/Button.js +15 -17
  60. package/dist/ui-kit/Button/Button.js.map +1 -1
  61. package/dist/ui-kit/Button/ButtonTitle.d.ts +5 -0
  62. package/dist/ui-kit/Button/ButtonTitle.js +7 -0
  63. package/dist/ui-kit/Button/ButtonTitle.js.map +1 -0
  64. package/dist/ui-kit/Button/SubmitButton.d.ts +5 -0
  65. package/dist/ui-kit/Button/SubmitButton.js +8 -0
  66. package/dist/ui-kit/Button/SubmitButton.js.map +1 -0
  67. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
  68. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  69. package/dist/ui-kit/ControlStateProps.d.ts +0 -1
  70. package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
  71. package/dist/ui-kit/Foldable/DefaultFoldButton.js +5 -12
  72. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  73. package/dist/ui-kit/Foldable/Foldable.d.ts +2 -1
  74. package/dist/ui-kit/Foldable/Foldable.js +1 -1
  75. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  76. package/dist/ui-kit/Icon/Icon.js +16 -11
  77. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  78. package/dist/ui-kit/Icon/IconProps.d.ts +12 -0
  79. package/dist/ui-kit/Icon/RoundedIcon.js +1 -1
  80. package/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
  81. package/dist/ui-kit/Icon/ToggleIcon.d.ts +6 -0
  82. package/dist/ui-kit/Icon/ToggleIcon.js +7 -0
  83. package/dist/ui-kit/Icon/ToggleIcon.js.map +1 -0
  84. package/dist/ui-kit/Input/InputPopup.d.ts +2 -1
  85. package/dist/ui-kit/Input/InputPopup.js +29 -1
  86. package/dist/ui-kit/Input/InputPopup.js.map +1 -1
  87. package/dist/ui-kit/Input/useInputPopup.js +4 -3
  88. package/dist/ui-kit/Input/useInputPopup.js.map +1 -1
  89. package/dist/ui-kit/Loader/Loader.js +1 -1
  90. package/dist/ui-kit/Loader/Loader.js.map +1 -1
  91. package/dist/ui-kit/Sitemap/Sitemap.mobile.js +14 -2
  92. package/dist/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
  93. package/lib/api/RetailAPI/doRequest.js +5 -0
  94. package/lib/api/RetailAPI/doRequest.js.map +1 -1
  95. package/lib/api/RetailAPI/getGenderFromName.js +7 -5
  96. package/lib/api/RetailAPI/getGenderFromName.js.map +1 -1
  97. package/lib/api/RetailAPI/getTraceId.d.ts +1 -0
  98. package/lib/api/RetailAPI/getTraceId.js +6 -0
  99. package/lib/api/RetailAPI/getTraceId.js.map +1 -0
  100. package/lib/common.css +1 -1
  101. package/lib/components/ApplicationForm/renderAgreementSubmit.js +2 -2
  102. package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  103. package/lib/components/ApplicationLeadForm/GroupedConsents.js +3 -2
  104. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  105. package/lib/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
  106. package/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  107. package/lib/components/CardTransfer/CardTransfer.js +2 -2
  108. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  109. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
  110. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  111. package/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -1
  112. package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  113. package/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
  114. package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  115. package/lib/components/Depository/DepositoryItem.js +2 -2
  116. package/lib/components/Depository/DepositoryItem.js.map +1 -1
  117. package/lib/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
  118. package/lib/components/OfficesAtmsMap/FiltrationForm.js +4 -4
  119. package/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
  120. package/lib/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
  121. package/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
  122. package/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -2
  123. package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  124. package/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  125. package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  126. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
  127. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  128. package/lib/components/RollupItem/RollupItem.d.ts +0 -4
  129. package/lib/components/RollupItem/RollupItem.js +4 -20
  130. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  131. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
  132. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  133. package/lib/components/TariffsTable/TariffsTable.js +2 -2
  134. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  135. package/lib/ui-kit/BaseFiltration/GridBlocks.js +2 -2
  136. package/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
  137. package/lib/ui-kit/Button/Button.d.ts +7 -3
  138. package/lib/ui-kit/Button/Button.js +16 -18
  139. package/lib/ui-kit/Button/Button.js.map +1 -1
  140. package/lib/ui-kit/Button/ButtonTitle.d.ts +5 -0
  141. package/lib/ui-kit/Button/ButtonTitle.js +5 -0
  142. package/lib/ui-kit/Button/ButtonTitle.js.map +1 -0
  143. package/lib/ui-kit/Button/SubmitButton.d.ts +5 -0
  144. package/lib/ui-kit/Button/SubmitButton.js +6 -0
  145. package/lib/ui-kit/Button/SubmitButton.js.map +1 -0
  146. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
  147. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  148. package/lib/ui-kit/ControlStateProps.d.ts +0 -1
  149. package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
  150. package/lib/ui-kit/Foldable/DefaultFoldButton.js +5 -11
  151. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  152. package/lib/ui-kit/Foldable/Foldable.d.ts +2 -1
  153. package/lib/ui-kit/Foldable/Foldable.js +1 -1
  154. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  155. package/lib/ui-kit/Icon/Icon.js +16 -11
  156. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  157. package/lib/ui-kit/Icon/IconProps.d.ts +12 -0
  158. package/lib/ui-kit/Icon/RoundedIcon.js +1 -1
  159. package/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
  160. package/lib/ui-kit/Icon/ToggleIcon.d.ts +6 -0
  161. package/lib/ui-kit/Icon/ToggleIcon.js +5 -0
  162. package/lib/ui-kit/Icon/ToggleIcon.js.map +1 -0
  163. package/lib/ui-kit/Input/InputPopup.d.ts +2 -1
  164. package/lib/ui-kit/Input/InputPopup.js +29 -1
  165. package/lib/ui-kit/Input/InputPopup.js.map +1 -1
  166. package/lib/ui-kit/Input/useInputPopup.js +4 -3
  167. package/lib/ui-kit/Input/useInputPopup.js.map +1 -1
  168. package/lib/ui-kit/Loader/Loader.js +1 -1
  169. package/lib/ui-kit/Loader/Loader.js.map +1 -1
  170. package/lib/ui-kit/Sitemap/Sitemap.mobile.js +15 -3
  171. package/lib/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
  172. package/mobile/bundle/api/RetailAPI/getTraceId.d.ts +1 -0
  173. package/mobile/bundle/bundle.umd.js +133 -142
  174. package/mobile/bundle/bundle.umd.min.js +1 -1
  175. package/mobile/bundle/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
  176. package/mobile/bundle/components/RollupItem/RollupItem.d.ts +0 -4
  177. package/mobile/bundle/ui-kit/Button/Button.d.ts +7 -3
  178. package/mobile/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -0
  179. package/mobile/bundle/ui-kit/Button/SubmitButton.d.ts +5 -0
  180. package/mobile/bundle/ui-kit/ControlStateProps.d.ts +0 -1
  181. package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
  182. package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +2 -1
  183. package/mobile/bundle/ui-kit/Icon/IconProps.d.ts +12 -0
  184. package/mobile/bundle/ui-kit/Icon/ToggleIcon.d.ts +6 -0
  185. package/mobile/bundle/ui-kit/Input/InputPopup.d.ts +2 -1
  186. package/mobile/dist/api/RetailAPI/doRequest.js +5 -0
  187. package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -1
  188. package/mobile/dist/api/RetailAPI/getGenderFromName.js +7 -5
  189. package/mobile/dist/api/RetailAPI/getGenderFromName.js.map +1 -1
  190. package/mobile/dist/api/RetailAPI/getTraceId.d.ts +1 -0
  191. package/mobile/dist/api/RetailAPI/getTraceId.js +9 -0
  192. package/mobile/dist/api/RetailAPI/getTraceId.js.map +1 -0
  193. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +2 -2
  194. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  195. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +3 -2
  196. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  197. package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
  198. package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  199. package/mobile/dist/components/CardTransfer/CardTransfer.js +2 -2
  200. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  201. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
  202. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  203. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -1
  204. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  205. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
  206. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  207. package/mobile/dist/components/Depository/DepositoryItem.js +2 -2
  208. package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
  209. package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
  210. package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js +5 -6
  211. package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
  212. package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
  213. package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
  214. package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -2
  215. package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  216. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  217. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  218. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
  219. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  220. package/mobile/dist/components/RollupItem/RollupItem.d.ts +0 -4
  221. package/mobile/dist/components/RollupItem/RollupItem.js +4 -20
  222. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  223. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
  224. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  225. package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
  226. package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  227. package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js +2 -2
  228. package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
  229. package/mobile/dist/ui-kit/Button/Button.d.ts +7 -3
  230. package/mobile/dist/ui-kit/Button/Button.js +15 -17
  231. package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
  232. package/mobile/dist/ui-kit/Button/ButtonTitle.d.ts +5 -0
  233. package/mobile/dist/ui-kit/Button/ButtonTitle.js +7 -0
  234. package/mobile/dist/ui-kit/Button/ButtonTitle.js.map +1 -0
  235. package/mobile/dist/ui-kit/Button/SubmitButton.d.ts +5 -0
  236. package/mobile/dist/ui-kit/Button/SubmitButton.js +8 -0
  237. package/mobile/dist/ui-kit/Button/SubmitButton.js.map +1 -0
  238. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
  239. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  240. package/mobile/dist/ui-kit/ControlStateProps.d.ts +0 -1
  241. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
  242. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +5 -12
  243. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  244. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +2 -1
  245. package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
  246. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  247. package/mobile/dist/ui-kit/Icon/Icon.js +16 -11
  248. package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
  249. package/mobile/dist/ui-kit/Icon/IconProps.d.ts +12 -0
  250. package/mobile/dist/ui-kit/Icon/RoundedIcon.js +1 -1
  251. package/mobile/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
  252. package/mobile/dist/ui-kit/Icon/ToggleIcon.d.ts +6 -0
  253. package/mobile/dist/ui-kit/Icon/ToggleIcon.js +7 -0
  254. package/mobile/dist/ui-kit/Icon/ToggleIcon.js.map +1 -0
  255. package/mobile/dist/ui-kit/Input/InputPopup.d.ts +2 -1
  256. package/mobile/dist/ui-kit/Input/InputPopup.js +29 -1
  257. package/mobile/dist/ui-kit/Input/InputPopup.js.map +1 -1
  258. package/mobile/dist/ui-kit/Input/useInputPopup.js +4 -3
  259. package/mobile/dist/ui-kit/Input/useInputPopup.js.map +1 -1
  260. package/mobile/dist/ui-kit/Loader/Loader.js +1 -1
  261. package/mobile/dist/ui-kit/Loader/Loader.js.map +1 -1
  262. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +14 -2
  263. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  264. package/mobile/lib/api/RetailAPI/doRequest.js +5 -0
  265. package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -1
  266. package/mobile/lib/api/RetailAPI/getGenderFromName.js +7 -5
  267. package/mobile/lib/api/RetailAPI/getGenderFromName.js.map +1 -1
  268. package/mobile/lib/api/RetailAPI/getTraceId.d.ts +1 -0
  269. package/mobile/lib/api/RetailAPI/getTraceId.js +6 -0
  270. package/mobile/lib/api/RetailAPI/getTraceId.js.map +1 -0
  271. package/mobile/lib/common.css +1 -1
  272. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +2 -2
  273. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  274. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +3 -2
  275. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  276. package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
  277. package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  278. package/mobile/lib/components/CardTransfer/CardTransfer.js +2 -2
  279. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  280. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
  281. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  282. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -1
  283. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  284. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
  285. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  286. package/mobile/lib/components/Depository/DepositoryItem.js +2 -2
  287. package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
  288. package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
  289. package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js +4 -4
  290. package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
  291. package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
  292. package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
  293. package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -2
  294. package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  295. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
  296. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  297. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
  298. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  299. package/mobile/lib/components/RollupItem/RollupItem.d.ts +0 -4
  300. package/mobile/lib/components/RollupItem/RollupItem.js +4 -20
  301. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  302. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
  303. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  304. package/mobile/lib/components/TariffsTable/TariffsTable.js +2 -2
  305. package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  306. package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js +2 -2
  307. package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
  308. package/mobile/lib/ui-kit/Button/Button.d.ts +7 -3
  309. package/mobile/lib/ui-kit/Button/Button.js +16 -18
  310. package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
  311. package/mobile/lib/ui-kit/Button/ButtonTitle.d.ts +5 -0
  312. package/mobile/lib/ui-kit/Button/ButtonTitle.js +5 -0
  313. package/mobile/lib/ui-kit/Button/ButtonTitle.js.map +1 -0
  314. package/mobile/lib/ui-kit/Button/SubmitButton.d.ts +5 -0
  315. package/mobile/lib/ui-kit/Button/SubmitButton.js +6 -0
  316. package/mobile/lib/ui-kit/Button/SubmitButton.js.map +1 -0
  317. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
  318. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  319. package/mobile/lib/ui-kit/ControlStateProps.d.ts +0 -1
  320. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
  321. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +5 -11
  322. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  323. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +2 -1
  324. package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
  325. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  326. package/mobile/lib/ui-kit/Icon/Icon.js +16 -11
  327. package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
  328. package/mobile/lib/ui-kit/Icon/IconProps.d.ts +12 -0
  329. package/mobile/lib/ui-kit/Icon/RoundedIcon.js +1 -1
  330. package/mobile/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
  331. package/mobile/lib/ui-kit/Icon/ToggleIcon.d.ts +6 -0
  332. package/mobile/lib/ui-kit/Icon/ToggleIcon.js +5 -0
  333. package/mobile/lib/ui-kit/Icon/ToggleIcon.js.map +1 -0
  334. package/mobile/lib/ui-kit/Input/InputPopup.d.ts +2 -1
  335. package/mobile/lib/ui-kit/Input/InputPopup.js +29 -1
  336. package/mobile/lib/ui-kit/Input/InputPopup.js.map +1 -1
  337. package/mobile/lib/ui-kit/Input/useInputPopup.js +4 -3
  338. package/mobile/lib/ui-kit/Input/useInputPopup.js.map +1 -1
  339. package/mobile/lib/ui-kit/Loader/Loader.js +1 -1
  340. package/mobile/lib/ui-kit/Loader/Loader.js.map +1 -1
  341. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +15 -3
  342. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  343. package/mobile/src/api/RetailAPI/doRequest.ts +6 -0
  344. package/mobile/src/api/RetailAPI/getGenderFromName.ts +7 -10
  345. package/mobile/src/api/RetailAPI/getTraceId.ts +6 -0
  346. package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +5 -2
  347. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
  348. package/mobile/src/components/ApplicationLeadForm/renderSubmitButton.tsx +3 -4
  349. package/mobile/src/components/CardTransfer/CardTransfer.tsx +3 -3
  350. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +19 -27
  351. package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +3 -2
  352. package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
  353. package/mobile/src/components/Depository/DepositoryItem.tsx +2 -2
  354. package/mobile/src/components/OfficesAtmsMap/FiltrationForm.tsx +17 -29
  355. package/mobile/src/components/OfficesAtmsMap/FoldableCardContent.tsx +14 -5
  356. package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +5 -6
  357. package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +0 -1
  358. package/mobile/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +0 -1
  359. package/mobile/src/components/RollupItem/RollupItem.tsx +14 -61
  360. package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +2 -2
  361. package/mobile/src/components/TariffsTable/TariffsTable.tsx +2 -2
  362. package/mobile/src/ui-kit/BaseFiltration/GridBlocks.tsx +5 -5
  363. package/mobile/src/ui-kit/Button/Button.tsx +60 -44
  364. package/mobile/src/ui-kit/Button/ButtonTitle.tsx +17 -0
  365. package/mobile/src/ui-kit/Button/SubmitButton.tsx +14 -0
  366. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -8
  367. package/mobile/src/ui-kit/ControlStateProps.ts +0 -1
  368. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +16 -51
  369. package/mobile/src/ui-kit/Foldable/Foldable.tsx +4 -3
  370. package/mobile/src/ui-kit/Icon/Icon.tsx +21 -15
  371. package/mobile/src/ui-kit/Icon/IconProps.ts +13 -0
  372. package/mobile/src/ui-kit/Icon/RoundedIcon.tsx +1 -1
  373. package/mobile/src/ui-kit/Icon/ToggleIcon.tsx +11 -0
  374. package/mobile/src/ui-kit/Input/InputPopup.tsx +52 -18
  375. package/mobile/src/ui-kit/Input/useInputPopup.tsx +11 -3
  376. package/mobile/src/ui-kit/Loader/Loader.tsx +1 -1
  377. package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +40 -8
  378. package/package.json +1 -1
  379. package/src/api/RetailAPI/doRequest.ts +6 -0
  380. package/src/api/RetailAPI/getGenderFromName.ts +7 -10
  381. package/src/api/RetailAPI/getTraceId.ts +6 -0
  382. package/src/components/ApplicationForm/renderAgreementSubmit.tsx +5 -2
  383. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
  384. package/src/components/ApplicationLeadForm/renderSubmitButton.tsx +3 -4
  385. package/src/components/CardTransfer/CardTransfer.tsx +3 -3
  386. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +19 -27
  387. package/src/components/CreditCardForm/StepsNavigationButtons.tsx +3 -2
  388. package/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
  389. package/src/components/Depository/DepositoryItem.tsx +2 -2
  390. package/src/components/OfficesAtmsMap/FiltrationForm.tsx +17 -29
  391. package/src/components/OfficesAtmsMap/FoldableCardContent.tsx +14 -5
  392. package/src/components/OfficesAtmsMap/renderAtmCard.tsx +5 -6
  393. package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +0 -1
  394. package/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +0 -1
  395. package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +1 -12
  396. package/src/components/RollupItem/RollupItem.tsx +14 -61
  397. package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +2 -2
  398. package/src/components/TariffsTable/TariffsTable.tsx +2 -2
  399. package/src/ui-kit/BaseFiltration/GridBlocks.tsx +5 -5
  400. package/src/ui-kit/Button/Button.fixture.tsx +0 -8
  401. package/src/ui-kit/Button/Button.tsx +60 -44
  402. package/src/ui-kit/Button/ButtonTitle.tsx +17 -0
  403. package/src/ui-kit/Button/SubmitButton.tsx +14 -0
  404. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -8
  405. package/src/ui-kit/ControlStateProps.ts +0 -1
  406. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +16 -51
  407. package/src/ui-kit/Foldable/Foldable.tsx +4 -3
  408. package/src/ui-kit/Icon/Icon.tsx +21 -15
  409. package/src/ui-kit/Icon/IconProps.ts +13 -0
  410. package/src/ui-kit/Icon/RoundedIcon.tsx +1 -1
  411. package/src/ui-kit/Icon/ToggleIcon.tsx +11 -0
  412. package/src/ui-kit/Input/InputPopup.tsx +52 -18
  413. package/src/ui-kit/Input/useInputPopup.tsx +11 -3
  414. package/src/ui-kit/Loader/Loader.tsx +1 -1
  415. package/src/ui-kit/Sitemap/Sitemap.mobile.tsx +40 -8
  416. package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
  417. package/bundle/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
  418. package/bundle/components/RollupItem/AccordionFoldButton.d.ts +0 -12
  419. package/bundle/components/RollupItem/getIconName.d.ts +0 -1
  420. package/bundle/components/RollupItem/renderRoundedIcon.d.ts +0 -3
  421. package/bundle/components/RollupItem/renderRoundedIcon.mobile.d.ts +0 -3
  422. package/bundle/components/RollupItem/rollupIconVersion.mobile.d.ts +0 -1
  423. package/bundle/ui-kit/Button/IconButton.d.ts +0 -10
  424. package/bundle/ui-kit/Button/useButton.d.ts +0 -2
  425. package/bundle/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
  426. package/dist/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
  427. package/dist/components/ApplicationForm/renderSubmitButton.js +0 -8
  428. package/dist/components/ApplicationForm/renderSubmitButton.js.map +0 -1
  429. package/dist/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
  430. package/dist/components/OfficesAtmsMap/renderFoldButton.js +0 -7
  431. package/dist/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
  432. package/dist/components/RollupItem/AccordionFoldButton.d.ts +0 -12
  433. package/dist/components/RollupItem/AccordionFoldButton.js +0 -11
  434. package/dist/components/RollupItem/AccordionFoldButton.js.map +0 -1
  435. package/dist/components/RollupItem/getIconName.d.ts +0 -1
  436. package/dist/components/RollupItem/getIconName.js +0 -7
  437. package/dist/components/RollupItem/getIconName.js.map +0 -1
  438. package/dist/components/RollupItem/renderRoundedIcon.d.ts +0 -3
  439. package/dist/components/RollupItem/renderRoundedIcon.js +0 -6
  440. package/dist/components/RollupItem/renderRoundedIcon.js.map +0 -1
  441. package/dist/components/RollupItem/renderRoundedIcon.mobile.d.ts +0 -3
  442. package/dist/components/RollupItem/renderRoundedIcon.mobile.js +0 -7
  443. package/dist/components/RollupItem/renderRoundedIcon.mobile.js.map +0 -1
  444. package/dist/components/RollupItem/rollupIconVersion.mobile.d.ts +0 -1
  445. package/dist/components/RollupItem/rollupIconVersion.mobile.js +0 -4
  446. package/dist/components/RollupItem/rollupIconVersion.mobile.js.map +0 -1
  447. package/dist/ui-kit/Button/IconButton.d.ts +0 -10
  448. package/dist/ui-kit/Button/IconButton.js +0 -13
  449. package/dist/ui-kit/Button/IconButton.js.map +0 -1
  450. package/dist/ui-kit/Button/useButton.d.ts +0 -2
  451. package/dist/ui-kit/Button/useButton.js +0 -16
  452. package/dist/ui-kit/Button/useButton.js.map +0 -1
  453. package/dist/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
  454. package/dist/ui-kit/TextWithIcon/TextWithIcon.js +0 -10
  455. package/dist/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
  456. package/lib/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
  457. package/lib/components/ApplicationForm/renderSubmitButton.js +0 -5
  458. package/lib/components/ApplicationForm/renderSubmitButton.js.map +0 -1
  459. package/lib/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
  460. package/lib/components/OfficesAtmsMap/renderFoldButton.js +0 -4
  461. package/lib/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
  462. package/lib/components/RollupItem/AccordionFoldButton.d.ts +0 -12
  463. package/lib/components/RollupItem/AccordionFoldButton.js +0 -9
  464. package/lib/components/RollupItem/AccordionFoldButton.js.map +0 -1
  465. package/lib/components/RollupItem/getIconName.d.ts +0 -1
  466. package/lib/components/RollupItem/getIconName.js +0 -4
  467. package/lib/components/RollupItem/getIconName.js.map +0 -1
  468. package/lib/components/RollupItem/renderRoundedIcon.d.ts +0 -3
  469. package/lib/components/RollupItem/renderRoundedIcon.js +0 -3
  470. package/lib/components/RollupItem/renderRoundedIcon.js.map +0 -1
  471. package/lib/components/RollupItem/renderRoundedIcon.mobile.d.ts +0 -3
  472. package/lib/components/RollupItem/renderRoundedIcon.mobile.js +0 -4
  473. package/lib/components/RollupItem/renderRoundedIcon.mobile.js.map +0 -1
  474. package/lib/components/RollupItem/rollupIconVersion.mobile.d.ts +0 -1
  475. package/lib/components/RollupItem/rollupIconVersion.mobile.js +0 -2
  476. package/lib/components/RollupItem/rollupIconVersion.mobile.js.map +0 -1
  477. package/lib/ui-kit/Button/IconButton.d.ts +0 -10
  478. package/lib/ui-kit/Button/IconButton.js +0 -11
  479. package/lib/ui-kit/Button/IconButton.js.map +0 -1
  480. package/lib/ui-kit/Button/useButton.d.ts +0 -2
  481. package/lib/ui-kit/Button/useButton.js +0 -13
  482. package/lib/ui-kit/Button/useButton.js.map +0 -1
  483. package/lib/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
  484. package/lib/ui-kit/TextWithIcon/TextWithIcon.js +0 -8
  485. package/lib/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
  486. package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
  487. package/mobile/bundle/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
  488. package/mobile/bundle/components/RollupItem/AccordionFoldButton.d.ts +0 -12
  489. package/mobile/bundle/components/RollupItem/getIconName.d.ts +0 -1
  490. package/mobile/bundle/components/RollupItem/renderRoundedIcon.d.ts +0 -3
  491. package/mobile/bundle/ui-kit/Button/IconButton.d.ts +0 -10
  492. package/mobile/bundle/ui-kit/Button/useButton.d.ts +0 -2
  493. package/mobile/bundle/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
  494. package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
  495. package/mobile/dist/components/ApplicationForm/renderSubmitButton.js +0 -8
  496. package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +0 -1
  497. package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
  498. package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js +0 -7
  499. package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
  500. package/mobile/dist/components/RollupItem/AccordionFoldButton.d.ts +0 -12
  501. package/mobile/dist/components/RollupItem/AccordionFoldButton.js +0 -11
  502. package/mobile/dist/components/RollupItem/AccordionFoldButton.js.map +0 -1
  503. package/mobile/dist/components/RollupItem/getIconName.d.ts +0 -1
  504. package/mobile/dist/components/RollupItem/getIconName.js +0 -7
  505. package/mobile/dist/components/RollupItem/getIconName.js.map +0 -1
  506. package/mobile/dist/components/RollupItem/renderRoundedIcon.d.ts +0 -3
  507. package/mobile/dist/components/RollupItem/renderRoundedIcon.js +0 -7
  508. package/mobile/dist/components/RollupItem/renderRoundedIcon.js.map +0 -1
  509. package/mobile/dist/ui-kit/Button/IconButton.d.ts +0 -10
  510. package/mobile/dist/ui-kit/Button/IconButton.js +0 -13
  511. package/mobile/dist/ui-kit/Button/IconButton.js.map +0 -1
  512. package/mobile/dist/ui-kit/Button/useButton.d.ts +0 -2
  513. package/mobile/dist/ui-kit/Button/useButton.js +0 -16
  514. package/mobile/dist/ui-kit/Button/useButton.js.map +0 -1
  515. package/mobile/dist/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
  516. package/mobile/dist/ui-kit/TextWithIcon/TextWithIcon.js +0 -10
  517. package/mobile/dist/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
  518. package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
  519. package/mobile/lib/components/ApplicationForm/renderSubmitButton.js +0 -5
  520. package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +0 -1
  521. package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
  522. package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js +0 -4
  523. package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
  524. package/mobile/lib/components/RollupItem/AccordionFoldButton.d.ts +0 -12
  525. package/mobile/lib/components/RollupItem/AccordionFoldButton.js +0 -9
  526. package/mobile/lib/components/RollupItem/AccordionFoldButton.js.map +0 -1
  527. package/mobile/lib/components/RollupItem/getIconName.d.ts +0 -1
  528. package/mobile/lib/components/RollupItem/getIconName.js +0 -4
  529. package/mobile/lib/components/RollupItem/getIconName.js.map +0 -1
  530. package/mobile/lib/components/RollupItem/renderRoundedIcon.d.ts +0 -3
  531. package/mobile/lib/components/RollupItem/renderRoundedIcon.js +0 -4
  532. package/mobile/lib/components/RollupItem/renderRoundedIcon.js.map +0 -1
  533. package/mobile/lib/ui-kit/Button/IconButton.d.ts +0 -10
  534. package/mobile/lib/ui-kit/Button/IconButton.js +0 -11
  535. package/mobile/lib/ui-kit/Button/IconButton.js.map +0 -1
  536. package/mobile/lib/ui-kit/Button/useButton.d.ts +0 -2
  537. package/mobile/lib/ui-kit/Button/useButton.js +0 -13
  538. package/mobile/lib/ui-kit/Button/useButton.js.map +0 -1
  539. package/mobile/lib/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
  540. package/mobile/lib/ui-kit/TextWithIcon/TextWithIcon.js +0 -8
  541. package/mobile/lib/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
  542. package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +0 -9
  543. package/mobile/src/components/OfficesAtmsMap/renderFoldButton.tsx +0 -12
  544. package/mobile/src/components/RollupItem/AccordionFoldButton.tsx +0 -41
  545. package/mobile/src/components/RollupItem/getIconName.tsx +0 -6
  546. package/mobile/src/components/RollupItem/renderRoundedIcon.tsx +0 -7
  547. package/mobile/src/ui-kit/Button/IconButton.tsx +0 -36
  548. package/mobile/src/ui-kit/Button/useButton.ts +0 -16
  549. package/mobile/src/ui-kit/TextWithIcon/TextWithIcon.tsx +0 -37
  550. package/src/components/ApplicationForm/renderSubmitButton.tsx +0 -9
  551. package/src/components/OfficesAtmsMap/renderFoldButton.tsx +0 -12
  552. package/src/components/RollupItem/AccordionFoldButton.tsx +0 -41
  553. package/src/components/RollupItem/getIconName.tsx +0 -6
  554. package/src/components/RollupItem/renderRoundedIcon.mobile.tsx +0 -7
  555. package/src/components/RollupItem/renderRoundedIcon.tsx +0 -5
  556. package/src/components/RollupItem/rollupIconVersion.mobile.tsx +0 -1
  557. package/src/ui-kit/Button/IconButton.tsx +0 -36
  558. package/src/ui-kit/Button/useButton.ts +0 -16
  559. package/src/ui-kit/TextWithIcon/TextWithIcon.tsx +0 -37
@@ -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).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),i=n("useEffect"),l=n("useCallback"),r=n("useMemo"),s=n("useRef"),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,n){const{children:a,...i}=t||{},l=n?.slots?.default,r=a||l&&l();return e(Object.assign(i,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={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","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:i,block:l,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],i||a,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={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"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:i,align:l="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=k,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},i)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function _(){return _._impl()}_._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),_.setup=e=>{_._impl=e};const A=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return A.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),E=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),F=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:E,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:V,hasPrefix:F});const $="/api/",j=`${$}v1/storage`,U=e=>(t,n)=>{if([!t,E(t),O(t),[D.CDN,$].some((e=>F(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`${j}/${t}/attachment`;const a=t?.startsWith("/");return V(F(t,n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:i=a,iconVersion:l="color",width:r,height:s})=>{const d=_(),m="normal"===l?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(V(D.CDN,"/icons/",m));return"normal"===l?o("img",{className:e,src:h,alt:a,title:i,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(G,{className:e,children:c("svg",{className:u(Y(r),q[l],{invert:"white"===l},t),width:r,height:s,"aria-hidden":"true",children:[i?o("title",{children:i}):null,a?o("desc",{children:a}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),K=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(K.SITE_URL);return t&&!E(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const a=_();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:i},l)=>o("source",{srcSet:J(a)(e),type:te(n),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${l}_${e}`))):null,t?.src?ee({...t,src:J(a)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("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}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...a})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):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",le={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},re="text-center font-sans select-none",se={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","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);function de(e,t){const n=s({});return r((()=>new Proxy({},{get:(a,i)=>(n.current||={},n.current[i]||=n=>e.fire(t,{...n??{},type:i}),n.current[i])})),[e,t])}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class me{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const ue=new me,he=()=>de(ue.emitter,"dialog");function pe(){const e=X(K.SITE_URL),t=_(),{closeAll:n}=he();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(a({...e,href:n}))}};function a({href:a,target:i,onClick:l}){return r=>{l?.(r),ge(a,i,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}const ge=(e,t,n)=>{if(!M(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},xe=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:i,version:l="primary"}=e,r=ye(e)&&"hidden lg:block";return c("div",{className:u(be(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,ye(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,i?o("div",{className:u(r,se[l]),children:i}):null]})})),be=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const i=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",ye(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},ye=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ve=({className:e,rounded:t,version:n})=>["inline-block",re,n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ne=d((({disabled:e,children:t,method:n="LINK",href:a,...i})=>{const r=(({method:e,href:t})=>l((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:i,searchParams:l}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,i].join(""));for(const[e,t]of l.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:a}),s=pe()({onClick:r,href:a,...i}),c=t??o(xe,{...s});return o(e?Ce:we,{...s,children:c})})),we=d((({className:e="",href:t,rel:n,target:a,ariaLabel:i,version:l,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:l,rounded:r}),href:t,rel:n,target:a,"aria-label":i||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...fe(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:a,children:i})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ve({className:e,rounded:a,version:n}),children:i})));function Se({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const i="primary"===e?"white":"black",l="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),l),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:i}})}),o(Ne,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=a(false);return i((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=_(),N=l((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Se({version:t,handleClick:N,text:w}),i?o("div",{className:"relative h-full",children:i}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Pe(P({...b,extraProps:{className:"@container-normal"}})),Te(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Be(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Be=e=>u(e?"row-span-2":"@xl:row-span-2"),Pe=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,_e=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("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((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:a=!0,children:i})=>e||i?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",a?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:i})}):null)),De=(e,t)=>e?o(w,{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:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:De(e.description,t)},String(t)):null,"__html"in e?o(Ae,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?_e(n.icon,t):null,o("div",{children:Oe(n)})]}))),Ve=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Fe=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Oe)}):null)),Le=d((({isTabularBenefits:e,...t})=>o(e?Fe:Ve,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Ue(n))}):null,Ue=(e="")=>(t,n)=>{const{text:a,icon:i,iconRight:l,version:r,...s}=t||{},c=qe(i,r),d=qe(l,r);return a||i?.icon?o(Ne,{className:u("basis-full @lg:basis-auto",e),appendLeft:We({...i,iconVersion:c}),appendRight:We({...l,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},qe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=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(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>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:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(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)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:k,children:I,...T})=>{const R=y?.src?o(ne,{image:y}):null,B=o(S,{title:a,description:i,headlineVersion:l,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Re,{className:e,padding:t,defaultPadding:n,...g?{title:B}:{insetTitle:B},...Qe(R,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Le,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(Ae,{richVersion:p,__html:h,isDotted:m,itemSize:Je[l]}):null,I,f?.length?o(Ye,{priceList:f}):null,et(x)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?o(Ke,{tags:e}):null;class tt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof tt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const nt=()=>!0,at=(e,t)=>(...n)=>e(...n)&&t(...n),it=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const lt=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&"object"==typeof e&&!lt(e)),st=e=>e;function ot(e){return e instanceof tt?e._:e}class ct extends tt{from(e){return this.of(e.map(((e=st)=>([,t])=>e(t))(ot)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(lt(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,a)=>a===e?t:this._[a])):Array.from({length:Number(e)+1},((n,a)=>a===e?t:void 0)))}}class dt extends tt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class mt extends tt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ot(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ut extends tt{proto=it([e=>lt(this._)||"number"==typeof e,()=>ct.prototype],[e=>rt(this._)||"string"==typeof e,()=>mt.prototype],[nt,()=>dt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ht=e=>e instanceof tt?e:new ut(e),pt=e=>{const t=(t,...n)=>ot(e(ht(t),...n));return t.fn=e,t},gt=[],ft=e=>e instanceof Function?e:t=>e===t,xt=e=>(t,n,a=gt)=>ht(t).entries().reduce(((t,[n,i])=>xt(e)(i,t,a.concat(n))),e(n,[a,ht(t)])),bt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?bt(e.get(a),[i,n]):n)})),yt=pt(((e,t)=>t.reduce(bt.fn,e))),vt=e=>xt(((e,[t,n])=>Nt(n)?[...e,[t,ot(n)]]:e))(e,[]),Nt=e=>0===e.size();pt(((e,t=gt)=>t.reduce(((e,t)=>e.get(t)),e)));const wt=pt(((e,[t,...n])=>n.length?e.set(t,wt(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(St=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-St.length]))).reduceRight(at,nt);var St;const kt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(It,e),It=it([lt,(e,t)=>e[parseInt(t,10)]],[rt,(e,t)=>e[t]],[nt,st]),Tt=(e,t)=>((e,t={})=>n=>yt(t,vt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(a=e,a.slice(0,-1)),kt(t(n),n)]:[e,n];var a}))(e),Rt=e=>vt(e).filter(((e=st)=>([t])=>e(t))(Ct)),Bt=e=>{return t=Rt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Pt(e,t){try{return e?await _t(e,t):null}catch(e){console.error(e)}return null}const _t=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),At=e=>[...new Set(e)],Dt={},Et=["/portal-resources"],Mt=(e,t)=>Tt(e,(e=>t?.[e])),Ot=(e,t)=>{const n=Bt(e),[l,r]=a({});return i((()=>{zt(n).then(r)}),[n.join()]),n.length?Mt(e,{...t,...l}):e},zt=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(At(e).filter((e=>!Et.some((t=>e.startsWith(t))))).map((async e=>[e,Dt[e]||=await _t(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},i=Object.entries(n).flatMap((([,e])=>Bt(e)));return i.length?zt(i,a):a}return t};function Vt(e,t={}){const n=d((t=>{const n=Ot((({block:e,options:t,className:n,defaultPadding:a,padding:i,isTheme:l,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Ft=Vt((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Ft,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},Ut=e=>e?.replace(/[^+\d]/g,""),qt="/api/v1";const Wt=e=>e?{phone:Ut(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ut(e)}:{},Xt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:i}of e??[])t[a??""]?.(n,i)};function Jt(){return Jt._impl()}Jt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Jt.setup=e=>{Jt._impl=e};const Zt="rshb-query-params";function Qt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Zt)||"";return e&&globalThis.sessionStorage?.setItem(Zt,e),e}const en=e=>{const t=e.target?.closest("a"),n=Jt();if(E(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!E(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}function nn(e=!1){const[t,n]=a(e),i=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,setFalse:r,toggle:s}]}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const an=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],ln=e=>!e?.length,rn=e=>t=>n=>e(n)?[]:[t],sn={},on=[];const cn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function dn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,u]=function(e,t,n){const[r,s]=a(e),o=l((e=>s((a=>{const i=e instanceof Function?e(a):e,l=t?t(i):i,r=cn(i,l)?i:l;return!cn(a,r)&&n?.(r),r}))),[t,n]);return i((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=nn(!1),f=s({}),[x,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??sn),[t,e]),a=r((()=>an(n)(e)??on),[n,e]),i=ln(a);return[n,{isValid:i,errors:a}]}(m,n),v=l(((e,t={})=>{const{parse:n,format:a,onChange:i}=t,l=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(l):[];return{value:a?a(l):l,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;i?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=l((e=>{f.current=e,u(e)}),[u]),w=l((()=>{f.current={},g(),u(e)}),[e,u]),C=l((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:C}]}const mn=d((e=>{const{className:t,title:n,children:a,...i}=e;return o(g,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function un(e,t={}){const{open:n,close:a,...i}=he();return{open:l(((i,l={})=>n({dialog:o(e,{...t,...i,onClose:()=>{a(),i.onClose?.()}}),...l})),[e,n,a]),close:a,...i}}function hn(e,t,n,a){i((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function pn(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return hn(globalThis.document,"click",n),t}const gn=({label:e,errors:t})=>e&&t?`${e}*`:e,fn=()=>{},xn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",bn=e=>e?xn:"border-error",yn=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,vn=d((({key:e,className:t="",id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),S=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);i((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=bn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[yn(d),N?o("textarea",{className:u("block resize-y min-h-24",Nn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Nn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Nn="w-full border rounded-md text-primary-text outline-none p-m",wn=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Cn=e=>e?.value||"",Sn={url:"suggest/address"},kn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},addressRegistration:Sn,addressFact:Sn,organizationAddress:Sn,addressCourier:Sn},In=()=>de(ue.emitter,"popup"),Tn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function Rn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=In(),x=kn[n],b=l((()=>{h.current=t,f.close()}),[t]),y=l((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:a,requestData:i={},responseItemHandler:l=Cn}=e,r=(s=l,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`${qt}/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...i,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const a=(...i)=>{a.dispose(),n=setTimeout((()=>{e(...i)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return i((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:i,width:l,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Tn,{options:p,value:t,onChange:y}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,y]),v}const Bn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=fn,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:b=!1,maxLength:y,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=l((e=>{v&&!w&&S(),y?e.length<=y&&d(e):d(e)}),[v,w,d]);i((()=>{b&&n&&d(Pn(n))}),[n]);const T=Rn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(vn,{disabled:N,type:g||"text","aria-label":t,label:gn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:_n(a,s,t)})}),wn(r)]})})),Pn=(e="")=>e.replace(/[^\d]+/g,""),_n=(e,t,n)=>t&&!n?`${e}*`:e,An=e=>e?.text||e?.key||"",Dn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,En=d((({popupRef:e,options:t,value:n,query:a,onChange:i,iconVersion:l})=>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:Dn(t,a).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===n?.key,onClick:t=>{t.stopPropagation(),i&&i(e)},children:[o("span",{className:"min-h-6",children:An(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Mn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=nn(),[N,w]=a(""),C=Vn(x,n.length),S=b&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=In(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=pn(u);return i((()=>{if(!e||!p.current)return;const i=p.current,{top:l,left:r,width:s,height:c}=i.getBoundingClientRect();m.open({popup:o(En,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),top:l+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[yn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:An(r)||h}),On(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(vn,{type:"text",autoFocus:!0,value:N,onChange:w,disabled:C})}):null]})]})})),On=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Vn=(e,t)=>e||0===t,Fn=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(Mn,{...i,valid:!n,label:gn({label:t,errors:a})}),wn(n)]}))),Ln=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],$n=d((({field:e,input:t})=>o(Fn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ln,...e(t?.name??"")}))),jn=(e="")=>Boolean("trade"===e||"all"===e),Un=e=>null!=e,qn=new Map,Wn=(e,t=qn)=>n=>{const a=Yn(n),i=t.get(a);if(a&&Un(i))return i;const l=e(...n);return a&&Un(l)&&t.set(a,Promise.resolve(l)),l},Hn=e=>Boolean(e?.every((e=>Array.isArray(e)?Hn(e):!e||"string"==typeof e))),Yn=e=>Hn(e)?e.toString():"",Gn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Kn(e,t,{fallback:n,cache:l}={}){const s=r((()=>Xn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(Un))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Wn(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&Gn(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Xn(e){return Array.isArray(e)?e:e instanceof Function?Xn(e()):[e]}const Jn=`${qt}/branches`,Zn=[];const Qn=async e=>await Pt(e,{method:"GET"})||Zn;function ea(e=!1){const{data:t}=Kn(`${qt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,_t);return Array.isArray(t)?t:[]}const ta=(e="")=>"ULTRASERVICE"===e,na=d((({field:e,input:t,params:n})=>{const a=ta(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?ea(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Kn(e?`${Jn}?regionCode=${e}`:null,Qn);return t||Zn}(r)?.filter((e=>e?.address));return i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Fn,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),aa=(e,{normalize:t,format:n})=>{const{value:i,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=l((e=>{d(!0),r&&r(e)}),[]),u=l((()=>{d(!1),o&&o(t(i)),s&&s()}),[o,i]);return{value:c||!n?i:n(i),onFocus:m,onBlur:u}},ia=(e,t,n)=>Math.max(t,Math.min(e,n));function la(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ra({list:e=[],min:t,max:n,step:a,value:i=e[0]||t,disabled:l,onChange:r}){const s=e.length?e.indexOf(i):i,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-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:u("w-2 h-2 rounded-full",s<=t||l?"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:n,step:a,value:s,disabled:l,onChange:t=>{const n=la(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const sa=1,oa=100,ca=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:sa),max:s=(i.length?i.length-1:oa),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=aa(e,{normalize:(e=0)=>i.length?da(i)(e):ia(e,r,s),format:He()}),f=l((e=>{p&&p(la(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",xn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),ra({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ma(a)]})})),da=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ma=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))))}),ua=["От 1 000 ₽","До 1 000 000 000 ₽"],ha=d((({field:e,input:t})=>o(ca,{title:"Сумма, ₽",items:ua,min:1e3,max:1e9,...e(t?.name??"")}))),pa=d((({field:e,input:t})=>o(Bn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ga=d((({field:e,input:t})=>o(Bn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),fa=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:i,min:l,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(i,a,d),n=xa(t,e),c=ba(t,l,r);u.push(o("td",{children:o("div",{className:ya(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},xa=(e,t)=>t&&e.toDateString()===t.toDateString(),ba=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),ya=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),va=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Na=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:s=fn,setValue:d=fn})=>{const m=l((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:va.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:fa({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),wa=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ca(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Sa),l=a.map(((e,t)=>Ia(e)?a.slice(0,t).filter(Ia).length:-1)),r=a.map(((e,t)=>ka(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const Sa=e=>"_"===e,ka=e=>/\d/.test(e),Ia=e=>Sa(e)||ka(e),Ta=1940,Ra={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Ba=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(l||"");return i((()=>{g(l||"")}),[l]),i((()=>{_a({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Ca(t,"__.__.____"))},onBlur:()=>{Pa(p)?_a({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Ra})]})})),Pa=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Ta&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let i=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),i++;return Number(t)>0&&Number(t)<=i}return!1},_a=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(Pa(e)){const{day:i,month:l,year:r}=(e=>{const[t,n,a]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(a)}})(e);t(l),n(r),a?.(new Date(r,l,i))}},Aa=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Ba,{onChange:a,disabled:r,onClick:e,value:t&&jt(t),setSelectedMonth:i,setSelectedYear:l,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Da=wa.map((e=>({key:e}))),Ea=Array.from({length:(new Date).getFullYear()-Ta+1},((e,t)=>Ta+t)).reverse().map((e=>({key:String(e)}))),Ma=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Oa=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},za={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Va={className:"min-w-32",iconVersion:"black",isBorder:!1},Fa=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=nn(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:i,selectedYear:r,onChange:s,value:o})=>{const c=pn(l((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:l((()=>e(!t)),[t]),handleNextMonth:l((()=>{n+1<=11?a(n+1):(a(0),i(r+1))}),[n]),handlePrevMonth:l((()=>{n-1>=0?a(n-1):(a(11),i(r-1))}),[n]),handleSelectMonth:l((({key:e})=>{a(wa.indexOf(e));const t=Ma(r,wa.indexOf(e));Oa({maxDateOfMonth:t,selectedYear:r,selectedMonth:wa.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:l((({key:e})=>{i(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Da,yearsOptions:Ea,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),R=((e,t)=>{const[n,l]=a(!1);return i((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();l(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[yn(t),c("div",{className:"relative",children:[Aa({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":R}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...za,className:"-rotate-90 cursor-pointer"})}),o(Mn,{onChange:w,value:{key:wa[f]},options:S,...Va}),o(Mn,{onChange:C,value:{key:String(b)},options:k,...Va}),o("div",{className:"my-auto",onClick:N,children:o(W,{...za,className:"rotate-90 cursor-pointer"})})]}),o(Na,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),La=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Fa,{label:gn({label:t,errors:a}),valid:Boolean(!n),...i}),wn(n)]}))),$a=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??"")}))),ja=d((({field:e,input:t})=>o(Bn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),Ua=d((({field:e,input:t})=>o(Bn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),qa=d((({className:e,viewBox:t,fill:n="none",width:a,height:i,paths:l,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:i,children:l.map((({d:e,fill:t,...n},a)=>{const i={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:i.stroke,strokeLinecap:i.strokeLinecap,strokeLinejoin:i.strokeLinejoin,strokeWidth:i.strokeWidth,strokeMiterlimit:i.strokeMiterlimit},a)}))}))),Wa="appearance-none w-5 h-5 border-solid flex-none",Ha=[{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"}],Ya=d((({className:e,value:t,text:n,disabled:a,isRadio:i,onChange:r})=>{const s=l((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=i?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(qa,{paths:Ha,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:u("flex items-center relative group/box",Ka(a)),onClick:s,children:[o("div",{className:u(Wa,"m-0",i?"rounded-full border-2":Ja(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Xa(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Ga(n)]})})})),Ga=e=>e?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:e})}):null,Ka=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Xa=(e=!1)=>e?"radio":"checkbox",Ja=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Za=d((({field:e,input:t})=>o(Ya,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")}))),Qa=d((({field:e,input:t})=>o(La,{label:"Желаемая дата встречи",...e(t?.name??"")}))),ei=d((({field:e,input:t})=>o(Bn,{label:"Электронная почта",...e(t?.name??""),...t}))),ti=[{key:"ULTRASERVICE",text:"Ультра"}],ni=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ai=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],ii=d((({field:e,input:t})=>o(Fn,{label:"Способ получения ответа",options:ai,...e(t?.name??"")}))),li=d((({field:e,input:t})=>o(Bn,{label:"ФИО",...e(t?.name??""),...t})));function ri(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}function si(e,t){return ri(e,t),ri(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class oi{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new me){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class ci{bus;store=new Map;get size(){return this.store.size}constructor(e=new me){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const di={};function mi(e,t=di){const n=s(null),o=function(){const[,e]=a(0);return l((()=>e((e=>(e+1)%65536))),[])}();return i((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,a)=>(n.current||=new Set,n.current.add(a),e.getItem(a)),has:(t,a)=>(n.current||=new Set,n.current.add(a),e.hasItem(a)),set:(t,n,a)=>(e.setItem(n,a),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const ui=new ci;function hi(e){return mi(ui,e)}si(ui,new oi(globalThis?.localStorage));const pi=()=>hi(),gi=(e,t)=>{if(!t)return null;const n=yi(e),a=+t?.split(".")[0],i=+t?.split(".")[1];switch(a){case 1:return n("AGRICULTURE");case 35:return n("FUEL_AND_ENERGY");case 41:case 42:case 43:return n("CONSTRUCTION");case 46:case 47:return n("TRADE");case 55:case 79:return n("TOURISM");case 62:return n("TECHNOLOGY");case 63:return n("CONSULTING_SERVICE");case 64:return n("BANK");case 65:return n("INSURER");case 66:return n("FINANCIAL_INSTITUTIONS");case 72:case 74:return n("SCIENCE");case 80:return n("SECURITY");case 84:return n(i<22?"GOVERNANCE":22===i?"ARMY":"OTHER_SECTORS");case 85:return n("EDUCATION");case 86:return n("HEALTHCARE");case 87:return n("SOCIAL_SPHERE");default:return n(a>=10&&a<=33?"INDUSTRY":a>=5&&a<=9?"FUEL_AND_ENERGY":a>=49&&a<=53?"TRANSPORT":"OTHER_SECTORS")}},fi=(e,t)=>{if(!t)return null;const[n]=[e?.find((e=>t<=Number(e.description)))].map((e=>({key:e?.key??"",text:e?.value??""})));return n},xi=(e,t)=>{const n=yi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},bi=(e,t,n)=>{const a=yi(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},yi=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,vi=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Ni=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(wi(t))}),[]),r=l((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Bn,{disabled:t?.filledByEsia&&vi(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),wi=e=>({apartment:e?.data?.flat,city:e?.data?.city,district:e?.data?.area_with_type,fullAddress:e?.unrestricted_value,fiasCode:e?.data?.fias_id,house:e?.data?.house,locality:e?.data?.settlement_with_type,okatoRegionCode:e?.data?.okato,postcode:e?.data?.postal_code,region:e?.data?.region,regionCode:e?.data?.region_kladr_id?e?.data?.region_kladr_id.substring(0,2):"",street:e?.data?.street,qc:e?.data?.qc,qcComplete:e?.data?.qc_complete,qcHouse:e?.data?.qc_house}),Ci=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Si(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(wi(n.data?.address));const r={amountWorkers:fi(e?.amountWorkers,n.data?.employee_count),employerActivities:gi(e?.employerActivities??[],a),organization:bi(e?.organization??[],i,l),employerOrganization:xi(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Si=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),ki=d((({field:e,input:t})=>{const n=pi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Ci(n,e,t)}),[]);return o(Bn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),Ii=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Ya,{text:t,value:n,disabled:i,onChange:r},a),wn(l)]}))),Ti=d((({field:e,input:t})=>o(Ii,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ri=`${qt}/outservice`,Bi=[];async function Pi(){const e=await Pt(`${Ri}/outserviceregions`);return e&&Array.isArray(e)?e:Bi}const _i=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=Kn("outServiceRegions",Pi),s=r((()=>l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[l,a]);return i((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(Fn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),Ai=d((({field:e,input:t})=>o(Bn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&vi(e,t?.name??""),...e(t?.name??""),...t}))),Di=d((({field:e,input:t})=>o(Bn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&vi(e,t.name??""),...e(t?.name??""),...t}))),Ei=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!e),children:[o("div",{className:u("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:u("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]}))),Mi=d((({field:e,input:t})=>jn(e("acquiringType")?.value?.key)?o(Ei,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),Oi=d((({field:e,input:t})=>o(Bn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),zi=e=>"_"===e,Vi=e=>/\d/.test(e),Fi=e=>zi(e)||Vi(e),Li=[..."+7 (___) ___-__-__"],$i=Li.findIndex(zi),ji=Li.map(((e,t)=>Fi(e)?Li.slice(0,t).filter(Fi).length:-1));function Ui(e){const t=e.replace(/\D/g,""),n=Li.map(((e,n)=>Vi(e)?e:t.charAt(ji[n])||e)),a=ji.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max($i,a)):n).join("")}const qi=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(Ui(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(vn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),Wi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(qi,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Hi=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Wi,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&vi(e,n),...t})})),Yi=d((({field:e})=>jn(e("acquiringType")?.value?.key)?o(Ei,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Gi=Vt((({field:e,input:t,source:n})=>o(Fn,{placeholder:"Выберите продукт",label:"Продукт",options:Ki(n?.productList),...e(t?.name??"")}))),Ki=e=>(e??[]).map((e=>({key:e,value:e}))),Xi=`${qt}/regions`,Ji=[];function Zi(e=Xi){const{data:t}=Kn(e,_t);return Array.isArray(t)?t:Ji}const Qi=`${qt}/outservice/outserviceregions`,el=d((({field:e,input:t,params:n})=>{var a;const i=Zi((a=n?.typeForm,"OUTSERVICE"===a?Qi:void 0));return o(Fn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...e(t?.name??"")})})),tl=d((({field:e,input:t})=>{const n=ea(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Fn,{label:"Регион",placeholder:"Выберите регион",options:a,...e(t?.name??"")})})),nl=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},al=rn((e=>null!=e&&""!==e)),il="Некорректно заполненное поле",ll="Укажите регион, город/населенный пункт, улицу, дом",rl=e=>al(e??il),sl=e=>rn((e=>e?.key&&""!==e?.key))(e??il),ol=e=>rn((e=>"string"==typeof e&&/^[0-9]{1,2}$/g.test(e)))(e??il),cl=e=>rn((e=>"string"==typeof e&&e.length>1&&yl(e)))(e??il),dl=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??il),ml=e=>rn((e=>"string"==typeof e&&6===e.length))(e),ul=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),hl=e=>rn(ul)(e),pl=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),gl=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},fl=e=>Boolean(e.region&&e.city&&e.house),xl=()=>rn(fl)(ll),bl=/^[\u0400-\u04FF\d\s]+$/u,yl=(e="")=>bl.test(e),vl=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},Nl={processPersonalDataFlg:pl,consentProviderFlg:pl,consentInformFlg:pl,consentPfrFlg:pl,consentOthersFlg:pl},wl={addressCourier:xl(),paymentSystem:rl("Укажите тип платежной системы"),currency:rl("Укажите валюту"),cardCategory:rl("Укажите категорию карты"),codeWord:(Cl="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&yl(e)))(Cl??il)),confirmationIncome:sl(),methodObtain:rl(),deliveryDate:rl("Укажите дату доставки")};var Cl;const Sl={organization:sl("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(ll),organizationPhone:hl("Укажите номер телефона"),organizationName:rl("Укажите наименование организации"),legalForm:rl("Укажите ОПФ"),generalSeniority:ol("Укажите количество лет стажа"),lastJobExperience:ol("Укажите стаж на последнем месте работы"),experience5Years:ol("Укажите общий стаж за последние 5 лет"),jobsNumber:ol("Укажите количество мест работы за последние 5 лет"),beginDate:rl("Укажите дату заключения трудового договора"),addressFact:xl(),addressRegistration:xl(),addressRetail:sl("Выберите адрес банка"),addressMatch:rl(),sex:rl("Укажите свой пол"),limitedBirthday:rn(vl)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:rl("Укажите место рождения"),education:sl("Выберите ваше образование"),housing:sl("Выберите тип жилья"),amountWorkers:sl("Выберите информацию о количестве сотрудников"),employment:sl("Выберите информацию о трудоустройстве"),employerActivities:sl("Выберите вид деятельности организации"),employerOrganization:sl("Выберите вид организации"),positionOrganization:sl("Выберите вашу должность"),familyStatus:sl("Выберите семейное положение"),familyMembers:dl(2,"Укажите количество членов семьи"),children:dl(2,"Укажите количество детей"),dependents:dl(2,"Укажите количество иждивенцев"),totalIncome:dl(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:dl(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(gl)(e))("Некорректный номер СНИЛС"),conscription:rl(),armyIdFlg:pl,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:ml("Укажите номер паспорта"),dulIssueDateField:rl("Укажите дату выдачи паспорта"),dulSubdivisionCode:ml("Укажите код подразделения"),dulIssuedBy:rl("Укажите организацию, выдавшую паспорт"),participantDateRegistration:rl("Укажите дату регистрации"),retirementIncome:rl(),otherIncome:rl(),wages:rl(),mandatoryPayments:rl(),disablePeopleFlg:rl(),bankruptcyFlg:rl(),shareholderFlg:rl(),legalEntityName:rl(),bankEmployeeCode:rl(),partInBusiness:rl(),regionRetail:sl("Выберите регион")},kl={fullName:rl(),addressBranch:sl(),desiredMeetingDate:rl(),product:rl(),localities:rl(),partnerComments:rl(),collectionCount:rl(),acquiringType:sl(),serviceType:sl(),annualRevenue:rl(),feedbackMethod:sl(),serviceDirection:sl(),secondaryPhone:hl("Укажите номер телефона"),region:sl(),surname:cl("Укажите свою фамилию на кириллице"),name:cl("Укажите своё имя на кириллице"),middleName:cl("Укажите своё отчество на кириллице"),birthday:rl("Укажите дату рождения"),phone:hl("Укажите номер телефона"),email:(e=>rn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>rn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:rl(),typeForm:rl(),consentToReceiveMaterials:pl,consentDataProcessing:pl,...Nl,...Sl,...wl},Il=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(Tl).map((({name:e})=>[e,kl[e??""]])));return e=>n?Object.fromEntries(t.filter(Tl).filter(Rl(e)).map((({name:e})=>[e,kl[e??""]]))):a},Tl=({name:e})=>Boolean(kl[e??""]),Rl=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Bl=d((({field:e})=>{const t=e("secondaryPhone");return o(Wi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?nl(t,kl.secondaryPhone):t})})),Pl=d((({field:e,input:t})=>o(Fn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ni,...e(t?.name??"")}))),_l=d((({field:e,input:t})=>o(Bn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&vi(e,"surname"),...e(t?.name??""),...t}))),Al=["От 1 мес","До 15 лет"],Dl=d((({field:e})=>o(ca,{title:"Срок, месяцев",items:Al,min:1,max:180,...e("term")}))),El=d((({field:e,input:t})=>o(Fn,{label:"Тип обслуживания",options:ti,...e(t?.name??"")}))),Ml={horizontal:"@lg:flex-row",vertical:""},Ol=d((({label:e,items:t,value:n,className:a,disabled:i=!1,orientation:l="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Ml[l],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ya,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:i},String(e))))})]}))),zl=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Vl=d((({field:e,input:t})=>{const n=l((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Ol,{className:"whitespace-normal",orientation:"horizontal",items:zl,...e(t?.name??"",{onChange:n})})})}));const Fl={$ref:"/wcms-resources/outservice-productlist.json"},Ll={fullName:li,addressBranch:na,desiredMeetingDate:Qa,product:e=>o(Gi,{...e,source:Fl}),localities:_i,isClient:Ti,partnerComments:Oi,collectionCount:ja,acquiringType:$n,onlineCheckout:Mi,posTerminal:Yi,serviceType:El,term:Dl,amount:ha,annualRevenue:pa,vedTypes:Vl,feedbackMethod:ii,serviceDirection:Pl,bankEmpolee:ga,secondaryPhone:Bl,applicationDate:e=>o(Bn,{label:"Дата и время обращения в Банк",...e}),region:e=>ta(e?.params?.typeForm)?o(tl,{...e}):o(el,{...e}),consentToReceiveMaterials:Za,surname:_l,name:Di,middleName:Ai,birthday:$a,phone:Hi,email:ei,inn:ki,comment:Ua},$l=(e,t,n={})=>(a,i)=>{const l={...Ll,...n}[String(a.name)];return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})&&l?o("div",{children:o(l,{field:e,input:a,params:t})},i):null},jl=e=>2===e?"@xl:grid-cols-2":"",Ul=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,ql=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:a="big"})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block ","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===a?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})})));function Wl({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Hl={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"},Yl={primary:u("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:u("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")},Gl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(Wl(e))}),{className:a,version:i="primary",active:l,disabled:r,isLoading:s,type:d="button",rounded:m=!0,role:h,onClick:p}=n(t);return c("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs relative",{"text-white bg-primary-active":l,"bg-main-gray text-main-disabled cursor-not-allowed":r||s,"rounded-md":m},l||r||s?"":u(Hl[i],Yl[i]),a),type:d,role:h,onClick:p,children:[s?o(ql,{blur:!0,size:"small"}):null,e]})})),Kl=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Xl=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>c("div",{className:u("relative bg-white pt-0 p-lg",e),role:"dialog",onClick:i,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Kl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Jl=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Xl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Gl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Zl=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,...m}=e,u=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${jn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,h={...m,...er(o),...Ql(c),...d&&{inn:d},...u?{partnerComments:u}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Ql=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},er=e=>e?{vedTypes:Object.fromEntries(zl.map((({id:t})=>[t,t===e])))}:{},tr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Ln[0],serviceType:ti[0],feedbackMethod:ai[0],serviceDirection:ni[0],vedTypes:zl[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},nr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ee,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ee,{children:t.text})}):null]}))),ar=(e,t)=>o(Gl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ir=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ya,{...e}),o(nr,{link:t})]}),wn(nl(e,pl).error)]}):o(nr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ar(n)]}),lr={send:async function(e,t=!1){const{typeForm:n,region:a,phone:i="",email:l,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${qt}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Yt(a,g),...Gt(l,g),...Wt(i),...Ht(s,"desiredMeetingDate"),...g?Ht(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Kt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},rr=d((({className:e,title:t,typeForm:n="",sections:a=[],button:i,link:s,endpoint:d,additionalParams:m,isContacts:h,data:p,...g})=>{const f=r((()=>a?.flatMap((e=>e?.inputs))||[]),[a]),x=r((()=>((e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||tr[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),b=r((()=>Il(f)),[f]),y=un(Jl),v=tn(),w=l((async(e,t)=>{const a=Zl({...e,...m}),i=Boolean(await lr.send(a,"lead"===d));y.open({ok:i,typeForm:n}),i&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),k=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return c(mn,{className:u("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[a.map(((e,t)=>c("div",{className:u(jl(e.columns),"grid gap-x-m"),children:[Ul(e.title),(e?.inputs||[])?.map($l(C,{typeForm:n}))]},`section-${t}`))),ir(k?C("consentDataProcessing"):void 0,s,i)]}),h?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center 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]})})),sr=[{columns:2,inputs:[{name:"surname",required:!0,dadata:!0},{name:"name",required:!0,dadata:!0},{name:"middleName",dadata:!0},{name:"limitedBirthday",required:!0},{name:"phone",required:!0},{name:"email",required:!0,dadata:!0}]},{inputs:[{name:"processPersonalDataFlg",required:!0},{name:"consentProviderFlg",required:!0},{name:"consentOthersFlg",required:!0},{name:"consentInformFlg"},{name:"consentPfrFlg"}]}],or=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");i((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r,e("addressRegistration").value]);const s=l((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),c=l((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Bn,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),cr=d((({field:e,input:t})=>o(Ii,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),dr="/icons/MapMarkerClusterIcon.svg",mr="/icons/MapMarkerClusterYellowIcon.svg";function ur({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const i=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),l=hr("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=hr("workplaces",e,i),r=pr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=pr(n.filter((e=>"offices"===e.type)),"offices",e);l.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(l)}else{const a=pr(n,"offices",e);l.add(a),t.geoObjects.add(l)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const hr=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?dr:mr,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),pr=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?dr:mr,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),gr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},fr={...gr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},xr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(fr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),br=e=>globalThis[e],yr=(e,t)=>{const n=document.getElementById(t);if(n){const t=br(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(br(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(br(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))};const vr=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return yr(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Nr={...gr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},wr=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Nr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Cr=[55.753995,37.614069],Sr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=vr();if(i((()=>{r.current?ur({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:kr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),ur({yandexMaps:m,map:r.current,points:e,isLoad:a})})),r.current&&l&&m?.geocode(l).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,a,l]),!m)return null;const h="z-10";return c("div",{ref:d,className:u("relative","w-full",t),children:[a?o(ql,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(wr,{yandexMaps:r}),o(wr,{yandexMaps:r,direction:"out"})]}),xr(r,m,u("right-2 top-80",h))]})})),kr=e=>{const t=[Tr(Ir(e,0)),Tr(Ir(e,1))];return t.every((e=>e))?t:Cr},Ir=(e,t)=>e.map((e=>e.coords?.[t])),Tr=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Rr=async(e,t,n)=>{try{return(await Br(e,t,n)).json()}catch(e){return console.error(e),null}};async function Br(e,t,n){return globalThis?.fetch?.(`/light-api-cash/v1${e}`,{method:t,headers:{"Content-Type":"application/json",...Pr()},credentials:"include",body:n?JSON.stringify(n):null})}const Pr=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},_r=e=>Number(e.toString().replace(",",".")),Ar=d((({value:e,subText:t,children:n,isPhone:a,...i})=>{const l=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[l.length,n,t].every((e=>!e))?null:Dr({textItems:l,subText:t,children:n,isPhone:a,...i})})),Dr=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:i,className:l,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",l),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Er(n,s),i?o(Ee,{color:a,size:"text-m",children:i}):null]}),Er=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ee,{size:"text-l",children:t?o("a",{href:`tel:${Mr(e)}`,children:e.trim()}):e.trim()},String(n)))),Mr=e=>e.replace(/\D/g,""),Or=d((({className:e,children:t})=>o("div",{className:u("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}))),zr=d((({className:e,children:t})=>o("div",{className:u(e),role:"group",children:t})));const Vr=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),l=function(e,t){const n=s(null);return i((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:l,children:n})})})),Fr=d((({className:e,name:t,text:n,data:a,onClick:i})=>{const l=r((()=>fe(a)),[a]);return c("button",{className:u("text-primary-main flex justify-between items-center border-none px-m",n?"pt-lg":"py-2xs",e),type:"button",...l,onClick:i,children:[n?o("div",{className:"pr-m",children:n}):null,o(W,{className:"text-primary-text",name:t,width:"16",height:"16"})]})})),Lr=({isUnfolded:e,onToggle:t})=>o(Fr,{className:"w-full border-b border-solid border-main-divider",name:e?"ArrowUpIcon":"ArrowDownIcon",text:e?"Скрыть":"Подробнее",onClick:t}),$r=d((({children:e})=>{const[t,{toggle:n}]=nn(!1);return c(zr,{className:"block sm:hidden",children:[o(Vr,{isUnfolded:t,children:e}),Lr({isUnfolded:t,onToggle:n})]})})),jr=e=>{const t=qr(e);return o(Ar,{label:"Режим работы",value:t,className:"max-w-none"})},Ur=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",qr=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Ur({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Ur({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Wr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Hr=e=>Wr.map((([t,n,a])=>({key:t,title:a,short:n,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??"")}}))),Yr=e=>{if(!e)return null;const t=Gr(e);return c(Or,{className:"border-none",children:[o(Ar,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Kr)})}),o(Ar,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Gr=e=>{const t=Wr.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},Kr=({short:e,status:t},n)=>o("div",{className:u("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(n)),Xr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ar,{label:"Валюта",value:e.currency}):null,t?o(Ar,{label:"Купить",value:String(t)}):null,n?o(Ar,{label:"Продать",value:String(n)}):null]},String(a)),Jr={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"}},Zr=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Jr[n].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:Jr[n].text,children:t})]}))),Qr=(new Date).getDay(),es=e=>{const[t]=e?.slice(Qr-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:i,hasLunch:l}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[i?o(Zr,{color:"green",children:i}):null,n&&l?o(Zr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Zr,{color:"red",children:"Выходной"})},ts=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ns=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(Ar,{label:e,value:t&&n?n:"",subText:ts({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),as=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,is=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,ls=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,rs=(e,t)=>{if(!e.workSchedule)return null;const n=Hr(e.workSchedule);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.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:e.address})]}):null]}),es(n)]}),o("div",{className:"hidden sm:block",children:ss(e)}),o($r,{children:ss(e)})]},String(t))},ss=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=Hr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Or,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ar,{label:"Факс",value:t,isPhone:!0}),o(Ar,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ar,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ar,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Ar,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Ar,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Or,{children:o(Ar,{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(ns)})})}):c(Or,{children:[o(Ar,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Kr)})}),jr(d)]}),r?.businessScheduleVisibleTag?Yr(r?.businessScheduleDescription):null,s?.currencies?.length?o(Or,{className:"flex-wrap",children:s?.currencies?.map(Xr)}):null]})},os=({name:e="",address:t="",workSchedule:n})=>{const a=(i=e)?`${i?.charAt(0)?.toUpperCase()}${i?.slice(1)}`:"";var i;const l=`${t} ${(e=>{const t=Hr(e),n=e?qr(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?as(n):ls(n,a):is(n):""})(n)}`;return{header:a,body:l}},cs={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},ds={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ms={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),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),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)},us=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ms[t](e)))))},hs=()=>{},ps=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=hs,getBalloonRemoteWorkplaces:i=hs})=>{const[l,s,o,c]=r((()=>{const l=us(e,n),r=us(t,n),s=[...l.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[l,s,r,l.length+r?.length]}),[e,t,n,a,i]);return{filteredItems:l,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},gs=e=>{const{data:t,error:n}=Kn(`/light-api-cash/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,fs);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},fs=async e=>await Pt(e,{method:"POST"})||[],xs=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),bs=d((({children:e})=>xs?e:null)),ys=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=gs("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");i((()=>{(async()=>{const e=await(async e=>{const t=await Rr("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:_r(e.latitude??Cr[0]),gpsLongitude:_r(e.longitude??Cr[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=ps({data:n,filtrationState:{},getBalloon:os});return c("div",{children:[o(Fn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...d,isSearch:!0}),o("div",{className:"h-[600px]",children:o(bs,{children:o(Sr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),vs=Vt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:i,...l})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Fn,{placeholder:a,options:r,...e(n),...l})})),Ns=d((({field:e,input:t})=>{const{data:n}=gs("EMPLOYEES_NUMBER"),a=pi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(vs,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),ws=d((({field:e,input:t})=>o(Ii,{text:"Наличие военного билета",...e(t?.name??"")}))),Cs=d((({field:e,input:t})=>o(Bn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),Ss=d((({field:e,input:t})=>o(Ii,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),ks=d((({field:e,input:t})=>o(La,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),Is=d((({field:e,input:t})=>o(Bn,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&vi(e,"birthPlace")}))),Ts=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const Rs=d((({field:e,input:t})=>{const[n,r]=a([]),[s]=function(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?Ts(t):null);return[n,l((t=>{i((n=>{const a=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(a)),a}))}),[e])]}("programId"),{value:c,onChange:d}=e("cardCategory"),m=e("paymentSystem")?.value?.key;return i((()=>{m&&s&&(async()=>{const e=await(async(e,t)=>{const n=await Rr("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(m,s);r(e),Bs(e,c)||d&&d(null)})()}),[m]),o(vs,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Bs=(e,t)=>e.some((e=>e.key===t?.key)),Ps=d((({field:e,input:t})=>o(Bn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),_s=d((({field:e,input:t})=>o(Bn,{label:"Кодовое слово",...e(t?.name??""),...t}))),As=d((({field:e,input:t})=>{const{data:n}=gs("INCOME_CERT_UNITED");return o(vs,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Ds=d((({field:e,input:t})=>{const{data:n}=gs("MILITARY_STATUS");return o(vs,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Es={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},Ms=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Xl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:n,children:[t?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Gl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Os=(e,t)=>{const{open:n}=un(Ms),a=ke();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Br(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return n?await n.blob():new Blob})(e,a));n({src:i,onDocumentRead:t})}}),[n,e,a])},zs=d((({className:e,error:t,docId:n,...a})=>{const i=Os(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Ya,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ee,{children:"Ознакомиться"})}):null]}),wn(t)]})})),Vs=d((({field:e,input:t})=>t&&t.name?o(zs,{text:Es[t.name]?.text,docId:Es[t.name]?.docId,...e(t.name)}):null)),Fs=Math.round(29.5),Ls=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),$s="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",js="flex flex-col lg:w-1/2 gap-2xl",Us="flex flex-col gap-y-xl min-w-52",qs=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ee,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),Ws=d((({className:e,title:t,value:n,color:a="text-secondary-text",...i})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(qs,{value:n,...i}):o(Ee,{size:"text-h3",children:"-"})]}))),Hs=(e=[],t=!1)=>Ys([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ys=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Gs=(e,t=0)=>e?.sum?e.sum:t,Ks=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Xs=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Js=({min:e=0,max:t=0,availableMonths:n,...a})=>o(ca,{items:[`От ${Zs(e)}`,`До ${Zs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Zs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Qs=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:i,onChange:l,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Ol,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),eo=e=>Qs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),to=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(ca,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),no=({field:e,defParams:t,calcParams:n,map:a,monthsValue:i="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(ia(t?.[i],n.minMonths,n.maxMonths))},ao=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:i,moneyExtra:l}=t;if(0===e)return 0;if(n){const t=e/1200;return l?(a+l)*(t+t/(Math.pow(1+t,i)-1)):a*(t+t/(Math.pow(1+t,i)-1))}return Math.round(a/i)+a*(e/1200)},io=e=>e,lo=(e=io)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ro=lo(),so=(e=io)=>lo((t=>-e(t))),oo=so(),co=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:mo([e,t],a),mo=([e,t],n=[])=>({[e]:n.length?oo(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ro(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),uo=(e,[t,n],a)=>e>=a[t]&&e<=a[n],ho={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},po=e=>go({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&go({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&go({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&go({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),go=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],fo=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[ho],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>po({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=co(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=co(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>po({row:e,userInputParams:t,paramsViewSettings:n})&&uo(a,["minSum","maxSum"],e)&&uo(i,["minMonths","maxMonths"],e)))||ho)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=ao(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},xo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),bo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},yo=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Ys([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=dn({moneyValue:Gs(s,2e5),monthsValue:Ks(s,Fs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=fo(g,n,r),b=eo({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:y}=f("moneyValue"),{onChange:v}=f("monthsValue");return i((()=>{y&&y(ia(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),i((()=>{v&&v(ia(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),i((()=>{!xo(s)&&h&&no({field:f,defParams:h,calcParams:x,map:bo,monthsValue:"minMonths"})}),[n,s]),o(Ls,{className:e,title:t,...m,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),Js({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),vo({...x,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(Us,"@4xl:w-1/2"),children:[o(Ws,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ws,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Ws,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),je(a,{isVertical:!0}),Xs(l)]})]})})})),vo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ya,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ya,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ya,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ya,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),No="calculator",wo=d((({field:e,params:t})=>{const n=l((t=>{e(No).onChange?.(t)}),[]);return o(yo,{...t?.calcData,padding:"p-0",defaultParams:So(e(No).value),onChange:n})})),Co={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},So=(e,t=!1)=>{const n=t?ko(Co):Co;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},ko=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),Io=d((({field:e,input:t})=>{const{data:n}=gs("CREDIT_IN_RSHB");return o(vs,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),To=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ol,{label:gn({label:t,errors:a?.errors}),...a}),wn(n)]}))),Ro=[{id:"810",text:"Рубли"}],Bo=d((({field:e,input:t})=>o(To,{label:"Валюта",orientation:"horizontal",items:Ro,...e(t?.name??"")}))),Po=d((({field:e,input:t})=>o(La,{label:"Дата доставки",...e(t?.name??"")}))),_o=d((({field:e,input:t})=>o(Bn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Ao=d((({field:e,input:t})=>o(Ii,{text:"Являюсь инвалидом",...e(t?.name??"")}))),Do=d((({field:e,input:t})=>o(La,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&vi(e,t?.name??"")}))),Eo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Bn,{disabled:t?.filledByEsia&&vi(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:i,daDataQueryPrefix:n})})),Mo=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&vi(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Oo=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&vi(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),zo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Bn,{disabled:t?.filledByEsia&&vi(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),Vo=d((({field:e,input:t})=>{const{data:n}=gs("EDUCATION_LEVEL");return o(vs,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Fo=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_ACTIVITY_TYPE"),a=pi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(vs,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Lo=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_KIND"),a=pi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(vs,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),$o=d((({field:e,input:t})=>{const{data:n}=gs("EMPLOYMENT_INFO_UNITED");return o(vs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),jo=d((({field:e,input:t})=>o(Bn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Uo=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(ia(Number(n),0,5)))),[]);return o(Bn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...e(t?.name??""),...t,onChange:n})})),qo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e(t?.name??""),l=e("familyStatus")?.value?.key,r="MARRIED"===l?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return i((()=>{a?.(d)}),[l,s,c]),o(Bn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:n,onChange:a})})),Wo=d((({field:e,input:t})=>{const{data:n}=gs("MARITAL_STATUS");return o(vs,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Ho=d((({field:e,input:t})=>o(Bn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),Yo=d((({field:e,input:t})=>{const{data:n}=gs("HOUSE_TYPE");return o(vs,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Go=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),c("div",{className:"",children:[o(Ae,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Ko=d((({input:e})=>o(Go,{__html:e?.label}))),Xo=d((({field:e,input:t})=>o(Bn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Jo=d((({field:e,input:t})=>o(Bn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),Zo=d((({field:e,input:t})=>o(Bn,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),Qo=d((({field:e,input:t})=>o(Bn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),ec=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&vi(e,t.name??"")}))),tc=d((({field:e,input:t})=>o(Bn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),nc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],ac=d((({field:e,input:t})=>o(To,{orientation:"horizontal",items:nc,...e(t?.name??"")}))),ic=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_TYPE"),a=pi();return i((()=>{n&&(a.organization=n)}),[n]),o(vs,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),lc=d((({field:e,input:t})=>{const n=pi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Ci(n,e,t)}),[]);return o(Bn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),rc=d((({field:e,input:t})=>o(Bn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),sc=d((({field:e,input:t})=>o(La,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),oc=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(ia(Number(n),0,100)))),[]);return o(Bn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...e(t?.name??""),...t,onChange:n})})),cc=e=>e.map((e=>({key:e.type,text:e.name})));const dc=e=>e?.key,mc=d((({field:e,input:t})=>{const[n,l]=a([]),s=hi();var c;c=async()=>{const{programId:e}=s;if(e){const t=await(async e=>{const t=await Rr("/public-data/creditProgramConditions","POST",{creditProgramId:e});return cc(t?.paymentSystems||[])})(e);l(t??[])}},i((()=>{const e=c();return()=>{e.then((e=>{e instanceof Function&&e()}))}}),[]);const d=r((()=>n?.map((e=>({id:e.key,text:e.text})))??[]),[n]);return o(To,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:dc,parse:e=>n?.find((t=>t.key===e))})})})),uc=d((({field:e,input:t})=>{const{data:n}=gs("POSITION");return o(vs,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),hc=d((({field:e,input:t})=>{const{data:n}=gs("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Fn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...e(t?.name??"")})})),pc=d((({field:e,input:t})=>o(Bn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),gc=["male","female"],fc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],xc=d((({field:e,input:t})=>{const n=e("name")?.value,{value:a,onChange:l}=e("sex");return i((()=>{n&&!a&&(async()=>{const e=await(async e=>{const t=await Rr("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return gc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(To,{label:"Пол",orientation:"horizontal",items:fc,...e(t?.name??"")})})),bc=d((({field:e,input:t})=>o(Ii,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),yc=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Ca(e,"___-___-___ __")):t?.(Ca(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(vn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),vc=d((({className:e,label:t,value:n,error:a,onChange:i,onBlur:l,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(yc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),wn(a)]}))),Nc=d((({field:e,input:t})=>o(vc,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),wc=d((({field:e,input:t})=>o(Bn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Cc=d((({field:e,input:t})=>o(Bn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Sc={limitedBirthday:ec},kc={processPersonalDataFlg:Vs,consentProviderFlg:Vs,consentOthersFlg:Vs,consentInformFlg:Vs,consentPfrFlg:Vs},Ic={organization:ic,organizationAddress:Ni,organizationPhone:Hi,organizationName:lc,legalForm:Qo,generalSeniority:Ho,lastJobExperience:Jo,experience5Years:Uo,jobsNumber:Xo,beginDate:ks,addressFact:or,addressRegistration:Ni,addressRetail:ys,addressMatch:cr,sex:xc,limitedBirthday:ec,birthPlace:Is,education:Vo,housing:Yo,amountWorkers:Ns,employment:$o,employerActivities:Fo,employerOrganization:Lo,positionOrganization:uc,familyStatus:Wo,familyMembers:qo,children:Ps,dependents:_o,totalIncome:wc,expenses:jo,snils:Nc,conscription:Ds,armyIdFlg:ws,dulSerie:Oo,dulNumber:Mo,dulIssueDateField:Do,dulSubdivisionCode:zo,dulIssuedBy:Eo,participantDateRegistration:sc,retirementIncome:pc,otherIncome:rc,wages:Cc,mandatoryPayments:tc,disablePeopleFlg:Ao,bankruptcyFlg:Ss,shareholderFlg:bc,legalEntityName:Zo,creditInRshbCd:Io,bankEmployeeCode:Cs,partInBusiness:oc,regionRetail:hc,infoCard:Ko,calculator:wo,confirmationIncome:As},Tc={addressCourier:Ni,paymentSystem:mc,currency:Bo,cardCategory:Rs,codeWord:_s,methodObtain:ac,deliveryDate:Po},Rc=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=l((n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}}),[e]),s=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(nl(t(e?.name),kl[e?.name]).error)))),[e]),[d,{toggle:m}]=nn(!0);return o("div",{className:"w-fit",children:c(zr,{children:[c("div",{className:"flex items-start",children:[c("div",{children:[o(Ya,{text:"Согласие на все документы",value:a,onChange:i},n),wn(s?"Отметьте все обязательные соглашения":"")]}),o(Fr,{name:d?"ArrowUpIcon":"ArrowDownIcon",onClick:m})]}),o(Vr,{className:"flex flex-col pl-2xl",isUnfolded:d,children:e.map($l(t,{},kc))})]})})})),Bc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Pc(t||[]);return n.length>2?c("div",{children:[a.map($l(e,{},{...Sc})),o(Rc,{inputs:n,field:e})]}):(t||[])?.map($l(e,{},{...Sc}))},Pc=(e=[])=>({consentInputs:e.filter((({name:e})=>Object.keys(Es).includes(String(e)))),restInputs:e.filter((({name:e})=>!Object.keys(Es).includes(String(e))))}),_c=(e,t)=>o(Gl,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Ac=e=>Br("/user-data/updateUserProfile","PUT",e),Dc=e=>Br("/user-data/updateUserTask","PUT",e),Ec={width:"118",height:"24"},Mc={"bg-white":"color",transparent:"white"},Oc={"bg-white":"text-primary-main",transparent:"text-white"},zc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Mc[e]},className:Oc[e],width:n?.width,height:n?.height}),Vc={"bg-white":"text-primary-text",transparent:"text-white"},Fc=d((({className:e,href:t="/",logo:n,children:a,targetBlank:i,bgColor:l="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:i?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...fe(s),children:[zc(l,n?.image,Ec),r?a??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:Vc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),Lc=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),[p,{setTrue:g,setFalse:f}]=nn(!1),x=l((async()=>{g();var e;await(e={captchaText:d},Br("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),b=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Br(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(b,[]),o(Xl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Fc,{}),onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o("div",{onClick:b,className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(vn,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Gl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Gl,{type:"submit",disabled:!d,onClick:x,version:"secondary",children:"Отправить"})]}),p?o(ql,{blur:!1}):null]})})})),$c=d((({time:e,setTime:t,className:n})=>(i((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:jc(e)})))),jc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Uc=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);i((()=>{u.current?.[d]?.focus()}),[d]);const h=l((n=>a=>{const{value:i}=a.currentTarget,l=i.slice(0,1);t(e.map(((e,t)=>t===n?l:e))),m(n+1)}),[e]),p=l((n=>a=>{const{key:i}=a;if("Backspace"===i&&!e[n]){const a=n>0?n-1:e.length-1,i=e.map(((e,t)=>t===a?"":e));t(i),m(a)}}),[e]),g=l((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),i=e.map(((e,t)=>t<a.length?a[t]:e));t(i),m(i.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:qc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),qc=(e,t,n=!1)=>{const a=!t[e];return`w-16 sm:w-20 h-24 text-5xl text-center p-md m-2 border ${bn(!n||!a)} rounded-md caret-transparent outline-none`},Wc=d((({isDisabled:e,onClick:t,text:n})=>o(Gl,{type:"button",onClick:t,disabled:e,children:o(Ee,{font:"font-normal",children:n})}))),Hc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Yc=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=nn(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=l((()=>r("")),[]),x=Boolean(0===d&&u),b=p>2||x||!e.every(Boolean),y=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Rr("/sms/checkCode","POST",e).then(Hc))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),f(),await(t?.(e.join("")))}catch{r(p>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{c()}}),[e,p]);return i((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:b,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},Gc=d((({phone:e,code:t=!0,codeLength:n=4,consents:r,onSuccess:s=fn,onClose:d=fn})=>{const[m,u]=a(Array(n).fill("")),{handleSubmit:h,hasError:p,errorText:g,isLoading:f,timeNextReq:x,isSubmitButtonDisabled:b,setTimeNextReq:y,setIsTimerStarted:v,setAttempts:N}=Yc({values:m,onSuccess:s}),w=un(Lc),C=Ut(e),k=l((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},Br("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(N(0),y(180),v(!0)):w.open({phoneNumber:C,sendCode:k})}),[C,d]);return i((()=>{k()}),[]),o(Xl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m",onClose:d,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(Uc,{values:m,setValues:u,errorText:g,hasError:p}):null,Xc(x,y,k),c(Ae,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),Kc(b,h),f?o(ql,{blur:!1}):null]})})})),Kc=(e,t)=>o(Wc,{text:"Далее",isDisabled:e,onClick:t}),Xc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o($c,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Jc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Zc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Qc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],ed=d((({onSubmit:e=fn,onClose:t=fn})=>{const[n,i]=a(""),[r,s]=a(!1),d=Os(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?Zc:Jc;return o(Xl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(Ol,{className:"whitespace-normal",orientation:"horizontal",items:Qc,value:n,onChange:u}),o(Gl,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),td=d((({title:e,icon:t,description:n,onClick:a=fn})=>c("button",{className:"flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green",type:"button",onClick:a,children:[o(ne,{image:{icon:t,iconVersion:"black"},width:"78",height:"78"}),c("div",{className:"w-full md:w-auto",children:[o(N,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(w,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),nd={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},ad={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},id={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},ld=e=>Object.entries(e).reduce(((e,[t,n])=>t in nd?[...e,{contactTypeCd:{key:nd[t]},value:n}]:e),[]),rd=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in ad){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:ad[t]},...a}]}return e}),[]),sd=e=>{const{familyStatus:t,familyMembers:n,dependents:a,children:i,confirmationIncome:l,wages:r,mandatoryPayments:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,totalDependents:n,incomeCertificateCd:l,otherDependents:a,childrenDependents:i,militaryStatusCd:g,participantIncomes:(f={wages:r,mandatoryPayments:s,incomeAverage:od(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in id?[...e,{incomeTypeCd:{key:id[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},od=(e,t)=>Number(e)+Number(t),cd={WORK:"Работаю",RETIREE:"Пенсионер"},dd={BANK_STATEMENT:"Получаю зарплату на счет/карту в РСХБ",BANK_STATEMENT_PENS:"Получаю пенсию на счет/карту в РСХБ",PFR_CERTIFICATE:"Получаю зарплату на счет/карту в другом банке",OTHER:"Другое"},md={credit_cash:"10",credit_cash_single_doc:"28",credit_mcx:"39",family_offer_credit:"41",gas_engine_fuel:"33",pension_credit:"12",ref_credit:"11",ref_credit_single_doc:"29",self_employed:"34",summer_cash:"35",summer_cash_pens:"36"},ud={...md,amur_card:"14",owner_card:"13",travel_card:"15"},hd=e=>{const t=e?.find((e=>"WAGES"===e.incomeTypeCd.key))?.value,n=e?.find((e=>"MANDATORY_PAYMENTS"===e.incomeTypeCd.key))?.value,a=e?.find((e=>"ADDITIONAL_INCOME"===e.incomeTypeCd.key))?.value,i=e?.find((e=>"OTHER_INCOME"===e.incomeTypeCd.key))?.value,l=e?.find((e=>"OTHER_PAYMENTS"===e.incomeTypeCd.key))?.value,r=e?.find((e=>"RENTAL_INCOME"===e.incomeTypeCd.key))?.value,s=e?.find((e=>"RETIREMENT_INCOME"===e.incomeTypeCd.key))?.value;return{wages:t,mandatoryPayments:n,incomeAverage:od(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},pd=e=>{const t=e?.find((e=>"REGISTRATION"===e.addressType.key)),n=e?.find((e=>"RESIDENTAL"===e.addressType.key)),a=e?.find((e=>"WORK"===e.addressType.key));return{addressRegistration:t,addressFact:n,organizationAddress:a}},gd=e=>{const t=e?.find((e=>"EMAIL"===e.contactTypeCd.key))?.value,n=e?.find((e=>"MAIN_PHONE"===e.contactTypeCd.key))?.value,a=e?.find((e=>"ORGANIZATION_PHONE"===e.contactTypeCd.key))?.value;return{email:t,phone:n,organizationPhone:a}},fd=(e,t)=>e?.key?{key:e.key,text:t?t[e.key]:e.value}:void 0,xd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=pi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=ud[s.code],u=Boolean(md[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],b=l((()=>{const t=(e=>{const t=e.participants[0],{classCard:n,codeWord:a,paymentSystemTypeCd:i,currencyCode:l}=e,{loanAmount:r,creditPeriod:s,paymentTypeCd:o}=e,{birthDate:c,midname:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,educationLevelCd:y,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:_,employeesNumberCd:A,opf:D,seniority:E,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:$,otherDependents:j,militaryStatusCd:U,participantIncomes:q,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:l?.key,paymentSystem:fd(i),cardCategory:fd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,education:fd(y),participantDateRegistration:v,housing:fd(N),beginDate:k,employment:fd(I,cd),organizationName:T,inn:R,employerActivities:fd(B),organization:fd(P),employerOrganization:fd(_),amountWorkers:fd(A),legalForm:D,generalSeniority:E?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:fd(V),familyStatus:fd(F),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:fd(U),confirmationIncome:fd(Q,dd),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:fd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...hd(q),...pd(S),...gd(C),...(ee=w,ee?.key?{sex:"MAN"===ee.key?"male":"female"}:null)};var ee})(e);a.participantId=f,a.taskId=d,a.profileId=x?.id,a.programId=m,a.leadForm=t,i.assign(h)}),[]),y=l((()=>{i.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=l((()=>{i.assign("/")}),[]);return o(Xl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:n,children:c("div",{className:"flex flex-col gap-lg mt-xs md:mt-0",children:[o(N,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(td,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:b}),o(td,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:y}),o(Gl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),bd=d((function({onClose:e=fn}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Xl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:e,children:c("div",{className:"flex flex-col gap-lg",children:[o(N,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(w,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Gl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Gl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),yd=d((({onClose:e})=>{const t=Jt(),n=pi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Rr("/esia/getLink","POST",n));var n;e?.link&&t.assign(e.link)}),[]),i=l((()=>{if(n.leadForm){const e={...n.leadForm};delete e.esiaAccountTypeCd,n.leadForm=e}e?.()}),[]);return o(Xl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:i,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full px-m",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex flex-wrap gap-lg w-full",children:[o(Gl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Gl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),vd=()=>{const e=new URLSearchParams(decodeURIComponent(globalThis.location?.search));return{utm_campaign:e.get("utm_campaign"),utm_medium:e.get("utm_medium"),utm_source:e.get("utm_source"),utm_content:e.get("utm_content"),utm_term:e.get("utm_term")}},Nd=()=>hi(),wd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:i,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=Nd();return l((({participantId:t,taskId:n,profileId:a,programId:i,formData:l})=>{e.participantId=t,e.taskId=n,e.profileId=a,e.programId=i,e.leadForm=l}),[])})(),d=(e=>{const{open:t}=un(yd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=un(ed),n=un(Gc),a=t=>async n=>{try{t&&await Ac({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},i=(t,i)=>async l=>{"SIGNED"===l&&t?n.open({phone:t,consents:["согласие на запрос информации в БКИ"],onSuccess:a(i)}):e()};return{open:(n,a)=>t({onSubmit:i(n,a),onClose:e})}})(d),u=un(Gc),h=(()=>{const{open:e}=un(xd),{open:t}=un(bd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{isSending:n,ok:s,handleSubmit:l((async t=>{try{i();const a=await(n={profile:{phone:Ut(t.phone)}},Rr("/public-data/createUserProfile","POST",n).then((e=>e?.profile?.id||null)));if(a&&t?.phone){const n=async()=>{await Sd({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},i=async()=>{try{const t=await(async e=>{const t=await Rr("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:a,programId:e});if(t){const e=await(async e=>await Rr("/user-data/getTaskById","POST",e)||void 0)({taskId:t});u.close(),h.open({task:e,isFromLead:!0,onClose:n})}else await n()}catch{o(!1)}},l=Cd(t);u.open({phone:t?.phone,consents:l,onSuccess:i}),r()}}catch{o(!1)}var n}),[])}},Cd=e=>Object.keys(Es).filter((t=>e[t])).map((e=>Es[e]?.text)),Sd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=kd(n);await Ac(((e,t)=>{const{name:n="",surname:a="",middleName:i="",limitedBirthday:l="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:i,birthDate:l&&jt(l,!0),email:s,phone:Ut(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,i));const{taskId:l,participantId:r}=await(async e=>await Rr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Dc((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:i,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:ld({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:vd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},kd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Id={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Td=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Id[e.name||""]])))}},Rd=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:i,addressFact:l}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,limitedBirthday:t?.birthDate,phone:Ui(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Bd(i),addressFact:Bd(l),esiaAccountTypeCd:t?.esiaAccountType}},Bd=e=>{const{postcode:t,region:n,regionCode:a,locality:i,city:l,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,i||l,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},Pd=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=Nd(),d=l((e=>{const t=e instanceof Function?e(m[u]):e;null!=t?m[u]=t:delete m[u]}),[m=c,u="leadForm"]);var m,u;const h=r((()=>Td(e,c.leadForm)),[e,c.leadForm]),p=l((async(e,a,i)=>{s();try{const r=await(l={profileId:e,code:a,state:i,redirectUri:globalThis.location?.href},Rr("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...Rd(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=Ts(globalThis.localStorage?.getItem("profileId")??""),t=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),n=t.get("code"),a=t.get("state");e&&n&&a?p(e,n,a):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),[h,{isLoading:a}]},_d=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>sr?.flatMap((e=>e?.inputs))||[]),[sr]),m=r((()=>Il(d)),[d]),[h,{isLoading:p}]=Pd(d,a),{isSending:g,ok:f,handleSubmit:x}=wd({programId:n,nextStepLink:a}),[,{field:b,onSubmit:y}]=dn(h,{formValidator:m,onSubmit:x}),v=un(Jl);return i((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(mn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[p?o(ql,{blur:!1}):null,sr.map(((e,t)=>c("div",{className:u(jl(e.columns),"grid gap-x-m"),children:[Ul(e.title),Bc({field:b,inputs:e?.inputs})]},`section-${t}`))),_c(l,g)]})})})),Ad=d((({title:e,description:t})=>{const n=ke();return 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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Dd=e=>e%2!=0,Ed=d((({textNode:e,iconNode:t,tag:n,onClick:a,justifyContent:i="between",className:l,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===i?"justify-between":"justify-center",l),onClick:a,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Md=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:i=!1,onClick:l})=>o(Ed,{tag:"button",onClick:l,disabled:i,"data-theme":a,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",i?"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:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Od=({isUnfolded:e,onToggle:t})=>o(Md,{icon:e?"ArrowUpIcon":"ArrowDownIcon",label:e?"Скрыть":"Развернуть",onClick:t}),zd="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Vd=d((({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]],[s,{toggle:d}]=nn(!1);return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(zd),children:[B(l,{...i.options,parent:n}),Dd(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),c(zr,{children:[c(Vr,{className:u(zd),isUnfolded:s,children:[B(r,{...i.options,parent:n}),Dd(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(Md,{className:u({hidden:e<1}),dataTheme:i.options?.page?.colorPalette,disabled:!r?.length,label:t,icon:s?"ArrowUpIcon":"ArrowDownIcon",onClick:d})]})]})})),Fd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ld=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),$d=10;function jd(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:Ud(t),root:n?.current})),[t,n?.current]);return i((()=>{if(!a.current)return;const t=new IntersectionObserver(e,l);return t.observe(a.current),()=>{t.disconnect()}}),[e,l]),a}function Ud(e=0){const t=Math.round(e*$d);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qd=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:i,children:r,onIntersection:s})=>{const c=jd(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),Wd=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Hd=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:i=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=l(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Gd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Yd(c,v):{},...N?Ld(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(qd,{className:u(m,i?Wd[i-1]:"",{"h-full":N},t),style:w?Yd(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Yd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Gd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Kd={"horizontal-list":"w-6","vertical-list":"h-6"},Xd=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,i)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",i===e?Kd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),Jd=({activeIndex:e,onClick:t})=>(n,a)=>{const i=a===e,l=i?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(a))},Zd=e=>t=>e.scrollWidth/t,Qd=e=>(t,n)=>{e.scrollBy({left:n*Zd(e)(t),behavior:"smooth"})},em=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[i,r]=a([]),o=l((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=i.length?[so()(i),lo()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?Qd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?Qd(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=l(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},tm={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},nm=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=em({itemCount:s.length}),g=am(Boolean(s?.length));i((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=l((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Hd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Jd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",tm[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Xd({activeIndex:t,onClick:f,listType:a}))}):null})),am=(e=!1)=>({behavior:e?"auto":"smooth"}),im=d((({className:e,disabled:t,...n})=>o(Ne,{rounded:!0,className:u("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,...n,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"})}))),lm=d((e=>o(im,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),rm=d((e=>o(im,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),sm="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",om=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:i})=>{const{canScrollLeft:l,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!i;return c("div",{className:e,children:[n?cm(t):null,l?o(lm,{className:u(dm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(rm,{className:u(dm(i),m?"right-1":"right-0"),onClick:d}):null]})})),cm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(sm,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(sm,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),dm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),mm=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:i=1,listType:l="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=em({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(Hd,{containerRef:y,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(om,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(nm,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:l,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),um=({blocksToRender:e,...t})=>o(mm,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:B(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Fd(!0)),children:T(e,t)},String(n))})}),hm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[pm(n,t),o(Vd,{...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[pm(n,t),um({...a,blocksToRender:t})]});default:return null}})),pm=(e,t)=>e&&!t.length?o(Ad,{...e}):null,gm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),fm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Ei,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const i=e?.includes(n);t(a?i?(e||[]).filter((e=>e!==n)):[...e||[],n]:i?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),xm=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:i})=>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,gm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(bm(a)).filter(Boolean))]}),n?o("div",{children:o(Gl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),bm=e=>([t,n])=>{const a=n?.type;return"array"===a?ym(t,e)(n):null},ym=(e,t)=>n=>{const a=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(fm,{items:a,multiple:!n?.single,...t(e)})]},e)},vm=e=>e;function Nm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const wm=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Cm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>wm(t[e])||wm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>wm(t[e])||wm(n[e])||Sm(t[e])<=Sm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>wm(t[e])||wm(n[e])||Sm(t[e]?.min)>=Sm(n[e]?.min)&&Sm(t[e]?.min)<=Sm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>wm(t[e])||wm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>wm(t[e])||wm(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Sm=e=>Number(e||0),km=(e,{block:t,page:n,normalize:a=vm})=>{const i=t?.blocks||[],[l,s]=dn(e),o=r((()=>Nm(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),c=l===e?i:((e,t)=>(n=vm)=>e?.filter((([,e])=>Cm(t,n(e)||{}))).map((([e])=>e)))(o,l)(a);return[l,{blocksToRender:c,blocksWithProps:o},s]},Im={},Tm={},Rm=Vt((({className:e,filtrationSchema:t=Im,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=km(Tm,{block:i.block,page:i.options?.page}),d=o(Mn,{className:"w-64",label:n?.title,options:Bm(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Bm(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(xm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Gl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(hm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Bm=e=>Nm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Pm=(e=!1)=>e?"text-left":"text-center",_m={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Am=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:i,...l})=>{const r=String(a?.width||t);return i?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",_m[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Dm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Pm(i),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Em)}):null]})})),Em=({label:e,description:t,__html:n,icon:a,isDotted:i=!1,iconBgVersion:l},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(Am,{className:"shrink-0",iconBgVersion:l,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Ae,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Mm=e=>({icon:t,title:n,description:a},i)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),Om=(e,t,n)=>o("div",{className:`grid gap-2xs ${zm(t)}`,children:e.map(Mm(n))}),zm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Vm=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:i,title:l,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?Om(e,a,t):null]}))),Fm={start:"justify-start",center:"justify-center",end:"justify-end"},Lm=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Fm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:je(e)})})),$m=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Ee,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:He(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),i&&l?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:i}):null]})]}))),jm=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),Um=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:i="text-secondary-text",children:l,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o($m,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(Ws,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(jm,{title:e,...r}),qm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Wm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Hm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=qm.prefMonthsNum,prefTravelBonusRate:l=qm.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(l*t)+Math.round(r*n),a);return[c,c*i+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-i)]})(t||Wm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},Ym=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=dn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Hm(r,n);return o(Ls,{className:e,title:t,...l,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),to({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Um({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Us,children:[f>=0?o(Ws,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),Xs(i)]})]})})})),Gm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Km=e=>Qs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Xm=" (c капитализацией)",Jm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:Us,children:[o(Ws,{title:`Доход в конце срока${l?Xm:""}`,value:e,postfix:n,prefix:"+"}),o(Ws,{title:`Сумма в конце срока${l?Xm:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),i?.map(Xs)]}),Zm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Qm={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},eu=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:i,isReplenished:l,isMonthlyInterestPayment:r}=e,s=l||i,o=n<90||n>730,c=function(e){const t=e?.rateType?Zm[e?.rateType]:"",{data:n}=Kn(t?`${qt}/depositrates/${t}`:null,_t);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&tu(s,e)&&uo(a,["minSum","maxSum"],e)&&uo(n,["minDays","maxDays"],e)))||Qm,{rate:m}=d,u=nu(m,e),h=a+u,p=c||[Qm];return{...d,...mo(["minSum","maxSum"],p),...mo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},tu=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,nu=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i/30)-a):Math.round(a*e*i/365/100)},au=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=dn({moneyValue:Gs(r,1e5),daysValue:Ks(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=eu(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o(Ls,{className:e,title:t,...d,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ca,{items:[`От ${Gm(y.min||0)}`,`До ${Gm(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[iu(p,h),Km({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Um({rate:x,depositeName:b,isShowDepositeName:l}),Jm({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var y})),iu=(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(Ya,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ya,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),lu=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[i,l]=t[n];a>=i?t.splice(n-1,2,[e,Math.max(a,l)]):n++}return t},ru={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},su=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?du(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[cu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),cu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),cu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),cu({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,uo(a,["minSum","maxSum"],t),uo(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||ru,{rate:u}=m,h=ou(u,e),p=a+h,g=t||[ru];return{...m,...mo(["minSum","maxSum"],g),...mo(["minMonths","maxMonths"],g),availableMonths:lu(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,i)=>t>=e?e+i*n:e-i*n)))(e,t))),...e,defaultMonth:l,income:h,finalSum:p}},ou=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i)-a):Math.round(a*e*30*i/365/100)},cu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],du=(e,t)=>e+Math.round((t-e)/2),mu=(e="rub")=>"rub"===e,uu=(e,t)=>{const{minMonths:n,maxMonths:a}=mo(["minMonths","maxMonths"],fu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:ia(i,n,a)}},hu=(e,t)=>{const{minSum:n,maxSum:a}=mo(["minSum","maxSum"],fu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:ia(i,n,a)}},pu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),gu=e=>{const t=mu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},fu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},xu=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Qs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Qs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),bu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Km({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Qs({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),bu(e.isShowNewClient),e.isShowNewClient?o(Ya,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},bu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,yu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},vu={text:"₽",key:"rub"},Nu=Vt((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[vu],g=l((e=>t=>e?{...t,...gu(t),...hu(t,e),...uu(t,e),...pu(t,e)}:t)(h),[h]),[f,{field:x}]=dn({moneyValue:Gs(d,2e4),monthsValue:Ks(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:vu},{normalizer:g}),b=x?.("currency")?.value??vu,y=x?.("isNewClient")?.value,v=fu(h,b),N=su(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{no({field:x,defParams:Hs(v,y),calcParams:N,monthsValue:"minMonths",map:yu})}),[x,h]);i((()=>{!xo(d)&&v&&I()}),[d,h]);const T=w===Hs(v,y)?.rate;return o(Ls,{className:e,title:t,...m,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[c("div",{className:"flex gap-m",children:[to({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:wu(b?.key)}),h&&h?.length>1?o(Fn,{label:"Валюта",options:p,...x("currency")}):null]}),Js({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),xu({...N,...s},x)]}),Um({rate:w,children:Su(I,T)}),Jm({income:C,finalSum:S,buttons:[...a,Cu(n?.buttons,k)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),wu=(e="")=>mu(e)?1e3:100,Cu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},Su=(e,t=!1)=>t?null:o(Gl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ku=e=>Iu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Iu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Iu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Tu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ru=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Tu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ku({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=co(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=co(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>ku({row:e,userInputParams:t,paramsViewSettings:n})&&uo(a+r,["minSum","maxSum"],e)&&uo(l,["minSumOld","maxSumOld"],e)&&uo(r,["minSumExtra","maxSumExtra"],e)&&uo(i,["minMonths","maxMonths"],e)))||Tu)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=ao(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r,monthlyPayment:g,benefit:f}},Bu=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=dn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Ru(s,n,l),h=eo({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ls,{className:e,title:t,...r,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),to({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Js({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Pu({...m,...l},d),m.isExtraMoney?to({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})]}),c("div",{className:u(Us,"@4xl:w-1/2"),children:[o(Ws,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ws,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Ws,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Ws,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(a,{isVertical:!0}),Xs(i)]})]})})})),Pu=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ya,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ya,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ya,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),_u=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=aa(e,{normalize:(e=i)=>n&&a?String(ia(Number(Au(e)),n,a)):Au(e),format:He(r)}),d=l((e=>t&&t(Au(e))),[t]);return o(vn,{onChange:d,...s,...c})})),Au=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Du=d((e=>o(_u,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Eu=new ci;function Mu(){return mi(Eu)}si(Eu,new oi(globalThis?.sessionStorage));const Ou={private:"p2p/registerP2P",business:"b2c/registerB2C"},zu=({onClose:e,errorCode:t,errorMessage:n})=>{const a=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(Xl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:a,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Vu=e=>{const t=un(zu),n=Mu(),a=Jt(),i="private"===e?"p2p":"b2c";return l((async({amount:l})=>{const r=await(async(e,t)=>{const n=Jt(),a={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},i=`${qt}/payment/${Ou[e]}`;try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(a)});return e.ok?await e.json():null}catch(e){return null}})(e,l);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:i,url:a.href},a.assign(`${i}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Fu={amount:1500},Lu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:a,formType:l="private",...r})=>{const[s,{setValue:d}]=nn(!1),m=Vu(l),[{amount:h},{field:p,onSubmit:f}]=dn(Fu,{onSubmit:m});return i((()=>{d(h<=0)}),[h]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{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",onSubmit:f,children:[o(Du,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:h}),a?.text?o(Gl,{className:"w-full mt-lg",type:"submit",disabled:s,children:a.text}):null]})]})})),$u=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ju="relative h-full",Uu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},qu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(Yu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,i)=>c("div",{className:Wu(n,{someCardsHighlighted:l}),children:[T(n,a,{className:Hu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Yu(n)?$u({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Wu=(e,{someCardsHighlighted:t})=>u(ju,t&&(Yu(e)?"pt-3xl":"pt-3xl sm:pt-16")),Hu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(ju,"min-w-80",Uu[a],t&&(Yu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Fd(n),n&&"h-full"),Yu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Gu=Vt((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:i=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(mm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Ku(s?.block?.blocks):[],hasBlur:!0,children:qu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Ku=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Xu="z-10 border border-solid w-full h-full",Ju=u(Xu,"absolute hidden @xl:block border-transparent"),Zu=d((({className:e,title:t,description:n,button:a,...i})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...i,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Ju,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Ju,"top-6 right-8 bg-green")}),o("div",{className:u(Ju,"top-3 right-4 bg-green-light")}),c("div",{className:u(Xu,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Qu={black:"bg-black",white:"bg-white"},eh=d((({className:e="",title:t,description:n,image:a,price:i,button:l,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Re,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:je([l],{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(th)]}):null,i?c(Ee,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),th=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Qu[e]}`},String(t)),nh=d((({icon:e,...t})=>{const n=pe(),{text:a,href:i,target:l,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:i,target:l,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),ah=d((({className:e,additionalDescription:t,description:n,links:a,title:i,...l})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...l,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?ih(a):null]})}))),ih=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(nh,{...e},String(t))))}),lh=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),rh=d((({className:e="",href:t,target:n,onClick:a,data:i,children:l})=>{const r=pe()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...fe(i),children:l})})),sh=[{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"}}],oh=d((({className:e="",media:t,showButtonText:n,stretched:i,version:l="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:i}=e,{iconMapped:r}=(e=>sh.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(a)?a:r,c=n?{text:i}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&i&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??l}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},ch(i));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:dh(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ch=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",dh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),mh=d((({className:e,padding:t,description:n,additionalDescription:a,href:i,icon:l,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(rh,{href:i,target:m,className:"h-full",data:lh(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(oh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(Ae,{__html:s,isDotted:r,itemSize:"list-s"}):null,uh(a,p)]})})}))),uh=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,hh=new me,ph=(e,t)=>{const{title:n,description:a,buttons:i}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:je(i)}):null]},String(t))},gh=d((({className:e="",title:t,align:n="text-center",icon:r,button:s,visibleCellsCount:d=1,cardCells:m=[],options:h,data:p,...f})=>{const x=m.map(ph),[b,y]=d>0?[x.slice(0,d),x.slice(d)]:[x,[]],[v,w]=a(!1);i((()=>hh.subscribe("fold",(e=>{e&&h?.parent&&e.parent===h?.parent&&w(e.isUnfolded)}))),[h?.parent]);const C=l((()=>{hh.fire("fold",{type:"fold",isUnfolded:!v,parent:h?.parent})}),[v,h?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[$e(r)?o("div",{className:"self-center",children:o(ne,{image:r})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,s?.text?o(Ne,{className:"w-full mt-m mb-lg",...s}):null,y.length?c(zr,{children:[c("div",{children:[b,o(Vr,{isUnfolded:v,children:y})]}),m.length>=d?o(fh,{isUnfolded:v,data:p,onClick:C}):null]}):o("div",{children:b})]})})),fh=d((({data:e,isUnfolded:t,onClick:n})=>o(Fr,{className:"w-full",...t?{name:"ArrowUpIcon",text:"Скрыть",data:e}:{name:"ArrowDownIcon",text:"Подробнее о тарифе"},onClick:n}))),xh=d((({className:e,contacts:t,info:n,version:a="secondary",...i})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...i,children:[n?.length?bh(n):null,t?.length?bh(t):null]}))),bh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>yh({column:e,i:t})))}),yh=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},i)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(i))))},`col-${String(t)}`):null,vh=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),a=Jt();if(!t||!e||!n)return a.assign("/"),()=>{};const i=async()=>{const n=await Br("/auth/refresh","POST",{refresh_token:e,access_token:t});if(401==n?.status&&a.assign("/"),n?.ok){const e=await n.json();globalThis.sessionStorage.setItem("refreshToken",e.refresh_token),globalThis.sessionStorage.setItem("accessToken",e.access_token)}};i();const l=setInterval(i,24e4);return()=>clearInterval(l)},Nh=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),wh=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(Nh,{step:a,showPercentage:!1})]})})}));var Ch;!function(e){e.process="IN_PROCESS",e.ok="APPROVED",e.fail="CANCELLED",e.pre_decision="PRE_DECISION",e.approved="APPROVED",e.cancelled="CANCELLED",e.failed="FAILED",e.draft="DRAFT",e.rework="REVISION"}(Ch||(Ch={}));const Sh=e=>Rr("/user-data/getTaskStatus","POST",e),kh=e=>Br("/user-data/sendSignalToProcess","POST",e),Ih=(e,t)=>{const n=s(null),a=l((()=>n.current&&clearInterval(n.current)),[]);return i((()=>(n.current=setInterval((()=>e(a)),t),a)),[e,t]),a},Th=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:i})=>{const[l,r]=a(e),s=100-(e-l)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o($c,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(Ae,{__html:i}):null]})]})})),Rh=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Th,{interval:d,intervalExpireAction:m}):null]}),o(Bh,{title:a,items:i}),o(Bh,{title:l,items:r,countColumns:!0}),n?.__html?o(Go,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Bh=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ee,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",jl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Ph(e)},t)))}):null]})]}):null},Ph=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),_h=d((()=>o(Rh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Ah=d((({handleExpireTimer:e})=>{const{statusInfo:t}=pi();return o(Rh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Dh=d((()=>{const{statusInfo:e}=pi();return o(Rh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Eh=d((()=>{const{statusInfo:e}=pi();return o(Rh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Mh(e),buttonText:"Вернуться на главную"})})),Mh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:jt(e?.deliveryDate)}]):t},Oh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],zh=d((()=>{const[e,t]=a(Ch.process),{taskId:n}=pi();i((()=>{(async()=>{for(const e of Oh)await kh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Sh({taskId:n});a&&a?.statusCd!==Ch.process&&(e(),t(a.statusCd))}),[n]);Ih(r,3e4);return Vh(e,(()=>t(Ch.rework)))})),Vh=(e,t)=>({IN_PROCESS:o(Ah,{handleExpireTimer:t}),CANCELLED:o(_h,{}),FAILED:o(_h,{}),DRAFT:o(_h,{}),APPROVED:o(Eh,{}),PRE_DECISION:o(Eh,{}),REVISION:o(Dh,{})}[e]||o(Dh,{})),Fh=e=>(t,n)=>t.filter((e=>e)).map((t=>[Lh(n,e),$h(t,e),Wh(t,e),jh(t,e),Uh(t,e),qh(t,e)].some(Boolean)?{...t,required:!1}:t)),Lh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,$h=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,jh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Uh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),qh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Wh=({name:e},t)=>"snils"===e&&Hh(t),Hh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Yh={...Ic,...Tc},Gh=({field:e,inputs:t,params:n})=>t.map($l(e,n,Yh)),Kh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Fh(Xh(t))(e,n);return c("div",{className:u(jl(i),"grid gap-x-m"),children:[Ul(l),Gh({field:t,inputs:s,params:a})]},`section-${r}`)})),Xh=e=>t=>e(t)?.value,Jh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Gl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Gl,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Zh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},Qh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},ep=e=>{const{beginDate:t,employment:n,organizationName:a,inn:i,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f,partInBusiness:x}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:i,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:ld({organizationPhone:p&&Ut(p)}),participantAddresses:rd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},tp=e=>{const{name:t,surname:n,middleName:a,limitedBirthday:i="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:jt(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:ld({phone:Ut(l),email:r}),participantAddresses:rd({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},np=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(i=n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{};var i},ap=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},ip=(e,t)=>{switch(e){case 0:default:return{};case 1:return tp(t);case 2:return ep(t);case 3:return sd(t);case 4:return Zh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:rd({addressCourier:t})}:{}})(t)}},lp=[{paymentSystem:{key:"",text:""},currency:"810",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0,methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},familyMembers:void 0,dependents:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:{key:"",text:""},bankEmployeeCode:void 0,addressCourier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}],rp=e=>{try{return e?new Date(e):void 0}catch(e){return}},sp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=pi(),d=r((()=>((e,t)=>({...lp[e],...t,limitedBirthday:rp(t?.limitedBirthday),dulIssueDateField:rp(t?.dulIssueDateField),participantDateRegistration:rp(t?.participantDateRegistration),beginDate:rp(t?.beginDate),deliveryDate:rp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate},c.leadForm=d)}),[o,d]),u=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await Dc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...ap(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...ip(i,a)}],...Qh(a),...np(a)}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}o?n?.():t()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},op=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,onFinish:i})=>{const s=r((()=>t?.flatMap((e=>e?.inputs||[]))),[t]),d=l((t=>Il(Fh((e=>t[e]))(s,e))(t)),[s]),[m,u,h]=sp({step:e,onNextStep:a,onFinish:i}),[,{field:p,onSubmit:g}]=dn(m,{formValidator:d,onSubmit:u});return c("form",{onSubmit:g,className:"space-y-m",children:[Kh({sections:t,field:p,step:e}),o(Jh,{isSending:h,step:e,onPrevStep:n})]})})),cp=[[{title:"Персональные данные",columns:2,inputs:[{name:"surname",required:!0,dadata:!0,filledByEsia:!0},{name:"name",required:!0,dadata:!0,filledByEsia:!0},{name:"middleName",dadata:!0,filledByEsia:!0},{name:"sex",required:!0},{name:"limitedBirthday",required:!0,filledByEsia:!0},{name:"birthPlace",required:!0,filledByEsia:!0},{name:"phone",required:!0,filledByEsia:!0},{name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{name:"dulSerie",required:!0,filledByEsia:!0},{name:"dulNumber",required:!0,filledByEsia:!0},{name:"dulIssueDateField",required:!0,filledByEsia:!0},{name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{name:"addressMatch"}]},{columns:2,inputs:[{name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{name:"housing",required:!0}]},{inputs:[{name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{name:"infoCard",label:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{name:"employment",required:!0},{name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{name:"inn",required:!0,dadata:!0},{name:"legalForm",required:!0}]},{inputs:[{name:"organization",required:!0},{name:"amountWorkers",required:!0}]},{columns:2,inputs:[{name:"employerActivities",required:!0},{name:"employerOrganization",required:!0},{name:"generalSeniority",required:!0},{name:"lastJobExperience",required:!0},{name:"experience5Years",required:!0},{name:"jobsNumber",required:!0}]},{inputs:[{name:"organizationPhone",label:"Телефон работодателя",required:!0},{name:"beginDate",required:!0}]},{columns:2,inputs:[{name:"positionOrganization",required:!0},{name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{name:"familyStatus",required:!0}]},{columns:1,inputs:[{name:"dependents",required:!0}]},{columns:2,inputs:[{name:"familyMembers"},{name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{name:"infoCard",label:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{name:"wages",required:!0}]},{columns:1,inputs:[{name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{name:"snils",required:!0}]},{columns:1,inputs:[{name:"conscription",required:!0}]},{columns:2,inputs:[{name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{name:"disablePeopleFlg"}]},{inputs:[{name:"bankruptcyFlg"}]},{inputs:[{name:"shareholderFlg"}]},{inputs:[{name:"legalEntityName"}]},{inputs:[{name:"creditInRshbCd"}]}]],dp=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...cp,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],mp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],up=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=l((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);i(vh,[]);const u=l((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=l((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=dp[n],[f,{setTrue:x}]=nn(!1);return o(g,{className:e,...t,children:c("div",{ref:d,className:"container grid grid-cols-12",children:[f?null:o(wh,{stepsTitles:mp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:f?o(zh,{}):o(op,{step:n,sections:p,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),hp=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(Nh,{step:a,showPercentage:!1})]})})})),pp=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Th,{interval:d,intervalExpireAction:m}):null]}),o(gp,{title:a,items:i}),o(gp,{title:l,items:r,countColumns:!0}),n?.__html?o(Go,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),gp=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ee,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",jl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:fp(e)},t)))}):null]})]}):null},fp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),xp=d((()=>o(pp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),bp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=pi();return o(pp,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:`${t?.calculator?.moneyValue?.toLocaleString()??"0"} ₽`},{label:"Срок кредита",description:`${t?.calculator?.monthsValue??"0"} мес`},{label:"Тип платежа",description:t?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),yp=d((()=>{const{statusInfo:e}=pi();return o(pp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),vp=d((()=>{const{statusInfo:e}=pi();return o(pp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Np=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],wp=d((()=>{const[e,t]=a(Ch.process),{taskId:n}=pi();i((()=>{(async()=>{for(const e of Np)await kh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Sh({taskId:n});a&&a?.statusCd!==Ch.process&&(e(),t(a.statusCd))}),[n]);Ih(r,3e4);return Cp(e,(()=>t(Ch.rework)))})),Cp=(e,t)=>({IN_PROCESS:o(bp,{handleExpireTimer:t}),CANCELLED:o(xp,{}),FAILED:o(xp,{}),DRAFT:o(xp,{}),APPROVED:o(vp,{}),PRE_DECISION:o(vp,{}),REVISION:o(yp,{})}[e]||o(yp,{})),Sp=({field:e,inputs:t,params:n})=>t.map($l(e,n,{...Ic})),kp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Fh(Ip(t))(e,n);return c("div",{className:u(jl(i),"grid gap-x-m"),children:[Ul(l),Sp({field:t,inputs:s,params:a})]},`section-${r}`)})),Ip=e=>t=>e(t)?.value,Tp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Gl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Gl,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Rp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Bp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Rp[a?"annuity":"differential"]}},Pp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},_p=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return tp(t);case 2:return ep(t);case 3:return sd(t);case 4:return Zh(t);default:return{}}},Ap=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:void 0,bankEmployeeCode:void 0}],Dp=e=>{try{return e?new Date(e):void 0}catch(e){return}},Ep=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=pi(),d=r((()=>((e,t)=>({...Ap[e],...t,limitedBirthday:Dp(t?.limitedBirthday),dulIssueDateField:Dp(t?.dulIssueDateField),participantDateRegistration:Dp(t?.participantDateRegistration),beginDate:Dp(t?.beginDate),deliveryDate:Dp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},c.leadForm=d)}),[o,d]),u=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await Dc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},..._p(i,a)}],...Bp(a),...Pp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Mp=d((({step:e,sections:t,programsSource:n,onPrevStep:a,onNextStep:i,onFinish:s})=>{const{programId:d}=pi(),m=n?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs??[]))),[t]),h=l((t=>Il(Fh((e=>t[e]))(u,e))(t)),[u]),[p,g,f]=Ep({step:e,onNextStep:i,onFinish:s}),[,{field:x,onSubmit:b}]=dn(p,{formValidator:h,onSubmit:g});return c("form",{onSubmit:b,className:"space-y-m",children:[kp({sections:t,field:x,step:e,params:{calcData:m}}),o(Tp,{step:e,isSending:f,onPrevStep:a})]})})),Op=[[{columns:1,inputs:[{name:"calculator"}]}],...cp,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{name:"regionRetail",required:!0}]},{inputs:[{name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{name:"bankEmployeeCode"}]}]],zp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Vp=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(vh,[]);const h=l((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Op[r],x=0===r,[b,{setTrue:y}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||b?null:o(hp,{stepsTitles:zp,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:b?o(wp,{}):o(Mp,{step:r,sections:f,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:y},String(r))})]})})})),Fp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Lp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),$p=1e9,jp={sum:{min:1e4,max:$p},period:3},Up=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=km(jp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:qp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Wp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(xm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Du,{label:a?.title,min:500,max:$p,...d("sum",{parse:e=>({min:Number(e),max:$p}),format:({min:e})=>String(e)})}),o(ca,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(hm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),qp=e=>At((e?.paramsSource?.rateRows||[]).filter(Fp).flatMap((e=>Lp(e.minMonths,e.maxMonths)))),Wp=e=>At(e.flatMap((e=>e||[])).filter(Fp).flatMap((e=>Lp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Hp=[{key:"10"},{key:"50"},{key:"100"}],Yp=({itemCount:e,onItemCountChange:t})=>{const n=l((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Mn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Hp,iconVersion:"black"})]})},Gp="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Kp=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:i}=e,l=t+1;return l===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:l},String(t)):1!==l&&l!==i&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(l,n,i)?o("div",{onClick:()=>a(l),className:Gp,"aria-label":`Страница ${l}`,children:l},String(t)):null},Xp={width:"24",height:"24"},Jp=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),i=l((()=>{e>1&&t(e-1)}),[e]),s=l((()=>{e<n&&t(e+1)}),[e,n]),d=l((()=>t(1)),[]),m=l((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:i,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Zp(1===e),...Xp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Gp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Kp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Gp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Zp(e===n),...Xp})})]})},Zp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Qp=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:i})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Jp,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Yp,{itemCount:a,onItemCountChange:i}):null]}),eg=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:i,placeholder:r="Поиск по сайту"})=>{const s=l((e=>{a&&a(e.target?.value||"")}),[a]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",xn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),tg=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(eg,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Fa,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Fa,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Gl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),ng=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:i}=a({href:`${qt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ee,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),ag=`${qt}/depository`,ig={startDate:void 0,endDate:void 0,query:""},lg=Vt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(ig),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?jt(a,!0):"",r=i?jt(i,!0):"",s=new URLSearchParams(ag);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",l),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Kn(ag+o,_t);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),b=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(tg,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(ng,{...e},String(e.publicId)))):o(Ad,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Qp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),rg=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,sg=d((({className:e="",title:t,description:n,error:a,button:i,...l})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...l,children:[o("div",{className:"flex justify-center",children:rg(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),i?.text?o(Ne,{version:i?.version,text:i?.text,...i}):null]}))),og=`${qt}/region`;function cg(e="Москва"){return hi().location??{name:e}}function dg(e="Москва"){const t=hi(),n=l((async()=>{if(!t.location){const n=await Pt(og);t.location=n??{name:e}}}),[t,e]);return Kn(og,n),t}var mg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(mg||(mg={}));const ug=new Intl.NumberFormat("ru",{style:"currency",currency:mg.RUB}),hg=e=>e?ug.format(e):"",pg="text-m font-light text-secondary-text ",gg=`${pg} text-left`,fg=`${pg} pl-5xl text-center`,xg=`${pg} pl-5xl text-right`,bg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},yg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:gg,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:fg,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:xg,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(vg)})]}))),vg=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:bg[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:hg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:hg(e?.buyExchangeRate)})})]},t)},Ng={icon:"GpsIcon"},wg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Am,{...Ng,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Cg=(e,t,n)=>{const a=Number(Sg(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},Sg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function kg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Ig=e=>t=>{const[,n]=kg(e.find((([e])=>e(t))));return n(t)},Tg=e=>Ig(e.map((([e,t])=>[e,()=>t])));Tg.if=e=>new Rg(void 0,e);class Rg{parent;predicate;unit;get entry(){return[kg(this.predicate),kg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Rg(this,e)}then(e){return new Rg(this.parent,this.predicate,e)}else(e){return Ig([...Bg(this),[()=>!0,e]])}}const Bg=e=>[...e?.parent?Bg(e.parent):[],e.entry],Pg=e=>Tg([[e=>e.value!==mg.RUB&&e.oppositeValue!==mg.RUB,()=>e.handleConvert(e.value,mg.RUB)],[e=>e.value===mg.RUB&&e.oppositeValue===mg.RUB,()=>e.handleConvert(e.value,mg.USD)],[e=>e.value===mg.RUB&&e.oppositeValue===mg.RUB,()=>e.handleConvert(e.value,mg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function _g(e){const{placeholder:t,rates:n,selected:a,value:i,setValue:l,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(vn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(Mn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ag=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||mg.RUB,selectBuy:n?.[0]?.currency?.currency||mg.USD}),d=l((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[_g({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Dg(r,d,n),value:r.inputSell,setValue:e=>Mg(d,n)(e,r.selectSell,r.selectBuy)}),_g({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Eg(r,d,t),value:r.inputBuy,setValue:e=>Og(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),Dg=(e,t,n)=>a=>{t({selectSell:a}),Pg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Mg(t,n)(e.inputSell,a,i)}})},Eg=(e,t,n)=>a=>{t({selectBuy:a}),Pg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Og(t,n)(e.inputBuy,a,i)})},Mg=(e,t)=>(n,a,i)=>{e({inputSell:Sg(n),selectBuy:i});const l=t.find((e=>e.currency?.currency===i))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;l&&e({inputBuy:String(Cg(n,l,a===mg.RUB)||"")})},Og=(e,t)=>(n,a,i)=>{e({inputBuy:Sg(n),selectSell:i});const l=t.find((e=>e.currency?.currency===i))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;l&&e({inputSell:String(Cg(n,l,a===mg.RUB)||"")})},zg=`${qt}/exchangerates`;const Vg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=Kn(zg+`?regionCode=${t}`,_t);return n||{}}(cg()),l=Fg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:mg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:mg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(N,{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:[l?o(yg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(wg,{address:i?.address})]}),o(Ag,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Fg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Lg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map($g(n))})})),$g=e=>({dataFooter:t,...n},a)=>{const{text:i,href:l,target:r,onClick:s}=e(n);return i?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:l,target:r||"_self",onClick:s,...fe(t),children:i||null})},String(a)):null},jg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Ug=["all","footer"],qg=d((({className:e,navigationItems:t})=>{const n=pe();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(jg(Ug)).map(n).map(Wg)})})),Wg=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(jg(Ug));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:i,target:l,onClick:r,...fe(s),children:n}),d?o(Lg,{items:d}):null]},String(t))},Hg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Yg)}):null)),Yg=(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(Gg)})]},String(t)),Gg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Kg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Kg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Xg(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Xg=e=>e.replaceAll(/\D/g,""),Jg=d((({className:e="",index:t,text:n,...a})=>{const i=pe(),{href:l,target:r,onClick:s}=i(a);return o("a",{className:u("text-secondary-text",e),href:l,target:r,onClick:s,children:n||`Документ ${t}`})})),Zg=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Ee,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Jg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Qg="w-full lg:w-52";function ef(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const tf=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:i}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),i=Array.from({length:t.length});let l=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)a[r]||i[n]||e[r]!==t[n]||(l++,a[r]=!0,i[n]=!0)}return{m:l,s1Matches:a,s2Matches:i}}(e,t);if(0===n)return 0;const l=function(e,t,{s1Matches:n,s2Matches:a}){let i=0;for(let l=0,r=0;l<e.length;l++){if(!n[l])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[l]!==t[s]&&i++}return i}(e,t,{s1Matches:a,s2Matches:i}),r=(n/e.length+n/t.length+(n-l/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const nf=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},af=(e=[])=>e.reduce(((e,t)=>e+t),0),lf=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),rf=e=>t=>e.map((([e,n])=>[tf(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>of(t,e))).reduce(nf(Math.max,0),new Map),sf=e=>t=>{return Nm(t,t.map((({title:e})=>e)).map((e=>t=>{const n=lf(t||"");return n.length?af(e.map((e=>ro(n.map(tf(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},of=(e,t)=>new Map(e.map((e=>[e,t]))),cf=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=Kn(e?.length?e:null,df),[s,o]=a(null);return ef((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=lf(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(rf(l)).reduce(nf(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return sf(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},df=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),mf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[i,l]=cf({basePathList:a,initialQuery:e}),s=r((()=>uf(t)(i)),[t,i]);return o(Xl,{head:o(eg,{autoFocus:!0,...l}),onClose:n,children:o(qg,{navigationItems:s})})})),uf=e=>t=>e?.length&&t?.length?Nm(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],hf=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=un(mf,n),m=l((e=>{r(e),pf(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(eg,{value:i,placeholder:t?.placeholder,onChange:m}),o(Kl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),pf=e=>e&&e.length>=3,gf=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:i,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Fc,{className:Qg,logo:l,data:i,showTitle:!1}),o(hf,{className:"grow",navigationItems:t,...e})]})},ff=d((({className:e="",index:t,...n})=>{const a=pe(),{href:i,target:l,text:r,onClick:s}=a(n);return o("a",{className:u("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:i,target:l,onClick:s,children:r||`Документ ${t}`})})),xf=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ee,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):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(ff,{index:t,...e},String(t))))}):null]}))),bf=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},i=n.options?.page?.common??{},{documents:l,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[gf(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(qg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(Qg,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Hg,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(oh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Zg,{title:m,links:r}),o(xf,{links:l,license:p})]})})),yf=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?vf(a):null]}))),vf=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>Nf(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:wf(e)}),c("div",{className:"text-s",children:[o(Ee,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ee,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Nf=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),wf=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Cf=Vt((({className:e,title:t,button:n,regionSource:i,data:l,...r})=>{const[s,d]=a({key:""}),m=i?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Fn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(Ne,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:lh(l,s?.key),children:f})}):null]})})}));function Sf(e=[]){const t=_(),n=Array.from(e.entries()).filter((([,e])=>kf(t)(e)));return n.find((([,e])=>kf(t,!0)(e)))??n[n.length-1]??[]}const kf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(If(e)(n));return t?a===z(n):a.startsWith(z(n))},If=e=>t=>{const n=X(K.SITE_URL);return E(t)?e.href:V(n,e.pathname)},Tf=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=nn(!1),h=pn(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),i=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${i}px`:a.left>e.left&&(i>a.left?n.current.style.left="":n.current.style.left=`${i}px`)}}),[r]);return hn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),i((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Bf(t,n)})]})})),Rf=d((({isActive:e,...t})=>{const n=pe(),{text:a,href:i,target:l,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:i,target:l,onClick:r,role:"link",...fe(t?.data),children:a})})),Bf=(e,t)=>e?.map(((e,n)=>o(Rf,{isActive:e===t,...e},e?.text??String(n)))),Pf={default:"w-6 h-6",large:"w-12 h-12"},_f=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:i,ariaLabel:l="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Pf[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:i,"aria-label":l,onClick:c,...fe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Af="chatbot",Df="text-page__btn-chat",Ef={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Mf=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:l})=>{const r=(e=>{i((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Ef[e??""];return n=>{if(t)if("personal"!==e)yr(Af,t);else{const e=n.target;e?.classList.contains(Df)||e?.classList.add(Df),document.getElementById("webchat-js-container:webchat_rshb")||yr(Af,t)}}})(e);return o(_f,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),Of=d((({className:e="",active:t,dataItemName:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(l);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...fe(i),children:[o("span",{className:zf(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),zf=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Vf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=jd(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Of,{...i,children:n})})})),Ff={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},Lf=d((({version:e,text:t,mobileText:n,...a})=>{const i=ke()?n:t;return i?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",Ff["transparent"===e?"transparent":"default"]),...a,children:i}):null})),$f=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:i,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=Sf(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?jf(t):Uf(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Vf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Tf,{items:p,activeItem:m,ariaLabel:i}):null,D.CHAT_BOT?o(Mf,{version:t,iconVersion:d,chat:D.CHAT_BOT,ariaLabel:l}):null,o(Lf,{version:t,...n})]})})),jf=e=>t=>Math.max(t,e+1),Uf=e=>t=>Math.min(t,e),qf=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(Wf,{...e},String(t))))})]}):null,Wf=d((({icon:e,...t})=>{const n=pe(),{text:a,target:i,href:l,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:l,target:i,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),Hf=(e,t)=>n=>n.name?o(rh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:lh(e,n.name),children:o(Ee,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Yf=d((({className:e,searchTerm:t,onSearch:n})=>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:u(xn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Gf=d((({defaultLocation:e})=>{const t=cg(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(rh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Kf=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=dg(t?.default),[s,d]=a(""),m=Zi(),u=r((()=>Jf(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),h=r((()=>((e,t)=>{const n=new Map;for(const a of e){const e=t(a),i=n.get(e)||[];n.set(e,[...i,a])}return n})(u,Xf)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Xl,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Gf,{defaultLocation:t?.default}),o(Yf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&tf(e.toLowerCase())(s.toLowerCase())>=.8)).map(Hf(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((g=p,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(Hf(f,g))]},e)))}),qf(e)]});var g,f})),Xf=e=>e.name?.charAt(0)??"",Jf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Zf=d((({className:e="",active:t,flat:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(Qf(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(i),children:o("span",{suppressHydrationWarning:!0,className:ex(t,n),children:d||a})})})),Qf=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),ex=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),tx=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=cg(n?.branches?.default),r=un(mf,n),s=un(Kf,n),d=l((()=>r.open({})),[r]),m=l((()=>s.open({})),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Zf,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:lh(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Zf,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(_f,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),nx=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=jd(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Zf,{...i,children:n})})})),ax=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?ix(t):lx(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Fc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(nx,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Tf,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(tx,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),ix=e=>t=>Math.max(t,e+1),lx=e=>t=>Math.min(t,e),rx={"bg-white":"primary",transparent:"transparent"},sx=["all","header"],ox=Vt((({className:e,bgColor:t="bg-white",logo:n={},version:a=rx[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=dx(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Sf(m),{internetBankButton:f}=i||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(ax,{activeTopItem:p,navigationItems:m?.filter(jg(sx)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",cx(a))}),p?.items?.length&&o($f,{subItems:p?.items?.filter(jg(sx)),version:a,internetBankButton:f})]})})})),cx=e=>"transparent"===e?"opacity-30":"",dx=e=>({navigation:e?.navigation??{},common:e?.common??{}}),mx=(e=!1)=>e?{}:{padding:"p-0"},ux={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},hx=Vt((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",ux[n],e),padding:t,version:i,isTheme:l,...s,children:P({...s,extraProps:{...mx(a),className:Fd(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),px=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Fm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),gx=(e,t=0)=>{const{itemCount:n,visibleItemCount:i}=e,[r,s]=a(t),o=l((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=l((()=>s((e=>Math.max(e-1,0)))),[n]),d=i?n>i&&r<n-i:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function fx({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(im,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(im,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const xx=d((({className:e="",cards:t=[],button:n})=>{const[i,r]=a(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=gx({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?bx({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,fx({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function bx({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const i=460*e,l=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${i}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${l}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?yx("страховая сумма",e.sum):null,e?.fee?yx("страховой взнос",e.fee):null]}),vx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function yx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ee,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ee,{size:"text-l",color:"text-secondary-text",children:e})})]})}function vx(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Nx=d((({className:e="",title:t,insuranceTabs:n=[],button:i,...r})=>{const[s,d]=a(0),m=l((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:wx({insuranceTabs:n,button:i})})]})})),wx=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(xx,{button:t,cards:e},String(n)))):null};const Cx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Sx={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},kx=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:i,investmentColumns:l,...r}=e,s=l?[...l]:[];return i&&s.unshift(i),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[gm(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Ix)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Bx)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Ae,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Ix=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Tx(a,i,e.cells)}`,children:l.length?o("div",{className:"w-full "+(i?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:l.map(Rx)}):null},`column_${t}`)},Tx=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Rx=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Sx[n]} ${Cx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ee,{align:"text-center",children:e.text})},`cell_${t}`):null},Bx=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Px=["байт","Кб","Мб","Гб","Тб","Пб"],_x=d((({icon:e,text:t,href:n,target:a,fileFormat:i,data:l,fileSize:r})=>{const s=r&&i?",":"",d=r??"",m=i?String(i):"";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:n,target:a,...fe(l),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Ax(d,m),o(Ee,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Ax=(e,t)=>e||t?o("span",{children:", "}):"",Dx=(e,t)=>(n,a)=>{const i=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),l="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Px[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Mx(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(_x,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:Ex(t),data:n?.data}),o(Ae,{__html:n?.__html})]},String(a))},Ex=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Mx=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},Ox=d((({href:e,__html:t,target:n,onClose:a})=>{const i=_(),l=U(i)(e);return c(Xl,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(Ae,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ne,{text:"Я согласен",version:"primary",target:n,href:l,onClick:a}),o(Gl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),zx=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=un(Ox),s=l((()=>r({__html:a,href:t,target:n})),[a,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Ex(i),o(Ee,{font:"font-light",children:e})]}):null})),Vx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Fx=Vt((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=_();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),i?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Vx[r]),role:"list",children:i.map(Lx(d,l))}):null]})})),Lx=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?$x(t)(n,a):Dx(e,t)(n,a)},$x=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(zx,{...a,icon:e,href:jx(t)?t?.href:t?.attachment?.src}),o(Ae,{__html:t?.__html})]},String(n)):null},jx=e=>"href"in e,Ux=Vt((({className:e,padding:t,align:n="text-left",buttons:a=[],description:i,image:l,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=l?.src?o(ne,{className:"hidden lg:block",image:l}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Re,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(a,{className:"flex-wrap"}),children:[i?o(Ee,{size:"text-xl","font-weight":"font-light",children:i}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Ae,{__html:r,itemSize:"list-m"}):null,o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,l?.src?o(ne,{className:"lg:hidden",image:l}):null]})]})})})),qx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Wx=(e=[],t={})=>e.filter((({content:e={}})=>Cm(t,e))).length,Hx=(e,t)=>e===t;const Yx=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,a])=>e(a,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Hx,((e=Hx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Gx=[],Kx={},Xx={primary:"bg-white/30",secondary:"bg-main-divider"},Jx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Zx=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Xx[t],i=Jx[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ee,{size:"text-xs",color:i,children:e})})})),Qx=({text:e,description:t,icon:n,isActive:a,type:i})=>{const l=(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"}))(a);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",l.icon),image:{...n,iconVersion:n?.iconVersion??l.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===i?l.text:l.oldText,children:e}),o("div",{className:"animated"===i?l.desc:l.oldDesc,children:t})]})]})},eb={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},tb={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},nb={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},ab={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},ib=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:i})=>{const l=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(l,{className:u("h-12","block flex-1","cursor-pointer",eb[a],n?ab[a]:nb[a]),role:"tablist","aria-label":"Список табов",onClick:i,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?tb[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Qx({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Zx,{count:m,version:qx(n,a)})}):null]})})})),lb=d((e=>o(e?.item?.href?rb:sb,{...e}))),rb=d((e=>{const t=pe(),n=l((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...i}=t({...e.item,onClick:n});return o(ib,{...e,tag:"a",item:i,onClick:a})})),sb=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(ib,{item:e,onClick:a,...n})})),ob=(e,t,n)=>(a,i)=>o(lb,{isActive:a===e,onClick:t,type:n,item:a},String(i)),cb=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:i})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(ob(a,i,t))}))),db={categories:[],extraOptions:[],propertyType:[],stage:[]},mb=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=km(db,{block:i.block,page:i.options?.page}),f=l(((e=db)=>p(e)),[]),x=(({hotFilters:e=Gx,filtrationState:t=Kx,blocks:n=Gx,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Yx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Wx(n,t.filter),version:qx(t===e[i])})))),[e,n,i]),o=l((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[i],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:i.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(cb,{...x}),o(xm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(hm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),ub="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",hb=d((({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Ya,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]],[m,{toggle:u}]=nn(!1);return o("div",{children:e?.length?o("div",{children:c(zr,{children:[c("div",{children:[o("div",{className:ub,children:s}),o(Vr,{className:ub,isUnfolded:m,children:d})]}),pb(n,a)({isUnfolded:m,onToggle:u})]})}):null})})),pb=(e,t=!1)=>({isUnfolded:n,onToggle:a})=>c("div",{className:"flex space-x-lg",children:[t?o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"}),text:n?"Меньше фильтров":"Больше фильтров",onClick:a}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]})})]}),gb=(e,t,n)=>{const a=qx("all"===t),i=qx("business"===t),l=(e,t,a)=>{const i=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),i},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Gl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Gl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},fb=({__html:e,list:t,richVersion:n})=>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,richVersion:n})}):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,xb=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ee,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),bb=()=>{},yb=e=>"all"===e?"block":"hidden",vb=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=bb,renderRemoteWorkplaceCard:r=bb,getBalloon:s=bb,getBalloonRemoteWorkplaces:d=bb,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(cs),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=ps({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all");return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[xb(h,N),m?fb(m):null,p&&gb(t,w,C),o("div",{className:u("pb-3xl",yb(w)),children:o(hb,{filters:Nb([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:ds})})]}),o("div",{className:"h-[600px]",children:o(bs,{children:o(Sr,{points:y,isLoad:n,className:"h-full"})})})]}),c(bs,{children:[b.map(l),v.map(r)]})]})})),Nb=e=>Object.keys(cs).filter((t=>e.filter((e=>ms[t](e))).length)),wb=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Cb=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:wb(a)},{label:"Модуль приема наличных",value:i?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:l}];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:wb(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Zr,{color:"green",children:wb(s)})})]}),o("div",{className:"hidden sm:block",children:o(Or,{className:"flex-wrap",children:m?.map(kb)})}),o($r,{children:o(Or,{className:"flex-wrap",children:m?.map(kb)})})]},String(d))},Sb=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${wb(t)} №${n}`,body:e.toUpperCase()}),kb=(e,t)=>o(Ar,{...e},String(t)),Ib=[];const Tb=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Ib},Rb={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Bb={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Pb=d((({descriptionData:e,className:t})=>{const n=cg(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=Kn(`${qt}/atms?regionCode=${e}`,Tb);return{data:t||Ib,isLoad:!t&&!n}}(a);return o(vb,{className:t,filterItems:_b,data:i,isLoad:l,initFilterState:Rb,renderCard:Cb,getBalloon:Sb,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),_b=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),i=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=i.every((t=>Bb[t](e))),n=!a.length||a.some((t=>Bb[t](e)));return t&&n}))},Ab=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow 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(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Db(t)}),o($r,{children:Db(t)})]},String(n)):null,Db=e=>c("div",{children:[c(Or,{className:"flex",children:[o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ar,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),Eb=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Mb={branches:[],remoteWorkplaces:[]};const Ob=async e=>await Pt(e,{method:"GET"})||Mb,zb=d((({className:e})=>{const t=cg(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=Kn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Ob);return{data:t||Mb,isLoad:!t&&!n}}(n);return o(vb,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:rs,renderRemoteWorkplaceCard:Ab,getBalloon:os,getBalloonRemoteWorkplaces:Eb,title:`Офисы филиала ${t?.name}`})})),Vb=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(zb,{}):o(Pb,{descriptionData:e})})})),Fb=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Lb="hidden sm:flex absolute z-40 top-10",$b=Vt((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=em({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...i,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*l}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...i})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Hd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(jb({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(lm,{className:u("left-6",Lb),onClick:d.scrollLeft}):null,d.canScrollRight?o(rm,{className:u("right-6",Lb),onClick:d.scrollRight}):null]})]})})),jb=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const i=a===e,l=i?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Ub=d((({address:e,email:t,telephone:n,button:a,className:i="",__html:l,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",i),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?qb({__html:l,richVersion:r}):null,Wb({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Wb({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Wb({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),qb=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Ae,{...e,itemSize:"list-s"})}),Wb=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,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:a,children:t})]})]}):null,Hb=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Ae,{__html:t,richVersion:n})})})),Yb=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:i})=>o(Ed,{tag:"button",className:u("border-none bg-transparent items-center group/button",i?.icon?"py-xs":"py-lg"),onClick:a,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Gb=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Kb=(e=!1)=>e?"MinusIcon":"PlusIcon",Xb=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Jb=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:d,...m})=>{const h=ke(),[p,{toggle:f}]=nn(t),x=o(Vr,{className:u("gap-lg",Gb(h)),isUnfolded:p,children:P({...m,extraProps:{className:"w-full",padding:"p-0"}})}),b=Zb({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isMobile:h,isUnfolded:p,onToggle:f});return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:d,...m,children:c(zr,{children:[n?b:x,n?x:b]})})}),{childrenTypes:{exclude:["RollupItem"]}}),Zb=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:i,isMobile:l=!1,onToggle:r})=>{const s=t||(i?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Xb(e):Kb(e))(i,l);return"accordion"===e?o(Yb,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:r}):o(Md,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:r})},Qb=d((({name:e,text:t,value:n,checked:a,onChange:i,className:l})=>o("div",{className:l,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(xn.split(" ").filter((e=>"rounded"!==e)),Wa,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:a,onChange:e=>i?.(e.target.value),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),ey=d((({className:e=""})=>{const[t,n]=a("option2"),i=l((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Qb,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(Qb,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),ty=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:i="",setSelected:l,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(Mn,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),ny=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:i,onSelectedBranch:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ty,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(ty,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ay=["От 1 дня","До 365 дней"],iy=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ca,{min:1,max:365,value:e,items:ay,onChange:t})]}))),ly=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:i,onSelectedBoxSize:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ty,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(ty,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ry=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:i,selectedCaseVolume:l,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(ny,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:sy(m)}),o(iy,{days:i,setDays:e=>m({days:e})}),o(ly,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:oy(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(ey,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),sy=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},oy=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},cy=d((({days:e,tariffs:t=[]})=>{const n=my(e,t),a="На рисунке изображена пачка листов\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:[dy("Аренда за",e),dy("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),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(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),dy=(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})]}),my=(e,t)=>{const n=uy(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},uy=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},hy=(e,t)=>e.find((e=>e.branchCode===t)),py=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=hy(a,n.selectedBranch),d=gy(s?.safeBoxCaseVolumes),m=fy(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=xy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(ry,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(cy,{days:n.days,tariffs:u})]})})),gy=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],fy=(e,t)=>e?.find((e=>e.volume===t)),xy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,by=`${qt}/safeboxes`,yy=[];const vy=async e=>await Pt(e,{method:"GET"})||yy,Ny=d((({title:e,footnote:t,className:n="",...i})=>{const[r,s]=a(!1),d=l((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Zi(),p=wy(m.selectedRegion,h),f=function(e){const{data:t}=Kn(e?`${by}?regionCode=${e}`:null,vy);return t||yy}(p),x=l((e=>u((t=>({...t,...e})))),[u]),b=(y=hy(f,m.selectedBranch)||f,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(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(py,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Sr,{points:b,className:"h-[640px]"}):null]})})),wy=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Cy=e=>e<4?"w-72":"w-52",Sy={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"},ky=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:i=[],stepVersion:l="gray",title:r,version:s="primary",...d})=>{const m=i.length>3,h=Sy,p=(e=>e?"":"opacity-0")(a),f=ke();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Pm(f)}),i?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:gm(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Iy(h,m,l)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:i.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:i}=x,{label:l,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Cy(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Ee,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(Ae,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{className:"box-border py-s w-full mt-auto",version:i,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),Iy=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Ty(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||l},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:i+1})},String(i));var r},Ty=e=>e?"h-16 w-16":"h-24 w-24",Ry=d((()=>o("div",{className:"hidden",role:"none"}))),By="hidden sm:flex absolute z-40",Py={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},_y=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=em({itemCount:t?.length||0});return i((()=>Ay(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Hd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Py[l].item,gap:Py[l].gap,children:t.map(ob(n,a,l))}),s.canScrollLeft?o(lm,{className:u("left-6",By,Py[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(rm,{className:u("right-6",By,Py[l].buttonTop),onClick:s.scrollRight}):null]})})),Ay=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Dy={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Ey=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Dy[t].wrapper,e),children:o(_y,{className:Dy[t].component,tabsType:t,...n})}):null,My=Vt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Oy(n??{}),p=_(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=a(Fy(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));i((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const C=Vy(x[y],y),S=l((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Ey({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:zy(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Vy)?.filter(Boolean)||[]}),Oy=({__id:e,anchor:t})=>t??e??"tabs",zy=(e,t)=>t?.length?t:e,Vy=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Fy=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Ly={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},$y=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Ly[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),jy=d((({className:e="",isOpen:t,onClick:n})=>o(Ne,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Uy={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Ae,{__html:e,isDotted:t,itemSize:"list-m"})}),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",{className:"lg:text-l font-light text-xs",children:o(Ee,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(jy,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},qy=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:l,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);i((()=>{l===o&&s||m(!0)}),[s,o]);return Wy({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Wy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Uy))return null;return o(Uy[n],{...t,...a})},Hy=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,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(qy,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Yy=(e,t)=>140*af(e.slice(0,t).map((e=>e?.cols?.length??1))),Gy=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),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,Ky=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=gx({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((i=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,l=u("flex duration-1000 text-center",0!==t?"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:l,style:{transform:`translateX(-${Yy(a,i)}px)`},children:a?.map(((e,t)=>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?Gy(e.cols,i):null]},`row${t}`)))})})]},String(t))})),fx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),Xy=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;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(Ky,{rows:t.rowsData})})})]},a)}))}))),Jy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Zy=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>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:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>a(t),children:o(Ee,{size:"text-xl",font:"font-light",color:Jy(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Qy=Vt((({tableSource:e,pdfUrl:t,onClick:n})=>{const i=e?.tableData,[r,s]=a(0),d=l((e=>s(e)),[]),m=i?.[r]?.items??[],u=i?.map((e=>e.currency??""));return c("div",i?{className:"bg-white z-10",children:[o(Zy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Xy,{activeTabIndex:r,items:m}),o(jy,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(jy,{onClick:n,isOpen:!0})]})})),ev=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@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(Qy,{...t,onClick:n})}):null]}))),tv=d((({row:{header:e,data:t},activeIndex:n,rowIdx:i,...r})=>{const[s,d]=a(void 0),m=l((e=>d(e)),[]),[h,p]=a(void 0),g=l((e=>p(e)),[]);return c(ev,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("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($y,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Hy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),nv=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,fx({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),av=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:i,hiddenRowsNum:l=0,...r})=>{const s=i?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=gx({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(tv,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]],[y,{toggle:v}]=nn(!1);return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?c(zr,{children:[c(nv,{controls:p,children:[x,o(Vr,{isUnfolded:y,children:b})]}),Od({isUnfolded:y,onToggle:v})]}):o(nv,{controls:p,children:f})})]})})),iv=d((({className:e="",title:t,description:n,iconVersion:a,__html:i,richVersion:l,...r})=>c(g,{className:u("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?lv():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,n?rv(n):null,i?o(Ae,{richVersion:l,__html:i}):null]})]}))),lv=()=>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"}),rv=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),sv=d((({prefix:e,unit:t,suffix:n})=>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,n?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:n})}):null]}))),ov=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(sv,{prefix:t,unit:n,suffix:a})})})),cv=Vt((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r=!1,image:s,...c})=>{const d=_();return o(g,{className:u("relative flex flex-col",ux[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:i,isTheme:l,...c,children:P({...c,extraProps:{className:u("w-full",Fd(r)),...mx(a)}})})}),{childrenTypes:[]}),dv=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",mv=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=_();return c(g,{className:e,defaultPadding:dv(e),...i,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(l)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(l)(n)})}):null]})})),uv={AdTile:Lt,ApplicationForm:rr,ApplicationLeadForm:_d,BankAccountFiltration:Rm,BenefitsBlock:Dm,BonusBenefitsBlock:Vm,ButtonsBlock:Lm,CalculatorBonus:Ym,CalculatorBusinessDeposit:au,CalculatorCredit:yo,CalculatorDeposit:Nu,CalculatorRefinancing:Bu,CardTransfer:Lu,Carousel:Gu,CarouselCard:Zu,CarouselCatalogCard:eh,CarouselLinks:ah,CarouselRecommendationCard:mh,CarouselTariffsCard:gh,ContactsBlock:xh,CreditCardForm:up,CreditForm:Vp,DepositFiltration:Up,Depository:lg,ErrorBlock:sg,ExchangeRateTile:Vg,Footer:bf,GracePeriod:yf,GrantSupport:Cf,Header:ox,Headline:S,HorizontalLayout:hx,ImgBlock:px,InsuranceAmountBlock:Nx,InvestmentInfo:kx,LinkDocs:Fx,MobileAppTile:Ux,MortgageFiltration:mb,OfficesAtmsMap:Vb,Placeholder:Fb,ProductBlock:Ft,ProductGallery:$b,RepresentativeOfficeInfo:Ub,RichTextBlock:Hb,RollupItem:Jb,SafeDepositRental:Ny,StepsBlock:ky,StickyBottomMenu:Ry,TabsLayout:My,TariffsTable:av,TextBlock:iv,UnitBlock:ov,VerticalLayout:cv,Video:mv},hv=ce((()=>{i((()=>{Qt()}),[]);const e=tn();hn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Xt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),pv="cookie",gv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();ef((()=>{globalThis.localStorage?.getItem(pv)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem(pv,"true"),a()}),[]);return t&&e?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:o(Ae,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Kl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function fv(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}function xv(e,t,n){i((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const a=n[t];a&&a(e)}}))),[e,t,...Object.values(n)])}const bv=()=>{const[e,{push:t,pop:n,clear:i}]=function(e=[]){const[t,n]=a(e),i=l((e=>n((t=>[...t,e]))),[]),r=l((()=>n((e=>e.slice(0,-1)))),[]),s=l((e=>n((t=>t.filter((t=>t!==e))))),[]),o=l((()=>n([])),[]);return[t,{setList:n,push:i,pop:r,remove:s,clear:o}]}();return xv(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},yv=d((()=>{const[e,{close:t}]=bv(),n=Boolean(e.length);return fv(t),i((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==e.length-1}),children:t},String(n||a))))}):null})),vv=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return xv(ue.observable,"popup",{open:t,close:n}),fv(n),e?o("div",{className:u("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})),Nv="header",wv="footer",Cv="sticky-footer",Sv={},kv=d((({className:e,data:t=Sv,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);hv(),dg();const m={key:"",page:{slots:i,blocks:l,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[i?.[Nv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(i?.[Nv],{...m,slotName:Nv})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),B(i?.[wv],{...m,slotName:wv})]})]}),i?.[Cv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(i?.[Cv],{...m,slotName:Cv})}):null,o(yv,{}),o(vv,{}),o(gv,{__html:d?.cookieContent?.__html})]})}));Object.assign(kv,{childrenTypes:[],slots:()=>[Nv,wv,Cv]});e.Blocks=uv,e.ContentPage=kv,e.handlerDecorator=ce,e.joinList=gm,e.locationNavigator=Jt,e.packageVersion="0.14.751",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=_,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).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),l=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),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,n){const{children:a,...l}=t||{},i=n?.slots?.default,r=a||i&&i();return e(Object.assign(l,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={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","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:l,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],l||a,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:l})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||l}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={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"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:l,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:a}):null,l?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:l}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:l,blockDecorator:i=k,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...a},l):null}},l)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:l,renderProps:i=T,...r})=>{const s=l?(e,t)=>T(e,t,l):i;return(e||[]).map(((e,l)=>s(e,{...r,key:`${t||e.type}-${l}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},l)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:l}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:l}):null)}function _(){return _._impl()}_._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),_.setup=e=>{_._impl=e};const D=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),F=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:V,hasPrefix:F});const $="/api/",j=`${$}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),O(t),[E.CDN,$].some((e=>F(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`${j}/${t}/attachment`;const a=t?.startsWith("/");return V(F(t,n)?"":n,a?"/":(l=e.pathname,l?.split("/").slice(0,-1).join("/")),t);var l},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W={small:"16",medium:"24",large:"48",xl:"78"},H=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:l=a,iconVersion:i="color",size:r,width:s=r&&W[r],height:d=s})=>{const m=_(),h="normal"===i?`${n}.svg`:`sprites.svg#${n}`,p=U(m)(V(E.CDN,"/icons/",h));return"normal"===i?o("img",{className:e,style:Y(e,d),src:p,alt:a,title:l,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:u(q[i],{"w-full h-full":!s,invert:"white"===i},t),width:s,height:d,"aria-hidden":"true",children:[l?o("title",{children:l}):null,a?o("desc",{children:a}):null,o("use",{href:p,xlinkHref:p})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),K=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(K.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const a=_();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:l},i)=>o("source",{srcSet:J(a)(e),type:te(n),media:l?`(max-width: ${l}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(a)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("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}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...a})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):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","":""},le="bg-main-divider text-main-disabled",ie={primary:le,secondary:le,white:le,link:"",transparent:"",gray:le,"":""},re="text-center font-sans select-none",se={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","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);function de(e,t){const n=s({});return r((()=>new Proxy({},{get:(a,l)=>(n.current||={},n.current[l]||=n=>e.fire(t,{...n??{},type:l}),n.current[l])})),[e,t])}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class me{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const ue=new me,he=()=>de(ue.emitter,"dialog");function pe(){const e=X(K.SITE_URL),t=_(),{closeAll:n}=he();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(a({...e,href:n}))}};function a({href:a,target:l,onClick:i}){return r=>{i?.(r),ge(a,l,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}const ge=(e,t,n)=>{if(!M(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},xe=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:l,version:i="primary"}=e,r=ye(e)&&"hidden lg:block";return c("div",{className:u(be(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[i]),children:a}):null,ye(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,l?o("div",{className:u(r,se[i]),children:l}):null]})})),be=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const l=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",ye(e)?l:"h-12 w-12 m-auto",{"rounded-full":a})},ye=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ve=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ne=d((({disabled:e,children:t,method:n="LINK",href:a,...l})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:l,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,l].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:a}),s=pe()({onClick:r,href:a,...l}),c=t??o(xe,{...s});return o(e?Ce:we,{...s,children:c})})),we=d((({className:e="",href:t,rel:n,target:a,ariaLabel:l,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:a,"aria-label":l||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...fe(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:a,children:l})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ve({className:e,rounded:a,version:n}),children:l})));function Se({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const l="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),o(Ne,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=a(false);return l((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:l,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=_(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Se({version:t,handleClick:N,text:w}),l?o("div",{className:"relative h-full",children:l}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Pe(P({...b,extraProps:{className:"@container-normal"}})),Te(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Be(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Be=e=>u(e?"row-span-2":"@xl:row-span-2"),Pe=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,_e=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("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,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:a=!0,children:l})=>e||l?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",a?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:l})}):null)),Ee=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ae=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ae,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ee(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?_e(n.icon,t):null,o("div",{children:Oe(n)})]}))),Ve=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Fe=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Oe)}):null)),Le=d((({isTabularBenefits:e,...t})=>o(e?Fe:Ve,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Ue(n))}):null,Ue=(e="")=>(t,n)=>{const{text:a,icon:l,iconRight:i,version:r,...s}=t||{},c=qe(l,r),d=qe(i,r);return a||l?.icon?o(Ne,{className:u("basis-full @lg:basis-auto",e),appendLeft:We({...l,iconVersion:c}),appendRight:We({...i,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},qe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=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(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>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(Ae,{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:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ae,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:l,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:k,children:I,...T})=>{const R=y?.src?o(ne,{image:y}):null,B=o(S,{title:a,description:l,headlineVersion:i,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Re,{className:e,padding:t,defaultPadding:n,...g?{title:B}:{insetTitle:B},...Qe(R,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Le,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(De,{richVersion:p,__html:h,isDotted:m,itemSize:Je[i]}):null,I,f?.length?o(Ye,{priceList:f}):null,et(x)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?o(Ke,{tags:e}):null;class tt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof tt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const nt=()=>!0,at=(e,t)=>(...n)=>e(...n)&&t(...n),lt=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const it=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&"object"==typeof e&&!it(e)),st=e=>e;function ot(e){return e instanceof tt?e._:e}class ct extends tt{from(e){return this.of(e.map(((e=st)=>([,t])=>e(t))(ot)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(it(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,a)=>a===e?t:this._[a])):Array.from({length:Number(e)+1},((n,a)=>a===e?t:void 0)))}}class dt extends tt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class mt extends tt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ot(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ut extends tt{proto=lt([e=>it(this._)||"number"==typeof e,()=>ct.prototype],[e=>rt(this._)||"string"==typeof e,()=>mt.prototype],[nt,()=>dt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ht=e=>e instanceof tt?e:new ut(e),pt=e=>{const t=(t,...n)=>ot(e(ht(t),...n));return t.fn=e,t},gt=[],ft=e=>e instanceof Function?e:t=>e===t,xt=e=>(t,n,a=gt)=>ht(t).entries().reduce(((t,[n,l])=>xt(e)(l,t,a.concat(n))),e(n,[a,ht(t)])),bt=pt(((e,[t,n])=>{const[a,...l]=t;return e.set(a,l.length?bt(e.get(a),[l,n]):n)})),yt=pt(((e,t)=>t.reduce(bt.fn,e))),vt=e=>xt(((e,[t,n])=>Nt(n)?[...e,[t,ot(n)]]:e))(e,[]),Nt=e=>0===e.size();pt(((e,t=gt)=>t.reduce(((e,t)=>e.get(t)),e)));const wt=pt(((e,[t,...n])=>n.length?e.set(t,wt(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(St=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-St.length]))).reduceRight(at,nt);var St;const kt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(It,e),It=lt([it,(e,t)=>e[parseInt(t,10)]],[rt,(e,t)=>e[t]],[nt,st]),Tt=(e,t)=>((e,t={})=>n=>yt(t,vt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(a=e,a.slice(0,-1)),kt(t(n),n)]:[e,n];var a}))(e),Rt=e=>vt(e).filter(((e=st)=>([t])=>e(t))(Ct)),Bt=e=>{return t=Rt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Pt(e,t){try{return e?await _t(e,t):null}catch(e){console.error(e)}return null}const _t=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],Et={},At=["/portal-resources"],Mt=(e,t)=>Tt(e,(e=>t?.[e])),Ot=(e,t)=>{const n=Bt(e),[i,r]=a({});return l((()=>{zt(n).then(r)}),[n.join()]),n.length?Mt(e,{...t,...i}):e},zt=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,Et[e]||=await _t(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},l=Object.entries(n).flatMap((([,e])=>Bt(e)));return l.length?zt(l,a):a}return t};function Vt(e,t={}){const n=d((t=>{const n=Ot((({block:e,options:t,className:n,defaultPadding:a,padding:l,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Ft=Vt((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Ft,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getFullYear());return t?`${l}-${a}-${n}`:`${n}.${a}.${l}`}},Ut=e=>e?.replace(/[^+\d]/g,""),qt="/api/v1";const Wt=e=>e?{phone:Ut(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ut(e)}:{},Xt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:l}of e??[])t[a??""]?.(n,l)};function Jt(){return Jt._impl()}Jt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Jt.setup=e=>{Jt._impl=e};const Zt="rshb-query-params";function Qt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Zt)||"";return e&&globalThis.sessionStorage?.setItem(Zt,e),e}const en=e=>{const t=e.target?.closest("a"),n=Jt();if(A(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}function nn(e=!1){const[t,n]=a(e),l=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:l,setFalse:r,toggle:s}]}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const an=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],ln=e=>!e?.length,rn=e=>t=>n=>e(n)?[]:[t],sn={},on=[];const cn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function dn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,u]=function(e,t,n){const[r,s]=a(e),o=i((e=>s((a=>{const l=e instanceof Function?e(a):e,i=t?t(l):l,r=cn(l,i)?l:i;return!cn(a,r)&&n?.(r),r}))),[t,n]);return l((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=nn(!1),f=s({}),[x,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??sn),[t,e]),a=r((()=>an(n)(e)??on),[n,e]),l=ln(a);return[n,{isValid:l,errors:a}]}(m,n),v=i(((e,t={})=>{const{parse:n,format:a,onChange:l}=t,i=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(i):[];return{value:a?a(i):i,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;l?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=i((e=>{f.current=e,u(e)}),[u]),w=i((()=>{f.current={},g(),u(e)}),[e,u]),C=i((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:C}]}const mn=d((e=>{const{className:t,title:n,children:a,...l}=e;return o(g,{className:t,defaultPadding:"p-6xl",...l,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function un(e,t={}){const{open:n,close:a,...l}=he();return{open:i(((l,i={})=>n({dialog:o(e,{...t,...l,onClose:()=>{a(),l.onClose?.()}}),...i})),[e,n,a]),close:a,...l}}function hn(e,t,n,a){l((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function pn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return hn(globalThis.document,"click",n),t}const gn=({label:e,errors:t})=>e&&t?`${e}*`:e,fn=()=>{},xn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",bn=e=>e?xn:"border-error",yn=e=>e?o(Ae,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,vn=d((({key:e,className:t="",id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),S=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);l((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=bn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[yn(d),N?o("textarea",{className:u("block resize-y min-h-24",Nn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Nn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Nn="w-full border rounded-md text-primary-text outline-none p-m",wn=e=>o("div",{className:"h-6",children:e?o(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Cn=e=>e?.value||"",Sn=e=>{const{url:t,query:n,queryPrefix:a,requestData:l={},responseItemHandler:i=Cn}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`${qt}/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:o})}).then((e=>e.json())).then(r)},kn={url:"suggest/address"},In={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},addressRegistration:kn,addressFact:kn,organizationAddress:kn,addressCourier:kn},Tn=()=>de(ue.emitter,"popup"),Rn=d((({options:e,container:t,onChange:n})=>{const[i,r]=a(-1),s=t=>{const a=e.length-1;"ArrowDown"===t.key?r(i<a?i+1:0):"ArrowUp"===t.key?r(i>0?i-1:a):"Enter"===t.key&&e[i]&&(t.preventDefault(),n(e[i]))};return l((()=>(t.addEventListener("keydown",s),()=>t.removeEventListener("keydown",s))),[i]),o("div",{className:"bg-white text-l overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,t)=>o("div",{className:u("flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",{"bg-main-divider":i===t}),role:"listitem",onMouseDown:()=>n(e),children:o("span",{className:"min-h-6",children:e.processedValue})},t.toString())))})}));function Bn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=Tn(),x=In[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c?.(e.processedValue),d?.(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await Sn({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const a=(...l)=>{a.dispose(),n=setTimeout((()=>{e(...l)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return l((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:l,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Rn,{options:p,container:n,value:t,onChange:y}),top:a+globalThis.scrollY+r,left:l,width:i})}),[e,p,t,y]),v}const Pn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=fn,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:b=!1,maxLength:y,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=i((e=>{v&&!w&&S(),y?e.length<=y&&d(e):d(e)}),[v,w,d]);l((()=>{b&&n&&d(_n(n))}),[n]);const T=Bn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(vn,{disabled:N,type:g||"text","aria-label":t,label:gn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:Dn(a,s,t)})}),wn(r)]})})),_n=(e="")=>e.replace(/[^\d]+/g,""),Dn=(e,t,n)=>t&&!n?`${e}*`:e,En=e=>e?.text||e?.key||"",An=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:a,onChange:l,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:An(t,a).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===n?.key,onClick:t=>{t.stopPropagation(),l&&l(e)},children:[o("span",{className:"min-h-6",children:En(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const On=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=nn(),[N,w]=a(""),C=Fn(x,n.length),S=b&&!C,k=i((()=>{C||v()}),[C]),I=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=Tn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=pn(u);return l((()=>{if(!e||!p.current)return;const l=p.current,{top:i,left:r,width:s,height:c}=l.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[yn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Vn(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:En(r)||h}),zn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(vn,{type:"text",autoFocus:!0,value:N,onChange:w,disabled:C})}):null]})]})})),zn=(e,t)=>o(H,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Vn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Fn=(e,t)=>e||0===t,Ln=d((({className:e="",label:t,error:n,errors:a,...l})=>c("div",{className:e,children:[o(On,{...l,valid:!n,label:gn({label:t,errors:a})}),wn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(Ln,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Un=(e="")=>Boolean("trade"===e||"all"===e),qn=e=>null!=e,Wn=new Map,Hn=(e,t=Wn)=>n=>{const a=Gn(n),l=t.get(a);if(a&&qn(l))return l;const i=e(...n);return a&&qn(i)&&t.set(a,Promise.resolve(i)),i},Yn=e=>Boolean(e?.every((e=>Array.isArray(e)?Yn(e):!e||"string"==typeof e))),Gn=e=>Yn(e)?e.toString():"",Kn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Xn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Jn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);l((()=>{if(!s.some(qn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Hn(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&Kn(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Jn(e){return Array.isArray(e)?e:e instanceof Function?Jn(e()):[e]}const Zn=`${qt}/branches`,Qn=[];const ea=async e=>await Pt(e,{method:"GET"})||Qn;function ta(e=!1){const{data:t}=Xn(`${qt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,_t);return Array.isArray(t)?t:[]}const na=(e="")=>"ULTRASERVICE"===e,aa=d((({field:e,input:t,params:n})=>{const a=na(n?.typeForm),i=e("region"),r=i?.value?.key,s=i?.value?.text,c=a?ta(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Xn(e?`${Zn}?regionCode=${e}`:null,ea);return t||Qn}(r)?.filter((e=>e?.address));return l((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(Ln,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),la=(e,{normalize:t,format:n})=>{const{value:l,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(l)),s&&s()}),[o,l]);return{value:c||!n?l:n(l),onFocus:m,onBlur:u}},ia=(e,t,n)=>Math.max(t,Math.min(e,n));function ra(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function sa({list:e=[],min:t,max:n,step:a,value:l=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(l):l,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-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:u("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:n,step:a,value:s,disabled:i,onChange:t=>{const n=ra(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const oa=1,ca=100,da=d((e=>{const{className:t,title:n,items:a=[],list:l=[],min:r=(l.length?0:oa),max:s=(l.length?l.length-1:ca),step:d=1,value:m=l[0]||r,disabled:h=!1,onChange:p}=e,g=la(e,{normalize:(e=0)=>l.length?ma(l)(e):ia(e,r,s),format:He()}),f=i((e=>{p&&p(ra(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",xn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),sa({list:l,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ua(a)]})})),ma=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ua=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ha=["От 1 000 ₽","До 1 000 000 000 ₽"],pa=d((({field:e,input:t})=>o(da,{title:"Сумма, ₽",items:ha,min:1e3,max:1e9,...e(t?.name??"")}))),ga=d((({field:e,input:t})=>o(Pn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),fa=d((({field:e,input:t})=>o(Pn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),xa=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:l,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(l,a,d),n=ba(t,e),c=ya(t,i,r);u.push(o("td",{children:o("div",{className:va(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},ba=(e,t)=>t&&e.toDateString()===t.toDateString(),ya=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),va=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Na=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],wa=d((({today:e,currentMonth:t,currentYear:n,min:a,max:l,onDateSelect:s=fn,setValue:d=fn})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Na.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:xa({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:l,onDateClick:m})})]})})),Ca=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Sa(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],l=a.findIndex(ka),i=a.map(((e,t)=>Ta(e)?a.slice(0,t).filter(Ta).length:-1)),r=a.map(((e,t)=>Ia(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(l,s)).join("")}const ka=e=>"_"===e,Ia=e=>/\d/.test(e),Ta=e=>ka(e)||Ia(e),Ra=1940,Ba={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Pa=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(i||"");return l((()=>{g(i||"")}),[i]),l((()=>{Da({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Sa(t,"__.__.____"))},onBlur:()=>{_a(p)?Da({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(i||"")},disabled:r}),r?null:o(H,{className:"mr-s",...Ba})]})})),_a=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Ra&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let l=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),l++;return Number(t)>0&&Number(t)<=l}return!1},Da=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(_a(e)){const{day:l,month:i,year:r}=(e=>{const[t,n,a]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(a)}})(e);t(i),n(r),a?.(new Date(r,i,l))}},Ea=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:l,setSelectedYear:i,disabled:r=!1})=>o(Pa,{onChange:a,disabled:r,onClick:e,value:t&&jt(t),setSelectedMonth:l,setSelectedYear:i,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Aa=Ca.map((e=>({key:e}))),Ma=Array.from({length:(new Date).getFullYear()-Ra+1},((e,t)=>Ra+t)).reverse().map((e=>({key:String(e)}))),Oa=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},za=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:l})=>{a&&l?.(new Date(t,n,Math.min(e,a.getDate())))},Va={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Fa={className:"min-w-32",iconVersion:"black",isBorder:!1},La=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=nn(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:l,selectedYear:r,onChange:s,value:o})=>{const c=pn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?a(n+1):(a(0),l(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?a(n-1):(a(11),l(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{a(Ca.indexOf(e));const t=Oa(r,Ca.indexOf(e));za({maxDateOfMonth:t,selectedYear:r,selectedMonth:Ca.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{l(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Aa,yearsOptions:Ma,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),R=((e,t)=>{const[n,i]=a(!1);return l((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[yn(t),c("div",{className:"relative",children:[Ea({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":R}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(H,{...Va,className:"-rotate-90 cursor-pointer"})}),o(On,{onChange:w,value:{key:Ca[f]},options:S,...Fa}),o(On,{onChange:C,value:{key:String(b)},options:k,...Fa}),o("div",{className:"my-auto",onClick:N,children:o(H,{...Va,className:"rotate-90 cursor-pointer"})})]}),o(wa,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),$a=d((({className:e,label:t,error:n,errors:a,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(La,{label:gn({label:t,errors:a}),valid:Boolean(!n),...l}),wn(n)]}))),ja=d((({field:e,input:t})=>o($a,{label:"Дата рождения",...e(t?.name??"")}))),Ua=d((({field:e,input:t})=>o(Pn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),qa=d((({field:e,input:t})=>o(Pn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Wa=d((({className:e,viewBox:t,fill:n="none",width:a,height:l,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:l,children:i.map((({d:e,fill:t,...n},a)=>{const l={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:l.stroke,strokeLinecap:l.strokeLinecap,strokeLinejoin:l.strokeLinejoin,strokeWidth:l.strokeWidth,strokeMiterlimit:l.strokeMiterlimit},a)}))}))),Ha="appearance-none w-5 h-5 border-solid flex-none",Ya=[{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"}],Ga=d((({className:e,value:t,text:n,disabled:a,isRadio:l,onChange:r})=>{const s=i((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=l?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Wa,{paths:Ya,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:u("flex items-center relative group/box",Xa(a)),onClick:s,children:[o("div",{className:u(Ha,"m-0",l?"rounded-full border-2":Za(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Ja(l),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Ka(n)]})})})),Ka=e=>e?o("div",{className:"ml-s",children:o(Ae,{size:"text-l",font:"font-light",children:e})}):null,Xa=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Ja=(e=!1)=>e?"radio":"checkbox",Za=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Qa=d((({field:e,input:t})=>o(Ga,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")}))),el=d((({field:e,input:t})=>o($a,{label:"Желаемая дата встречи",...e(t?.name??"")}))),tl=d((({field:e,input:t})=>o(Pn,{label:"Электронная почта",...e(t?.name??""),...t}))),nl=[{key:"ULTRASERVICE",text:"Ультра"}],al=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ll=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],il=d((({field:e,input:t})=>o(Ln,{label:"Способ получения ответа",options:ll,...e(t?.name??"")}))),rl=d((({field:e,input:t})=>o(Pn,{label:"ФИО",...e(t?.name??""),...t})));function sl(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}function ol(e,t){return sl(e,t),sl(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class cl{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new me){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class dl{bus;store=new Map;get size(){return this.store.size}constructor(e=new me){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const ml={};function ul(e,t=ml){const n=s(null),o=function(){const[,e]=a(0);return i((()=>e((e=>(e+1)%65536))),[])}();return l((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,a)=>(n.current||=new Set,n.current.add(a),e.getItem(a)),has:(t,a)=>(n.current||=new Set,n.current.add(a),e.hasItem(a)),set:(t,n,a)=>(e.setItem(n,a),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const hl=new dl;function pl(e){return ul(hl,e)}ol(hl,new cl(globalThis?.localStorage));const gl=()=>pl(),fl=(e,t)=>{if(!t)return null;const n=vl(e),a=+t?.split(".")[0],l=+t?.split(".")[1];switch(a){case 1:return n("AGRICULTURE");case 35:return n("FUEL_AND_ENERGY");case 41:case 42:case 43:return n("CONSTRUCTION");case 46:case 47:return n("TRADE");case 55:case 79:return n("TOURISM");case 62:return n("TECHNOLOGY");case 63:return n("CONSULTING_SERVICE");case 64:return n("BANK");case 65:return n("INSURER");case 66:return n("FINANCIAL_INSTITUTIONS");case 72:case 74:return n("SCIENCE");case 80:return n("SECURITY");case 84:return n(l<22?"GOVERNANCE":22===l?"ARMY":"OTHER_SECTORS");case 85:return n("EDUCATION");case 86:return n("HEALTHCARE");case 87:return n("SOCIAL_SPHERE");default:return n(a>=10&&a<=33?"INDUSTRY":a>=5&&a<=9?"FUEL_AND_ENERGY":a>=49&&a<=53?"TRANSPORT":"OTHER_SECTORS")}},xl=(e,t)=>{if(!t)return null;const[n]=[e?.find((e=>t<=Number(e.description)))].map((e=>({key:e?.key??"",text:e?.value??""})));return n},bl=(e,t)=>{const n=vl(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},yl=(e,t,n)=>{const a=vl(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},vl=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,Nl=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,wl=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,l=i((t=>{e?.(n)?.onChange?.(Cl(t))}),[]),r=i((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Pn,{disabled:t?.filledByEsia&&Nl(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:l})})),Cl=e=>({apartment:e?.data?.flat,city:e?.data?.city,district:e?.data?.area_with_type,fullAddress:e?.unrestricted_value,fiasCode:e?.data?.fias_id,house:e?.data?.house,locality:e?.data?.settlement_with_type,okatoRegionCode:e?.data?.okato,postcode:e?.data?.postal_code,region:e?.data?.region,regionCode:e?.data?.region_kladr_id?e?.data?.region_kladr_id.substring(0,2):"",street:e?.data?.street,qc:e?.data?.qc,qcComplete:e?.data?.qc_complete,qcHouse:e?.data?.qc_house}),Sl=(e,t,n)=>{const{okved:a,okopf:l,inn:i}=kl(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Cl(n.data?.address));const r={amountWorkers:xl(e?.amountWorkers,n.data?.employee_count),employerActivities:fl(e?.employerActivities??[],a),organization:yl(e?.organization??[],l,i),employerOrganization:bl(e?.employerOrganization??[],l)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},kl=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Il=d((({field:e,input:t})=>{const n=gl(),a=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Sl(n,e,t)}),[]);return o(Pn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),Tl=d((({className:e,text:t,value:n,key:a,disabled:l,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Ga,{text:t,value:n,disabled:l,onChange:r},a),wn(i)]}))),Rl=d((({field:e,input:t})=>o(Tl,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Bl=`${qt}/outservice`,Pl=[];async function _l(){const e=await Pt(`${Bl}/outserviceregions`);return e&&Array.isArray(e)?e:Pl}const Dl=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:i}=Xn("outServiceRegions",_l),s=r((()=>i?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[i,a]);return l((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(Ln,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),El=d((({field:e,input:t})=>o(Pn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Nl(e,t?.name??""),...e(t?.name??""),...t}))),Al=d((({field:e,input:t})=>o(Pn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Nl(e,t.name??""),...e(t?.name??""),...t}))),Ml=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!e),children:[o("div",{className:u("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:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Ol=d((({field:e,input:t})=>Un(e("acquiringType")?.value?.key)?o(Ml,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),zl=d((({field:e,input:t})=>o(Pn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),Vl=e=>"_"===e,Fl=e=>/\d/.test(e),Ll=e=>Vl(e)||Fl(e),$l=[..."+7 (___) ___-__-__"],jl=$l.findIndex(Vl),Ul=$l.map(((e,t)=>Ll(e)?$l.slice(0,t).filter(Ll).length:-1));function ql(e){const t=e.replace(/\D/g,""),n=$l.map(((e,n)=>Fl(e)?e:t.charAt(Ul[n])||e)),a=Ul.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(jl,a)):n).join("")}const Wl=d((({children:e,onChange:t,...n})=>{const a=i((e=>t&&t(ql(e))),[t]),l=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(vn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>l(e?.target?.value||""),children:e})})),Hl=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Wl,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Yl=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Hl,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&Nl(e,n),...t})})),Gl=d((({field:e})=>Un(e("acquiringType")?.value?.key)?o(Ml,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Kl=Vt((({field:e,input:t,source:n})=>o(Ln,{placeholder:"Выберите продукт",label:"Продукт",options:Xl(n?.productList),...e(t?.name??"")}))),Xl=e=>(e??[]).map((e=>({key:e,value:e}))),Jl=`${qt}/regions`,Zl=[];function Ql(e=Jl){const{data:t}=Xn(e,_t);return Array.isArray(t)?t:Zl}const ei=`${qt}/outservice/outserviceregions`,ti=d((({field:e,input:t,params:n})=>{var a;const l=Ql((a=n?.typeForm,"OUTSERVICE"===a?ei:void 0));return o(Ln,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...e(t?.name??"")})})),ni=d((({field:e,input:t})=>{const n=ta(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Ln,{label:"Регион",placeholder:"Выберите регион",options:a,...e(t?.name??"")})})),ai=(e,t)=>{const{value:n,isDirty:a}=e,l=a?t(n):[];return{...e,errors:l,error:l[0]}},li=rn((e=>null!=e&&""!==e)),ii="Некорректно заполненное поле",ri="Укажите регион, город/населенный пункт, улицу, дом",si=e=>li(e??ii),oi=e=>rn((e=>e?.key&&""!==e?.key))(e??ii),ci=e=>rn((e=>"string"==typeof e&&/^[0-9]{1,2}$/g.test(e)))(e??ii),di=e=>rn((e=>"string"==typeof e&&e.length>1&&vi(e)))(e??ii),mi=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??ii),ui=e=>rn((e=>"string"==typeof e&&6===e.length))(e),hi=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),pi=e=>rn(hi)(e),gi=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),fi=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},xi=e=>Boolean(e.region&&e.city&&e.house),bi=()=>rn(xi)(ri),yi=/^[\u0400-\u04FF\d\s]+$/u,vi=(e="")=>yi.test(e),Ni=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},wi={processPersonalDataFlg:gi,consentProviderFlg:gi,consentInformFlg:gi,consentPfrFlg:gi,consentOthersFlg:gi},Ci={addressCourier:bi(),paymentSystem:si("Укажите тип платежной системы"),currency:si("Укажите валюту"),cardCategory:si("Укажите категорию карты"),codeWord:(Si="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&vi(e)))(Si??ii)),confirmationIncome:oi(),methodObtain:si(),deliveryDate:si("Укажите дату доставки")};var Si;const ki={organization:oi("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(ri),organizationPhone:pi("Укажите номер телефона"),organizationName:si("Укажите наименование организации"),legalForm:si("Укажите ОПФ"),generalSeniority:ci("Укажите количество лет стажа"),lastJobExperience:ci("Укажите стаж на последнем месте работы"),experience5Years:ci("Укажите общий стаж за последние 5 лет"),jobsNumber:ci("Укажите количество мест работы за последние 5 лет"),beginDate:si("Укажите дату заключения трудового договора"),addressFact:bi(),addressRegistration:bi(),addressRetail:oi("Выберите адрес банка"),addressMatch:si(),sex:si("Укажите свой пол"),limitedBirthday:rn(Ni)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:si("Укажите место рождения"),education:oi("Выберите ваше образование"),housing:oi("Выберите тип жилья"),amountWorkers:oi("Выберите информацию о количестве сотрудников"),employment:oi("Выберите информацию о трудоустройстве"),employerActivities:oi("Выберите вид деятельности организации"),employerOrganization:oi("Выберите вид организации"),positionOrganization:oi("Выберите вашу должность"),familyStatus:oi("Выберите семейное положение"),familyMembers:mi(2,"Укажите количество членов семьи"),children:mi(2,"Укажите количество детей"),dependents:mi(2,"Укажите количество иждивенцев"),totalIncome:mi(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:mi(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(fi)(e))("Некорректный номер СНИЛС"),conscription:si(),armyIdFlg:gi,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:ui("Укажите номер паспорта"),dulIssueDateField:si("Укажите дату выдачи паспорта"),dulSubdivisionCode:ui("Укажите код подразделения"),dulIssuedBy:si("Укажите организацию, выдавшую паспорт"),participantDateRegistration:si("Укажите дату регистрации"),retirementIncome:si(),otherIncome:si(),wages:si(),mandatoryPayments:si(),disablePeopleFlg:si(),bankruptcyFlg:si(),shareholderFlg:si(),legalEntityName:si(),bankEmployeeCode:si(),partInBusiness:si(),regionRetail:oi("Выберите регион")},Ii={fullName:si(),addressBranch:oi(),desiredMeetingDate:si(),product:si(),localities:si(),partnerComments:si(),collectionCount:si(),acquiringType:oi(),serviceType:oi(),annualRevenue:si(),feedbackMethod:oi(),serviceDirection:oi(),secondaryPhone:pi("Укажите номер телефона"),region:oi(),surname:di("Укажите свою фамилию на кириллице"),name:di("Укажите своё имя на кириллице"),middleName:di("Укажите своё отчество на кириллице"),birthday:si("Укажите дату рождения"),phone:pi("Укажите номер телефона"),email:(e=>rn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>rn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:si(),typeForm:si(),consentToReceiveMaterials:gi,consentDataProcessing:gi,...wi,...ki,...Ci},Ti=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(Ri).map((({name:e})=>[e,Ii[e??""]])));return e=>n?Object.fromEntries(t.filter(Ri).filter(Bi(e)).map((({name:e})=>[e,Ii[e??""]]))):a},Ri=({name:e})=>Boolean(Ii[e??""]),Bi=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Pi=d((({field:e})=>{const t=e("secondaryPhone");return o(Hl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?ai(t,Ii.secondaryPhone):t})})),_i=d((({field:e,input:t})=>o(Ln,{label:"Направление обслуживания",placeholder:"Выберите направление",options:al,...e(t?.name??"")}))),Di=d((({field:e,input:t})=>o(Pn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Nl(e,"surname"),...e(t?.name??""),...t}))),Ei=["От 1 мес","До 15 лет"],Ai=d((({field:e})=>o(da,{title:"Срок, месяцев",items:Ei,min:1,max:180,...e("term")}))),Mi=d((({field:e,input:t})=>o(Ln,{label:"Тип обслуживания",options:nl,...e(t?.name??"")}))),Oi={horizontal:"@lg:flex-row",vertical:""},zi=d((({label:e,items:t,value:n,className:a,disabled:l=!1,orientation:i="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Oi[i],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ga,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:l},String(e))))})]}))),Vi=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Fi=d((({field:e,input:t})=>{const n=i((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(zi,{className:"whitespace-normal",orientation:"horizontal",items:Vi,...e(t?.name??"",{onChange:n})})})}));const Li={$ref:"/wcms-resources/outservice-productlist.json"},$i={fullName:rl,addressBranch:aa,desiredMeetingDate:el,product:e=>o(Kl,{...e,source:Li}),localities:Dl,isClient:Rl,partnerComments:zl,collectionCount:Ua,acquiringType:jn,onlineCheckout:Ol,posTerminal:Gl,serviceType:Mi,term:Ai,amount:pa,annualRevenue:ga,vedTypes:Fi,feedbackMethod:il,serviceDirection:_i,bankEmpolee:fa,secondaryPhone:Pi,applicationDate:e=>o(Pn,{label:"Дата и время обращения в Банк",...e}),region:e=>na(e?.params?.typeForm)?o(ni,{...e}):o(ti,{...e}),consentToReceiveMaterials:Qa,surname:Di,name:Al,middleName:El,birthday:ja,phone:Yl,email:tl,inn:Il,comment:qa},ji=(e,t,n={})=>(a,l)=>{const i={...$i,...n}[String(a.name)];return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})&&i?o("div",{children:o(i,{field:e,input:a,params:t})},l):null},Ui=e=>2===e?"@xl:grid-cols-2":"",qi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,Wi={primary:u("justify-center px-9 py-4","text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","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:u("justify-center px-9 py-4","text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","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")},Hi=u("group/btn-embedded","justify-between p-0","bg-transparent border border-transparent outline-none"),Yi=d((({className:e,type:t="button",version:n="primary",embedded:a,rounded:l=!0,disabled:s,role:c,data:d,dataTheme:m,children:h,onClick:p})=>{const g=i(ce((e=>{!s&&p?.(e)})),[s,p]),f=r((()=>fe(d)),[d]);return o("button",{className:u("font-sans flex items-center gap-xs relative",!s&&!a&&Wi[n],{[Hi]:a,"rounded-md":l,"bg-main-gray text-main-disabled cursor-not-allowed":s},e),type:t,role:c,"data-theme":m,...f,onClick:g,children:h})})),Gi=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(H,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Ki=d((({className:e,head:t,children:n,onClose:a,onClick:l})=>c("div",{className:u("relative bg-white pt-0 p-lg",e),role:"dialog",onClick:l,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Gi,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Xi=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Yi,{type:"button",onClick:n,children:"Хорошо"})]})})})),Ji=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:l,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,...m}=e,u=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:l,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Un(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${l}/Выручка=${r}`})(e):null,h={...m,...Qi(o),...Zi(c),...d&&{inn:d},...u?{partnerComments:u}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Zi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Qi=e=>e?{vedTypes:Object.fromEntries(Vi.map((({id:t})=>[t,t===e])))}:{},er={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:nl[0],feedbackMethod:ll[0],serviceDirection:al[0],vedTypes:Vi[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},tr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:a="big"})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===a?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),nr=d((({isLoading:e,disabled:t,children:n,...a})=>c(Yi,{type:"submit",disabled:e||t,...a,children:[e?o(tr,{blur:!0,size:"small"}):null,n]}))),ar=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ae,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ae,{children:t.text})}):null]}))),lr=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ga,{...e}),o(ar,{link:t})]}),wn(ai(e,gi).error)]}):o(ar,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(nr,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),ir={send:async function(e,t=!1){const{typeForm:n,region:a,phone:l="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${qt}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Yt(a,g),...Gt(i,g),...Wt(l),...Ht(s,"desiredMeetingDate"),...g?Ht(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Kt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},rr=d((({className:e,title:t,typeForm:n="",sections:a=[],button:l,link:s,endpoint:d,additionalParams:m,isContacts:h,data:p,...g})=>{const f=r((()=>a?.flatMap((e=>e?.inputs))||[]),[a]),x=r((()=>((e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||er[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),b=r((()=>Ti(f)),[f]),y=un(Xi),v=tn(),w=i((async(e,t)=>{const a=Ji({...e,...m}),l=Boolean(await ir.send(a,"lead"===d));y.open({ok:l,typeForm:n}),l&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),k=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return c(mn,{className:u("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[a.map(((e,t)=>c("div",{className:u(Ui(e.columns),"grid gap-x-m"),children:[qi(e.title),(e?.inputs||[])?.map(ji(C,{typeForm:n}))]},`section-${t}`))),lr(k?C("consentDataProcessing"):void 0,s,l)]}),h?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center 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]})})),sr=[{columns:2,inputs:[{name:"surname",required:!0,dadata:!0},{name:"name",required:!0,dadata:!0},{name:"middleName",dadata:!0},{name:"limitedBirthday",required:!0},{name:"phone",required:!0},{name:"email",required:!0,dadata:!0}]},{inputs:[{name:"processPersonalDataFlg",required:!0},{name:"consentProviderFlg",required:!0},{name:"consentOthersFlg",required:!0},{name:"consentInformFlg"},{name:"consentPfrFlg"}]}],or=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");l((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r,e("addressRegistration").value]);const s=i((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),c=i((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Pn,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),cr=d((({field:e,input:t})=>o(Tl,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),dr="/icons/MapMarkerClusterIcon.svg",mr="/icons/MapMarkerClusterYellowIcon.svg";function ur({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const l=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=hr("offices",e,l);if(n.length&&n.every((e=>"type"in e))){const a=hr("workplaces",e,l),r=pr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=pr(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(i)}else{const a=pr(n,"offices",e);i.add(a),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const hr=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?dr:mr,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),pr=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?dr:mr,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),gr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},fr={...gr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},xr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(fr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),br=e=>globalThis[e],yr=(e,t)=>{const n=document.getElementById(t);if(n){const t=br(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(br(e))}))}))}return new Promise(((n,a)=>{const l=document.createElement("script");l.src=t,l.async=!0,l.id=t,l.addEventListener("load",(()=>{n(br(e))})),l.addEventListener("error",(e=>{a(e)})),document.head.appendChild(l)}))};const vr=()=>function(e,t,n=!0){const[i,r]=a(void 0);return l((()=>{let a=!0;return yr(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Nr={...gr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},wr=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Nr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:n,width:"20",height:"16"})})})),Cr=[55.753995,37.614069],Sr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:i})=>{const r=s(null),d=s(null),m=vr();if(l((()=>{r.current?ur({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:kr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),ur({yandexMaps:m,map:r.current,points:e,isLoad:a})})),r.current&&i&&m?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,a,i]),!m)return null;const h="z-10";return c("div",{ref:d,className:u("relative","w-full",t),children:[a?o(tr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(wr,{yandexMaps:r}),o(wr,{yandexMaps:r,direction:"out"})]}),xr(r,m,u("right-2 top-80",h))]})})),kr=e=>{const t=[Tr(Ir(e,0)),Tr(Ir(e,1))];return t.every((e=>e))?t:Cr},Ir=(e,t)=>e.map((e=>e.coords?.[t])),Tr=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Rr=async(e,t,n)=>{try{return(await Br(e,t,n)).json()}catch(e){return console.error(e),null}};async function Br(e,t,n){const a=(()=>{const e=new Uint8Array(8);return globalThis.crypto.getRandomValues(e),e.reduce(((e,t)=>`${e}${t.toString(16).padStart(2,"0")}`),"")})();return globalThis?.fetch?.(`/light-api-cash/v1${e}`,{method:t,headers:{"Content-Type":"application/json","X-B3-Sampled":"1","X-B3-Spanid":a,"X-B3-Traceid":a,...Pr()},credentials:"include",body:n?JSON.stringify(n):null})}const Pr=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},_r=e=>Number(e.toString().replace(",",".")),Dr=d((({value:e,subText:t,children:n,isPhone:a,...l})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Er({textItems:i,subText:t,children:n,isPhone:a,...l})})),Er=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:l,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Ar(n,s),l?o(Ae,{color:a,size:"text-m",children:l}):null]}),Ar=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${Mr(e)}`,children:e.trim()}):e.trim()},String(n)))),Mr=e=>e.replace(/\D/g,""),Or=d((({className:e,children:t})=>o("div",{className:u("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}))),zr=d((({className:e,children:t})=>o("span",{className:u("inline-flex items-center text-start gap-s group-hover/btn-embedded:text-primary-main",e),children:t}))),Vr=d((({isUnfolded:e,...t})=>o(H,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Fr=d((({className:e,isUnfolded:t,label:n=(t?"Скрыть":"Развернуть"),embedded:a,...l})=>c(Yi,{className:u({"text-h4":!a},e),rounded:!1,embedded:a,...l,children:[o(zr,{children:n}),o(Vr,{isUnfolded:t,iconVersion:a?"color":""})]}))),Lr=d((({className:e,role:t="group",children:n})=>o("div",{className:u(e),role:t,children:n})));const $r=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),i=function(e,t){const n=s(null);return l((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),jr=d((({children:e})=>{const[t,{toggle:n}]=nn(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Lr,{className:"block sm:hidden",children:[o($r,{isUnfolded:t,children:e}),o(Fr,{className:"w-full my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),Ur=e=>{const t=Wr(e);return o(Dr,{label:"Режим работы",value:t,className:"max-w-none"})},qr=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Wr=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[qr({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),qr({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Hr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Yr=e=>Hr.map((([t,n,a])=>({key:t,title:a,short:n,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??"")}}))),Gr=e=>{if(!e)return null;const t=Kr(e);return c(Or,{className:"border-none",children:[o(Dr,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Xr)})}),o(Dr,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},Kr=e=>{const t=Hr.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},Xr=({short:e,status:t},n)=>o("div",{className:u("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(Ae,{size:"text-xs",children:e})},String(n)),Jr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Dr,{label:"Валюта",value:e.currency}):null,t?o(Dr,{label:"Купить",value:String(t)}):null,n?o(Dr,{label:"Продать",value:String(n)}):null]},String(a)),Zr={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"}},Qr=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Zr[n].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(Ae,{size:"text-m",color:Zr[n].text,children:t})]}))),es=(new Date).getDay(),ts=e=>{const[t]=e?.slice(es-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:l,hasLunch:i}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[l?o(Qr,{color:"green",children:l}):null,n&&i?o(Qr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Qr,{color:"red",children:"Выходной"})},ns=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",as=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:l},i)=>o(Dr,{label:e,value:t&&n?n:"",subText:ns({lunchHour:a,hasLunch:l,status:t}),subColor:!t||l?"text-error":"text-green-dark"},String(i)),ls=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,is=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,rs=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,ss=(e,t)=>{if(!e.workSchedule)return null;const n=Yr(e.workSchedule);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(Ae,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e.address})]}):null]}),ts(n)]}),o(jr,{children:os(e)})]},String(t))},os=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:l,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Yr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Or,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Dr,{label:"Факс",value:t,isPhone:!0}),o(Dr,{label:"Телефон филиала",value:e,isPhone:!0}),o(Dr,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Dr,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Dr,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Dr,{label:"Контакт-центр",value:l,isPhone:!0})]}),r?.isMatchesPattern?o(Or,{children:o(Dr,{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(as)})})}):c(Or,{children:[o(Dr,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Xr)})}),Ur(d)]}),r?.businessScheduleVisibleTag?Gr(r?.businessScheduleDescription):null,s?.currencies?.length?o(Or,{className:"flex-wrap",children:s?.currencies?.map(Jr)}):null]})},cs=({name:e="",address:t="",workSchedule:n})=>{const a=(l=e)?`${l?.charAt(0)?.toUpperCase()}${l?.slice(1)}`:"";var l;const i=`${t} ${(e=>{const t=Yr(e),n=e?Wr(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ls(n):rs(n,a):is(n):""})(n)}`;return{header:a,body:i}},ds={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},ms={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},us={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),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),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)},hs=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>us[t](e)))))},ps=()=>{},gs=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=ps,getBalloonRemoteWorkplaces:l=ps})=>{const[i,s,o,c]=r((()=>{const i=hs(e,n),r=hs(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,a,l]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},fs=e=>{const{data:t,error:n}=Xn(`/light-api-cash/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,xs);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},xs=async e=>await Pt(e,{method:"POST"})||[],bs=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),ys=d((({children:e})=>bs?e:null)),vs=d((({field:e,input:t})=>{const[n,i]=a([]),{data:r}=fs("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");l((()=>{(async()=>{const e=await(async e=>{const t=await Rr("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:_r(e.latitude??Cr[0]),gpsLongitude:_r(e.longitude??Cr[1])})))||[]})(s?.key??"");i(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=gs({data:n,filtrationState:{},getBalloon:cs});return c("div",{children:[o(Ln,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...d,isSearch:!0}),o("div",{className:"h-[600px]",children:o(ys,{children:o(Sr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),Ns=Vt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:l,...i})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Ln,{placeholder:a,options:r,...e(n),...i})})),ws=d((({field:e,input:t})=>{const{data:n}=fs("EMPLOYEES_NUMBER"),a=gl();return l((()=>{n&&(a.amountWorkers=n)}),[n]),o(Ns,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),Cs=d((({field:e,input:t})=>o(Tl,{text:"Наличие военного билета",...e(t?.name??"")}))),Ss=d((({field:e,input:t})=>o(Pn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),ks=d((({field:e,input:t})=>o(Tl,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),Is=d((({field:e,input:t})=>o($a,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),Ts=d((({field:e,input:t})=>o(Pn,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&Nl(e,"birthPlace")}))),Rs=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const Bs=d((({field:e,input:t})=>{const[n,r]=a([]),[s]=function(e){const t=globalThis.localStorage?.getItem(e),[n,l]=a(t?Rs(t):null);return[n,i((t=>{l((n=>{const a=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(a)),a}))}),[e])]}("programId"),{value:c,onChange:d}=e("cardCategory"),m=e("paymentSystem")?.value?.key;return l((()=>{m&&s&&(async()=>{const e=await(async(e,t)=>{const n=await Rr("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(m,s);r(e),Ps(e,c)||d&&d(null)})()}),[m]),o(Ns,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Ps=(e,t)=>e.some((e=>e.key===t?.key)),_s=d((({field:e,input:t})=>o(Pn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Ds=d((({field:e,input:t})=>o(Pn,{label:"Кодовое слово",...e(t?.name??""),...t}))),Es=d((({field:e,input:t})=>{const{data:n}=fs("INCOME_CERT_UNITED");return o(Ns,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),As=d((({field:e,input:t})=>{const{data:n}=fs("MILITARY_STATUS");return o(Ns,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Ms={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},Os=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Ki,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:n,children:[t?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Yi,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),zs=(e,t)=>{const{open:n}=un(Os),a=ke();return i((async()=>{if(e){const l=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Br(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return n?await n.blob():new Blob})(e,a));n({src:l,onDocumentRead:t})}}),[n,e,a])},Vs=d((({className:e,error:t,docId:n,...a})=>{const l=zs(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Ga,{...a}),n?o(Ne,{className:"text-primary-main",onClick:l,children:o(Ae,{children:"Ознакомиться"})}):null]}),wn(t)]})})),Fs=d((({field:e,input:t})=>t&&t.name?o(Vs,{text:Ms[t.name]?.text,docId:Ms[t.name]?.docId,...e(t.name)}):null)),Ls=Math.round(29.5),$s=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),js="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Us="flex flex-col lg:w-1/2 gap-2xl",qs="flex flex-col gap-y-xl min-w-52",Ws=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:l})=>o(Ae,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),l].filter(Boolean).join(" "):e}))),Hs=d((({className:e,title:t,value:n,color:a="text-secondary-text",...l})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ae,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Ws,{value:n,...l}):o(Ae,{size:"text-h3",children:"-"})]}))),Ys=(e=[],t=!1)=>Gs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Gs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Ks=(e,t=0)=>e?.sum?e.sum:t,Xs=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Js=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Zs=({min:e=0,max:t=0,availableMonths:n,...a})=>o(da,{items:[`От ${Qs(e)}`,`До ${Qs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Qs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,eo=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:l,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(zi,{orientation:a,items:e,value:e[l?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),to=e=>eo({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),no=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(da,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),ao=({field:e,defParams:t,calcParams:n,map:a,monthsValue:l="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(ia(t?.[l],n.minMonths,n.maxMonths))},lo=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:l,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(a+i)*(t+t/(Math.pow(1+t,l)-1)):a*(t+t/(Math.pow(1+t,l)-1))}return Math.round(a/l)+a*(e/1200)},io=e=>e,ro=(e=io)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),so=ro(),oo=(e=io)=>ro((t=>-e(t))),co=oo(),mo=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:uo([e,t],a),uo=([e,t],n=[])=>({[e]:n.length?co(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?so(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ho=(e,[t,n],a)=>e>=a[t]&&e<=a[n],po={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},go=e=>fo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&fo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&fo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&fo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),fo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],xo=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.rateRows||[po],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>go({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=mo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=mo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l})=>e?.find((e=>go({row:e,userInputParams:t,paramsViewSettings:n})&&ho(a,["minSum","maxSum"],e)&&ho(l,["minMonths","maxMonths"],e)))||po)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l}),{rate:u}=m,h=lo(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:l,monthlyPayment:h}},bo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),yo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},vo=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Gs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=dn({moneyValue:Ks(s,2e5),monthsValue:Xs(s,Ls),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=xo(g,n,r),b=to({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:y}=f("moneyValue"),{onChange:v}=f("monthsValue");return l((()=>{y&&y(ia(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),l((()=>{v&&v(ia(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),l((()=>{!bo(s)&&h&&ao({field:f,defParams:h,calcParams:x,map:yo,monthsValue:"minMonths"})}),[n,s]),o($s,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:Us,children:[no({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),Zs({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),No({...x,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(qs,"@4xl:w-1/2"),children:[o(Hs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hs,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Hs,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),je(a,{isVertical:!0}),Js(i)]})]})})})),No=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ga,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ga,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ga,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ga,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),wo="calculator",Co=d((({field:e,params:t})=>{const n=i((t=>{e(wo).onChange?.(t)}),[]);return o(vo,{...t?.calcData,padding:"p-0",defaultParams:ko(e(wo).value),onChange:n})})),So={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},ko=(e,t=!1)=>{const n=t?Io(So):So;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},Io=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),To=d((({field:e,input:t})=>{const{data:n}=fs("CREDIT_IN_RSHB");return o(Ns,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),Ro=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(zi,{label:gn({label:t,errors:a?.errors}),...a}),wn(n)]}))),Bo=[{id:"810",text:"Рубли"}],Po=d((({field:e,input:t})=>o(Ro,{label:"Валюта",orientation:"horizontal",items:Bo,...e(t?.name??"")}))),_o=d((({field:e,input:t})=>o($a,{label:"Дата доставки",...e(t?.name??"")}))),Do=d((({field:e,input:t})=>o(Pn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Eo=d((({field:e,input:t})=>o(Tl,{text:"Являюсь инвалидом",...e(t?.name??"")}))),Ao=d((({field:e,input:t})=>o($a,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&Nl(e,t?.name??"")}))),Mo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),l=i((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Pn,{disabled:t?.filledByEsia&&Nl(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:l,daDataQueryPrefix:n})})),Oo=d((({field:e,input:t})=>o(Pn,{disabled:t?.filledByEsia&&Nl(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),zo=d((({field:e,input:t})=>o(Pn,{disabled:t?.filledByEsia&&Nl(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),Vo=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Pn,{disabled:t?.filledByEsia&&Nl(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),Fo=d((({field:e,input:t})=>{const{data:n}=fs("EDUCATION_LEVEL");return o(Ns,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Lo=d((({field:e,input:t})=>{const{data:n}=fs("ORGANIZATION_ACTIVITY_TYPE"),a=gl();return l((()=>{n&&(a.employerActivities=n)}),[n]),o(Ns,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),$o=d((({field:e,input:t})=>{const{data:n}=fs("ORGANIZATION_KIND"),a=gl();return l((()=>{n&&(a.employerOrganization=n)}),[n]),o(Ns,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),jo=d((({field:e,input:t})=>{const{data:n}=fs("EMPLOYMENT_INFO_UNITED");return o(Ns,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Uo=d((({field:e,input:t})=>o(Pn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),qo=d((({field:e,input:t})=>{const n=i((n=>e(t?.name??"")?.onChange?.(String(ia(Number(n),0,5)))),[]);return o(Pn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...e(t?.name??""),...t,onChange:n})})),Wo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e(t?.name??""),i=e("familyStatus")?.value?.key,r="MARRIED"===i?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return l((()=>{a?.(d)}),[i,s,c]),o(Pn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:n,onChange:a})})),Ho=d((({field:e,input:t})=>{const{data:n}=fs("MARITAL_STATUS");return o(Ns,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Yo=d((({field:e,input:t})=>o(Pn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),Go=d((({field:e,input:t})=>{const{data:n}=fs("HOUSE_TYPE");return o(Ns,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Ko=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(H,{name:t,width:"24",height:"24",iconVersion:n})}),c("div",{className:"",children:[o(De,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Xo=d((({input:e})=>o(Ko,{__html:e?.label}))),Jo=d((({field:e,input:t})=>o(Pn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Zo=d((({field:e,input:t})=>o(Pn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),Qo=d((({field:e,input:t})=>o(Pn,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),ec=d((({field:e,input:t})=>o(Pn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),tc=d((({field:e,input:t})=>o($a,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&Nl(e,t.name??"")}))),nc=d((({field:e,input:t})=>o(Pn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),ac=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],lc=d((({field:e,input:t})=>o(Ro,{orientation:"horizontal",items:ac,...e(t?.name??"")}))),ic=d((({field:e,input:t})=>{const{data:n}=fs("ORGANIZATION_TYPE"),a=gl();return l((()=>{n&&(a.organization=n)}),[n]),o(Ns,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),rc=d((({field:e,input:t})=>{const n=gl(),a=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),Sl(n,e,t)}),[]);return o(Pn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),sc=d((({field:e,input:t})=>o(Pn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),oc=d((({field:e,input:t})=>o($a,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),cc=d((({field:e,input:t})=>{const n=i((n=>e(t?.name??"")?.onChange?.(String(ia(Number(n),0,100)))),[]);return o(Pn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...e(t?.name??""),...t,onChange:n})})),dc=e=>e.map((e=>({key:e.type,text:e.name})));const mc=e=>e?.key,uc=d((({field:e,input:t})=>{const[n,i]=a([]),s=pl();var c;c=async()=>{const{programId:e}=s;if(e){const t=await(async e=>{const t=await Rr("/public-data/creditProgramConditions","POST",{creditProgramId:e});return dc(t?.paymentSystems||[])})(e);i(t??[])}},l((()=>{const e=c();return()=>{e.then((e=>{e instanceof Function&&e()}))}}),[]);const d=r((()=>n?.map((e=>({id:e.key,text:e.text})))??[]),[n]);return o(Ro,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:mc,parse:e=>n?.find((t=>t.key===e))})})})),hc=d((({field:e,input:t})=>{const{data:n}=fs("POSITION");return o(Ns,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),pc=d((({field:e,input:t})=>{const{data:n}=fs("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Ln,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...e(t?.name??"")})})),gc=d((({field:e,input:t})=>o(Pn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),fc=["male","female"],xc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],bc=d((({field:e,input:t})=>{const n=e("name")?.value,{value:a,onChange:i}=e("sex");return l((()=>{n&&!a&&(async()=>{const e=await(async e=>{const t=await Sn({url:"/suggest/fio",requestData:{parts:["NAME"]},query:e}),n=t[0]?.data?.gender?.toLowerCase()||"";return fc.includes(n)?n:""})(n);e&&i?.(e)})()}),[]),o(Ro,{label:"Пол",orientation:"horizontal",items:xc,...e(t?.name??"")})})),yc=d((({field:e,input:t})=>o(Tl,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),vc=d((({children:e,onChange:t,maxLength:n,...a})=>{const l=i((e=>n?e.length<=n&&t?.(Sa(e,"___-___-___ __")):t?.(Sa(e,"___-___-___ __"))),[t]),r=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(vn,{...a,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),Nc=d((({className:e,label:t,value:n,error:a,onChange:l,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(vc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:l,onBlur:i,placeholder:"___-___-___ __",...r}),wn(a)]}))),wc=d((({field:e,input:t})=>o(Nc,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),Cc=d((({field:e,input:t})=>o(Pn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Sc=d((({field:e,input:t})=>o(Pn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),kc={limitedBirthday:tc},Ic={processPersonalDataFlg:Fs,consentProviderFlg:Fs,consentOthersFlg:Fs,consentInformFlg:Fs,consentPfrFlg:Fs},Tc={organization:ic,organizationAddress:wl,organizationPhone:Yl,organizationName:rc,legalForm:ec,generalSeniority:Yo,lastJobExperience:Zo,experience5Years:qo,jobsNumber:Jo,beginDate:Is,addressFact:or,addressRegistration:wl,addressRetail:vs,addressMatch:cr,sex:bc,limitedBirthday:tc,birthPlace:Ts,education:Fo,housing:Go,amountWorkers:ws,employment:jo,employerActivities:Lo,employerOrganization:$o,positionOrganization:hc,familyStatus:Ho,familyMembers:Wo,children:_s,dependents:Do,totalIncome:Cc,expenses:Uo,snils:wc,conscription:As,armyIdFlg:Cs,dulSerie:zo,dulNumber:Oo,dulIssueDateField:Ao,dulSubdivisionCode:Vo,dulIssuedBy:Mo,participantDateRegistration:oc,retirementIncome:gc,otherIncome:sc,wages:Sc,mandatoryPayments:nc,disablePeopleFlg:Eo,bankruptcyFlg:ks,shareholderFlg:yc,legalEntityName:Qo,creditInRshbCd:To,bankEmployeeCode:Ss,partInBusiness:cc,regionRetail:pc,infoCard:Xo,calculator:Co,confirmationIncome:Es},Rc={addressCourier:wl,paymentSystem:uc,currency:Po,cardCategory:Bs,codeWord:Ds,methodObtain:lc,deliveryDate:_o},Bc=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),l=i((n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}}),[e]),s=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(ai(t(e?.name),Ii[e?.name]).error)))),[e]),[d,{toggle:m}]=nn(!0);return o("div",{className:"w-fit",children:c(Lr,{children:[c("div",{className:"flex items-start",children:[c("div",{children:[o(Ga,{text:"Согласие на все документы",value:a,onChange:l},n),wn(s?"Отметьте все обязательные соглашения":"")]}),o(Yi,{embedded:!0,onClick:m,children:o(Vr,{className:"p-2xs",iconVersion:"color",isUnfolded:d})})]}),o($r,{className:"flex flex-col pl-2xl",isUnfolded:d,children:e.map(ji(t,{},Ic))})]})})})),Pc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=_c(t||[]);return n.length>2?c("div",{children:[a.map(ji(e,{},{...kc})),o(Bc,{inputs:n,field:e})]}):(t||[])?.map(ji(e,{},{...kc}))},_c=(e=[])=>({consentInputs:e.filter((({name:e})=>Object.keys(Ms).includes(String(e)))),restInputs:e.filter((({name:e})=>!Object.keys(Ms).includes(String(e))))}),Dc=(e,t)=>o(nr,{className:"w-full @xl:w-auto",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Ec=e=>Br("/user-data/updateUserProfile","PUT",e),Ac=e=>Br("/user-data/updateUserTask","PUT",e),Mc={width:"118",height:"24"},Oc={"bg-white":"color",transparent:"white"},zc={"bg-white":"text-primary-main",transparent:"text-white"},Vc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Oc[e]},className:zc[e],width:n?.width,height:n?.height}),Fc={"bg-white":"text-primary-text",transparent:"text-white"},Lc=d((({className:e,href:t="/",logo:n,children:a,targetBlank:l,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:l?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...fe(s),children:[Vc(i,n?.image,Mc),r?a??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:Fc[i],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),$c=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),[p,{setTrue:g,setFalse:f}]=nn(!1),x=i((async()=>{g();var e;await(e={captchaText:d},Br("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),b=i((()=>{(async()=>{s(URL.createObjectURL(await(e=>Br(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return l(b,[]),o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Lc,{}),onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o(Yi,{className:"w-8",embedded:!0,onClick:b,children:o(H,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(vn,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Yi,{version:"secondary",onClick:close,children:"Вернуться"}),o(nr,{version:"secondary",disabled:!d,onClick:x,children:"Отправить"})]}),p?o(tr,{blur:!1}):null]})})})),jc=d((({time:e,setTime:t,className:n})=>(l((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:Uc(e)})))),Uc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,qc=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);l((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>a=>{const{value:l}=a.currentTarget,i=l.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>a=>{const{key:l}=a;if("Backspace"===l&&!e[n]){const a=n>0?n-1:e.length-1,l=e.map(((e,t)=>t===a?"":e));t(l),m(a)}}),[e]),g=i((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),l=e.map(((e,t)=>t<a.length?a[t]:e));t(l),m(l.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:Wc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Wc=(e,t,n=!1)=>{const a=!t[e];return`w-16 sm:w-20 h-24 text-5xl text-center p-md m-2 border ${bn(!n||!a)} rounded-md caret-transparent outline-none`},Hc=d((({isDisabled:e,onClick:t,text:n})=>o(Yi,{type:"button",onClick:t,disabled:e,children:o(Ae,{font:"font-normal",children:n})}))),Yc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Gc=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=nn(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=i((()=>r("")),[]),x=Boolean(0===d&&u),b=p>2||x||!e.every(Boolean),y=i((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Rr("/sms/checkCode","POST",e).then(Yc))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),f(),await(t?.(e.join("")))}catch{r(p>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{c()}}),[e,p]);return l((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:b,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},Kc=d((({phone:e,code:t=!0,codeLength:n=4,consents:r,onSuccess:s=fn,onClose:d=fn})=>{const[m,u]=a(Array(n).fill("")),{handleSubmit:h,hasError:p,errorText:g,isLoading:f,timeNextReq:x,isSubmitButtonDisabled:b,setTimeNextReq:y,setIsTimerStarted:v,setAttempts:N}=Gc({values:m,onSuccess:s}),w=un($c),C=Ut(e),k=i((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},Br("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(N(0),y(180),v(!0)):w.open({phoneNumber:C,sendCode:k})}),[C,d]);return l((()=>{k()}),[]),o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m",onClose:d,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(qc,{values:m,setValues:u,errorText:g,hasError:p}):null,Jc(x,y,k),c(De,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),Xc(b,h),f?o(tr,{blur:!1}):null]})})})),Xc=(e,t)=>o(Hc,{text:"Далее",isDisabled:e,onClick:t}),Jc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(jc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Zc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Qc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},ed=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],td=d((({onSubmit:e=fn,onClose:t=fn})=>{const[n,l]=a(""),[r,s]=a(!1),d=zs(2),m=i((()=>{e(n)}),[e,n]),u=i((e=>{l(e),"REFUSE"===e&&s(!0)}),[]),h=r?Qc:Zc;return o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(zi,{className:"whitespace-normal",orientation:"horizontal",items:ed,value:n,onChange:u}),o(Yi,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),nd=d((({title:e,icon:t,description:n,onClick:a=fn})=>c("button",{className:"flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green",type:"button",onClick:a,children:[o(ne,{image:{icon:t,iconVersion:"black"},width:"78",height:"78"}),c("div",{className:"w-full md:w-auto",children:[o(N,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(w,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),ad={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},ld={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},id={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},rd=e=>Object.entries(e).reduce(((e,[t,n])=>t in ad?[...e,{contactTypeCd:{key:ad[t]},value:n}]:e),[]),sd=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in ld){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:ld[t]},...a}]}return e}),[]),od=e=>{const{familyStatus:t,familyMembers:n,dependents:a,children:l,confirmationIncome:i,wages:r,mandatoryPayments:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,totalDependents:n,incomeCertificateCd:i,otherDependents:a,childrenDependents:l,militaryStatusCd:g,participantIncomes:(f={wages:r,mandatoryPayments:s,incomeAverage:cd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in id?[...e,{incomeTypeCd:{key:id[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},cd=(e,t)=>Number(e)+Number(t),dd={WORK:"Работаю",RETIREE:"Пенсионер"},md={BANK_STATEMENT:"Получаю зарплату на счет/карту в РСХБ",BANK_STATEMENT_PENS:"Получаю пенсию на счет/карту в РСХБ",PFR_CERTIFICATE:"Получаю зарплату на счет/карту в другом банке",OTHER:"Другое"},ud={credit_cash:"10",credit_cash_single_doc:"28",credit_mcx:"39",family_offer_credit:"41",gas_engine_fuel:"33",pension_credit:"12",ref_credit:"11",ref_credit_single_doc:"29",self_employed:"34",summer_cash:"35",summer_cash_pens:"36"},hd={...ud,amur_card:"14",owner_card:"13",travel_card:"15"},pd=e=>{const t=e?.find((e=>"WAGES"===e.incomeTypeCd.key))?.value,n=e?.find((e=>"MANDATORY_PAYMENTS"===e.incomeTypeCd.key))?.value,a=e?.find((e=>"ADDITIONAL_INCOME"===e.incomeTypeCd.key))?.value,l=e?.find((e=>"OTHER_INCOME"===e.incomeTypeCd.key))?.value,i=e?.find((e=>"OTHER_PAYMENTS"===e.incomeTypeCd.key))?.value,r=e?.find((e=>"RENTAL_INCOME"===e.incomeTypeCd.key))?.value,s=e?.find((e=>"RETIREMENT_INCOME"===e.incomeTypeCd.key))?.value;return{wages:t,mandatoryPayments:n,incomeAverage:cd(t,s),additionalIncome:a,otherIncome:l,otherPayments:i,rentalIncome:r,retirementIncome:s}},gd=e=>{const t=e?.find((e=>"REGISTRATION"===e.addressType.key)),n=e?.find((e=>"RESIDENTAL"===e.addressType.key)),a=e?.find((e=>"WORK"===e.addressType.key));return{addressRegistration:t,addressFact:n,organizationAddress:a}},fd=e=>{const t=e?.find((e=>"EMAIL"===e.contactTypeCd.key))?.value,n=e?.find((e=>"MAIN_PHONE"===e.contactTypeCd.key))?.value,a=e?.find((e=>"ORGANIZATION_PHONE"===e.contactTypeCd.key))?.value;return{email:t,phone:n,organizationPhone:a}},xd=(e,t)=>e?.key?{key:e.key,text:t?t[e.key]:e.value}:void 0,bd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=gl(),l=Jt(),{participants:r,creditProgram:s,id:d}=e,m=hd[s.code],u=Boolean(ud[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],b=i((()=>{const t=(e=>{const t=e.participants[0],{classCard:n,codeWord:a,paymentSystemTypeCd:l,currencyCode:i}=e,{loanAmount:r,creditPeriod:s,paymentTypeCd:o}=e,{birthDate:c,midname:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,educationLevelCd:y,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:_,employeesNumberCd:D,opf:E,seniority:A,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:$,otherDependents:j,militaryStatusCd:U,participantIncomes:q,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:i?.key,paymentSystem:xd(l),cardCategory:xd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,education:xd(y),participantDateRegistration:v,housing:xd(N),beginDate:k,employment:xd(I,dd),organizationName:T,inn:R,employerActivities:xd(B),organization:xd(P),employerOrganization:xd(_),amountWorkers:xd(D),legalForm:E,generalSeniority:A?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:xd(V),familyStatus:xd(F),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:xd(U),confirmationIncome:xd(Q,md),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:xd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...pd(q),...gd(S),...fd(C),...(ee=w,ee?.key?{sex:"MAN"===ee.key?"male":"female"}:null)};var ee})(e);a.participantId=f,a.taskId=d,a.profileId=x?.id,a.programId=m,a.leadForm=t,l.assign(h)}),[]),y=i((()=>{l.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=i((()=>{l.assign("/")}),[]);return o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:n,children:c("div",{className:"flex flex-col gap-lg mt-xs md:mt-0",children:[o(N,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(nd,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:b}),o(nd,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:y}),o(Yi,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),yd=d((function({onClose:e=fn}){const t=Jt(),n=i((()=>{t.assign("/natural/loans/all-goals")}),[]),a=i((()=>{t.assign("/")}),[]);return o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:e,children:c("div",{className:"flex flex-col gap-lg",children:[o(N,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(w,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Yi,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Yi,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),vd=d((({onClose:e})=>{const t=Jt(),n=gl(),a=i((async()=>{const e=await(n={redirectUri:t.href},Rr("/esia/getLink","POST",n));var n;e?.link&&t.assign(e.link)}),[]),l=i((()=>{if(n.leadForm){const e={...n.leadForm};delete e.esiaAccountTypeCd,n.leadForm=e}e?.()}),[]);return o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:l,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full px-m",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex flex-wrap gap-lg w-full",children:[o(Yi,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Yi,{type:"button",version:"secondary",onClick:l,children:"Пропустить"})]})]})})})),Nd=()=>{const e=new URLSearchParams(decodeURIComponent(globalThis.location?.search));return{utm_campaign:e.get("utm_campaign"),utm_medium:e.get("utm_medium"),utm_source:e.get("utm_source"),utm_content:e.get("utm_content"),utm_term:e.get("utm_term")}},wd=()=>pl(),Cd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:l,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=wd();return i((({participantId:t,taskId:n,profileId:a,programId:l,formData:i})=>{e.participantId=t,e.taskId=n,e.profileId=a,e.programId=l,e.leadForm=i}),[])})(),d=(e=>{const{open:t}=un(vd),n=Jt();return i((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=un(td),n=un(Kc),a=t=>async n=>{try{t&&await Ec({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},l=(t,l)=>async i=>{"SIGNED"===i&&t?n.open({phone:t,consents:["согласие на запрос информации в БКИ"],onSuccess:a(l)}):e()};return{open:(n,a)=>t({onSubmit:l(n,a),onClose:e})}})(d),u=un(Kc),h=(()=>{const{open:e}=un(bd),{open:t}=un(yd);return{open:({task:n,isFromLead:a,onClose:l})=>{n?e({task:n,isFromLead:a,onClose:l}):t({})}}})();return{isSending:n,ok:s,handleSubmit:i((async t=>{try{l();const a=await(n={profile:{phone:Ut(t.phone)}},Rr("/public-data/createUserProfile","POST",n).then((e=>e?.profile?.id||null)));if(a&&t?.phone){const n=async()=>{await kd({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},l=async()=>{try{const t=await(async e=>{const t=await Rr("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:a,programId:e});if(t){const e=await(async e=>await Rr("/user-data/getTaskById","POST",e)||void 0)({taskId:t});u.close(),h.open({task:e,isFromLead:!0,onClose:n})}else await n()}catch{o(!1)}},i=Sd(t);u.open({phone:t?.phone,consents:i,onSuccess:l}),r()}}catch{o(!1)}var n}),[])}},Sd=e=>Object.keys(Ms).filter((t=>e[t])).map((e=>Ms[e]?.text)),kd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const l=Id(n);await Ec(((e,t)=>{const{name:n="",surname:a="",middleName:l="",limitedBirthday:i="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:l,birthDate:i&&jt(i,!0),email:s,phone:Ut(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,l));const{taskId:i,participantId:r}=await(async e=>await Rr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Ac((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:l,surname:i,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:l,surname:i,profile:{id:n},participantContacts:rd({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:Nd()}}})({participantId:r,taskId:i,profileId:t,formData:l}))}catch(e){console.log(e)}a({participantId:r,taskId:i,profileId:t,programId:e,formData:n})},Id=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Td={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Rd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Td[e.name||""]])))}},Bd=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:l,addressFact:i}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,limitedBirthday:t?.birthDate,phone:ql(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Pd(l),addressFact:Pd(i),esiaAccountTypeCd:t?.esiaAccountType}},Pd=e=>{const{postcode:t,region:n,regionCode:a,locality:l,city:i,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,l||i,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},_d=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=wd(),d=i((e=>{const t=e instanceof Function?e(m[u]):e;null!=t?m[u]=t:delete m[u]}),[m=c,u="leadForm"]);var m,u;const h=r((()=>Rd(e,c.leadForm)),[e,c.leadForm]),p=i((async(e,a,l)=>{s();try{const r=await(i={profileId:e,code:a,state:l,redirectUri:globalThis.location?.href},Rr("/esia/updateProfileEsia","POST",i));r&&d((e=>({...e,...Bd(r)}))),n.assign(t)}finally{o()}var i}),[t]);return l((()=>{const e=Rs(globalThis.localStorage?.getItem("profileId")??""),t=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),n=t.get("code"),a=t.get("state");e&&n&&a?p(e,n,a):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),[h,{isLoading:a}]},Dd=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:i,...s})=>{const d=r((()=>sr?.flatMap((e=>e?.inputs))||[]),[sr]),m=r((()=>Ti(d)),[d]),[h,{isLoading:p}]=_d(d,a),{isSending:g,ok:f,handleSubmit:x}=Cd({programId:n,nextStepLink:a}),[,{field:b,onSubmit:y}]=dn(h,{formValidator:m,onSubmit:x}),v=un(Xi);return l((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(mn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[p?o(tr,{blur:!1}):null,sr.map(((e,t)=>c("div",{className:u(Ui(e.columns),"grid gap-x-m"),children:[qi(e.title),Pc({field:b,inputs:e?.inputs})]},`section-${t}`))),Dc(i,g)]})})})),Ed=d((({title:e,description:t})=>{const n=ke();return 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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Ad=e=>e%2!=0,Md="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Od=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:a=[],...l})=>{const[i,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]],[s,{toggle:d}]=nn(!1);return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Md),children:[B(i,{...l.options,parent:n}),Ad(i.length)?o(Lt,{className:"col-span-6",...l}):null]}),c(Lr,{children:[c($r,{className:u(Md),isUnfolded:s,children:[B(r,{...l.options,parent:n}),Ad(r.length)?o(Lt,{className:"col-span-6",...l}):null]}),o(Fr,{className:u("w-full",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:l.options?.page?.colorPalette,onClick:d})]})]})})),zd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Vd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Fd=10;function Ld(e,{sensitivity:t,rootRef:n}={}){const a=s(null),i=r((()=>({threshold:$d(t),root:n?.current})),[t,n?.current]);return l((()=>{if(!a.current)return;const t=new IntersectionObserver(e,i);return t.observe(a.current),()=>{t.disconnect()}}),[e,i]),a}function $d(e=0){const t=Math.round(e*Fd);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const jd=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:l,children:r,onIntersection:s})=>{const c=Ld(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),l);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),Ud=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],qd=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:l=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Hd(n))}),[g,f]),v=l>0?r*Number(l)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Wd(c,v):{},...N?Vd(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(jd,{className:u(m,l?Ud[l-1]:"",{"h-full":N},t),style:w?Wd(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Wd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Hd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Yd={"horizontal-list":"w-6","vertical-list":"h-6"},Gd=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,l)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",l===e?Yd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(l)},String(l)),Kd=({activeIndex:e,onClick:t})=>(n,a)=>{const l=a===e,i=l?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(a))},Xd=e=>t=>e.scrollWidth/t,Jd=e=>(t,n)=>{e.scrollBy({left:n*Xd(e)(t),behavior:"smooth"})},Zd=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[l,r]=a([]),o=i((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=l.length?[oo()(l),ro()(l)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Jd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Jd(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Qd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},em=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=Zd({itemCount:s.length}),g=tm(Boolean(s?.length));l((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(qd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Kd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Qd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Gd({activeIndex:t,onClick:f,listType:a}))}):null})),tm=(e=!1)=>({behavior:e?"auto":"smooth"}),nm=d((({className:e,disabled:t,...n})=>o(Ne,{rounded:!0,className:u("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,...n,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"})}))),am=d((e=>o(nm,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),lm=d((e=>o(nm,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),im="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",rm=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:l})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!l;return c("div",{className:e,children:[n?sm(t):null,i?o(am,{className:u(om(l),m?"left-1":"left-0"),onClick:s}):null,r?o(lm,{className:u(om(l),m?"right-1":"right-0"),onClick:d}):null]})})),sm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(im,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(im,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),om=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),cm=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:l=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Zd({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(qd,{containerRef:y,activeIndex:N,visibleItemCount:l,gap:n,padding:a,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(rm,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(em,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),dm=({blocksToRender:e,...t})=>o(cm,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:B(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",zd(!0)),children:T(e,t)},String(n))})}),mm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[um(n,t),o(Od,{...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[um(n,t),dm({...a,blocksToRender:t})]});default:return null}})),um=(e,t)=>e&&!t.length?o(Ed,{...e}):null,hm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),pm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Ml,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const l=e?.includes(n);t(a?l?(e||[]).filter((e=>e!==n)):[...e||[],n]:l?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),gm=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:l})=>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,hm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(fm(a)).filter(Boolean))]}),n?o("div",{children:o(Yi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:l,children:n?.text})}):null]}))),fm=e=>([t,n])=>{const a=n?.type;return"array"===a?xm(t,e)(n):null},xm=(e,t)=>n=>{const a=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Ae,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(pm,{items:a,multiple:!n?.single,...t(e)})]},e)},bm=e=>e;function ym(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const vm=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Nm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>vm(t[e])||vm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>vm(t[e])||vm(n[e])||wm(t[e])<=wm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>vm(t[e])||vm(n[e])||wm(t[e]?.min)>=wm(n[e]?.min)&&wm(t[e]?.min)<=wm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>vm(t[e])||vm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>vm(t[e])||vm(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),wm=e=>Number(e||0),Cm=(e,{block:t,page:n,normalize:a=bm})=>{const l=t?.blocks||[],[i,s]=dn(e),o=r((()=>ym(l,l.map((e=>Mt(e.content,n?.fallback))))),[l,n?.fallback]),c=i===e?l:((e,t)=>(n=bm)=>e?.filter((([,e])=>Nm(t,n(e)||{}))).map((([e])=>e)))(o,i)(a);return[i,{blocksToRender:c,blocksWithProps:o},s]},Sm={},km={},Im=Vt((({className:e,filtrationSchema:t=Sm,consumerField:n={},resetButton:a,...l})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Cm(km,{block:l.block,page:l.options?.page}),d=o(On,{className:"w-64",label:n?.title,options:Tm(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Tm(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...l,children:[o(gm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Yi,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(mm,{blocksToRender:i,...l})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Tm=e=>ym(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Rm=(e=!1)=>e?"text-left":"text-center",Bm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Pm=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:l,...i})=>{const r=String(a?.width||t);return l?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Bm[n],e),children:o(H,{...i,width:"54%",name:l})}):null})),_m=d((({className:e="",title:t,benefitList:n,...a})=>{const l=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Rm(l),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Dm)}):null]})})),Dm=({label:e,description:t,__html:n,icon:a,isDotted:l=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(Pm,{className:"shrink-0",iconBgVersion:i,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ae,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:l,itemSize:"list-s"}):null]}):null]},String(r)),Em=e=>({icon:t,title:n,description:a},l)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Ae,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ae,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(l)),Am=(e,t,n)=>o("div",{className:`grid gap-2xs ${Mm(t)}`,children:e.map(Em(n))}),Mm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Om=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:l,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:i,description:l,headlineVersion:"M"}),e?.length?Am(e,a,t):null]}))),zm={start:"justify-start",center:"justify-center",end:"justify-end"},Vm=d((({buttons:e,className:t="",align:n,...a})=>{const l=n&&u("flex",zm[n]);return o(g,{className:u("!bg-transparent",l,t),defaultPadding:"p-0",...a,children:je(e)})})),Fm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:l,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Ae,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:He(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),l&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:l}):null]})]}))),Lm=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),$m=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:l="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(Fm,{title:e,rate:t,unit:n,fractionDigits:a,color:l,...r})}),o(Hs,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:l,...r}),i]}):o(Lm,{title:e,...r}),jm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Um={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},qm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[l,i]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:l=jm.prefMonthsNum,prefTravelBonusRate:i=jm.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),a);return[c,c*l+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-l)]})(t||Um,n,a);return{...t,...e,monthBonus:l,yearBonus:i}},Wm=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,...i})=>{const[r,{field:s}]=dn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=qm(r,n);return o($s,{className:e,title:t,...i,children:c("section",{className:u(js,e),children:[c("div",{className:Us,children:[no({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),no({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?$m({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:qs,children:[f>=0?o(Hs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),Js(l)]})]})})})),Hm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ym=e=>eo({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Gm=" (c капитализацией)",Km=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:l=[],isCapitalization:i=!1})=>c("div",{className:qs,children:[o(Hs,{title:`Доход в конце срока${i?Gm:""}`,value:e,postfix:n,prefix:"+"}),o(Hs,{title:`Сумма в конце срока${i?Gm:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),l?.map(Js)]}),Xm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Jm={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Zm=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:l,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||l,o=n<90||n>730,c=function(e){const t=e?.rateType?Xm[e?.rateType]:"",{data:n}=Xn(t?`${qt}/depositrates/${t}`:null,_t);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Qm(s,e)&&ho(a,["minSum","maxSum"],e)&&ho(n,["minDays","maxDays"],e)))||Jm,{rate:m}=d,u=eu(m,e),h=a+u,p=c||[Jm];return{...d,...uo(["minSum","maxSum"],p),...uo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Qm=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,eu=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l/30)-a):Math.round(a*e*l/365/100)},tu=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:l,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=dn({moneyValue:Ks(r,1e5),daysValue:Xs(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Zm(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o($s,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:Us,children:[no({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(da,{items:[`От ${Hm(y.min||0)}`,`До ${Hm(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[nu(p,h),Ym({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),$m({rate:x,depositeName:b,isShowDepositeName:i}),Km({income:g,finalSum:f,buttons:n,footnotes:[a,l]})]})});var y})),nu=(e,t)=>c("div",{className:"space-y-s",children:[o(Ae,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ga,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ga,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),au=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[l,i]=t[n];a>=l?t.splice(n-1,2,[e,Math.max(a,i)]):n++}return t},lu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},iu=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.[0]?ou(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[su({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),su({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),su({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),su({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ho(a,["minSum","maxSum"],t),ho(l||i,["minMonths","maxMonths"],t)].every(Boolean)))||lu,{rate:u}=m,h=ru(u,e),p=a+h,g=t||[lu];return{...m,...uo(["minSum","maxSum"],g),...uo(["minMonths","maxMonths"],g),availableMonths:au(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,l)=>t>=e?e+l*n:e-l*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},ru=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l)-a):Math.round(a*e*30*l/365/100)},su=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],ou=(e,t)=>e+Math.round((t-e)/2),cu=(e="rub")=>"rub"===e,du=(e,t)=>{const{minMonths:n,maxMonths:a}=uo(["minMonths","maxMonths"],pu(t,e?.currency)),l=e.monthsValue||Math.round((n+a)/2);return{monthsValue:ia(l,n,a)}},mu=(e,t)=>{const{minSum:n,maxSum:a}=uo(["minSum","maxSum"],pu(t,e?.currency)),l=e.moneyValue||n;return{moneyValue:ia(l,n,a)}},uu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),hu=e=>{const t=cu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},pu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},gu=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?eo({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?eo({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),fu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Ym({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},eo({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),fu(e.isShowNewClient),e.isShowNewClient?o(Ga,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},fu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,xu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},bu={text:"₽",key:"rub"},yu=Vt((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[bu],g=i((e=>t=>e?{...t,...hu(t),...mu(t,e),...du(t,e),...uu(t,e)}:t)(h),[h]),[f,{field:x}]=dn({moneyValue:Ks(d,2e4),monthsValue:Xs(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:bu},{normalizer:g}),b=x?.("currency")?.value??bu,y=x?.("isNewClient")?.value,v=pu(h,b),N=iu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=i((()=>{ao({field:x,defParams:Ys(v,y),calcParams:N,monthsValue:"minMonths",map:xu})}),[x,h]);l((()=>{!bo(d)&&v&&I()}),[d,h]);const T=w===Ys(v,y)?.rate;return o($s,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:Us,children:[c("div",{className:"flex gap-m",children:[no({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:vu(b?.key)}),h&&h?.length>1?o(Ln,{label:"Валюта",options:p,...x("currency")}):null]}),Zs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),gu({...N,...s},x)]}),$m({rate:w,children:wu(I,T)}),Km({income:C,finalSum:S,buttons:[...a,Nu(n?.buttons,k)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),vu=(e="")=>cu(e)?1e3:100,Nu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},wu=(e,t=!1)=>t?null:o(Yi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Cu=e=>Su({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Su({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Su=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],ku={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Iu=(e,t,n)=>{const{moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ku],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Cu({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=mo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=mo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Cu({row:e,userInputParams:t,paramsViewSettings:n})&&ho(a+r,["minSum","maxSum"],e)&&ho(i,["minSumOld","maxSumOld"],e)&&ho(r,["minSumExtra","maxSumExtra"],e)&&ho(l,["minMonths","maxMonths"],e)))||ku)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=lo(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},Tu=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:i,...r})=>{const[s,{field:d}]=dn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Iu(s,n,i),h=to({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o($s,{className:e,title:t,...r,children:c("section",{className:u(js,e),children:[c("div",{className:Us,children:[no({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),no({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Zs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Ru({...m,...i},d),m.isExtraMoney?no({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})]}),c("div",{className:u(qs,"@4xl:w-1/2"),children:[o(Hs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Hs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Hs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(a,{isVertical:!0}),Js(l)]})]})})})),Ru=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ga,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ga,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ga,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Bu=d((e=>{const{onChange:t,min:n,max:a,defaultValue:l="0",fractionDigits:r=0,...s}=e,c=la(e,{normalize:(e=l)=>n&&a?String(ia(Number(Pu(e)),n,a)):Pu(e),format:He(r)}),d=i((e=>t&&t(Pu(e))),[t]);return o(vn,{onChange:d,...s,...c})})),Pu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),_u=d((e=>o(Bu,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Du=new dl;function Eu(){return ul(Du)}ol(Du,new cl(globalThis?.sessionStorage));const Au={private:"p2p/registerP2P",business:"b2c/registerB2C"},Mu=({onClose:e,errorCode:t,errorMessage:n})=>{const a=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:a,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Ou=e=>{const t=un(Mu),n=Eu(),a=Jt(),l="private"===e?"p2p":"b2c";return i((async({amount:i})=>{const r=await(async(e,t)=>{const n=Jt(),a={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},l=`${qt}/payment/${Au[e]}`;try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(a)});return e.ok?await e.json():null}catch(e){return null}})(e,i);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:l,url:a.href},a.assign(`${l}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},zu={amount:1500},Vu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:a,formType:i="private",...r})=>{const[s,{setValue:d}]=nn(!1),m=Ou(i),[{amount:h},{field:p,onSubmit:f}]=dn(zu,{onSubmit:m});return l((()=>{d(h<=0)}),[h]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{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",onSubmit:f,children:[o(_u,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:h}),a?.text?o(nr,{className:"w-full mt-lg",disabled:s,children:a.text}):null]})]})})),Fu=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Lu="relative h-full",$u={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},ju=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:l}=a.block||{},i=l?.some(Wu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,l)=>c("div",{className:Uu(n,{someCardsHighlighted:i}),children:[T(n,a,{className:qu(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:l}),Wu(n)?Fu({className:"absolute top-0 -right-4 z-40"}):null]},String(l))})},Uu=(e,{someCardsHighlighted:t})=>u(Lu,t&&(Wu(e)?"pt-3xl":"pt-3xl sm:pt-16")),qu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Lu,"min-w-80",$u[a],t&&(Wu(e)?"pt-3xl sm:pt-16":"pt-3xl"),zd(n),n&&"h-full"),Wu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Hu=Vt((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:l=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(cm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:l?16:0,padding:0,arrowsPadded:a,navButtons:r?Yu(s?.block?.blocks):[],hasBlur:!0,children:ju({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Yu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Gu="z-10 border border-solid w-full h-full",Ku=u(Gu,"absolute hidden @xl:block border-transparent"),Xu=d((({className:e,title:t,description:n,button:a,...l})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...l,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Ku,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Ku,"top-6 right-8 bg-green")}),o("div",{className:u(Ku,"top-3 right-4 bg-green-light")}),c("div",{className:u(Gu,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Ju={black:"bg-black",white:"bg-white"},Zu=d((({className:e="",title:t,description:n,image:a,price:l,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Re,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:je([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(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Qu)]}):null,l?c(Ae,{size:"text-h3",align:"text-left",children:[l," ₽"]}):null]})}))),Qu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Ju[e]}`},String(t)),eh=d((({icon:e,...t})=>{const n=pe(),{text:a,href:l,target:i,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:l,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),th=d((({className:e,additionalDescription:t,description:n,links:a,title:l,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:l,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?nh(a):null]})}))),nh=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(eh,{...e},String(t))))}),ah=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),lh=d((({className:e="",href:t,target:n,onClick:a,data:l,children:i})=>{const r=pe()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...fe(l),children:i})})),ih=[{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"}}],rh=d((({className:e="",media:t,showButtonText:n,stretched:l,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:l}=e,{iconMapped:r}=(e=>ih.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(a)?a:r,c=n?{text:l}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&l&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},sh(l));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:oh(s??!1,l??!1,n),buttonClassName:h})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),sh=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",oh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ch=d((({className:e,padding:t,description:n,additionalDescription:a,href:l,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(lh,{href:l,target:m,className:"h-full",data:ah(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(i)?o(ne,{image:i}):null,x),buttons:d.length?o(rh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,dh(a,p)]})})}))),dh=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,mh=new me,uh=(e,t)=>{const{title:n,description:a,buttons:l}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ae,{size:"text-xl",color:"text-primary-text",children:a})}):null,l?.length?o("div",{className:"text-primary-main",children:je(l)}):null]},String(t))},hh=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:h=[],options:p,data:f,...x})=>{const b=r((()=>h.map(uh)),[h]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,C]=a(!1);l((()=>mh.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&C(e.isUnfolded)}))),[p?.parent]);const S=i((()=>{mh.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...x,children:[o(ne,{className:"self-center",image:s}),t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(Ne,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Lr,{children:[c("div",{children:[y,o($r,{isUnfolded:w,children:v})]}),h.length>=m?o(Fr,{className:"w-full mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:f,onClick:S}):null]}):o("div",{children:y})]})})),ph=d((({className:e,contacts:t,info:n,version:a="secondary",...l})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...l,children:[n?.length?gh(n):null,t?.length?gh(t):null]}))),gh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>fh({column:e,i:t})))}),fh=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},l)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(l))))},`col-${String(t)}`):null,xh=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),a=Jt();if(!t||!e||!n)return a.assign("/"),()=>{};const l=async()=>{const n=await Br("/auth/refresh","POST",{refresh_token:e,access_token:t});if(401==n?.status&&a.assign("/"),n?.ok){const e=await n.json();globalThis.sessionStorage.setItem("refreshToken",e.refresh_token),globalThis.sessionStorage.setItem("accessToken",e.access_token)}};l();const i=setInterval(l,24e4);return()=>clearInterval(i)},bh=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),yh=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(bh,{step:a,showPercentage:!1})]})})}));var vh;!function(e){e.process="IN_PROCESS",e.ok="APPROVED",e.fail="CANCELLED",e.pre_decision="PRE_DECISION",e.approved="APPROVED",e.cancelled="CANCELLED",e.failed="FAILED",e.draft="DRAFT",e.rework="REVISION"}(vh||(vh={}));const Nh=e=>Rr("/user-data/getTaskStatus","POST",e),wh=e=>Br("/user-data/sendSignalToProcess","POST",e),Ch=(e,t)=>{const n=s(null),a=i((()=>n.current&&clearInterval(n.current)),[]);return l((()=>(n.current=setInterval((()=>e(a)),t),a)),[e,t]),a},Sh=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:l})=>{const[i,r]=a(e),s=100-(e-i)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(jc,{interval:e,time:i,setTime:e=>{0===e&&t(),r(e)}})})]}),l?o(De,{__html:l}):null]})]})})),kh=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Sh,{interval:d,intervalExpireAction:m}):null]}),o(Ih,{title:a,items:l}),o(Ih,{title:i,items:r,countColumns:!0}),n?.__html?o(Ko,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Ih=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ae,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Ui(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Th(e)},t)))}):null]})]}):null},Th=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),Rh=d((()=>o(kh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Bh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=gl();return o(kh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Ph=d((()=>{const{statusInfo:e}=gl();return o(kh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),_h=d((()=>{const{statusInfo:e}=gl();return o(kh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Dh(e),buttonText:"Вернуться на главную"})})),Dh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:jt(e?.deliveryDate)}]):t},Eh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Ah=d((()=>{const[e,t]=a(vh.process),{taskId:n}=gl();l((()=>{(async()=>{for(const e of Eh)await wh({signalType:e,taskId:n})})()}),[n]);const r=i((async e=>{const a=await Nh({taskId:n});a&&a?.statusCd!==vh.process&&(e(),t(a.statusCd))}),[n]);Ch(r,3e4);return Mh(e,(()=>t(vh.rework)))})),Mh=(e,t)=>({IN_PROCESS:o(Bh,{handleExpireTimer:t}),CANCELLED:o(Rh,{}),FAILED:o(Rh,{}),DRAFT:o(Rh,{}),APPROVED:o(_h,{}),PRE_DECISION:o(_h,{}),REVISION:o(Ph,{})}[e]||o(Ph,{})),Oh=e=>(t,n)=>t.filter((e=>e)).map((t=>[zh(n,e),Vh(t,e),jh(t,e),Fh(t,e),Lh(t,e),$h(t,e)].some(Boolean)?{...t,required:!1}:t)),zh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,Vh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Fh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Lh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),$h=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),jh=({name:e},t)=>"snils"===e&&Uh(t),Uh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,qh={...Tc,...Rc},Wh=({field:e,inputs:t,params:n})=>t.map(ji(e,n,qh)),Hh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:l,title:i},r)=>{const s=Oh(Yh(t))(e,n);return c("div",{className:u(Ui(l),"grid gap-x-m"),children:[qi(i),Wh({field:t,inputs:s,params:a})]},`section-${r}`)})),Yh=e=>t=>e(t)?.value,Gh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yi,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(nr,{isLoading:t,children:a?"Отправить заявку":"Далее"})]})})),Kh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:l}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:l}},Xh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:l}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:l}},Jh=e=>{const{beginDate:t,employment:n,organizationName:a,inn:l,legalForm:i,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f,partInBusiness:x}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:l,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:i,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:rd({organizationPhone:p&&Ut(p)}),participantAddresses:sd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},Zh=e=>{const{name:t,surname:n,middleName:a,limitedBirthday:l="",phone:i="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:jt(l,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:rd({phone:Ut(i),email:r}),participantAddresses:sd({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},Qh=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(l=n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),l?new Date(l).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{};var l},ep=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},tp=(e,t)=>{switch(e){case 0:default:return{};case 1:return Zh(t);case 2:return Jh(t);case 3:return od(t);case 4:return Kh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:sd({addressCourier:t})}:{}})(t)}},np=[{paymentSystem:{key:"",text:""},currency:"810",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0,methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},familyMembers:void 0,dependents:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:{key:"",text:""},bankEmployeeCode:void 0,addressCourier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}],ap=e=>{try{return e?new Date(e):void 0}catch(e){return}},lp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:l,setFalse:s}]=nn(!1),o=5===e,c=gl(),d=r((()=>((e,t)=>({...np[e],...t,limitedBirthday:ap(t?.limitedBirthday),dulIssueDateField:ap(t?.dulIssueDateField),participantDateRegistration:ap(t?.participantDateRegistration),beginDate:ap(t?.beginDate),deliveryDate:ap(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=i((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate},c.leadForm=d)}),[o,d]),u=i((async a=>{l(),c.leadForm=a;try{const{taskId:l,profileId:i,participantId:r}=c;if(l&&i&&r){const t=await Ac((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...ep(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...tp(l,a)}],...Xh(a),...Qh(a)}}))({participantId:r,taskId:l,profileId:i,step:e,formData:a}));m(t)}o?n?.():t()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},ip=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,onFinish:l})=>{const s=r((()=>t?.flatMap((e=>e?.inputs||[]))),[t]),d=i((t=>Ti(Oh((e=>t[e]))(s,e))(t)),[s]),[m,u,h]=lp({step:e,onNextStep:a,onFinish:l}),[,{field:p,onSubmit:g}]=dn(m,{formValidator:d,onSubmit:u});return c("form",{onSubmit:g,className:"space-y-m",children:[Hh({sections:t,field:p,step:e}),o(Gh,{isSending:h,step:e,onPrevStep:n})]})})),rp=[[{title:"Персональные данные",columns:2,inputs:[{name:"surname",required:!0,dadata:!0,filledByEsia:!0},{name:"name",required:!0,dadata:!0,filledByEsia:!0},{name:"middleName",dadata:!0,filledByEsia:!0},{name:"sex",required:!0},{name:"limitedBirthday",required:!0,filledByEsia:!0},{name:"birthPlace",required:!0,filledByEsia:!0},{name:"phone",required:!0,filledByEsia:!0},{name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{name:"dulSerie",required:!0,filledByEsia:!0},{name:"dulNumber",required:!0,filledByEsia:!0},{name:"dulIssueDateField",required:!0,filledByEsia:!0},{name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{name:"addressMatch"}]},{columns:2,inputs:[{name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{name:"housing",required:!0}]},{inputs:[{name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{name:"infoCard",label:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{name:"employment",required:!0},{name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{name:"inn",required:!0,dadata:!0},{name:"legalForm",required:!0}]},{inputs:[{name:"organization",required:!0},{name:"amountWorkers",required:!0}]},{columns:2,inputs:[{name:"employerActivities",required:!0},{name:"employerOrganization",required:!0},{name:"generalSeniority",required:!0},{name:"lastJobExperience",required:!0},{name:"experience5Years",required:!0},{name:"jobsNumber",required:!0}]},{inputs:[{name:"organizationPhone",label:"Телефон работодателя",required:!0},{name:"beginDate",required:!0}]},{columns:2,inputs:[{name:"positionOrganization",required:!0},{name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{name:"familyStatus",required:!0}]},{columns:1,inputs:[{name:"dependents",required:!0}]},{columns:2,inputs:[{name:"familyMembers"},{name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{name:"infoCard",label:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{name:"wages",required:!0}]},{columns:1,inputs:[{name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{name:"snils",required:!0}]},{columns:1,inputs:[{name:"conscription",required:!0}]},{columns:2,inputs:[{name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{name:"disablePeopleFlg"}]},{inputs:[{name:"bankruptcyFlg"}]},{inputs:[{name:"shareholderFlg"}]},{inputs:[{name:"legalEntityName"}]},{inputs:[{name:"creditInRshbCd"}]}]],sp=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...rp,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],op=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],cp=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=i((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);l(xh,[]);const u=i((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=i((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=sp[n],[f,{setTrue:x}]=nn(!1);return o(g,{className:e,...t,children:c("div",{ref:d,className:"container grid grid-cols-12",children:[f?null:o(yh,{stepsTitles:op,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:f?o(Ah,{}):o(ip,{step:n,sections:p,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),dp=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(bh,{step:a,showPercentage:!1})]})})})),mp=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Sh,{interval:d,intervalExpireAction:m}):null]}),o(up,{title:a,items:l}),o(up,{title:i,items:r,countColumns:!0}),n?.__html?o(Ko,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),up=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ae,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Ui(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:hp(e)},t)))}):null]})]}):null},hp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),pp=d((()=>o(mp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),gp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=gl();return o(mp,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:`${t?.calculator?.moneyValue?.toLocaleString()??"0"} ₽`},{label:"Срок кредита",description:`${t?.calculator?.monthsValue??"0"} мес`},{label:"Тип платежа",description:t?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),fp=d((()=>{const{statusInfo:e}=gl();return o(mp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),xp=d((()=>{const{statusInfo:e}=gl();return o(mp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),bp=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],yp=d((()=>{const[e,t]=a(vh.process),{taskId:n}=gl();l((()=>{(async()=>{for(const e of bp)await wh({signalType:e,taskId:n})})()}),[n]);const r=i((async e=>{const a=await Nh({taskId:n});a&&a?.statusCd!==vh.process&&(e(),t(a.statusCd))}),[n]);Ch(r,3e4);return vp(e,(()=>t(vh.rework)))})),vp=(e,t)=>({IN_PROCESS:o(gp,{handleExpireTimer:t}),CANCELLED:o(pp,{}),FAILED:o(pp,{}),DRAFT:o(pp,{}),APPROVED:o(xp,{}),PRE_DECISION:o(xp,{}),REVISION:o(fp,{})}[e]||o(fp,{})),Np=({field:e,inputs:t,params:n})=>t.map(ji(e,n,{...Tc})),wp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:l,title:i},r)=>{const s=Oh(Cp(t))(e,n);return c("div",{className:u(Ui(l),"grid gap-x-m"),children:[qi(i),Np({field:t,inputs:s,params:a})]},`section-${r}`)})),Cp=e=>t=>e(t)?.value,Sp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yi,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(nr,{isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),kp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Ip=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:kp[a?"annuity":"differential"]}},Tp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Rp=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return Zh(t);case 2:return Jh(t);case 3:return od(t);case 4:return Kh(t);default:return{}}},Bp=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:void 0,bankEmployeeCode:void 0}],Pp=e=>{try{return e?new Date(e):void 0}catch(e){return}},_p=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:l,setFalse:s}]=nn(!1),o=5===e,c=gl(),d=r((()=>((e,t)=>({...Bp[e],...t,limitedBirthday:Pp(t?.limitedBirthday),dulIssueDateField:Pp(t?.dulIssueDateField),participantDateRegistration:Pp(t?.participantDateRegistration),beginDate:Pp(t?.beginDate),deliveryDate:Pp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=i((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},c.leadForm=d)}),[o,d]),u=i((async a=>{l(),c.leadForm=a;try{const{taskId:l,profileId:i,participantId:r}=c;if(l&&i&&r){const t=await Ac((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Rp(l,a)}],...Ip(a),...Tp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:l,profileId:i,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Dp=d((({step:e,sections:t,programsSource:n,onPrevStep:a,onNextStep:l,onFinish:s})=>{const{programId:d}=gl(),m=n?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs??[]))),[t]),h=i((t=>Ti(Oh((e=>t[e]))(u,e))(t)),[u]),[p,g,f]=_p({step:e,onNextStep:l,onFinish:s}),[,{field:x,onSubmit:b}]=dn(p,{formValidator:h,onSubmit:g});return c("form",{onSubmit:b,className:"space-y-m",children:[wp({sections:t,field:x,step:e,params:{calcData:m}}),o(Sp,{step:e,isSending:f,onPrevStep:a})]})})),Ep=[[{columns:1,inputs:[{name:"calculator"}]}],...rp,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{name:"regionRetail",required:!0}]},{inputs:[{name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{name:"bankEmployeeCode"}]}]],Ap=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Mp=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=i((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);l(xh,[]);const h=i((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=i((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Ep[r],x=0===r,[b,{setTrue:y}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||b?null:o(dp,{stepsTitles:Ap,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:b?o(yp,{}):o(Dp,{step:r,sections:f,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:y},String(r))})]})})})),Op=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,zp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Vp=1e9,Fp={sum:{min:1e4,max:Vp},period:3},Lp=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:l,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Cm(Fp,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:$p(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=jp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(gm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(_u,{label:a?.title,min:500,max:Vp,...d("sum",{parse:e=>({min:Number(e),max:Vp}),format:({min:e})=>String(e)})}),o(da,{title:l?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(mm,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),$p=e=>Dt((e?.paramsSource?.rateRows||[]).filter(Op).flatMap((e=>zp(e.minMonths,e.maxMonths)))),jp=e=>Dt(e.flatMap((e=>e||[])).filter(Op).flatMap((e=>zp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Up=[{key:"10"},{key:"50"},{key:"100"}],qp=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(On,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Up,iconVersion:"black"})]})},Wp="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Hp=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:l}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==l&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,l)?o("div",{onClick:()=>a(i),className:Wp,"aria-label":`Страница ${i}`,children:i},String(t)):null},Yp={width:"24",height:"24"},Gp=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),l=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:l,children:o(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Kp(1===e),...Yp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Wp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Hp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Wp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Kp(e===n),...Yp})})]})},Kp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Xp=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:l})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Gp,{currentPage:e,onPageChange:t,totalPages:n}),a&&l?o(qp,{itemCount:a,onItemCountChange:l}):null]}),Jp=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:l,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{a&&a(e.target?.value||"")}),[a]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",xn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:l})]})})),Zp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Jp,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(La,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(La,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Yi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Qp=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:l}=a({href:`${qt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Pm,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ae,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:l,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),eg=`${qt}/depository`,tg={startDate:void 0,endDate:void 0,query:""},ng=Vt((({className:e,...t})=>{const[n,l]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(tg),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:l})=>{const i=a?jt(a,!0):"",r=l?jt(l,!0):"",s=new URLSearchParams(eg);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Xn(eg+o,_t);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>l(e-1)),[]),b=i((e=>{r!==e?(s(e),l(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Zp,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Qp,{...e},String(e.publicId)))):o(Ed,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Xp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),ag=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,lg=d((({className:e="",title:t,description:n,error:a,button:l,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:ag(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),l?.text?o(Ne,{version:l?.version,text:l?.text,...l}):null]}))),ig=`${qt}/region`;function rg(e="Москва"){return pl().location??{name:e}}function sg(e="Москва"){const t=pl(),n=i((async()=>{if(!t.location){const n=await Pt(ig);t.location=n??{name:e}}}),[t,e]);return Xn(ig,n),t}var og;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(og||(og={}));const cg=new Intl.NumberFormat("ru",{style:"currency",currency:og.RUB}),dg=e=>e?cg.format(e):"",mg="text-m font-light text-secondary-text ",ug=`${mg} text-left`,hg=`${mg} pl-5xl text-center`,pg=`${mg} pl-5xl text-right`,gg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},fg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:ug,children:o(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:hg,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:pg,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(xg)})]}))),xg=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:gg[t]},width:"24",height:"24"}):null,o(Ae,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ae,{size:"text-h6",children:dg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:dg(e?.buyExchangeRate)})})]},t)},bg={icon:"GpsIcon"},yg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Pm,{...bg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),vg=(e,t,n)=>{const a=Number(Ng(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},Ng=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function wg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Cg=e=>t=>{const[,n]=wg(e.find((([e])=>e(t))));return n(t)},Sg=e=>Cg(e.map((([e,t])=>[e,()=>t])));Sg.if=e=>new kg(void 0,e);class kg{parent;predicate;unit;get entry(){return[wg(this.predicate),wg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new kg(this,e)}then(e){return new kg(this.parent,this.predicate,e)}else(e){return Cg([...Ig(this),[()=>!0,e]])}}const Ig=e=>[...e?.parent?Ig(e.parent):[],e.entry],Tg=e=>Sg([[e=>e.value!==og.RUB&&e.oppositeValue!==og.RUB,()=>e.handleConvert(e.value,og.RUB)],[e=>e.value===og.RUB&&e.oppositeValue===og.RUB,()=>e.handleConvert(e.value,og.USD)],[e=>e.value===og.RUB&&e.oppositeValue===og.RUB,()=>e.handleConvert(e.value,og.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Rg(e){const{placeholder:t,rates:n,selected:a,value:l,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(vn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:l,onChange:i}),s.length?o(On,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Bg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:l})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||og.RUB,selectBuy:n?.[0]?.currency?.currency||og.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[Rg({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Pg(r,d,n),value:r.inputSell,setValue:e=>Dg(d,n)(e,r.selectSell,r.selectBuy)}),Rg({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:_g(r,d,t),value:r.inputBuy,setValue:e=>Eg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,l?.text?o(Ne,{text:l.text,version:l?.version,...l}):null]})})),Pg=(e,t,n)=>a=>{t({selectSell:a}),Tg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,l=e.selectBuy)=>{Dg(t,n)(e.inputSell,a,l)}})},_g=(e,t,n)=>a=>{t({selectBuy:a}),Tg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,l=e.selectSell)=>Eg(t,n)(e.inputBuy,a,l)})},Dg=(e,t)=>(n,a,l)=>{e({inputSell:Ng(n),selectBuy:l});const i=t.find((e=>e.currency?.currency===l))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;i&&e({inputBuy:String(vg(n,i,a===og.RUB)||"")})},Eg=(e,t)=>(n,a,l)=>{e({inputBuy:Ng(n),selectSell:l});const i=t.find((e=>e.currency?.currency===l))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;i&&e({inputSell:String(vg(n,i,a===og.RUB)||"")})},Ag=`${qt}/exchangerates`;const Mg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const l=function(e){const t=e?.code||"000",{data:n}=Xn(Ag+`?regionCode=${t}`,_t);return n||{}}(rg()),i=Og(l?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:og.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:og.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(N,{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:[i?o(fg,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(yg,{address:l?.address})]}),o(Bg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Og=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],zg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Vg(n))})})),Vg=e=>({dataFooter:t,...n},a)=>{const{text:l,href:i,target:r,onClick:s}=e(n);return l?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...fe(t),children:l||null})},String(a)):null},Fg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Lg=["all","footer"],$g=d((({className:e,navigationItems:t})=>{const n=pe();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(Fg(Lg)).map(n).map(jg)})})),jg=(e,t)=>{const{text:n,items:a=[],href:l,target:i="_self",onClick:r,dataFooter:s}=e,d=a.filter(Fg(Lg));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:l,target:i,onClick:r,...fe(s),children:n}),d?o(zg,{items:d}):null]},String(t))},Ug=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(qg)}):null)),qg=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Wg)})]},String(t)),Wg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Hg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Hg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Yg(t)}`,children:o(Ae,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Yg=e=>e.replaceAll(/\D/g,""),Gg=d((({className:e="",index:t,text:n,...a})=>{const l=pe(),{href:i,target:r,onClick:s}=l(a);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Kg=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Ae,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Gg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Xg="w-full lg:w-52";function Jg(e,t,n=300){l((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const Zg=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:l}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),l=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)a[r]||l[n]||e[r]!==t[n]||(i++,a[r]=!0,l[n]=!0)}return{m:i,s1Matches:a,s2Matches:l}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:a}){let l=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[i]!==t[s]&&l++}return l}(e,t,{s1Matches:a,s2Matches:l}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Qg=(e,t)=>(n,a)=>{for(const[l,i]of a)n.set(l,e(n.get(l)||t,i));return n},ef=(e=[])=>e.reduce(((e,t)=>e+t),0),tf=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),nf=e=>t=>e.map((([e,n])=>[Zg(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>lf(t,e))).reduce(Qg(Math.max,0),new Map),af=e=>t=>{return ym(t,t.map((({title:e})=>e)).map((e=>t=>{const n=tf(t||"");return n.length?ef(e.map((e=>so(n.map(Zg(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},lf=(e,t)=>new Map(e.map((e=>[e,t]))),rf=({basePathList:e,initialQuery:t=""})=>{const[n,i]=a(t||"");l((()=>{null!=t&&i(t)}),[t]);const{data:r}=Xn(e?.length?e:null,sf),[s,o]=a(null);return Jg((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const l=tf(e);if(!l.length)return[];const i=Object.entries(a),r=[...l.map(nf(i)).reduce(Qg(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*l.length)).map((([e])=>n[e]));return af(l)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},sf=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),of=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,i]=rf({basePathList:a,initialQuery:e}),s=r((()=>cf(t)(l)),[t,l]);return o(Ki,{head:o(Jp,{autoFocus:!0,...i}),onClose:n,children:o($g,{navigationItems:s})})})),cf=e=>t=>e?.length&&t?.length?ym(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],df=d((({className:e,search:t,...n})=>{const[l,r]=a(""),s=i((()=>r("")),[]),d=un(of,n),m=i((e=>{r(e),mf(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(Jp,{value:l,placeholder:t?.placeholder,onChange:m}),o(Gi,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),mf=e=>e&&e.length>=3,uf=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:l,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Lc,{className:Xg,logo:i,data:l,showTitle:!1}),o(df,{className:"grow",navigationItems:t,...e})]})},hf=d((({className:e="",index:t,...n})=>{const a=pe(),{href:l,target:i,text:r,onClick:s}=a(n);return o("a",{className:u("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:l,target:i,onClick:s,children:r||`Документ ${t}`})})),pf=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ae,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):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(hf,{index:t,...e},String(t))))}):null]}))),gf=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},l=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[uf(l,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o($g,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(Xg,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Ug,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(rh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Kg,{title:m,links:r}),o(pf,{links:i,license:p})]})})),ff=d((({className:e="",title:t,description:n,calendar:a,...l})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...l,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?xf(a):null]}))),xf=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>bf(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:yf(e)}),c("div",{className:"text-s",children:[o(Ae,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ae,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},bf=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),yf=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),vf=Vt((({className:e,title:t,button:n,regionSource:l,data:i,...r})=>{const[s,d]=a({key:""}),m=l?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Ln,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(Ne,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:ah(i,s?.key),children:f})}):null]})})}));function Nf(e=[]){const t=_(),n=Array.from(e.entries()).filter((([,e])=>wf(t)(e)));return n.find((([,e])=>wf(t,!0)(e)))??n[n.length-1]??[]}const wf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(Cf(e)(n));return t?a===z(n):a.startsWith(z(n))},Cf=e=>t=>{const n=X(K.SITE_URL);return A(t)?e.href:V(n,e.pathname)},Sf=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=nn(!1),h=pn(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),l=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${l}px`:a.left>e.left&&(l>a.left?n.current.style.left="":n.current.style.left=`${l}px`)}}),[r]);return hn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),l((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:If(t,n)})]})})),kf=d((({isActive:e,...t})=>{const n=pe(),{text:a,href:l,target:i,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:l,target:i,onClick:r,role:"link",...fe(t?.data),children:a})})),If=(e,t)=>e?.map(((e,n)=>o(kf,{isActive:e===t,...e},e?.text??String(n)))),Tf={default:"w-6 h-6",large:"w-12 h-12"},Rf=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:l,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Tf[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":i,onClick:c,...fe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Bf="chatbot",Pf="text-page__btn-chat",_f={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Df=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:i})=>{const r=(e=>{l((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=_f[e??""];return n=>{if(t)if("personal"!==e)yr(Bf,t);else{const e=n.target;e?.classList.contains(Pf)||e?.classList.add(Pf),document.getElementById("webchat-js-container:webchat_rshb")||yr(Bf,t)}}})(e);return o(Rf,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),Ef=d((({className:e="",active:t,dataItemName:n,children:a,data:l,...i})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...fe(l),children:[o("span",{className:Af(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Af=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Mf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Ld(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Ef,{...l,children:n})})})),Of={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},zf=d((({version:e,text:t,mobileText:n,...a})=>{const l=ke()?n:t;return l?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",Of["transparent"===e?"transparent":"default"]),...a,children:l}):null})),Vf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:l,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=Nf(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?Ff(t):Lf(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Mf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Sf,{items:p,activeItem:m,ariaLabel:l}):null,E.CHAT_BOT?o(Df,{version:t,iconVersion:d,chat:E.CHAT_BOT,ariaLabel:i}):null,o(zf,{version:t,...n})]})})),Ff=e=>t=>Math.max(t,e+1),Lf=e=>t=>Math.min(t,e),$f=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(Ae,{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(jf,{...e},String(t))))})]}):null,jf=d((({icon:e,...t})=>{const n=pe(),{text:a,target:l,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:i,target:l,onClick:r,children:o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),Uf=(e,t)=>n=>n.name?o(lh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:ah(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,qf=d((({className:e,searchTerm:t,onSearch:n})=>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:u(xn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Wf=d((({defaultLocation:e})=>{const t=rg(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(lh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Hf=d((({foreignOffices:e,branches:t,onClose:n})=>{const l=sg(t?.default),[s,d]=a(""),m=Ql(),u=r((()=>Gf(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),h=r((()=>((e,t)=>{const n=new Map;for(const a of e){const e=t(a),l=n.get(e)||[];n.set(e,[...l,a])}return n})(u,Yf)),[u]),p=i((e=>{l.location=e,n?.()}),[l,n]);return c(Ki,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Wf,{defaultLocation:t?.default}),o(qf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&Zg(e.toLowerCase())(s.toLowerCase())>=.8)).map(Uf(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ae,{size:"text-h6",children:e})}),t.map(Uf(f,g))]},e)))}),$f(e)]});var g,f})),Yf=e=>e.name?.charAt(0)??"",Gf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Kf=d((({className:e="",active:t,flat:n,children:a,data:l,...i})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:u(Xf(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(l),children:o("span",{suppressHydrationWarning:!0,className:Jf(t,n),children:d||a})})})),Xf=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),Jf=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Zf=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",l=rg(n?.branches?.default),r=un(of,n),s=un(Hf,n),d=i((()=>r.open({})),[r]),m=i((()=>s.open({})),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Kf,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:l?.name,data:ah(n?.branches?.dataClick,l?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Kf,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Rf,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Qf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Ld(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Kf,{...l,children:n})})})),ex=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:l,headerData:i,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?tx(t):nx(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Lc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Qf,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Sf,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Zf,{version:l,className:"ml-auto",search:d,navigationItems:e,...i})]})})),tx=e=>t=>Math.max(t,e+1),nx=e=>t=>Math.min(t,e),ax={"bg-white":"primary",transparent:"transparent"},lx=["all","header"],ix=Vt((({className:e,bgColor:t="bg-white",logo:n={},version:a=ax[t],portal:l,header:i={},...r})=>{const{common:s,navigation:d}=sx(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Nf(m),{internetBankButton:f}=l||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(ex,{activeTopItem:p,navigationItems:m?.filter(Fg(lx)),version:a,headerData:{...i,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",rx(a))}),p?.items?.length&&o(Vf,{subItems:p?.items?.filter(Fg(lx)),version:a,internetBankButton:f})]})})})),rx=e=>"transparent"===e?"opacity-30":"",sx=e=>({navigation:e?.navigation??{},common:e?.common??{}}),ox=(e=!1)=>e?{}:{padding:"p-0"},cx={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},dx=Vt((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",cx[n],e),padding:t,version:l,isTheme:i,...s,children:P({...s,extraProps:{...ox(a),className:zd(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),mx=d((e=>{const{className:t,align:n,image:a,...l}=e,i=n?u("flex",zm[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...l,children:o(ne,{image:a})})})),ux=(e,t=0)=>{const{itemCount:n,visibleItemCount:l}=e,[r,s]=a(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=l?n>l&&r<n-l:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function hx({dec:e,inc:t,canDec:n,canInc:a,btnClass:l,className:i=""}){return n||a?c("div",{children:[n?o(nm,{className:u("absolute z-40",l[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(nm,{className:u("absolute z-40 rotate-180",l[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const px=d((({className:e="",cards:t=[],button:n})=>{const[l,r]=a(0),s=i((e=>r(e)),[]),d=t.length,[m,u]=ux({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?gx({activeIndex:m,cards:t,selectedCardIndex:l,onClick:s}):null,hx({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function gx({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const l=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${l}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?fx("страховая сумма",e.sum):null,e?.fee?fx("страховой взнос",e.fee):null]}),xx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function fx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ae,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ae,{size:"text-l",color:"text-secondary-text",children:e})})]})}function xx(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const bx=d((({className:e="",title:t,insuranceTabs:n=[],button:l,...r})=>{const[s,d]=a(0),m=i((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:yx({insuranceTabs:n,button:l})})]})})),yx=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(px,{button:t,cards:e},String(n)))):null};const vx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Nx={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},wx=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:l,investmentColumns:i,...r}=e,s=i?[...i]:[];return l&&s.unshift(l),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[hm(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Cx)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Ix)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Cx=(e,t,n)=>{const a=1===t,l=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${Sx(a,l,e.cells)}`,children:i.length?o("div",{className:"w-full "+(l?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(kx)}):null},`column_${t}`)},Sx=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),kx=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Nx[n]} ${vx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ae,{align:"text-center",children:e.text})},`cell_${t}`):null},Ix=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Tx=["байт","Кб","Мб","Гб","Тб","Пб"],Rx=d((({icon:e,text:t,href:n,target:a,fileFormat:l,data:i,fileSize:r})=>{const s=r&&l?",":"",d=r??"",m=l?String(l):"";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:n,target:a,...fe(i),children:[e,t?c(Ae,{size:"text-l",font:"font-light",children:[t," ",Bx(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Bx=(e,t)=>e||t?o("span",{children:", "}):"",Px=(e,t)=>(n,a)=>{const l=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Tx[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Dx(l):n?.fileFormat;return c("div",{role:"listitem",children:[o(Rx,{text:n?.text,target:n?.target,href:l,fileFormat:r,fileSize:i,icon:_x(t),data:n?.data}),o(De,{__html:n?.__html})]},String(a))},_x=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Dx=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},Ex=d((({href:e,__html:t,target:n,onClose:a})=>{const l=_(),i=U(l)(e);return c(Ki,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ne,{text:"Я согласен",version:"primary",target:n,href:i,onClick:a}),o(Yi,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Ax=d((({text:e,href:t,target:n,__html:a,icon:l})=>{const{open:r}=un(Ex),s=i((()=>r({__html:a,href:t,target:n})),[a,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[_x(l),o(Ae,{font:"font-light",children:e})]}):null})),Mx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ox=Vt((({className:e="",title:t,description:n,align:a="text-center",documents:l,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=_();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),l?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Mx[r]),role:"list",children:l.map(zx(d,i))}):null]})})),zx=(e,t)=>(n,a)=>{const l=n?.docType;return""===l?null:"reportSource"in n&&n?.reportSource?.__html?Vx(t)(n,a):Px(e,t)(n,a)},Vx=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Ax,{...a,icon:e,href:Fx(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},Fx=e=>"href"in e,Lx=Vt((({className:e,padding:t,align:n="text-left",buttons:a=[],description:l,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Re,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(a,{className:"flex-wrap"}),children:[l?o(Ae,{size:"text-xl","font-weight":"font-light",children:l}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(De,{__html:r,itemSize:"list-m"}):null,o(Ae,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),$x=(e,t)=>e&&"underlined"!==t?"primary":"secondary",jx=(e=[],t={})=>e.filter((({content:e={}})=>Nm(t,e))).length,Ux=(e,t)=>e===t;const qx=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,a])=>e(a,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Ux,((e=Ux)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Wx=[],Hx={},Yx={primary:"bg-white/30",secondary:"bg-main-divider"},Gx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Kx=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Yx[t],l=Gx[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ae,{size:"text-xs",color:l,children:e})})})),Xx=({text:e,description:t,icon:n,isActive:a,type:l})=>{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"}))(a);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===l?i.text:i.oldText,children:e}),o("div",{className:"animated"===l?i.desc:i.oldDesc,children:t})]})]})},Jx={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Zx={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Qx={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},eb={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},tb=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:l})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",Jx[a],n?eb[a]:Qx[a]),role:"tablist","aria-label":"Список табов",onClick:l,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Zx[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Xx({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Kx,{count:m,version:$x(n,a)})}):null]})})})),nb=d((e=>o(e?.item?.href?ab:lb,{...e}))),ab=d((e=>{const t=pe(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...l}=t({...e.item,onClick:n});return o(tb,{...e,tag:"a",item:l,onClick:a})})),lb=d((({item:e={},onClick:t,...n})=>{const a=i((()=>{t&&t(e)}),[t,e]);return o(tb,{item:e,onClick:a,...n})})),ib=(e,t,n)=>(a,l)=>o(nb,{isActive:a===e,onClick:t,type:n,item:a},String(l)),rb=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:l})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(ib(a,l,t))}))),sb={categories:[],extraOptions:[],propertyType:[],stage:[]},ob=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...l})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Cm(sb,{block:l.block,page:l.options?.page}),f=i(((e=sb)=>p(e)),[]),x=(({hotFilters:e=Wx,filtrationState:t=Hx,blocks:n=Wx,onFiltrationStateChange:a})=>{const l=r((()=>Math.max(0,e.findIndex((e=>qx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:jx(n,t.filter),version:$x(t===e[l])})))),[e,n,l]),o=i((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[l],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:l.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(rb,{...x}),o(gm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(mm,{blocksToRender:d,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),cb="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",db=d((({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:l})=>{const i=a?5:6,r=(e||[]).map((e=>o(Ga,{text:l[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]],[m,{toggle:u}]=nn(!1);return o("div",{children:e?.length?o("div",{children:c(Lr,{children:[c("div",{children:[o("div",{className:cb,children:s}),o($r,{className:cb,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[a?o(Fr,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,onClick:u}):null,c(Yi,{embedded:!0,onClick:n,children:[o(zr,{children:"Очистить фильтр"}),o(H,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),mb=(e,t,n)=>{const a=$x("all"===t),l=$x("business"===t),i=(e,t,a)=>{const l=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),l},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Yi,{"data-id":"all",onClick:t=>i(t,"all",e),version:a,children:"Для физических лиц"}),o(Yi,{"data-id":"business",onClick:t=>i(t,"business",e),version:l,children:"Для юридических лиц"})]})},ub=({__html:e,list:t,richVersion:n})=>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(De,{__html:e,richVersion:n})}):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(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,hb=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ae,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),pb=()=>{},gb=e=>"all"===e?"block":"hidden",fb=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:l=[],renderCard:i=pb,renderRemoteWorkplaceCard:r=pb,getBalloon:s=pb,getBalloonRemoteWorkplaces:d=pb,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(ds),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=gs({data:t,remoteWorkplaces:l,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all");return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[hb(h,N),m?ub(m):null,p&&mb(t,w,C),o("div",{className:u("pb-3xl",gb(w)),children:o(db,{filters:xb([...t,...l]),field:{field:f,reset:x},onlyOffice:p,labels:ms})})]}),o("div",{className:"h-[600px]",children:o(ys,{children:o(Sr,{points:y,isLoad:n,className:"h-full"})})})]}),c(ys,{children:[b.map(i),v.map(r)]})]})})),xb=e=>Object.keys(ds).filter((t=>e.filter((e=>us[t](e))).length)),bb=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",yb=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:l,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:bb(a)},{label:"Модуль приема наличных",value:l?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{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(Ae,{size:"text-h4",children:bb(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Qr,{color:"green",children:bb(s)})})]}),o(jr,{children:o(Or,{className:"flex-wrap",children:m?.map(((e,t)=>o(Dr,{...e},String(t))))})})]},String(d))},vb=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${bb(t)} №${n}`,body:e.toUpperCase()}),Nb=[];const wb=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Nb},Cb={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Sb={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},kb=d((({descriptionData:e,className:t})=>{const n=rg(),a=n?.code??"000",{data:l,isLoad:i}=function(e){const{data:t,error:n}=Xn(`${qt}/atms?regionCode=${e}`,wb);return{data:t||Nb,isLoad:!t&&!n}}(a);return o(fb,{className:t,filterItems:Ib,data:l,isLoad:i,initFilterState:Cb,renderCard:yb,getBalloon:vb,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Ib=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),l=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=l.every((t=>Sb[t](e))),n=!a.length||a.some((t=>Sb[t](e)));return t&&n}))},Tb=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Ae,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e})]}):null]})}),o(jr,{children:Rb(t)})]},String(n)):null,Rb=e=>c("div",{children:[c(Or,{className:"flex",children:[o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Dr,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),Bb=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Pb={branches:[],remoteWorkplaces:[]};const _b=async e=>await Pt(e,{method:"GET"})||Pb,Db=d((({className:e})=>{const t=rg(),n=t?.code??"000",{data:a,isLoad:l}=function(e="000"){const{data:t,error:n}=Xn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,_b);return{data:t||Pb,isLoad:!t&&!n}}(n);return o(fb,{className:e,data:a?.branches,isLoad:l,remoteWorkplaces:a?.remoteWorkplaces,renderCard:ss,renderRemoteWorkplaceCard:Tb,getBalloon:cs,getBalloonRemoteWorkplaces:Bb,title:`Офисы филиала ${t?.name}`})})),Eb=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(Db,{}):o(kb,{descriptionData:e})})})),Ab=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Mb="hidden sm:flex absolute z-40 top-10",Ob=Vt((({className:e="",padding:t,slides:n=[],...l})=>{const[i,r]=a(0),[s,d]=Zd({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...l,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...l})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(qd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(zb({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(am,{className:u("left-6",Mb),onClick:d.scrollLeft}):null,d.canScrollRight?o(lm,{className:u("right-6",Mb),onClick:d.scrollRight}):null]})]})})),zb=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const l=a===e,i=l?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Vb=d((({address:e,email:t,telephone:n,button:a,className:l="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",l),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Fb({__html:i,richVersion:r}):null,Lb({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Lb({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Lb({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),Fb=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Lb=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:a,children:t})]})]}):null,$b=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(De,{__html:t,richVersion:n})})})),jb=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Ub=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:a="default",label:l,version:i,role:r,...s})=>{const d=ke(),[m,{toggle:h}]=nn(t),p=o($r,{className:u("gap-lg",jb(d)),isUnfolded:m,children:P({...s,extraProps:{className:"w-full",padding:"p-0"}})}),f="accordion"===a,x=o(Fr,{className:u("w-full",{"text-h6 my-lg":f}),label:l,isUnfolded:m,embedded:f,onClick:h});return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Lr,{children:[n?x:p,n?p:x]})})}),{childrenTypes:{exclude:["RollupItem"]}}),qb=d((({name:e,text:t,value:n,checked:a,onChange:l,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(xn.split(" ").filter((e=>"rounded"!==e)),Ha,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:a,onChange:e=>l?.(e.target.value),role:"radio"}),t?o(Ae,{color:"text-primary-text",children:t}):null]})}))),Wb=d((({className:e=""})=>{const[t,n]=a("option2"),l=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(qb,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:l}),o(qb,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:l})]})})),Hb=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:l="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(On,{options:s,label:r,placeholder:l||a,onChange:e=>i(e.key),value:c})})),Yb=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:l,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(Hb,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Hb,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:l,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Gb=["От 1 дня","До 365 дней"],Kb=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(da,{min:1,max:365,value:e,items:Gb,onChange:t})]}))),Xb=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:l,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(Hb,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Hb,{data:a,fieldLabel:"safeBoxCasesSize",selected:l,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Jb=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:l,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Yb,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:Zb(m)}),o(Kb,{days:l,setDays:e=>m({days:e})}),o(Xb,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Qb(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ae,{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(Wb,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Zb=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Qb=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ey=d((({days:e,tariffs:t=[]})=>{const n=ny(e,t),a="На рисунке изображена пачка листов\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:[ty("Аренда за",e),ty("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),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(H,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),ty=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ae,{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})]}),ny=(e,t)=>{const n=ay(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},ay=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},ly=(e,t)=>e.find((e=>e.branchCode===t)),iy=d((e=>{const{regions:t,data:n,branches:a,onChange:i,onClick:r}=e;l((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=ly(a,n.selectedBranch),d=ry(s?.safeBoxCaseVolumes),m=sy(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=oy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Jb,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:i}),o(ey,{days:n.days,tariffs:u})]})})),ry=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],sy=(e,t)=>e?.find((e=>e.volume===t)),oy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,cy=`${qt}/safeboxes`,dy=[];const my=async e=>await Pt(e,{method:"GET"})||dy,uy=d((({title:e,footnote:t,className:n="",...l})=>{const[r,s]=a(!1),d=i((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Ql(),p=hy(m.selectedRegion,h),f=function(e){const{data:t}=Xn(e?`${cy}?regionCode=${e}`:null,my);return t||dy}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=ly(f,m.selectedBranch)||f,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(g,{className:n,defaultPadding:"",...l,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(iy,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Sr,{points:b,className:"h-[640px]"}):null]})})),hy=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,py=e=>e<4?"w-72":"w-52",gy={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"},fy=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:l=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=l.length>3,h=gy,p=(e=>e?"":"opacity-0")(a),f=ke();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Rm(f)}),l?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:hm(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(l.map(xy(h,m,i)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:l.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:l}=x,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",py(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Ae,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{className:"box-border py-s w-full mt-auto",version:l,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),xy=(e,t,n)=>({icon:a},l)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${by(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||i},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:l+1})},String(l));var r},by=e=>e?"h-16 w-16":"h-24 w-24",yy=d((()=>o("div",{className:"hidden",role:"none"}))),vy="hidden sm:flex absolute z-40",Ny={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},wy=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:i="default"})=>{const[r,s]=Zd({itemCount:t?.length||0});return l((()=>Cy(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(qd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ny[i].item,gap:Ny[i].gap,children:t.map(ib(n,a,i))}),s.canScrollLeft?o(am,{className:u("left-6",vy,Ny[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(lm,{className:u("right-6",vy,Ny[i].buttonTop),onClick:s.scrollRight}):null]})})),Cy=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Sy={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},ky=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Sy[t].wrapper,e),children:o(wy,{className:Sy[t].component,tabsType:t,...n})}):null,Iy=Vt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Ty(n??{}),p=_(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=a(Py(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));l((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const C=By(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[ky({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Ry(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(By)?.filter(Boolean)||[]}),Ty=({__id:e,anchor:t})=>t??e??"tabs",Ry=(e,t)=>t?.length?t:e,By=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Py=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),_y={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Dy=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:_y[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ey=d((({className:e="",isOpen:t,onClick:n})=>o(Ne,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Ay={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ae,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ae,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:l})=>e?o(Ey,{className:"w-fit",isOpen:l,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},My=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);l((()=>{i===o&&s||m(!0)}),[s,o]);return Oy({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Oy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Ay))return null;return o(Ay[n],{...t,...a})},zy=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,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(My,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Vy=(e,t)=>140*ef(e.slice(0,t).map((e=>e?.cols?.length??1))),Fy=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Ly=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=ux({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((l=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,i=u("flex duration-1000 text-center",0!==t?"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(Ae,{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(-${Vy(a,l)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ae,{size:"text-xl",children:e.data}):null,e?.cols?Fy(e.cols,l):null]},`row${t}`)))})})]},String(t))})),hx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var l})),$y=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;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(Ae,{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(Ly,{rows:t.rowsData})})})]},a)}))}))),jy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Uy=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>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:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>a(t),children:o(Ae,{size:"text-xl",font:"font-light",color:jy(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),qy=Vt((({tableSource:e,pdfUrl:t,onClick:n})=>{const l=e?.tableData,[r,s]=a(0),d=i((e=>s(e)),[]),m=l?.[r]?.items??[],u=l?.map((e=>e.currency??""));return c("div",l?{className:"bg-white z-10",children:[o(Uy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o($y,{activeTabIndex:r,items:m}),o(Ey,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(Ey,{onClick:n,isOpen:!0})]})})),Wy=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@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(qy,{...t,onClick:n})}):null]}))),Hy=d((({row:{header:e,data:t},activeIndex:n,rowIdx:l,...r})=>{const[s,d]=a(void 0),m=i((e=>d(e)),[]),[h,p]=a(void 0),g=i((e=>p(e)),[]);return c(Wy,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("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(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Dy,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(zy,{cells:e,rowIdx:l,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Yy=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,hx({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Gy=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:l,hiddenRowsNum:i=0,...r})=>{const s=l?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=ux({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(Hy,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=i>0?[f.slice(0,-i),f.slice(-i)]:[f,[]],[y,{toggle:v}]=nn(!1);return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?c(Lr,{children:[c(Yy,{controls:p,children:[x,o($r,{isUnfolded:y,children:b})]}),o(Fr,{className:"w-full",isUnfolded:y,onClick:v})]}):o(Yy,{controls:p,children:f})})]})})),Ky=d((({className:e="",title:t,description:n,iconVersion:a,__html:l,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?Xy():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Jy(n):null,l?o(De,{richVersion:i,__html:l}):null]})]}))),Xy=()=>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"}),Jy=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Zy=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ae,{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,n?o("div",{className:"gradient-color-text",children:o(Ae,{size:"text-h2",children:n})}):null]}))),Qy=d((e=>{const{prefix:t,unit:n,suffix:a,...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Zy,{prefix:t,unit:n,suffix:a})})})),ev=Vt((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=_();return o(g,{className:u("relative flex flex-col",cx[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:l,isTheme:i,...c,children:P({...c,extraProps:{className:u("w-full",zd(r)),...ox(a)}})})}),{childrenTypes:[]}),tv=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",nv=d((({className:e,title:t,url:n,previewImg:a,...l})=>{const i=_();return c(g,{className:e,defaultPadding:tv(e),...l,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(n)})}):null]})})),av={AdTile:Lt,ApplicationForm:rr,ApplicationLeadForm:Dd,BankAccountFiltration:Im,BenefitsBlock:_m,BonusBenefitsBlock:Om,ButtonsBlock:Vm,CalculatorBonus:Wm,CalculatorBusinessDeposit:tu,CalculatorCredit:vo,CalculatorDeposit:yu,CalculatorRefinancing:Tu,CardTransfer:Vu,Carousel:Hu,CarouselCard:Xu,CarouselCatalogCard:Zu,CarouselLinks:th,CarouselRecommendationCard:ch,CarouselTariffsCard:hh,ContactsBlock:ph,CreditCardForm:cp,CreditForm:Mp,DepositFiltration:Lp,Depository:ng,ErrorBlock:lg,ExchangeRateTile:Mg,Footer:gf,GracePeriod:ff,GrantSupport:vf,Header:ix,Headline:S,HorizontalLayout:dx,ImgBlock:mx,InsuranceAmountBlock:bx,InvestmentInfo:wx,LinkDocs:Ox,MobileAppTile:Lx,MortgageFiltration:ob,OfficesAtmsMap:Eb,Placeholder:Ab,ProductBlock:Ft,ProductGallery:Ob,RepresentativeOfficeInfo:Vb,RichTextBlock:$b,RollupItem:Ub,SafeDepositRental:uy,StepsBlock:fy,StickyBottomMenu:yy,TabsLayout:Iy,TariffsTable:Gy,TextBlock:Ky,UnitBlock:Qy,VerticalLayout:ev,Video:nv},lv=ce((()=>{l((()=>{Qt()}),[]);const e=tn();hn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Xt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),iv="cookie",rv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();Jg((()=>{globalThis.localStorage?.getItem(iv)||n()}),[],3e3);const l=i((()=>{globalThis.localStorage?.setItem(iv,"true"),a()}),[]);return t&&e?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:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Gi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:l})})]})}):null}));function sv(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}function ov(e,t,n){l((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const a=n[t];a&&a(e)}}))),[e,t,...Object.values(n)])}const cv=()=>{const[e,{push:t,pop:n,clear:l}]=function(e=[]){const[t,n]=a(e),l=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:l,pop:r,remove:s,clear:o}]}();return ov(ue.observable,"dialog",{open:t,close:n,closeAll:l}),[e,{close:n,closeAll:l}]},dv=d((()=>{const[e,{close:t}]=cv(),n=Boolean(e.length);return sv(t),l((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==e.length-1}),children:t},String(n||a))))}):null})),mv=d((()=>{const[e,t]=a(null),n=i((()=>{t(null)}),[]);return ov(ue.observable,"popup",{open:t,close:n}),sv(n),e?o("div",{className:u("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})),uv="header",hv="footer",pv="sticky-footer",gv={},fv=d((({className:e,data:t=gv,blocksRegistry:n,blockDecorator:a})=>{const{slots:l,blocks:i,fallback:r,...s}=t,d=Ot(s,r);lv(),sg();const m={key:"",page:{slots:l,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[l?.[uv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(l?.[uv],{...m,slotName:uv})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),B(l?.[hv],{...m,slotName:hv})]})]}),l?.[pv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(l?.[pv],{...m,slotName:pv})}):null,o(dv,{}),o(mv,{}),o(rv,{__html:d?.cookieContent?.__html})]})}));Object.assign(fv,{childrenTypes:[],slots:()=>[uv,hv,pv]});e.Blocks=av,e.ContentPage=fv,e.handlerDecorator=ce,e.joinList=hm,e.locationNavigator=Jt,e.packageVersion="0.14.752",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=_,Object.defineProperty(e,"__esModule",{value:!0})}));