@redneckz/wildless-cms-uni-blocks 0.14.736 → 0.14.738

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 (1449) hide show
  1. package/bundle/EventBus/defaultEventBus.d.ts +1 -3
  2. package/bundle/bundle.umd.js +598 -593
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  5. package/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  6. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  7. package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  8. package/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  9. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  10. package/bundle/components/CreditCardForm/renderInputs.d.ts +1 -1
  11. package/bundle/components/CreditCardForm/renderStep.d.ts +1 -1
  12. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  13. package/bundle/components/CreditForm/renderInputs.d.ts +1 -1
  14. package/bundle/components/CreditForm/renderStep.d.ts +1 -1
  15. package/bundle/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  16. package/bundle/components/Depository/DepositoryFilter.d.ts +1 -1
  17. package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  18. package/bundle/hooks/useAspects/handleAspects.d.ts +1 -1
  19. package/bundle/hooks/useForm/FieldOptions.d.ts +7 -0
  20. package/bundle/hooks/useForm/FormOptions.d.ts +13 -0
  21. package/bundle/hooks/useForm/shallowCompare.d.ts +1 -0
  22. package/bundle/hooks/useForm/useForm.d.ts +19 -0
  23. package/bundle/hooks/useForm/useFormValidator.d.ts +6 -0
  24. package/bundle/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  25. package/bundle/services/retail/external/types.d.ts +1 -1
  26. package/bundle/services/retail/inputs.d.ts +67 -68
  27. package/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  28. package/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  29. package/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  30. package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  31. package/bundle/ui-kit/FormField/getField.d.ts +1 -1
  32. package/bundle/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  33. package/bundle/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  34. package/bundle/ui-kit/FormField/isRenderField.d.ts +1 -1
  35. package/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  36. package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  37. package/bundle/validation/objectValidator.d.ts +1 -1
  38. package/dist/EventBus/defaultEventBus.d.ts +1 -3
  39. package/dist/EventBus/defaultEventBus.js +1 -1
  40. package/dist/EventBus/defaultEventBus.js.map +1 -1
  41. package/dist/components/ApplicationForm/ApplicationForm.js +14 -34
  42. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  43. package/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  44. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  45. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  46. package/dist/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  47. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  48. package/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  49. package/dist/components/ApplicationLeadForm/renderInputs.js +1 -0
  50. package/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  51. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  52. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  53. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  54. package/dist/components/CalculatorBonus/CalculatorBonus.js +1 -1
  55. package/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  56. package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  57. package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  58. package/dist/components/CalculatorCredit/CalculatorCredit.js +3 -6
  59. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  60. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  61. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  62. package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  63. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  64. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  65. package/dist/components/CardTransfer/CardTransfer.js +1 -1
  66. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  67. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -11
  68. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  69. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  70. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +5 -0
  71. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  72. package/dist/components/CreditCardForm/CreditCardForm.js +1 -1
  73. package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
  74. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  75. package/dist/components/CreditCardForm/CreditCardFormStep.js +10 -3
  76. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  77. package/dist/components/CreditCardForm/renderInputs.d.ts +1 -1
  78. package/dist/components/CreditCardForm/renderInputs.js +2 -1
  79. package/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  80. package/dist/components/CreditCardForm/renderStep.d.ts +1 -1
  81. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  82. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  83. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  84. package/dist/components/CreditForm/CreditForm.js +1 -1
  85. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  86. package/dist/components/CreditForm/CreditFormStep.js +10 -3
  87. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  88. package/dist/components/CreditForm/renderInputs.d.ts +1 -1
  89. package/dist/components/CreditForm/renderStep.d.ts +1 -1
  90. package/dist/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  91. package/dist/components/CreditForm/useCreditFormAPI.js +1 -10
  92. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  93. package/dist/components/Depository/Depository.js +1 -1
  94. package/dist/components/Depository/Depository.js.map +1 -1
  95. package/dist/components/Depository/DepositoryFilter.d.ts +1 -1
  96. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  97. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  98. package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  99. package/dist/hooks/useAspects/handleAspects.d.ts +1 -1
  100. package/dist/hooks/useAspects/handleAspects.js +1 -1
  101. package/dist/hooks/useAspects/handleAspects.js.map +1 -1
  102. package/dist/hooks/useForm/FieldOptions.d.ts +7 -0
  103. package/dist/{components/CarouselTariffsCard/CarouselTariffsCardAction.js → hooks/useForm/FieldOptions.js} +1 -1
  104. package/dist/hooks/useForm/FieldOptions.js.map +1 -0
  105. package/dist/hooks/useForm/FormOptions.d.ts +13 -0
  106. package/{mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js → dist/hooks/useForm/FormOptions.js} +1 -1
  107. package/dist/hooks/useForm/FormOptions.js.map +1 -0
  108. package/dist/hooks/useForm/shallowCompare.d.ts +1 -0
  109. package/dist/hooks/useForm/shallowCompare.js +5 -0
  110. package/dist/hooks/useForm/shallowCompare.js.map +1 -0
  111. package/dist/hooks/useForm/useForm.d.ts +19 -0
  112. package/dist/hooks/useForm/useForm.js +54 -0
  113. package/dist/hooks/useForm/useForm.js.map +1 -0
  114. package/dist/hooks/useForm/useFormValidator.d.ts +6 -0
  115. package/dist/hooks/useForm/useFormValidator.js +15 -0
  116. package/dist/hooks/useForm/useFormValidator.js.map +1 -0
  117. package/dist/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  118. package/dist/hooks/useForm/useNormalizedFormState.js +26 -0
  119. package/dist/hooks/useForm/useNormalizedFormState.js.map +1 -0
  120. package/dist/services/retail/external/types.d.ts +1 -1
  121. package/dist/services/retail/inputs.d.ts +67 -68
  122. package/dist/services/retail/inputs.js +67 -68
  123. package/dist/services/retail/inputs.js.map +1 -1
  124. package/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  125. package/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  126. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  127. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  128. package/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  129. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
  130. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  131. package/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  132. package/dist/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  133. package/dist/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  134. package/dist/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  135. package/dist/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  136. package/dist/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  137. package/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  138. package/dist/ui-kit/FormField/Fields/AddressField.js +1 -3
  139. package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  140. package/dist/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  141. package/dist/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  142. package/dist/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  143. package/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  144. package/dist/ui-kit/FormField/Fields/AmountField.js +1 -1
  145. package/dist/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  146. package/dist/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  147. package/dist/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  148. package/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  149. package/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  150. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  151. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  152. package/dist/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  153. package/dist/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  154. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  155. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  156. package/dist/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  157. package/dist/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  158. package/dist/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  159. package/dist/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  160. package/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  161. package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  162. package/dist/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  163. package/dist/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  164. package/dist/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  165. package/dist/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  166. package/dist/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  167. package/dist/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  168. package/dist/ui-kit/FormField/Fields/CommentField.js +1 -3
  169. package/dist/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  170. package/dist/ui-kit/FormField/Fields/ConsentField.js +1 -3
  171. package/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  172. package/dist/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  173. package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  174. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  175. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  176. package/dist/ui-kit/FormField/Fields/DependentsField.js +1 -3
  177. package/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  178. package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  179. package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  180. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  181. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  182. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  183. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  184. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  185. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  186. package/dist/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  187. package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  188. package/dist/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  189. package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  190. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  191. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  192. package/dist/ui-kit/FormField/Fields/EmailField.js +1 -4
  193. package/dist/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  194. package/dist/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  195. package/dist/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  196. package/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  197. package/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  198. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  199. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  200. package/dist/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  201. package/dist/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  202. package/dist/ui-kit/FormField/Fields/FullNameField.js +1 -3
  203. package/dist/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  204. package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  205. package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  206. package/dist/ui-kit/FormField/Fields/InnField.js +1 -3
  207. package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  208. package/dist/ui-kit/FormField/Fields/IsClientField.js +1 -1
  209. package/dist/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  210. package/dist/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  211. package/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  212. package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  213. package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  214. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  215. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  216. package/dist/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  217. package/dist/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  218. package/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  219. package/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  220. package/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -8
  221. package/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  222. package/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  223. package/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  224. package/dist/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  225. package/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  226. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  227. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  228. package/dist/ui-kit/FormField/Fields/NameField.js +1 -3
  229. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  230. package/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  231. package/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  232. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  233. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  234. package/dist/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  235. package/dist/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  236. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  237. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  238. package/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  239. package/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  240. package/dist/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  241. package/dist/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  242. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +13 -13
  243. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  244. package/dist/ui-kit/FormField/Fields/PhoneField.js +1 -3
  245. package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  246. package/dist/ui-kit/FormField/Fields/ProductField.js +1 -3
  247. package/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  248. package/dist/ui-kit/FormField/Fields/RegionField.js +1 -3
  249. package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  250. package/dist/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  251. package/dist/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  252. package/dist/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  253. package/dist/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  254. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  255. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  256. package/dist/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  257. package/dist/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  258. package/dist/ui-kit/FormField/Fields/SexField.js +1 -3
  259. package/dist/ui-kit/FormField/Fields/SexField.js.map +1 -1
  260. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  261. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  262. package/dist/ui-kit/FormField/Fields/SnilsField.js +1 -3
  263. package/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  264. package/dist/ui-kit/FormField/Fields/SurnameField.js +1 -3
  265. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  266. package/dist/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  267. package/dist/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  268. package/dist/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  269. package/dist/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  270. package/dist/ui-kit/FormField/Fields/VedField.js +7 -8
  271. package/dist/ui-kit/FormField/Fields/VedField.js.map +1 -1
  272. package/dist/ui-kit/FormField/Fields/WagesField.js +1 -3
  273. package/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  274. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  275. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  276. package/dist/ui-kit/FormField/SelectField.js +2 -4
  277. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  278. package/dist/ui-kit/FormField/getField.d.ts +1 -1
  279. package/dist/ui-kit/FormField/getField.js +28 -28
  280. package/dist/ui-kit/FormField/getField.js.map +1 -1
  281. package/dist/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  282. package/dist/ui-kit/FormField/getObjectValidator.js +18 -6
  283. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  284. package/dist/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  285. package/dist/ui-kit/FormField/isRenderField.d.ts +1 -1
  286. package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  287. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  288. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  289. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  290. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  291. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  292. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  293. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  294. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  295. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  296. package/dist/utils/getRequiredLabel.js +1 -0
  297. package/dist/utils/getRequiredLabel.js.map +1 -1
  298. package/dist/validation/objectValidator.d.ts +1 -1
  299. package/dist/validation/objectValidator.js +1 -1
  300. package/dist/validation/objectValidator.js.map +1 -1
  301. package/lib/EventBus/defaultEventBus.d.ts +1 -3
  302. package/lib/EventBus/defaultEventBus.js +1 -1
  303. package/lib/EventBus/defaultEventBus.js.map +1 -1
  304. package/lib/components/ApplicationForm/ApplicationForm.js +16 -36
  305. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  306. package/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  307. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  308. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  309. package/lib/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  310. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  311. package/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  312. package/lib/components/ApplicationLeadForm/renderInputs.js +1 -0
  313. package/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  314. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  315. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  316. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  317. package/lib/components/CalculatorBonus/CalculatorBonus.js +1 -1
  318. package/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  319. package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  320. package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  321. package/lib/components/CalculatorCredit/CalculatorCredit.js +3 -6
  322. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  323. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  324. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  325. package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  326. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  327. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  328. package/lib/components/CardTransfer/CardTransfer.js +1 -1
  329. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  330. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +13 -12
  331. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  332. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  333. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +3 -0
  334. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  335. package/lib/components/CreditCardForm/CreditCardForm.js +2 -2
  336. package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
  337. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  338. package/lib/components/CreditCardForm/CreditCardFormStep.js +11 -4
  339. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  340. package/lib/components/CreditCardForm/renderInputs.d.ts +1 -1
  341. package/lib/components/CreditCardForm/renderInputs.js +2 -1
  342. package/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  343. package/lib/components/CreditCardForm/renderStep.d.ts +1 -1
  344. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  345. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  346. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  347. package/lib/components/CreditForm/CreditForm.js +2 -2
  348. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  349. package/lib/components/CreditForm/CreditFormStep.js +11 -4
  350. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  351. package/lib/components/CreditForm/renderInputs.d.ts +1 -1
  352. package/lib/components/CreditForm/renderStep.d.ts +1 -1
  353. package/lib/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  354. package/lib/components/CreditForm/useCreditFormAPI.js +1 -10
  355. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  356. package/lib/components/Depository/Depository.js +1 -1
  357. package/lib/components/Depository/Depository.js.map +1 -1
  358. package/lib/components/Depository/DepositoryFilter.d.ts +1 -1
  359. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  360. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  361. package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  362. package/lib/hooks/useAspects/handleAspects.d.ts +1 -1
  363. package/lib/hooks/useAspects/handleAspects.js +1 -1
  364. package/lib/hooks/useAspects/handleAspects.js.map +1 -1
  365. package/lib/hooks/useForm/FieldOptions.d.ts +7 -0
  366. package/lib/hooks/useForm/FieldOptions.js +2 -0
  367. package/lib/hooks/useForm/FieldOptions.js.map +1 -0
  368. package/lib/hooks/useForm/FormOptions.d.ts +13 -0
  369. package/lib/hooks/useForm/FormOptions.js +2 -0
  370. package/lib/hooks/useForm/FormOptions.js.map +1 -0
  371. package/lib/hooks/useForm/shallowCompare.d.ts +1 -0
  372. package/lib/hooks/useForm/shallowCompare.js +2 -0
  373. package/lib/hooks/useForm/shallowCompare.js.map +1 -0
  374. package/lib/hooks/useForm/useForm.d.ts +19 -0
  375. package/lib/hooks/useForm/useForm.js +51 -0
  376. package/lib/hooks/useForm/useForm.js.map +1 -0
  377. package/lib/hooks/useForm/useFormValidator.d.ts +6 -0
  378. package/lib/hooks/useForm/useFormValidator.js +12 -0
  379. package/lib/hooks/useForm/useFormValidator.js.map +1 -0
  380. package/lib/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  381. package/lib/hooks/useForm/useNormalizedFormState.js +23 -0
  382. package/lib/hooks/useForm/useNormalizedFormState.js.map +1 -0
  383. package/lib/services/retail/external/types.d.ts +1 -1
  384. package/lib/services/retail/inputs.d.ts +67 -68
  385. package/lib/services/retail/inputs.js +67 -68
  386. package/lib/services/retail/inputs.js.map +1 -1
  387. package/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  388. package/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  389. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  390. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  391. package/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  392. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
  393. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  394. package/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  395. package/lib/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  396. package/lib/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  397. package/lib/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  398. package/lib/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  399. package/lib/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  400. package/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  401. package/lib/ui-kit/FormField/Fields/AddressField.js +1 -3
  402. package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  403. package/lib/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  404. package/lib/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  405. package/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  406. package/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  407. package/lib/ui-kit/FormField/Fields/AmountField.js +1 -1
  408. package/lib/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  409. package/lib/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  410. package/lib/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  411. package/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  412. package/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  413. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  414. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  415. package/lib/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  416. package/lib/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  417. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  418. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  419. package/lib/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  420. package/lib/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  421. package/lib/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  422. package/lib/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  423. package/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  424. package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  425. package/lib/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  426. package/lib/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  427. package/lib/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  428. package/lib/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  429. package/lib/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  430. package/lib/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  431. package/lib/ui-kit/FormField/Fields/CommentField.js +1 -3
  432. package/lib/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  433. package/lib/ui-kit/FormField/Fields/ConsentField.js +1 -3
  434. package/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  435. package/lib/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  436. package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  437. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  438. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  439. package/lib/ui-kit/FormField/Fields/DependentsField.js +1 -3
  440. package/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  441. package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  442. package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  443. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  444. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  445. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  446. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  447. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  448. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  449. package/lib/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  450. package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  451. package/lib/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  452. package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  453. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  454. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  455. package/lib/ui-kit/FormField/Fields/EmailField.js +1 -4
  456. package/lib/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  457. package/lib/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  458. package/lib/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  459. package/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  460. package/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  461. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  462. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  463. package/lib/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  464. package/lib/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  465. package/lib/ui-kit/FormField/Fields/FullNameField.js +1 -3
  466. package/lib/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  467. package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  468. package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  469. package/lib/ui-kit/FormField/Fields/InnField.js +1 -3
  470. package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  471. package/lib/ui-kit/FormField/Fields/IsClientField.js +1 -1
  472. package/lib/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  473. package/lib/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  474. package/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  475. package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  476. package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  477. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  478. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  479. package/lib/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  480. package/lib/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  481. package/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  482. package/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  483. package/lib/ui-kit/FormField/Fields/LocalitiesField.js +5 -9
  484. package/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  485. package/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  486. package/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  487. package/lib/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  488. package/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  489. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  490. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  491. package/lib/ui-kit/FormField/Fields/NameField.js +1 -3
  492. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  493. package/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  494. package/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  495. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  496. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  497. package/lib/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  498. package/lib/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  499. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  500. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  501. package/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  502. package/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  503. package/lib/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  504. package/lib/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  505. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +14 -14
  506. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  507. package/lib/ui-kit/FormField/Fields/PhoneField.js +1 -3
  508. package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  509. package/lib/ui-kit/FormField/Fields/ProductField.js +1 -3
  510. package/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  511. package/lib/ui-kit/FormField/Fields/RegionField.js +1 -3
  512. package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  513. package/lib/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  514. package/lib/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  515. package/lib/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  516. package/lib/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  517. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  518. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  519. package/lib/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  520. package/lib/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  521. package/lib/ui-kit/FormField/Fields/SexField.js +1 -3
  522. package/lib/ui-kit/FormField/Fields/SexField.js.map +1 -1
  523. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  524. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  525. package/lib/ui-kit/FormField/Fields/SnilsField.js +1 -3
  526. package/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  527. package/lib/ui-kit/FormField/Fields/SurnameField.js +1 -3
  528. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  529. package/lib/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  530. package/lib/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  531. package/lib/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  532. package/lib/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  533. package/lib/ui-kit/FormField/Fields/VedField.js +8 -9
  534. package/lib/ui-kit/FormField/Fields/VedField.js.map +1 -1
  535. package/lib/ui-kit/FormField/Fields/WagesField.js +1 -3
  536. package/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  537. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  538. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  539. package/lib/ui-kit/FormField/SelectField.js +2 -4
  540. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  541. package/lib/ui-kit/FormField/getField.d.ts +1 -1
  542. package/lib/ui-kit/FormField/getField.js +28 -28
  543. package/lib/ui-kit/FormField/getField.js.map +1 -1
  544. package/lib/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  545. package/lib/ui-kit/FormField/getObjectValidator.js +16 -4
  546. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  547. package/lib/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  548. package/lib/ui-kit/FormField/isRenderField.d.ts +1 -1
  549. package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  550. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  551. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  552. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  553. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  554. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  555. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  556. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  557. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  558. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  559. package/lib/utils/getRequiredLabel.js +1 -0
  560. package/lib/utils/getRequiredLabel.js.map +1 -1
  561. package/lib/validation/objectValidator.d.ts +1 -1
  562. package/lib/validation/objectValidator.js +1 -1
  563. package/lib/validation/objectValidator.js.map +1 -1
  564. package/mobile/bundle/EventBus/defaultEventBus.d.ts +1 -3
  565. package/mobile/bundle/bundle.umd.js +598 -593
  566. package/mobile/bundle/bundle.umd.min.js +1 -1
  567. package/mobile/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  568. package/mobile/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  569. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  570. package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  571. package/mobile/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  572. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  573. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +1 -1
  574. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +1 -1
  575. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  576. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +1 -1
  577. package/mobile/bundle/components/CreditForm/renderStep.d.ts +1 -1
  578. package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  579. package/mobile/bundle/components/Depository/DepositoryFilter.d.ts +1 -1
  580. package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  581. package/mobile/bundle/hooks/useAspects/handleAspects.d.ts +1 -1
  582. package/mobile/bundle/hooks/useForm/FieldOptions.d.ts +7 -0
  583. package/mobile/bundle/hooks/useForm/FormOptions.d.ts +13 -0
  584. package/mobile/bundle/hooks/useForm/shallowCompare.d.ts +1 -0
  585. package/mobile/bundle/hooks/useForm/useForm.d.ts +19 -0
  586. package/mobile/bundle/hooks/useForm/useFormValidator.d.ts +6 -0
  587. package/mobile/bundle/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  588. package/mobile/bundle/services/retail/external/types.d.ts +1 -1
  589. package/mobile/bundle/services/retail/inputs.d.ts +67 -68
  590. package/mobile/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  591. package/mobile/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  592. package/mobile/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  593. package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  594. package/mobile/bundle/ui-kit/FormField/getField.d.ts +1 -1
  595. package/mobile/bundle/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  596. package/mobile/bundle/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  597. package/mobile/bundle/ui-kit/FormField/isRenderField.d.ts +1 -1
  598. package/mobile/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  599. package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  600. package/mobile/bundle/validation/objectValidator.d.ts +1 -1
  601. package/mobile/dist/EventBus/defaultEventBus.d.ts +1 -3
  602. package/mobile/dist/EventBus/defaultEventBus.js +1 -1
  603. package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
  604. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +14 -34
  605. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  606. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  607. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  608. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  609. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  610. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  611. package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  612. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js +1 -0
  613. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  614. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  615. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  616. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  617. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js +1 -1
  618. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  619. package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  620. package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  621. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +3 -6
  622. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  623. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  624. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  625. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  626. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  627. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  628. package/mobile/dist/components/CardTransfer/CardTransfer.js +1 -1
  629. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  630. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -11
  631. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  632. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  633. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +5 -0
  634. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  635. package/mobile/dist/components/CreditCardForm/CreditCardForm.js +1 -1
  636. package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
  637. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  638. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +10 -3
  639. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  640. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +1 -1
  641. package/mobile/dist/components/CreditCardForm/renderInputs.js +2 -1
  642. package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  643. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +1 -1
  644. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  645. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  646. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  647. package/mobile/dist/components/CreditForm/CreditForm.js +1 -1
  648. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  649. package/mobile/dist/components/CreditForm/CreditFormStep.js +10 -3
  650. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  651. package/mobile/dist/components/CreditForm/renderInputs.d.ts +1 -1
  652. package/mobile/dist/components/CreditForm/renderStep.d.ts +1 -1
  653. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  654. package/mobile/dist/components/CreditForm/useCreditFormAPI.js +1 -10
  655. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  656. package/mobile/dist/components/Depository/Depository.js +1 -1
  657. package/mobile/dist/components/Depository/Depository.js.map +1 -1
  658. package/mobile/dist/components/Depository/DepositoryFilter.d.ts +1 -1
  659. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  660. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  661. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  662. package/mobile/dist/hooks/useAspects/handleAspects.d.ts +1 -1
  663. package/mobile/dist/hooks/useAspects/handleAspects.js +1 -1
  664. package/mobile/dist/hooks/useAspects/handleAspects.js.map +1 -1
  665. package/mobile/dist/hooks/useForm/FieldOptions.d.ts +7 -0
  666. package/mobile/dist/hooks/useForm/FieldOptions.js +2 -0
  667. package/mobile/dist/hooks/useForm/FieldOptions.js.map +1 -0
  668. package/mobile/dist/hooks/useForm/FormOptions.d.ts +13 -0
  669. package/mobile/dist/hooks/useForm/FormOptions.js +2 -0
  670. package/mobile/dist/hooks/useForm/FormOptions.js.map +1 -0
  671. package/mobile/dist/hooks/useForm/shallowCompare.d.ts +1 -0
  672. package/mobile/dist/hooks/useForm/shallowCompare.js +5 -0
  673. package/mobile/dist/hooks/useForm/shallowCompare.js.map +1 -0
  674. package/mobile/dist/hooks/useForm/useForm.d.ts +19 -0
  675. package/mobile/dist/hooks/useForm/useForm.js +54 -0
  676. package/mobile/dist/hooks/useForm/useForm.js.map +1 -0
  677. package/mobile/dist/hooks/useForm/useFormValidator.d.ts +6 -0
  678. package/mobile/dist/hooks/useForm/useFormValidator.js +15 -0
  679. package/mobile/dist/hooks/useForm/useFormValidator.js.map +1 -0
  680. package/mobile/dist/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  681. package/mobile/dist/hooks/useForm/useNormalizedFormState.js +26 -0
  682. package/mobile/dist/hooks/useForm/useNormalizedFormState.js.map +1 -0
  683. package/mobile/dist/services/retail/external/types.d.ts +1 -1
  684. package/mobile/dist/services/retail/inputs.d.ts +67 -68
  685. package/mobile/dist/services/retail/inputs.js +67 -68
  686. package/mobile/dist/services/retail/inputs.js.map +1 -1
  687. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  688. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  689. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  690. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  691. package/mobile/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  692. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
  693. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  694. package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  695. package/mobile/dist/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  696. package/mobile/dist/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  697. package/mobile/dist/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  698. package/mobile/dist/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  699. package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  700. package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  701. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +1 -3
  702. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  703. package/mobile/dist/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  704. package/mobile/dist/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  705. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  706. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  707. package/mobile/dist/ui-kit/FormField/Fields/AmountField.js +1 -1
  708. package/mobile/dist/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  709. package/mobile/dist/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  710. package/mobile/dist/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  711. package/mobile/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  712. package/mobile/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  713. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  714. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  715. package/mobile/dist/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  716. package/mobile/dist/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  717. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  718. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  719. package/mobile/dist/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  720. package/mobile/dist/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  721. package/mobile/dist/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  722. package/mobile/dist/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  723. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  724. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  725. package/mobile/dist/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  726. package/mobile/dist/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  727. package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  728. package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  729. package/mobile/dist/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  730. package/mobile/dist/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  731. package/mobile/dist/ui-kit/FormField/Fields/CommentField.js +1 -3
  732. package/mobile/dist/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  733. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js +1 -3
  734. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  735. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  736. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  737. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  738. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  739. package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js +1 -3
  740. package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  741. package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  742. package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  743. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  744. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  745. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  746. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  747. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  748. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  749. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  750. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  751. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  752. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  753. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  754. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  755. package/mobile/dist/ui-kit/FormField/Fields/EmailField.js +1 -4
  756. package/mobile/dist/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  757. package/mobile/dist/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  758. package/mobile/dist/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  759. package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  760. package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  761. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  762. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  763. package/mobile/dist/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  764. package/mobile/dist/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  765. package/mobile/dist/ui-kit/FormField/Fields/FullNameField.js +1 -3
  766. package/mobile/dist/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  767. package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  768. package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  769. package/mobile/dist/ui-kit/FormField/Fields/InnField.js +1 -3
  770. package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  771. package/mobile/dist/ui-kit/FormField/Fields/IsClientField.js +1 -1
  772. package/mobile/dist/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  773. package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  774. package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  775. package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  776. package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  777. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  778. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  779. package/mobile/dist/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  780. package/mobile/dist/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  781. package/mobile/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  782. package/mobile/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  783. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -8
  784. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  785. package/mobile/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  786. package/mobile/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  787. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  788. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  789. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  790. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  791. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +1 -3
  792. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  793. package/mobile/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  794. package/mobile/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  795. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  796. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  797. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  798. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  799. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  800. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  801. package/mobile/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  802. package/mobile/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  803. package/mobile/dist/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  804. package/mobile/dist/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  805. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +13 -13
  806. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  807. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +1 -3
  808. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  809. package/mobile/dist/ui-kit/FormField/Fields/ProductField.js +1 -3
  810. package/mobile/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  811. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +1 -3
  812. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  813. package/mobile/dist/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  814. package/mobile/dist/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  815. package/mobile/dist/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  816. package/mobile/dist/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  817. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  818. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  819. package/mobile/dist/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  820. package/mobile/dist/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  821. package/mobile/dist/ui-kit/FormField/Fields/SexField.js +1 -3
  822. package/mobile/dist/ui-kit/FormField/Fields/SexField.js.map +1 -1
  823. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  824. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  825. package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js +1 -3
  826. package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  827. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +1 -3
  828. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  829. package/mobile/dist/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  830. package/mobile/dist/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  831. package/mobile/dist/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  832. package/mobile/dist/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  833. package/mobile/dist/ui-kit/FormField/Fields/VedField.js +7 -8
  834. package/mobile/dist/ui-kit/FormField/Fields/VedField.js.map +1 -1
  835. package/mobile/dist/ui-kit/FormField/Fields/WagesField.js +1 -3
  836. package/mobile/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  837. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  838. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  839. package/mobile/dist/ui-kit/FormField/SelectField.js +2 -4
  840. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  841. package/mobile/dist/ui-kit/FormField/getField.d.ts +1 -1
  842. package/mobile/dist/ui-kit/FormField/getField.js +28 -28
  843. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  844. package/mobile/dist/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  845. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +18 -6
  846. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  847. package/mobile/dist/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  848. package/mobile/dist/ui-kit/FormField/isRenderField.d.ts +1 -1
  849. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  850. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  851. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  852. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  853. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  854. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  855. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  856. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  857. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  858. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  859. package/mobile/dist/utils/getRequiredLabel.js +1 -0
  860. package/mobile/dist/utils/getRequiredLabel.js.map +1 -1
  861. package/mobile/dist/validation/objectValidator.d.ts +1 -1
  862. package/mobile/dist/validation/objectValidator.js +1 -1
  863. package/mobile/dist/validation/objectValidator.js.map +1 -1
  864. package/mobile/lib/EventBus/defaultEventBus.d.ts +1 -3
  865. package/mobile/lib/EventBus/defaultEventBus.js +1 -1
  866. package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
  867. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +16 -36
  868. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  869. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  870. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  871. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  872. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  873. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  874. package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  875. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js +1 -0
  876. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  877. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  878. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  879. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  880. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js +1 -1
  881. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  882. package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  883. package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  884. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +3 -6
  885. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  886. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  887. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  888. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  889. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  890. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  891. package/mobile/lib/components/CardTransfer/CardTransfer.js +1 -1
  892. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  893. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +13 -12
  894. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  895. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  896. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +3 -0
  897. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  898. package/mobile/lib/components/CreditCardForm/CreditCardForm.js +2 -2
  899. package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
  900. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  901. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +11 -4
  902. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  903. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +1 -1
  904. package/mobile/lib/components/CreditCardForm/renderInputs.js +2 -1
  905. package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  906. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +1 -1
  907. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  908. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  909. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  910. package/mobile/lib/components/CreditForm/CreditForm.js +2 -2
  911. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  912. package/mobile/lib/components/CreditForm/CreditFormStep.js +11 -4
  913. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  914. package/mobile/lib/components/CreditForm/renderInputs.d.ts +1 -1
  915. package/mobile/lib/components/CreditForm/renderStep.d.ts +1 -1
  916. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  917. package/mobile/lib/components/CreditForm/useCreditFormAPI.js +1 -10
  918. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  919. package/mobile/lib/components/Depository/Depository.js +1 -1
  920. package/mobile/lib/components/Depository/Depository.js.map +1 -1
  921. package/mobile/lib/components/Depository/DepositoryFilter.d.ts +1 -1
  922. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  923. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  924. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  925. package/mobile/lib/hooks/useAspects/handleAspects.d.ts +1 -1
  926. package/mobile/lib/hooks/useAspects/handleAspects.js +1 -1
  927. package/mobile/lib/hooks/useAspects/handleAspects.js.map +1 -1
  928. package/mobile/lib/hooks/useForm/FieldOptions.d.ts +7 -0
  929. package/mobile/lib/hooks/useForm/FieldOptions.js +2 -0
  930. package/mobile/lib/hooks/useForm/FieldOptions.js.map +1 -0
  931. package/mobile/lib/hooks/useForm/FormOptions.d.ts +13 -0
  932. package/mobile/lib/hooks/useForm/FormOptions.js +2 -0
  933. package/mobile/lib/hooks/useForm/FormOptions.js.map +1 -0
  934. package/mobile/lib/hooks/useForm/shallowCompare.d.ts +1 -0
  935. package/mobile/lib/hooks/useForm/shallowCompare.js +2 -0
  936. package/mobile/lib/hooks/useForm/shallowCompare.js.map +1 -0
  937. package/mobile/lib/hooks/useForm/useForm.d.ts +19 -0
  938. package/mobile/lib/hooks/useForm/useForm.js +51 -0
  939. package/mobile/lib/hooks/useForm/useForm.js.map +1 -0
  940. package/mobile/lib/hooks/useForm/useFormValidator.d.ts +6 -0
  941. package/mobile/lib/hooks/useForm/useFormValidator.js +12 -0
  942. package/mobile/lib/hooks/useForm/useFormValidator.js.map +1 -0
  943. package/mobile/lib/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  944. package/mobile/lib/hooks/useForm/useNormalizedFormState.js +23 -0
  945. package/mobile/lib/hooks/useForm/useNormalizedFormState.js.map +1 -0
  946. package/mobile/lib/services/retail/external/types.d.ts +1 -1
  947. package/mobile/lib/services/retail/inputs.d.ts +67 -68
  948. package/mobile/lib/services/retail/inputs.js +67 -68
  949. package/mobile/lib/services/retail/inputs.js.map +1 -1
  950. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  951. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  952. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  953. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  954. package/mobile/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  955. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
  956. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  957. package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  958. package/mobile/lib/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  959. package/mobile/lib/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  960. package/mobile/lib/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  961. package/mobile/lib/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  962. package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  963. package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  964. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +1 -3
  965. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  966. package/mobile/lib/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  967. package/mobile/lib/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  968. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  969. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  970. package/mobile/lib/ui-kit/FormField/Fields/AmountField.js +1 -1
  971. package/mobile/lib/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  972. package/mobile/lib/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  973. package/mobile/lib/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  974. package/mobile/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  975. package/mobile/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  976. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  977. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  978. package/mobile/lib/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  979. package/mobile/lib/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  980. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  981. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  982. package/mobile/lib/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  983. package/mobile/lib/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  984. package/mobile/lib/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  985. package/mobile/lib/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  986. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  987. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  988. package/mobile/lib/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  989. package/mobile/lib/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  990. package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  991. package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  992. package/mobile/lib/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  993. package/mobile/lib/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  994. package/mobile/lib/ui-kit/FormField/Fields/CommentField.js +1 -3
  995. package/mobile/lib/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  996. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js +1 -3
  997. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  998. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  999. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  1000. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  1001. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  1002. package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js +1 -3
  1003. package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  1004. package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  1005. package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  1006. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  1007. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  1008. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  1009. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  1010. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  1011. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  1012. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  1013. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  1014. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  1015. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  1016. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  1017. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  1018. package/mobile/lib/ui-kit/FormField/Fields/EmailField.js +1 -4
  1019. package/mobile/lib/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  1020. package/mobile/lib/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  1021. package/mobile/lib/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  1022. package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  1023. package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  1024. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  1025. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  1026. package/mobile/lib/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  1027. package/mobile/lib/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  1028. package/mobile/lib/ui-kit/FormField/Fields/FullNameField.js +1 -3
  1029. package/mobile/lib/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  1030. package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  1031. package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  1032. package/mobile/lib/ui-kit/FormField/Fields/InnField.js +1 -3
  1033. package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  1034. package/mobile/lib/ui-kit/FormField/Fields/IsClientField.js +1 -1
  1035. package/mobile/lib/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  1036. package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  1037. package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  1038. package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  1039. package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  1040. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  1041. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  1042. package/mobile/lib/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  1043. package/mobile/lib/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  1044. package/mobile/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  1045. package/mobile/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  1046. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js +5 -9
  1047. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  1048. package/mobile/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  1049. package/mobile/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  1050. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  1051. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  1052. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  1053. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  1054. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +1 -3
  1055. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  1056. package/mobile/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  1057. package/mobile/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  1058. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  1059. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  1060. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  1061. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  1062. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  1063. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  1064. package/mobile/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  1065. package/mobile/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  1066. package/mobile/lib/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  1067. package/mobile/lib/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  1068. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +14 -14
  1069. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  1070. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +1 -3
  1071. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  1072. package/mobile/lib/ui-kit/FormField/Fields/ProductField.js +1 -3
  1073. package/mobile/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  1074. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +1 -3
  1075. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  1076. package/mobile/lib/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  1077. package/mobile/lib/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  1078. package/mobile/lib/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  1079. package/mobile/lib/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  1080. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  1081. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  1082. package/mobile/lib/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  1083. package/mobile/lib/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  1084. package/mobile/lib/ui-kit/FormField/Fields/SexField.js +1 -3
  1085. package/mobile/lib/ui-kit/FormField/Fields/SexField.js.map +1 -1
  1086. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  1087. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  1088. package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js +1 -3
  1089. package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  1090. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +1 -3
  1091. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  1092. package/mobile/lib/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  1093. package/mobile/lib/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  1094. package/mobile/lib/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  1095. package/mobile/lib/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  1096. package/mobile/lib/ui-kit/FormField/Fields/VedField.js +8 -9
  1097. package/mobile/lib/ui-kit/FormField/Fields/VedField.js.map +1 -1
  1098. package/mobile/lib/ui-kit/FormField/Fields/WagesField.js +1 -3
  1099. package/mobile/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  1100. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  1101. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  1102. package/mobile/lib/ui-kit/FormField/SelectField.js +2 -4
  1103. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  1104. package/mobile/lib/ui-kit/FormField/getField.d.ts +1 -1
  1105. package/mobile/lib/ui-kit/FormField/getField.js +28 -28
  1106. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  1107. package/mobile/lib/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  1108. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +16 -4
  1109. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  1110. package/mobile/lib/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  1111. package/mobile/lib/ui-kit/FormField/isRenderField.d.ts +1 -1
  1112. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  1113. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  1114. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  1115. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  1116. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  1117. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  1118. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  1119. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  1120. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
  1121. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  1122. package/mobile/lib/utils/getRequiredLabel.js +1 -0
  1123. package/mobile/lib/utils/getRequiredLabel.js.map +1 -1
  1124. package/mobile/lib/validation/objectValidator.d.ts +1 -1
  1125. package/mobile/lib/validation/objectValidator.js +1 -1
  1126. package/mobile/lib/validation/objectValidator.js.map +1 -1
  1127. package/mobile/src/EventBus/defaultEventBus.ts +1 -3
  1128. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +22 -42
  1129. package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +1 -1
  1130. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +12 -7
  1131. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
  1132. package/mobile/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +1 -1
  1133. package/mobile/src/components/ApplicationLeadForm/renderInputs.tsx +1 -0
  1134. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +5 -23
  1135. package/mobile/src/components/CalculatorBonus/CalculatorBonus.tsx +1 -1
  1136. package/mobile/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +1 -1
  1137. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +13 -14
  1138. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +2 -2
  1139. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +1 -1
  1140. package/mobile/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -1
  1141. package/mobile/src/components/CardTransfer/CardTransfer.tsx +1 -1
  1142. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +37 -34
  1143. package/mobile/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +12 -0
  1144. package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +2 -2
  1145. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +1 -1
  1146. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +16 -4
  1147. package/mobile/src/components/CreditCardForm/renderInputs.tsx +4 -2
  1148. package/mobile/src/components/CreditCardForm/renderStep.tsx +1 -1
  1149. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +0 -20
  1150. package/mobile/src/components/CreditForm/CreditForm.tsx +3 -3
  1151. package/mobile/src/components/CreditForm/CreditFormStep.tsx +16 -4
  1152. package/mobile/src/components/CreditForm/renderInputs.tsx +1 -1
  1153. package/mobile/src/components/CreditForm/renderStep.tsx +1 -1
  1154. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +0 -20
  1155. package/mobile/src/components/Depository/Depository.tsx +1 -1
  1156. package/mobile/src/components/Depository/DepositoryFilter.tsx +1 -1
  1157. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  1158. package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
  1159. package/mobile/src/hooks/useAspects/handleAspects.ts +2 -2
  1160. package/mobile/src/hooks/useForm/FieldOptions.ts +8 -0
  1161. package/mobile/src/hooks/useForm/FormOptions.ts +18 -0
  1162. package/mobile/src/hooks/useForm/shallowCompare.ts +2 -0
  1163. package/mobile/src/hooks/useForm/useForm.ts +98 -0
  1164. package/mobile/src/hooks/useForm/useFormValidator.ts +24 -0
  1165. package/mobile/src/hooks/useForm/useNormalizedFormState.ts +37 -0
  1166. package/mobile/src/services/retail/external/types.ts +1 -1
  1167. package/mobile/src/services/retail/inputs.tsx +67 -70
  1168. package/mobile/src/ui-kit/BaseFiltration/FiltrationForm.tsx +1 -1
  1169. package/mobile/src/ui-kit/BaseFiltration/useFiltrationForm.ts +4 -4
  1170. package/mobile/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
  1171. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +8 -2
  1172. package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +1 -1
  1173. package/mobile/src/ui-kit/FormField/Fields/AcquiringField.tsx +1 -3
  1174. package/mobile/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -3
  1175. package/mobile/src/ui-kit/FormField/Fields/AddressFactField.tsx +1 -3
  1176. package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +1 -3
  1177. package/mobile/src/ui-kit/FormField/Fields/AddressMatchField.tsx +1 -3
  1178. package/mobile/src/ui-kit/FormField/Fields/AddressRetailField.tsx +4 -12
  1179. package/mobile/src/ui-kit/FormField/Fields/AmountField.tsx +2 -2
  1180. package/mobile/src/ui-kit/FormField/Fields/AnnualRevenueField.tsx +1 -6
  1181. package/mobile/src/ui-kit/FormField/Fields/ArmyIdFlgField.tsx +1 -6
  1182. package/mobile/src/ui-kit/FormField/Fields/BankEmployeeCodeField.tsx +1 -3
  1183. package/mobile/src/ui-kit/FormField/Fields/BankEmpoleeField.tsx +2 -2
  1184. package/mobile/src/ui-kit/FormField/Fields/BankruptcyFlgField.tsx +1 -3
  1185. package/mobile/src/ui-kit/FormField/Fields/BeginDateField.tsx +1 -3
  1186. package/mobile/src/ui-kit/FormField/Fields/BirthPlaceField.tsx +1 -3
  1187. package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -6
  1188. package/mobile/src/ui-kit/FormField/Fields/ChildrenField.tsx +1 -3
  1189. package/mobile/src/ui-kit/FormField/Fields/CodeWordField.tsx +1 -7
  1190. package/mobile/src/ui-kit/FormField/Fields/CollectionCountField.tsx +1 -3
  1191. package/mobile/src/ui-kit/FormField/Fields/CommentField.tsx +1 -3
  1192. package/mobile/src/ui-kit/FormField/Fields/ConsentField.tsx +1 -3
  1193. package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +9 -17
  1194. package/mobile/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +1 -6
  1195. package/mobile/src/ui-kit/FormField/Fields/DependentsField.tsx +1 -3
  1196. package/mobile/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +1 -10
  1197. package/mobile/src/ui-kit/FormField/Fields/DisablePeopleFlgField.tsx +1 -6
  1198. package/mobile/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +2 -6
  1199. package/mobile/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +2 -6
  1200. package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +2 -6
  1201. package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +2 -6
  1202. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +2 -6
  1203. package/mobile/src/ui-kit/FormField/Fields/EmailField.tsx +1 -12
  1204. package/mobile/src/ui-kit/FormField/Fields/ExpensesField.tsx +1 -3
  1205. package/mobile/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +2 -5
  1206. package/mobile/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +4 -4
  1207. package/mobile/src/ui-kit/FormField/Fields/FeedbackMethodField.tsx +1 -3
  1208. package/mobile/src/ui-kit/FormField/Fields/FullNameField.tsx +1 -7
  1209. package/mobile/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +1 -3
  1210. package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +1 -3
  1211. package/mobile/src/ui-kit/FormField/Fields/IsClientField.tsx +5 -2
  1212. package/mobile/src/ui-kit/FormField/Fields/JobsNumberField.tsx +1 -3
  1213. package/mobile/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +1 -3
  1214. package/mobile/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -3
  1215. package/mobile/src/ui-kit/FormField/Fields/LegalFormField.tsx +1 -3
  1216. package/mobile/src/ui-kit/FormField/Fields/LimitedBirthdayField.tsx +2 -6
  1217. package/mobile/src/ui-kit/FormField/Fields/LocalitiesField.tsx +8 -9
  1218. package/mobile/src/ui-kit/FormField/Fields/MandatoryPaymentsField.tsx +1 -3
  1219. package/mobile/src/ui-kit/FormField/Fields/MethodObtainField.tsx +1 -3
  1220. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -6
  1221. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +1 -3
  1222. package/mobile/src/ui-kit/FormField/Fields/OnlineCheckoutField.tsx +2 -2
  1223. package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +1 -3
  1224. package/mobile/src/ui-kit/FormField/Fields/OtherIncomeField.tsx +1 -3
  1225. package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +2 -5
  1226. package/mobile/src/ui-kit/FormField/Fields/ParticipantDateRegistrationField.tsx +1 -10
  1227. package/mobile/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +8 -15
  1228. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +18 -22
  1229. package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -3
  1230. package/mobile/src/ui-kit/FormField/Fields/ProductField.tsx +2 -4
  1231. package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +1 -4
  1232. package/mobile/src/ui-kit/FormField/Fields/RegionPremiumField.tsx +1 -3
  1233. package/mobile/src/ui-kit/FormField/Fields/RegionRetailField.tsx +1 -3
  1234. package/mobile/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +1 -3
  1235. package/mobile/src/ui-kit/FormField/Fields/ServiceDirectionField.tsx +1 -3
  1236. package/mobile/src/ui-kit/FormField/Fields/SexField.tsx +1 -3
  1237. package/mobile/src/ui-kit/FormField/Fields/ShareholderFlgField.tsx +1 -3
  1238. package/mobile/src/ui-kit/FormField/Fields/SnilsField.tsx +1 -8
  1239. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -3
  1240. package/mobile/src/ui-kit/FormField/Fields/TotalIncomeField.tsx +1 -3
  1241. package/mobile/src/ui-kit/FormField/Fields/UltraPremiumField.tsx +1 -7
  1242. package/mobile/src/ui-kit/FormField/Fields/VedField.tsx +8 -10
  1243. package/mobile/src/ui-kit/FormField/Fields/WagesField.tsx +1 -3
  1244. package/mobile/src/ui-kit/FormField/Fields/consentToReceiveMaterialsField.tsx +1 -5
  1245. package/mobile/src/ui-kit/FormField/SelectField.tsx +1 -4
  1246. package/mobile/src/ui-kit/FormField/getField.tsx +29 -31
  1247. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +30 -5
  1248. package/mobile/src/ui-kit/FormField/isEsiaAuthorize.ts +1 -1
  1249. package/mobile/src/ui-kit/FormField/isRenderField.tsx +1 -1
  1250. package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +1 -1
  1251. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +2 -2
  1252. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroupControl.tsx +2 -6
  1253. package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +25 -28
  1254. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  1255. package/mobile/src/utils/getRequiredLabel.ts +1 -0
  1256. package/mobile/src/validation/objectValidator.ts +6 -4
  1257. package/package.json +1 -1
  1258. package/src/EventBus/defaultEventBus.ts +1 -3
  1259. package/src/components/ApplicationForm/ApplicationForm.tsx +22 -42
  1260. package/src/components/ApplicationForm/renderAgreementSubmit.tsx +1 -1
  1261. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +12 -7
  1262. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
  1263. package/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +1 -1
  1264. package/src/components/ApplicationLeadForm/renderInputs.tsx +1 -0
  1265. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +5 -23
  1266. package/src/components/CalculatorBonus/CalculatorBonus.tsx +1 -1
  1267. package/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +1 -1
  1268. package/src/components/CalculatorCredit/CalculatorCredit.tsx +13 -14
  1269. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +2 -2
  1270. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +1 -1
  1271. package/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -1
  1272. package/src/components/CardTransfer/CardTransfer.tsx +1 -1
  1273. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +37 -34
  1274. package/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +12 -0
  1275. package/src/components/CreditCardForm/CreditCardForm.tsx +2 -2
  1276. package/src/components/CreditCardForm/CreditCardFormContent.ts +1 -1
  1277. package/src/components/CreditCardForm/CreditCardFormStep.tsx +16 -4
  1278. package/src/components/CreditCardForm/renderInputs.tsx +4 -2
  1279. package/src/components/CreditCardForm/renderStep.tsx +1 -1
  1280. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +0 -20
  1281. package/src/components/CreditForm/CreditForm.tsx +3 -3
  1282. package/src/components/CreditForm/CreditFormStep.tsx +16 -4
  1283. package/src/components/CreditForm/renderInputs.tsx +1 -1
  1284. package/src/components/CreditForm/renderStep.tsx +1 -1
  1285. package/src/components/CreditForm/useCreditFormAPI.tsx +0 -20
  1286. package/src/components/Depository/Depository.tsx +1 -1
  1287. package/src/components/Depository/DepositoryFilter.tsx +1 -1
  1288. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  1289. package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
  1290. package/src/hooks/useAspects/handleAspects.ts +2 -2
  1291. package/src/hooks/useForm/FieldOptions.ts +8 -0
  1292. package/src/hooks/useForm/FormOptions.ts +18 -0
  1293. package/src/hooks/useForm/shallowCompare.ts +2 -0
  1294. package/src/hooks/useForm/useForm.ts +98 -0
  1295. package/src/hooks/useForm/useFormValidator.ts +24 -0
  1296. package/src/hooks/useForm/useNormalizedFormState.ts +37 -0
  1297. package/src/services/retail/external/types.ts +1 -1
  1298. package/src/services/retail/inputs.tsx +67 -70
  1299. package/src/ui-kit/BaseFiltration/FiltrationForm.tsx +1 -1
  1300. package/src/ui-kit/BaseFiltration/useFiltrationForm.ts +4 -4
  1301. package/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
  1302. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +8 -2
  1303. package/src/ui-kit/FormField/CustomFieldProps.ts +1 -1
  1304. package/src/ui-kit/FormField/Fields/AcquiringField.tsx +1 -3
  1305. package/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -3
  1306. package/src/ui-kit/FormField/Fields/AddressFactField.tsx +1 -3
  1307. package/src/ui-kit/FormField/Fields/AddressField.tsx +1 -3
  1308. package/src/ui-kit/FormField/Fields/AddressMatchField.tsx +1 -3
  1309. package/src/ui-kit/FormField/Fields/AddressRetailField.tsx +4 -12
  1310. package/src/ui-kit/FormField/Fields/AmountField.tsx +2 -2
  1311. package/src/ui-kit/FormField/Fields/AnnualRevenueField.tsx +1 -6
  1312. package/src/ui-kit/FormField/Fields/ArmyIdFlgField.tsx +1 -6
  1313. package/src/ui-kit/FormField/Fields/BankEmployeeCodeField.tsx +1 -3
  1314. package/src/ui-kit/FormField/Fields/BankEmpoleeField.tsx +2 -2
  1315. package/src/ui-kit/FormField/Fields/BankruptcyFlgField.tsx +1 -3
  1316. package/src/ui-kit/FormField/Fields/BeginDateField.tsx +1 -3
  1317. package/src/ui-kit/FormField/Fields/BirthPlaceField.tsx +1 -3
  1318. package/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -6
  1319. package/src/ui-kit/FormField/Fields/ChildrenField.tsx +1 -3
  1320. package/src/ui-kit/FormField/Fields/CodeWordField.tsx +1 -7
  1321. package/src/ui-kit/FormField/Fields/CollectionCountField.tsx +1 -3
  1322. package/src/ui-kit/FormField/Fields/CommentField.tsx +1 -3
  1323. package/src/ui-kit/FormField/Fields/ConsentField.tsx +1 -3
  1324. package/src/ui-kit/FormField/Fields/CurrencyField.tsx +9 -17
  1325. package/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +1 -6
  1326. package/src/ui-kit/FormField/Fields/DependentsField.tsx +1 -3
  1327. package/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +1 -10
  1328. package/src/ui-kit/FormField/Fields/DisablePeopleFlgField.tsx +1 -6
  1329. package/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +2 -6
  1330. package/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +2 -6
  1331. package/src/ui-kit/FormField/Fields/DulNumberField.tsx +2 -6
  1332. package/src/ui-kit/FormField/Fields/DulSerieField.tsx +2 -6
  1333. package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +2 -6
  1334. package/src/ui-kit/FormField/Fields/EmailField.tsx +1 -12
  1335. package/src/ui-kit/FormField/Fields/ExpensesField.tsx +1 -3
  1336. package/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +2 -5
  1337. package/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +4 -4
  1338. package/src/ui-kit/FormField/Fields/FeedbackMethodField.tsx +1 -3
  1339. package/src/ui-kit/FormField/Fields/FullNameField.tsx +1 -7
  1340. package/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +1 -3
  1341. package/src/ui-kit/FormField/Fields/InnField.tsx +1 -3
  1342. package/src/ui-kit/FormField/Fields/IsClientField.tsx +5 -2
  1343. package/src/ui-kit/FormField/Fields/JobsNumberField.tsx +1 -3
  1344. package/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +1 -3
  1345. package/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -3
  1346. package/src/ui-kit/FormField/Fields/LegalFormField.tsx +1 -3
  1347. package/src/ui-kit/FormField/Fields/LimitedBirthdayField.tsx +2 -6
  1348. package/src/ui-kit/FormField/Fields/LocalitiesField.tsx +8 -9
  1349. package/src/ui-kit/FormField/Fields/MandatoryPaymentsField.tsx +1 -3
  1350. package/src/ui-kit/FormField/Fields/MethodObtainField.tsx +1 -3
  1351. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -6
  1352. package/src/ui-kit/FormField/Fields/NameField.tsx +1 -3
  1353. package/src/ui-kit/FormField/Fields/OnlineCheckoutField.tsx +2 -2
  1354. package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +1 -3
  1355. package/src/ui-kit/FormField/Fields/OtherIncomeField.tsx +1 -3
  1356. package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +2 -5
  1357. package/src/ui-kit/FormField/Fields/ParticipantDateRegistrationField.tsx +1 -10
  1358. package/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +8 -15
  1359. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +18 -22
  1360. package/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -3
  1361. package/src/ui-kit/FormField/Fields/ProductField.tsx +2 -4
  1362. package/src/ui-kit/FormField/Fields/RegionField.tsx +1 -4
  1363. package/src/ui-kit/FormField/Fields/RegionPremiumField.tsx +1 -3
  1364. package/src/ui-kit/FormField/Fields/RegionRetailField.tsx +1 -3
  1365. package/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +1 -3
  1366. package/src/ui-kit/FormField/Fields/ServiceDirectionField.tsx +1 -3
  1367. package/src/ui-kit/FormField/Fields/SexField.tsx +1 -3
  1368. package/src/ui-kit/FormField/Fields/ShareholderFlgField.tsx +1 -3
  1369. package/src/ui-kit/FormField/Fields/SnilsField.tsx +1 -8
  1370. package/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -3
  1371. package/src/ui-kit/FormField/Fields/TotalIncomeField.tsx +1 -3
  1372. package/src/ui-kit/FormField/Fields/UltraPremiumField.tsx +1 -7
  1373. package/src/ui-kit/FormField/Fields/VedField.tsx +8 -10
  1374. package/src/ui-kit/FormField/Fields/WagesField.tsx +1 -3
  1375. package/src/ui-kit/FormField/Fields/consentToReceiveMaterialsField.tsx +1 -5
  1376. package/src/ui-kit/FormField/SelectField.tsx +1 -4
  1377. package/src/ui-kit/FormField/getField.tsx +29 -31
  1378. package/src/ui-kit/FormField/getObjectValidator.tsx +30 -5
  1379. package/src/ui-kit/FormField/isEsiaAuthorize.ts +1 -1
  1380. package/src/ui-kit/FormField/isRenderField.tsx +1 -1
  1381. package/src/ui-kit/FormField/updateOrganizationFields.ts +1 -1
  1382. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +2 -2
  1383. package/src/ui-kit/RadioButtonGroup/RadioButtonGroupControl.tsx +2 -6
  1384. package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +25 -28
  1385. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
  1386. package/src/utils/getRequiredLabel.ts +1 -0
  1387. package/src/validation/objectValidator.ts +6 -4
  1388. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1389. package/bundle/hooks/useForm.d.ts +0 -23
  1390. package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1391. package/bundle/ui-kit/FormField/getValidation.d.ts +0 -3
  1392. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1393. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1394. package/dist/hooks/useForm.d.ts +0 -23
  1395. package/dist/hooks/useForm.js +0 -62
  1396. package/dist/hooks/useForm.js.map +0 -1
  1397. package/dist/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1398. package/dist/ui-kit/FormField/getNamesFromInput.js +0 -5
  1399. package/dist/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1400. package/dist/ui-kit/FormField/getValidation.d.ts +0 -3
  1401. package/dist/ui-kit/FormField/getValidation.js +0 -6
  1402. package/dist/ui-kit/FormField/getValidation.js.map +0 -1
  1403. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1404. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +0 -2
  1405. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1406. package/lib/hooks/useForm.d.ts +0 -23
  1407. package/lib/hooks/useForm.js +0 -59
  1408. package/lib/hooks/useForm.js.map +0 -1
  1409. package/lib/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1410. package/lib/ui-kit/FormField/getNamesFromInput.js +0 -2
  1411. package/lib/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1412. package/lib/ui-kit/FormField/getValidation.d.ts +0 -3
  1413. package/lib/ui-kit/FormField/getValidation.js +0 -3
  1414. package/lib/ui-kit/FormField/getValidation.js.map +0 -1
  1415. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1416. package/mobile/bundle/hooks/useForm.d.ts +0 -23
  1417. package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1418. package/mobile/bundle/ui-kit/FormField/getValidation.d.ts +0 -3
  1419. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1420. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1421. package/mobile/dist/hooks/useForm.d.ts +0 -23
  1422. package/mobile/dist/hooks/useForm.js +0 -62
  1423. package/mobile/dist/hooks/useForm.js.map +0 -1
  1424. package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1425. package/mobile/dist/ui-kit/FormField/getNamesFromInput.js +0 -5
  1426. package/mobile/dist/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1427. package/mobile/dist/ui-kit/FormField/getValidation.d.ts +0 -3
  1428. package/mobile/dist/ui-kit/FormField/getValidation.js +0 -6
  1429. package/mobile/dist/ui-kit/FormField/getValidation.js.map +0 -1
  1430. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1431. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +0 -2
  1432. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1433. package/mobile/lib/hooks/useForm.d.ts +0 -23
  1434. package/mobile/lib/hooks/useForm.js +0 -59
  1435. package/mobile/lib/hooks/useForm.js.map +0 -1
  1436. package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1437. package/mobile/lib/ui-kit/FormField/getNamesFromInput.js +0 -2
  1438. package/mobile/lib/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1439. package/mobile/lib/ui-kit/FormField/getValidation.d.ts +0 -3
  1440. package/mobile/lib/ui-kit/FormField/getValidation.js +0 -3
  1441. package/mobile/lib/ui-kit/FormField/getValidation.js.map +0 -1
  1442. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +0 -6
  1443. package/mobile/src/hooks/useForm.ts +0 -120
  1444. package/mobile/src/ui-kit/FormField/getNamesFromInput.tsx +0 -4
  1445. package/mobile/src/ui-kit/FormField/getValidation.tsx +0 -6
  1446. package/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +0 -6
  1447. package/src/hooks/useForm.ts +0 -120
  1448. package/src/ui-kit/FormField/getNamesFromInput.tsx +0 -4
  1449. package/src/ui-kit/FormField/getValidation.tsx +0 -6
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const 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)=>b(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),b=(e,t)=>[e].concat(t>0?b(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>{const l=v[n]||"h3";return o(l,{role:"heading",className:u("font-sans m-0",N[t],e),children:a||i})})),C=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={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"}},k=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=S[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(w,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(C,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function R(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=I,blocksRegistry:r={},ancestors:s=T}=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 B=[],P=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:i,renderProps:l=R,...r})=>{const s=i?(e,t)=>R(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},i)))};function D({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?P(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 E=["CDN","BASE_PATH"],A=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return E.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),M=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!M(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),z=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),V=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:M,isLocalURL:O,isHash:F,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:z,hasPrefix:V});const j="/api/",$=`${j}v1/storage`,q=e=>(t,n)=>{if([!t,M(t),F(t),[A.CDN,j].some((e=>V(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`${$}/${t}/attachment`;const a=t?.startsWith("/");return z(V(t,n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},U={"":"",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=q(d)(z(A.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),U[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&&!M(t)?q(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=q(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(!O(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>V(e,t)))||!V(e,n||"/")},fe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"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=be(e)&&"hidden lg:block";return c("div",{className:u(ye(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,be(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]})})),ye=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",be(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},be=({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(true);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,...y})=>{const b=ke(),v=_(),N=l((()=>v.back()),[]),w=y.options?.page?.common?.backwardButton,C=f&&!b;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(D({...y,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,De=(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,_e=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)),Ee=(e,t)=>e?o(C,{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(_e,{...e},`rte-${t}`):null],Fe=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?De(n.icon,t):null,o("div",{children:Oe(n)})]}))),ze=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(Fe,{benefitsVersion:t,...e},String(n))))}):null)),Ve=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?Ve:ze,{...t}))),je=e=>Boolean(e?.src||e?.icon),$e=(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(qe(n))}):null,qe=(e="")=>(t,n)=>{const{text:a,icon:i,iconRight:l,version:r,...s}=t||{},c=Ue(i,r),d=Ue(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},Ue=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>je(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: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:y,image:b,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:I,...T})=>{const R=b?.src?o(ne,{image:b}):null,B=o(k,{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:$e(y),backwardButton:S,...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(_e,{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)])),yt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?yt(e.get(a),[i,n]):n)})),bt=pt(((e,t)=>t.reduce(yt.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=>bt(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 Dt(e,t):null}catch(e){console.error(e)}return null}const Dt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),_t=e=>[...new Set(e)],Et={},At=["/portal-resources"],Mt=(e,t)=>Tt(e,(e=>t?.[e])),Ot=(e,t)=>{const n=Bt(e),[l,r]=a({});return i((()=>{Ft(n).then(r)}),[n.join()]),n.length?Mt(e,{...t,...l}):e},Ft=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(_t(e).filter((e=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,Et[e]||=await Dt(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?Ft(i,a):a}return t};function zt(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 Vt=zt((({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((()=>jt(0,t?.length)),[t]),a=t?.[n];return a?o(Vt,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),jt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),$t=(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}`}},qt=e=>e?.replace(/[^+\d]/g,""),Ut="/api/v1";const Wt=e=>e?{phone:qt(e)}:{},Ht=(e,t="birthday")=>e?{[t]:$t(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:qt(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(M(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!M(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()}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const nn=e=>e,an=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=a(e),c=l(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return ln(t,n)?t:n}:r(e)):o,[r]);i((()=>{r&&o(r)}),[r]);const[d,m]=a(!1),[u,h]=a({}),p=l(((e,t)=>{const{parse:n=nn,format:a=nn}=t||{};return{value:a(s[e]),isDirty:d||u[e],onChange:t=>{c((a=>({...a,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=l((e=>{c(e),h(e)}),[]),f=l((()=>{c(e),m(!1),h({})}),[e]),x=l((e=>(e.preventDefault(),t?f():m(!0),n&&n(s,e),s)),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},ln=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),rn=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(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function sn(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 on(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}]}function cn(e,t,n,a){i((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function dn(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return cn(globalThis.document,"click",n),t}const mn=({label:e,errors:t})=>e&&t?`${e}*`:e,un=()=>{},hn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",pn=e=>e?hn:"border-error",gn=e=>e?o(Ae,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,fn=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:y,pattern:b,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=pn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[gn(d),N?o("textarea",{className:u("block resize-y min-h-24",xn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:y,disabled:w},e):o("input",{type:r,className:u("h-14",xn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:y,pattern:b,disabled:w},e)]}),g]})})),xn="w-full border rounded-md text-primary-text outline-none p-m",yn=e=>o("div",{className:"h-6",children:e?o(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),bn=e=>e?.value||"",vn={url:"suggest/address"},Nn={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:vn,addressFact:vn,organizationAddress:vn,addressCourier:vn},wn=()=>de(ue.emitter,"popup"),Cn=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 Sn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=wn(),x=Nn[n],y=l((()=>{h.current=t,f.close()}),[t]),b=l((e=>{y(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[y,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=bn}=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(`${Ut}/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 y();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(Cn,{options:p,value:t,onChange:b}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,b]),v}const kn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=un,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:y=!1,maxLength:b,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=on(),k=dn(C),I=l((e=>{v&&!w&&S(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&n&&d(In(n))}),[n]);const T=Sn({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(fn,{disabled:N,type:g||"text","aria-label":t,label:mn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:Tn(a,s,t)})}),yn(r)]})})),In=(e="")=>e.replace(/[^\d]+/g,""),Tn=(e,t,n)=>t&&!n?`${e}*`:e,Rn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Pn=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:Bn(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:Rn(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 Dn=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[y,{setFalse:b,setTrue:v}]=on(),[N,w]=a(""),C=An(x,n.length),S=y&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),b()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=wn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=dn(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(Pn,{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:y,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[gn(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",En(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Rn(r)||h}),_n(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(fn,{type:"text",autoFocus:!0,value:N,onChange:w,disabled:C})}):null]})]})})),_n=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),En=(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"),An=(e,t)=>e||0===t,Mn=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(Dn,{...i,valid:!n,label:mn({label:t,errors:a})}),yn(n)]}))),On=e=>!e?.length,Fn=e=>t=>n=>e(n)?[]:[t],zn=Fn((e=>null!=e&&""!==e)),Vn="Некорректно заполненное поле",Ln="Укажите регион, город/населенный пункт, улицу, дом",jn=e=>zn(e??Vn),$n=e=>Fn((e=>e?.key&&""!==e?.key))(e??Vn),qn=e=>Fn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??Vn),Un=e=>Fn((e=>"string"==typeof e&&e.length>1&&ea(e)))(e??Vn),Wn=(e,t)=>Fn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??Vn),Hn=e=>Fn((e=>"string"==typeof e&&6===e.length))(e),Yn=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Gn=e=>Fn(Yn)(e),Kn=Fn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Xn=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},Jn=e=>Boolean(e.region&&e.city&&e.house),Zn=()=>Fn(Jn)(Ln),Qn=/^[\u0400-\u04FF\d\s]+$/u,ea=(e="")=>Qn.test(e),ta=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)},na={processPersonalDataFlg:Kn,consentProviderFlg:Kn,consentInformFlg:Kn,consentPfrFlg:Kn,consentOthersFlg:Kn},aa={addressCourier:Zn(),paymentSystem:jn("Укажите тип платежной системы"),currency:jn("Укажите валюту"),cardCategory:jn("Укажите категорию карты"),codeWord:(ia="Необходимо ввести кодовое слово",Fn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&ea(e)))(ia??Vn)),confirmationIncome:$n(),methodObtain:jn(),deliveryDate:jn("Укажите дату доставки")};var ia;const la={organization:$n("Выберите тип организации"),organizationAddress:Fn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(Ln),organizationPhone:Gn("Укажите номер телефона"),organizationName:jn("Укажите наименование организации"),legalForm:jn("Укажите ОПФ"),generalSeniority:qn("Укажите количество лет стажа"),lastJobExperience:qn("Укажите стаж на последнем месте работы"),experience5Years:qn("Укажите общий стаж за последние 5 лет"),jobsNumber:qn("Укажите количество мест работы за последние 5 лет"),beginDate:jn("Укажите дату заключения трудового договора"),addressFact:Zn(),addressRegistration:Zn(),addressRetail:$n("Выберите адрес банка"),addressMatch:jn(),sex:jn("Укажите свой пол"),limitedBirthday:Fn(ta)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:jn("Укажите место рождения"),education:$n("Выберите ваше образование"),housing:$n("Выберите тип жилья"),amountWorkers:$n("Выберите информацию о количестве сотрудников"),employment:$n("Выберите информацию о трудоустройстве"),employerActivities:$n("Выберите вид деятельности организации"),employerOrganization:$n("Выберите вид организации"),positionOrganization:$n("Выберите вашу должность"),familyStatus:$n("Выберите семейное положение"),familyMembers:Wn(2,"Укажите количество членов семьи"),children:Wn(2,"Укажите количество детей"),dependents:Wn(2,"Укажите количество иждивенцев"),totalIncome:Wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Wn(10,"Укажите сумму обязательных выплат"),snils:(e=>Fn(Xn)(e))("Некорректный номер СНИЛС"),conscription:jn(),armyIdFlg:Kn,dulSerie:(e=>Fn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:Hn("Укажите номер паспорта"),dulIssueDateField:jn("Укажите дату выдачи паспорта"),dulSubdivisionCode:Hn("Укажите код подразделения"),dulIssuedBy:jn("Укажите организацию, выдавшую паспорт"),participantDateRegistration:jn("Укажите дату регистрации"),retirementIncome:jn(),otherIncome:jn(),wages:jn(),mandatoryPayments:jn(),disablePeopleFlg:jn(),bankruptcyFlg:jn(),shareholderFlg:jn(),legalEntityName:jn(),bankEmployeeCode:jn(),partInBusiness:jn(),regionRetail:$n("Выберите регион")},ra={fullName:jn(),addressBranch:$n(),desiredMeetingDate:jn(),product:jn(),localities:jn(),partnerComments:jn(),collectionCount:jn(),acquiringType:$n(),serviceType:$n(),annualRevenue:jn(),feedbackMethod:$n(),serviceDirection:$n(),secondaryPhone:Gn("Укажите номер телефона"),region:$n(),surname:Un("Укажите свою фамилию"),name:Un("Укажите своё имя"),middleName:Un("Укажите своё отчество"),birthday:jn("Укажите дату рождения"),phone:Gn("Укажите номер телефона"),email:(e=>Fn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>Fn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:jn(),typeForm:jn(),consentToReceiveMaterials:Kn,consentDataProcessing:Kn,...na,...la,...aa},sa=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>Boolean(e?.required))));return Object.fromEntries(t.map((e=>[e,ra?.[e||""]])).filter((([,e])=>e)))},oa=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},ca=(e,t,n=!1)=>n&&t?oa(e,t):e,da=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],ma=d((({field:e,input:t})=>o(Mn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:da,...ca(e("acquiringType"),ra.acquiringType,t?.required)}))),ua=(e="")=>Boolean("trade"===e||"all"===e),ha=e=>null!=e,pa=new Map,ga=(e,t=pa)=>n=>{const a=xa(n),i=t.get(a);if(a&&ha(i))return i;const l=e(...n);return a&&ha(l)&&t.set(a,Promise.resolve(l)),l},fa=e=>Boolean(e?.every((e=>Array.isArray(e)?fa(e):!e||"string"==typeof e))),xa=e=>fa(e)?e.toString():"",ya=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function ba(e,t,{fallback:n,cache:l}={}){const s=r((()=>va(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(ha))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await ga(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&ya(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function va(e){return Array.isArray(e)?e:e instanceof Function?va(e()):[e]}const Na=`${Ut}/branches`,wa=[];const Ca=async e=>await Pt(e,{method:"GET"})||wa;function Sa(e=!1){const{data:t}=ba(`${Ut}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Dt);return Array.isArray(t)?t:[]}const ka=(e="")=>"ULTRASERVICE"===e,Ia=d((({field:e,input:t,params:n})=>{const a=ka(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?Sa(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=ba(e?`${Na}?regionCode=${e}`:null,Ca);return t||wa}(r)?.filter((e=>e?.address));return i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Mn,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...ca(e("addressBranch"),ra.addressBranch,t?.required),isSearch:!0})})),Ta=(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}},Ra=(e,t,n)=>Math.max(t,Math.min(e,n));function Ba(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Pa({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=Ba(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const Da=1,_a=100,Ea=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:Da),max:s=(i.length?i.length-1:_a),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=Ta(e,{normalize:(e=0)=>i.length?Aa(i)(e):Ra(e,r,s),format:He()}),f=l((e=>{p&&p(Ba(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",hn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Pa({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),Ma(a)]})})),Aa=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(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Oa=["От 1 000 ₽","До 1 000 000 000 ₽"],Fa=d((({field:e})=>o(Ea,{title:"Сумма, ₽",items:Oa,min:1e3,max:1e9,...e("amount")}))),za=d((({field:e,input:t})=>o(kn,{label:"Годовая выручка, ₽",...ca(e("annualRevenue"),ra.annualRevenue,t?.required)}))),Va=d((({field:e})=>o(kn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),La=({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=ja(t,e),c=$a(t,l,r);u.push(o("td",{children:o("div",{className:qa(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},ja=(e,t)=>t&&e.toDateString()===t.toDateString(),$a=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),qa=(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"),Ua=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Wa=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:s=un,setValue:d=un})=>{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:Ua.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:La({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),Ha=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ya(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Ga),l=a.map(((e,t)=>Xa(e)?a.slice(0,t).filter(Xa).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 Ga=e=>"_"===e,Ka=e=>/\d/.test(e),Xa=e=>Ga(e)||Ka(e),Ja=1940,Za={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Qa=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((()=>{ti({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(Ya(t,"__.__.____"))},onBlur:()=>{ei(p)?ti({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Za})]})})),ei=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Ja&&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},ti=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(ei(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))}},ni=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Qa,{onChange:a,disabled:r,onClick:e,value:t&&$t(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")}),ai=Ha.map((e=>({key:e}))),ii=Array.from({length:(new Date).getFullYear()-Ja+1},((e,t)=>Ja+t)).reverse().map((e=>({key:String(e)}))),li=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},ri=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},si={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},oi={className:"min-w-32",iconVersion:"black",isBorder:!1},ci=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=on(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[y,b]=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=dn(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(Ha.indexOf(e));const t=li(r,Ha.indexOf(e));ri({maxDateOfMonth:t,selectedYear:r,selectedMonth:Ha.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:ai,yearsOptions:ii,ref:c}})({onYearSelect:b,onMonthSelect:x,onShowCalendar:g,selectedYear:y,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:[gn(t),c("div",{className:"relative",children:[ni({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:b}),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,{...si,className:"-rotate-90 cursor-pointer"})}),o(Dn,{onChange:w,value:{key:Ha[f]},options:S,...oi}),o(Dn,{onChange:C,value:{key:String(y)},options:k,...oi}),o("div",{className:"my-auto",onClick:N,children:o(W,{...si,className:"rotate-90 cursor-pointer"})})]}),o(Wa,{today:n,currentMonth:f,currentYear:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),di=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ci,{label:mn({label:t,errors:a}),valid:Boolean(!n),...i}),yn(n)]}))),mi=d((({field:e,input:t})=>o(di,{label:"Дата рождения",...ca(e("birthday"),ra.birthday,t?.required)}))),ui=d((({field:e,input:t})=>o(kn,{label:"Количество объектов инкассации",isInteger:!0,...ca(e("collectionCount"),ra.collectionCount,t?.required)}))),hi=d((({field:e,input:t})=>o(kn,{className:"col-span-2",...ca(e("comment"),ra.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),pi=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)}))}))),gi="appearance-none w-5 h-5 border-solid flex-none",fi=[{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"}],xi=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(pi,{paths:fi,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",bi(a)),onClick:s,children:[o("div",{className:u(gi,"m-0",i?"rounded-full border-2":Ni(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:vi(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,yi(n)]})})})),yi=e=>e?o("div",{className:"ml-s",children:o(Ae,{size:"text-l",font:"font-light",children:e})}):null,bi=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",vi=(e=!1)=>e?"radio":"checkbox",Ni=(e=!1)=>u("rounded border",{"bg-primary-main":e}),wi="consentToReceiveMaterials",Ci=d((({field:e,input:t})=>o(xi,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...ca(e(wi),ra[wi],t?.required)}))),Si=d((({field:e,input:t})=>o(di,{label:"Желаемая дата встречи",...ca(e("desiredMeetingDate"),ra.desiredMeetingDate,t?.required)}))),ki=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(kn,{label:"Электронная почта",...ca(e("email"),ra.email,n),...a})})),Ii=[{key:"ULTRASERVICE",text:"Ультра"}],Ti=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ri=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Bi=d((({field:e,input:t})=>o(Mn,{label:"Способ получения ответа",options:Ri,...ca(e("feedbackMethod"),ra.feedbackMethod,t?.required)}))),Pi=d((({field:e,input:t})=>o(kn,{label:"ФИО",...ca(e("fullName"),ra.fullName,t?.required),...t})));function Di(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}const _i={};function Ei(e,t=_i){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 Ai=new class{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)}};var Mi,Oi;function Fi(e){return Ei(Ai,e)}Mi=Ai,Oi=new class{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)}}(globalThis?.localStorage),Di(Mi,Oi),Di(Oi,Mi),Mi.bus.watch((({type:e,event:t})=>{null!=t?Oi.setItem(e,t):Oi.removeItem(e)}));const zi=()=>Fi(),Vi=(e,t)=>{if(!t)return null;const n=qi(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")}},Li=(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},ji=(e,t)=>{const n=qi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},$i=(e,t,n)=>{const a=qi(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},qi=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,Ui=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Wi=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(Hi(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(kn,{disabled:t?.filledByEsia&&Ui(e,n),label:"Адрес",...ca(e(n),ra[n],t?.required),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),Hi=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}),Yi=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Gi(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Hi(n.data?.address));const r={amountWorkers:Li(e?.amountWorkers,n.data?.employee_count),employerActivities:Vi(e?.employerActivities??[],a),organization:$i(e?.organization??[],i,l),employerOrganization:ji(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Gi=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Ki=d((({field:e,input:t})=>{const n=zi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Yi(n,e,t)}),[]);return o(kn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...ca(e("inn"),ra.inn,t?.required),onDaDataChange:a})})),Xi=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(xi,{text:t,value:n,disabled:i,onChange:r},a),yn(l)]}))),Ji=d((({field:e})=>o(Xi,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Zi=`${Ut}/outservice`,Qi=[];async function el(){const e=await Pt(`${Zi}/outserviceregions`);return e&&Array.isArray(e)?e:Qi}const tl=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=ba("outServiceRegions",el),r=l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})));return i((()=>{""!==a&&e?.("localities")?.onChange?.("")}),[a]),o(Mn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:r,...ca(e("localities"),ra.localities,t?.required),isSearch:!0})})),nl="middleName",al=d((({field:e,input:t})=>o(kn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Ui(e,nl),...ca(e(nl),ra.middleName,t?.required),...t}))),il=d((({field:e,input:t})=>o(kn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Ui(e,t.name??""),...ca(e("name"),ra.name,t?.required),...t}))),ll=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]}))),rl=d((({field:e})=>ua(e("acquiringType")?.value?.key)?o(ll,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),sl=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(kn,{...ca(e("partnerComments"),ra.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),ol=e=>"_"===e,cl=e=>/\d/.test(e),dl=e=>ol(e)||cl(e),ml=[..."+7 (___) ___-__-__"],ul=ml.findIndex(ol),hl=ml.map(((e,t)=>dl(e)?ml.slice(0,t).filter(dl).length:-1));function pl(e){const t=e.replace(/\D/g,""),n=ml.map(((e,n)=>cl(e)?e:t.charAt(hl[n])||e)),a=hl.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ul,a)):n).join("")}const gl=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(pl(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(fn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),fl=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(gl,{"aria-label":t,label:mn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),yn(n)]}))),xl=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(fl,{label:"Телефон",...ca(e(n),ra.phone,t?.required),disabled:t?.filledByEsia&&Ui(e,n),...t})})),yl=d((({field:e})=>ua(e("acquiringType")?.value?.key)?o(ll,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),bl=d((({field:e,source:t})=>o(Mn,{placeholder:"Выберите продукт",label:"Продукт",options:vl(t?.productList),...oa(e("product"),ra.product)}))),vl=e=>(e??[]).map((e=>({key:e,value:e}))),Nl=`${Ut}/regions`,wl=[];function Cl(e=Nl){const{data:t}=ba(e,Dt);return Array.isArray(t)?t:wl}const Sl=`${Ut}/outservice/outserviceregions`,kl=d((({field:e,input:t,params:n})=>{var a;const i=Cl((a=n?.typeForm,"OUTSERVICE"===a?Sl:void 0));return o(Mn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...ca(e("region"),ra.region,t?.required)})})),Il=d((({field:e,input:t})=>{const n=Sa(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Mn,{label:"Регион",placeholder:"Выберите регион",options:a,...ca(e("region"),ra.region,t?.required)})})),Tl=d((({field:e})=>{const t=e("secondaryPhone");return o(fl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?oa(t,ra.secondaryPhone):t})})),Rl=d((({field:e,input:t})=>o(Mn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ti,...ca(e("serviceDirection"),ra.serviceDirection,t?.required)}))),Bl=d((({field:e,input:t})=>o(kn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Ui(e,"surname"),...ca(e("surname"),ra.surname,t?.required),...t}))),Pl=["От 1 мес","До 15 лет"],Dl=d((({field:e})=>o(Ea,{title:"Срок, месяцев",items:Pl,min:1,max:180,...e("term")}))),_l=d((({field:e,input:t})=>o(Mn,{label:"Тип обслуживания",options:Ii,...ca(e("serviceType"),ra.serviceType,t?.required)}))),El={horizontal:"@lg:flex-row",vertical:""},Al=d((({label:e,items:t,value:n,className:a,onChange:i,disabled:l=!1,orientation:r="horizontal"})=>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",El[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(xi,{isRadio:!0,text:t,value:n===e,onChange:()=>i&&i(e),disabled:l},String(e))))})]}))),Ml=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Ol=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return i((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Al,{className:"whitespace-normal",orientation:"horizontal",items:Ml,value:t,onChange:e=>n&&n(e)})})}));const Fl={$ref:"/wcms-resources/outservice-productlist.json"},zl={fullName:e=>o(Pi,{...e}),addressBranch:e=>o(Ia,{...e}),desiredMeetingDate:e=>o(Si,{...e}),product:e=>o(bl,{...e,source:Fl}),localities:e=>o(tl,{...e}),isClient:e=>o(Ji,{...e}),partnerComments:e=>o(sl,{...e}),collectionCount:e=>o(ui,{...e}),acquiringType:e=>o(ma,{...e}),onlineCheckout:e=>o(rl,{...e}),posTerminal:e=>o(yl,{...e}),serviceType:e=>o(_l,{...e}),term:e=>o(Dl,{...e}),amount:e=>o(Fa,{...e}),annualRevenue:e=>o(za,{...e}),vedTypes:e=>o(Ol,{...e}),feedbackMethod:e=>o(Bi,{...e}),serviceDirection:e=>o(Rl,{...e}),bankEmpolee:e=>o(Va,{...e}),secondaryPhone:e=>o(Tl,{...e}),applicationDate:e=>o(kn,{label:"Дата и время обращения в Банк",...e}),region:e=>ka(e?.params?.typeForm)?o(Il,{...e}):o(kl,{...e}),consentToReceiveMaterials:e=>o(Ci,{...e}),surname:e=>o(Bl,{...e}),name:e=>o(il,{...e}),middleName:e=>o(al,{...e}),birthday:e=>o(mi,{...e}),phone:e=>o(xl,{...e}),email:e=>o(ki,{...e}),inn:e=>o(Ki,{...e}),comment:e=>o(hi,{...e})},Vl=(e,t,n={})=>(a,i)=>{const l={...zl,...n};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})?o("div",{children:l[a?.name||""]?.({field:e,input:a,params:t})},String(i)):null},Ll=e=>2===e?"@xl:grid-cols-2":"",jl=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,$l=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 ql({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Ul={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"},Wl={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")},Hl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(ql(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(Ul[i],Wl[i]),a),type:d,role:h,onClick:p,children:[s?o($l,{blur:!0,size:"small"}):null,e]})})),Yl=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"})}))),Gl=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(Yl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Kl=d((({responseType:e,typeForm:t,onClose:n})=>{const a="OK"===e,i="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Gl,{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:a?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(k,{className:"w-full",title:a?"Ваша заявка отправлена":"Не удалось отправить заявку",description:a?i:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Hl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Xl=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Jl=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${ua(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,u={...d,...Ql(o),...Zl(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Zl=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ql=e=>e?{vedTypes:Object.fromEntries(Ml.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:da[0],serviceType:Ii[0],feedbackMethod:Ri[0],serviceDirection:Ti[0],vedTypes:Ml[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},tr=d((({text:e,link:t})=>c(C,{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]}))),nr=(e,t)=>o(Hl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ar=(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(xi,{...e}),o(tr,{link:t})]}),yn(oa(e,Kn).error)]}):o(tr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),nr(n)]}),ir={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=`${Ut}${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}}},lr=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],y=((e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||er[e.name||""]]))),typeForm:{key:t,text:""}}))(x,n),[b,v]=a(""),N=sn(Kl),C=l((async(e,t)=>{const a=rr(x,e),i=Xl(sa(a));if(!On(i(e)))return console.warn("validation fail");const l=Jl({...e,...h}),r=await ir.send(l,"lead"===m)?"OK":"Fail";if(v(r),r&&N.open({typeForm:n,responseType:r}),"OK"===r&&g){const e=tn();Xt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[n]),[,{field:S,onSubmit:k,reset:I}]=an(y,{onSubmit:C}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return i((()=>{"OK"===b&&(v(""),I())}),[b]),c(rn,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:u(Ll(e.columns),"grid gap-x-m"),children:[jl(e.title),(e?.inputs||[])?.map(Vl(S,{typeForm:n}))]},`section-${t}`))),ar(T?S("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{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]})})),rr=(e,t)=>e.filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)})))),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(kn,{label:"Адрес",disabled:r,...ca(e(n),ra[n],t?.required),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),cr=d((({field:e,input:t})=>o(Xi,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...ca(e("addressMatch"),ra.addressMatch,t?.required)}))),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"})}),yr=e=>globalThis[e];function br(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=yr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(yr(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(yr(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))})(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}const vr={...gr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Nr=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(vr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),wr=[55.753995,37.614069],Cr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=br("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);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:Sr(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($l,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Nr,{yandexMaps:r}),o(Nr,{yandexMaps:r,direction:"out"})]}),xr(r,m,u("right-2 top-80",h))]})})),Sr=e=>{const t=[Ir(kr(e,0)),Ir(kr(e,1))];return t.every((e=>e))?t:wr},kr=(e,t)=>e.map((e=>e.coords?.[t])),Ir=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Tr=async(e,t,n)=>{try{return(await Rr(e,t,n)).json()}catch(e){return console.error(e),null}};async function Rr(e,t,n){return globalThis?.fetch?.(`${Ut}${e}`,{method:t,headers:{"Content-Type":"application/json",...Br()},credentials:"include",body:n?JSON.stringify(n):null})}const Br=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Pr=e=>Number(e.toString().replace(",",".")),Dr=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:i,renderFoldButton:r})=>{const[s,o]=a(n),d=l((()=>{o((e=>!e))}),[]),m=i({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const _r=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})})})),Er=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:Ar({textItems:l,subText:t,children:n,isPhone:a,...i})})),Ar=({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(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Mr(n,s),i?o(Ae,{color:a,size:"text-m",children:i}):null]}),Mr=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${Or(e)}`,children:e.trim()}):e.trim()},String(n)))),Or=e=>e.replace(/\D/g,""),Fr=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=e=>{const t=Lr(e);return o(Er,{label:"Режим работы",value:t,className:"max-w-none"})},Vr=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Lr=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[Vr({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Vr({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},jr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],$r=e=>jr.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??"")}}))),qr=e=>{if(!e)return null;const t=Ur(e);return c(Fr,{className:"border-none",children:[o(Er,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Wr)})}),o(Er,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},Ur=e=>{const t=jr.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},Wr=({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)),Hr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Er,{label:"Валюта",value:e.currency}):null,t?o(Er,{label:"Купить",value:String(t)}):null,n?o(Er,{label:"Продать",value:String(n)}):null]},String(a)),Yr={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"}},Gr=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",Yr[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:Yr[n].text,children:t})]}))),Kr=(new Date).getDay(),Xr=e=>{const[t]=e?.slice(Kr-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(Gr,{color:"green",children:i}):null,n&&l?o(Gr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Gr,{color:"red",children:"Выходной"})},Jr=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Zr=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(Er,{label:e,value:t&&n?n:"",subText:Jr({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),Qr=["ArrowDownIcon","ArrowUpIcon"],es=["Подробнее","Скрыть"],ts=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:es[Number(e)]}),o(W,{className:"text-primary-text",name:Qr[Number(e)],width:"16",height:"16"})]}),ns=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,as=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,is=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,ls=({name:e,address:t,phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=$r(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ae,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),Xr(h)]}),o("div",{className:"hidden sm:block",children:rs({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Dr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:rs({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(u))},rs=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=$r(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Fr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Er,{label:"Факс",value:t,isPhone:!0}),o(Er,{label:"Телефон филиала",value:e,isPhone:!0}),o(Er,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Er,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Er,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Er,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Fr,{children:o(Er,{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(Zr)})})}):c(Fr,{children:[o(Er,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Wr)})}),zr(d)]}),r?.businessScheduleVisibleTag?qr(r?.businessScheduleDescription):null,s?.currencies?.length?o(Fr,{className:"flex-wrap",children:s?.currencies?.map(Hr)}):null]})},ss=({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=$r(e),n=e?Lr(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ns(n):is(n,a):as(n):""})(n)}`;return{header:a,body:l}},os={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},cs={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ds={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)},ms=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ds[t](e)))))},us=()=>{},hs=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=us,getBalloonRemoteWorkplaces:i=us})=>{const[l,s,o,c]=r((()=>{const l=ms(e,n),r=ms(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}},ps=e=>{const{data:t,error:n}=ba(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,gs);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},gs=async e=>await Pt(e,{method:"POST"})||[],fs=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),xs=d((({children:e})=>fs?e:null)),ys=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=ps("REGION_RF"),s=e("regionRetail")?.value||{},d=e("addressRetail");i((()=>{(async()=>{const e=await(async e=>{const t=await Tr("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:Pr(e.latitude??wr[0]),gpsLongitude:Pr(e.longitude??wr[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&e?.("addressRetail")?.onChange?.("")}),[s.key]);const{points:m}=hs({data:n,filtrationState:{},getBalloon:ss}),u=Boolean(s?.key);return c("div",{children:[o(Mn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...ca(e("addressRetail"),ra.addressRetail,t?.required&&u),isSearch:!0}),o("div",{className:"h-[600px]",children:o(xs,{children:o(Cr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),bs=zt((({field:e,source:t,fieldName:n,input:a,placeholder:i="Выберите из списка",options:l,...r})=>{const s=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Mn,{placeholder:i,options:s,...ca(e(n),ra[n],a?.required),...r})})),vs=d((({field:e,input:t})=>{const{data:n}=ps("EMPLOYEES_NUMBER"),a=zi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(bs,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),Ns=d((({field:e,input:t})=>o(Xi,{text:"Наличие военного билета",...ca(e("armyIdFlg"),ra.armyIdFlg,t?.required)}))),ws=d((({field:e,input:t})=>o(kn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...ca(e("bankEmployeeCode"),ra.bankEmployeeCode,t?.required),...t}))),Cs=d((({field:e,input:t})=>o(Xi,{text:"В отношении меня ведётся производство по делу о банкротстве",...ca(e("bankruptcyFlg"),ra.bankruptcyFlg,t?.required)}))),Ss=d((({field:e,input:t})=>o(di,{label:"Дата начала работы на текущем месте",...ca(e("beginDate"),ra.beginDate,t?.required),...t}))),ks=d((({field:e,input:t})=>o(kn,{label:"Место рождения",...ca(e("birthPlace"),ra.birthPlace,t?.required),...t,disabled:t?.filledByEsia&&Ui(e,"birthPlace")}))),Is=e=>{try{return JSON.parse(String(e))}catch(e){return null}};function Ts(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?Is(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])]}const Rs=d((({field:e,input:t})=>{const[n,l]=a([]),[r]=Ts("programId"),{value:s,onChange:c}=e("cardCategory"),d=e("paymentSystem")?.value?.key;return i((()=>{d&&r&&(async()=>{const e=await(async(e,t)=>{const n=await Tr("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(d,r);l(e),Bs(e,s)||c&&c(null)})()}),[d]),o(bs,{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(kn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...ca(e("children"),ra.children,t?.required),...t}))),Ds=d((({field:e,input:t})=>o(kn,{label:"Кодовое слово",...ca(e("codeWord"),ra.codeWord,t?.required),...t}))),_s=d((({field:e,input:t})=>{const{data:n}=ps("INCOME_CERT_UNITED");return o(bs,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Es=d((({field:e,input:t})=>{const{data:n}=ps("MILITARY_STATUS");return o(bs,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),As={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(Gl,{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(Hl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Os=(e,t)=>{const{open:n}=sn(Ms),a=ke();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Rr(`/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])},Fs=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(xi,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ae,{children:"Ознакомиться"})}):null]}),yn(t)]})})),zs=d((({field:e,input:t})=>t&&t.name?o(Fs,{text:As[t.name]?.text,docId:As[t.name]?.docId,...ca(e(t.name),ra[t.name],t?.required)}):null)),Vs=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(w,{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",$s="flex flex-col lg:w-1/2 gap-2xl",qs="flex flex-col gap-y-xl min-w-52",Us=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ae,{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(Ae,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Us,{value:n,...i}):o(Ae,{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(C,{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(Ea,{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(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(Al,{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(Ea,{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?.(Ra(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),yo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},bo=zt((({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,isDirty:x}]=an({moneyValue:Gs(s,2e5),monthsValue:Ks(s,Vs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)});i((()=>{x&&d?.(g)}),[g,x]);const y=fo(g,n,r),b=eo({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return i((()=>{v&&v(Ra(g.moneyValue,y.minSum,y.maxSum))}),[y.minSum,y.maxSum]),i((()=>{N&&N(Ra(g.monthsValue,y.minMonths,y.maxMonths))}),[y.minMonths,y.maxMonths]),i((()=>{!xo(s)&&h&&no({field:f,defParams:h,calcParams:y,map:yo,monthsValue:"minMonths"})}),[n,s]),o(Ls,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:$s,children:[to({title:"Сумма кредита, ₽",step:500,min:y.minSum,max:y.maxSum,...f("moneyValue"),value:y.moneyValue}),Js({title:"Срок кредита, месяцев",min:y.minMonths,max:y.maxMonths,...f("monthsValue"),value:y.monthsValue}),vo({...y,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(qs,"@4xl:w-1/2"),children:[o(Ws,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ws,{title:"Ставка",value:y?.rate,fractionDigits:2,postfix:"%"}),o(Ws,{title:"Ежемесячный платёж",value:y.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),$e(a,{isVertical:!0}),Xs(l)]})]})})})),vo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(xi,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(xi,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(xi,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(xi,{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(bo,{...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}=ps("CREDIT_IN_RSHB");return o(bs,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),To=d((({className:e,label:t,onChange:n,error:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Al,{label:mn({label:t,errors:i?.errors}),onChange:e=>n&&n(e),...i}),yn(a)]}))),Ro=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency");return o(To,{label:"Валюта",orientation:"horizontal",items:[{id:"810",text:"Рубли"}],value:n,onChange:e=>a?.(e),...ca(e("currency"),ra.currency,t?.required)})})),Bo=d((({field:e,input:t})=>o(di,{label:"Дата доставки",...ca(e("deliveryDate"),ra.deliveryDate,t?.required)}))),Po=d((({field:e,input:t})=>o(kn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...ca(e("dependents"),ra.dependents,t?.required),...t}))),Do=d((({field:e,input:t})=>o(Xi,{text:"Являюсь инвалидом",...ca(e("disablePeopleFlg"),ra.disablePeopleFlg,t?.required)}))),_o="dulIssueDateField",Eo=d((({field:e,input:t})=>o(di,{label:"Дата выдачи",...ca(e(_o),ra.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Ui(e,_o)}))),Ao="dulIssuedBy",Mo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(kn,{disabled:t?.filledByEsia&&Ui(e,Ao),label:"Кем выдан",...t,...ca(e(Ao),ra.dulIssuedBy,t?.required),onDaDataChange:i,daDataQueryPrefix:n})})),Oo=d((({field:e,input:t})=>o(kn,{disabled:t?.filledByEsia&&Ui(e,"dulNumber"),label:"Номер документа",isInteger:!0,maxLength:6,...ca(e("dulNumber"),ra.dulNumber,t?.required)}))),Fo=d((({field:e,input:t})=>o(kn,{disabled:t?.filledByEsia&&Ui(e,"dulSerie"),label:"Серия документа",isInteger:!0,maxLength:4,...ca(e("dulSerie"),ra.dulSerie,t?.required)}))),zo="dulSubdivisionCode",Vo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(kn,{disabled:t?.filledByEsia&&Ui(e,zo),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...ca(e(zo),ra.dulSubdivisionCode,t?.required),onDaDataChange:n})})),Lo=d((({field:e,input:t})=>{const{data:n}=ps("EDUCATION_LEVEL");return o(bs,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),jo=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_ACTIVITY_TYPE"),a=zi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(bs,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),$o=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_KIND"),a=zi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(bs,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),qo=d((({field:e,input:t})=>{const{data:n}=ps("EMPLOYMENT_INFO_UNITED");return o(bs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Uo=d((({field:e,input:t})=>o(kn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...ca(e("expenses"),ra.expenses,t?.required),...t}))),Wo="experience5Years",Ho=d((({field:e,input:t})=>{const n=l((t=>e(Wo)?.onChange?.(String(Ra(Number(t),0,5)))),[]);return o(kn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...ca(e(Wo),ra[Wo],t?.required),...t,onChange:n})})),Yo=d((({field:e})=>{const{value:t,onChange:n}=e("familyMembers"),a=e("familyStatus")?.value?.key,l="MARRIED"===a?2:1,r=Number(e("children")?.value),s=Number(e("dependents")?.value),c=l+r+s;return i((()=>{e?.("familyMembers")?.onChange?.(c)}),[a,r,s]),o(kn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),Go=d((({field:e,input:t})=>{const{data:n}=ps("MARITAL_STATUS");return o(bs,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Ko=d((({field:e,input:t})=>o(kn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...ca(e("generalSeniority"),ra.generalSeniority,t?.required),...t}))),Xo=d((({field:e,input:t})=>{const{data:n}=ps("HOUSE_TYPE");return o(bs,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Jo=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(_e,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Zo=d((({input:e})=>o(Jo,{__html:e?.label}))),Qo=d((({field:e,input:t})=>o(kn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...ca(e("jobsNumber"),ra.jobsNumber,t?.required),...t}))),ec=d((({field:e,input:t})=>o(kn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...ca(e("lastJobExperience"),ra.lastJobExperience,t?.required),...t}))),tc=d((({field:e,input:t})=>o(kn,{label:"Наименование юридического лица",...t,...ca(e("legalEntityName"),ra.legalEntityName,t?.required),disabled:!e?.("shareholderFlg")?.value}))),nc=d((({field:e,input:t})=>o(kn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...ca(e("legalForm"),ra.legalForm,t?.required),...t}))),ac="limitedBirthday",ic=d((({field:e,input:t})=>o(di,{label:"Дата рождения",...ca(e(ac),ra.limitedBirthday,t?.required),disabled:t?.filledByEsia&&Ui(e,ac)}))),lc=d((({field:e,input:t})=>o(kn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...ca(e("mandatoryPayments"),ra.mandatoryPayments,t?.required),...t}))),rc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],sc=d((({field:e,input:t})=>o(To,{orientation:"horizontal",items:rc,...ca(e("methodObtain"),ra.methodObtain,t?.required)}))),oc=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_TYPE"),a=zi();return i((()=>{n&&(a.organization=n)}),[n]),o(bs,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),cc=d((({field:e,input:t})=>{const n=zi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Yi(n,e,t)}),[]);return o(kn,{label:"Наименование организации",...t,...ca(e("organizationName"),ra.organizationName,t?.required),onDaDataChange:a})})),dc=d((({field:e,input:t})=>o(kn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...ca(e("otherIncome"),ra.otherIncome,t?.required),...t}))),mc=d((({field:e,input:t})=>o(di,{label:"Дата регистрации по месту жительства",...ca(e("participantDateRegistration"),ra.participantDateRegistration,t?.required)}))),uc="partInBusiness",hc=d((({field:e,input:t})=>{const n=l((t=>e(uc)?.onChange?.(String(Ra(Number(t),0,100)))),[]);return o(kn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...ca(e(uc),ra.partInBusiness,t?.required),...t,onChange:n})})),pc=e=>e.map((e=>({key:e.type,text:e.name}))),gc=d((({field:e,input:t})=>{const{value:n,onChange:r}=e("paymentSystem"),[s]=Ts("programId"),[c,d]=a([]);i((()=>{s&&(async()=>{const e=await(async e=>{const t=await Tr("/public-data/creditProgramConditions","POST",{creditProgramId:e});return pc(t?.paymentSystems||[])})(s);d(e||[])})()}),[]);const m=l((e=>r?.(c?.find((t=>t.key===e)))),[c,r]);return o(To,{label:"Платежная система",orientation:"horizontal",items:fc(c),...ca(e("paymentSystem"),ra.paymentSystem,t?.required),value:n?.key,onChange:m})})),fc=e=>e?.map((e=>({id:e.key,text:e.text})))??[],xc=d((({field:e,input:t})=>{const{data:n}=ps("POSITION");return o(bs,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),yc=d((({field:e,input:t})=>{const{data:n}=ps("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Mn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...ca(e("regionRetail"),ra.regionRetail,t?.required)})})),bc=d((({field:e,input:t})=>o(kn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...ca(e("retirementIncome"),ra.retirementIncome,t?.required),...t}))),vc=["male","female"],Nc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],wc=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 Tr("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return vc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(To,{label:"Пол",orientation:"horizontal",items:Nc,...ca(e("sex"),ra.sex,t?.required)})})),Cc=d((({field:e,input:t})=>o(Xi,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...ca(e("shareholderFlg"),ra.shareholderFlg,t?.required)}))),Sc=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Ya(e,"___-___-___ __")):t?.(Ya(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(fn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),kc=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(Sc,{"aria-label":t,label:mn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),yn(a)]}))),Ic=d((({field:e,input:t})=>o(kc,{label:"СНИЛС",maxLength:14,...ca(e("snils"),ra.snils,t?.required),...t}))),Tc=d((({field:e,input:t})=>o(kn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ca(e("totalIncome"),ra.totalIncome,t?.required),...t}))),Rc=d((({field:e,input:t})=>o(kn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ca(e("wages"),ra.wages,t?.required),...t}))),Bc={limitedBirthday:e=>o(ic,{...e})},Pc={processPersonalDataFlg:e=>o(zs,{...e}),consentProviderFlg:e=>o(zs,{...e}),consentOthersFlg:e=>o(zs,{...e}),consentInformFlg:e=>o(zs,{...e}),consentPfrFlg:e=>o(zs,{...e})},Dc={organization:e=>o(oc,{...e}),organizationAddress:e=>o(Wi,{...e}),organizationPhone:e=>o(xl,{...e}),organizationName:e=>o(cc,{...e}),legalForm:e=>o(nc,{...e}),generalSeniority:e=>o(Ko,{...e}),lastJobExperience:e=>o(ec,{...e}),experience5Years:e=>o(Ho,{...e}),jobsNumber:e=>o(Qo,{...e}),beginDate:e=>o(Ss,{...e}),addressFact:e=>o(or,{...e}),addressRegistration:e=>o(Wi,{...e}),addressRetail:e=>o(ys,{...e}),addressMatch:e=>o(cr,{...e}),sex:e=>o(wc,{...e}),limitedBirthday:e=>o(ic,{...e}),birthPlace:e=>o(ks,{...e}),education:e=>o(Lo,{...e}),housing:e=>o(Xo,{...e}),amountWorkers:e=>o(vs,{...e}),employment:e=>o(qo,{...e}),employerActivities:e=>o(jo,{...e}),employerOrganization:e=>o($o,{...e}),positionOrganization:e=>o(xc,{...e}),familyStatus:e=>o(Go,{...e}),familyMembers:e=>o(Yo,{...e}),children:e=>o(Ps,{...e}),dependents:e=>o(Po,{...e}),totalIncome:e=>o(Tc,{...e}),expenses:e=>o(Uo,{...e}),snils:e=>o(Ic,{...e}),conscription:e=>o(Es,{...e}),armyIdFlg:e=>o(Ns,{...e}),dulSerie:e=>o(Fo,{...e}),dulNumber:e=>o(Oo,{...e}),dulIssueDateField:e=>o(Eo,{...e}),dulSubdivisionCode:e=>o(Vo,{...e}),dulIssuedBy:e=>o(Mo,{...e}),participantDateRegistration:e=>o(mc,{...e}),retirementIncome:e=>o(bc,{...e}),otherIncome:e=>o(dc,{...e}),wages:e=>o(Rc,{...e}),mandatoryPayments:e=>o(lc,{...e}),disablePeopleFlg:e=>o(Do,{...e}),bankruptcyFlg:e=>o(Cs,{...e}),shareholderFlg:e=>o(Cc,{...e}),legalEntityName:e=>o(tc,{...e}),creditInRshbCd:e=>o(Io,{...e}),bankEmployeeCode:e=>o(ws,{...e}),partInBusiness:e=>o(hc,{...e}),regionRetail:e=>o(yc,{...e}),infoCard:e=>o(Zo,{...e}),calculator:e=>o(wo,{...e}),confirmationIncome:e=>o(_s,{...e})},_c={addressCourier:e=>o(Wi,{...e}),paymentSystem:e=>o(gc,{...e}),currency:e=>o(Ro,{...e}),cardCategory:e=>o(Rs,{...e}),codeWord:e=>o(Ds,{...e}),methodObtain:e=>o(sc,{...e}),deliveryDate:e=>o(Bo,{...e})},Ec=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(oa(t(e?.name),ra[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Dr,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:n})=>o(_r,{isUnfolded:n,className:"flex flex-col pl-2xl",children:e.map(Vl(t,{},Pc))}),renderFoldButton:Ac(c("div",{children:[o(xi,{value:a,onChange:n=>{for(const a of e){const e=t(a.name);e?.onChange&&e.onChange(n)}},text:"Согласие на все документы"},n),yn(i?"Отметьте все обязательные соглашения":"")]}))})})})),Ac=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Mc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Oc(t||[]);return n.length>2?c("div",{children:[a.map(Vl(e,{},{...Bc})),o(Ec,{inputs:n,field:e})]}):(t||[])?.map(Vl(e,{},{...Bc}))},Oc=e=>({consentInputs:e?.filter((e=>Object.keys(As).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(As).includes(e.name||"")))||[]}),Fc=(e,t)=>o(Hl,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),zc=e=>Rr("/user-data/updateUserProfile","PUT",e),Vc=e=>Rr("/user-data/updateUserTask","PUT",e),Lc={width:"103",height:"21"},jc={"bg-white":"color",transparent:"white"},$c={"bg-white":"text-primary-main",transparent:"text-white"},qc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:jc[e]},className:$c[e],width:n?.width,height:n?.height}),Uc={"bg-white":"text-primary-text",transparent:"text-white"},Wc=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:[qc(l,n?.image,Lc),r?a??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:Uc[l],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Hc=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),p=l((async()=>{const e=await(a={captchaText:d},Rr("/sms/checkCaptcha","POST",a).then((e=>e.text())).then((e=>"ERROR"!==e)));var a;e?(t?.(),n?.()):h(e)}),[d,t]),g=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Rr(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(g,[]),o(Gl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Wc,{}),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:g,className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(fn,{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(Hl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Hl,{type:"submit",disabled:!d,onClick:p,version:"secondary",children:"Отправить"})]})]})})})),Yc=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:Gc(e)})))),Gc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Kc=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:Xc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Xc=(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 ${pn(!n||!a)} rounded-md caret-transparent outline-none`},Jc=d((({isDisabled:e,onClick:t,text:n})=>o(Hl,{type:"button",onClick:t,disabled:e,children:o(Ae,{font:"font-normal",children:n})}))),Zc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Qc=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=on(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=l((()=>r("")),[]),x=Boolean(0===d&&u),y=p>2||x||!e.every(Boolean),b=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Tr("/sms/checkCode","POST",e).then(Zc))({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:b,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:y,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},ed=d((({phone:e,code:t=!0,codeLength:n=4,consents:r,onSuccess:s=un,onClose:d=un})=>{const[m,u]=a(Array(n).fill("")),{handleSubmit:h,hasError:p,errorText:g,isLoading:f,timeNextReq:x,isSubmitButtonDisabled:y,setTimeNextReq:b,setIsTimerStarted:v,setAttempts:N}=Qc({values:m,onSuccess:s}),w=sn(Hc),C=qt(e),S=l((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},Rr("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(N(0),b(180),v(!0)):w.open({phoneNumber:C,sendCode:S,onClose:d})}),[C,d]);return i((()=>{S()}),[]),o(Gl,{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(k,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(Kc,{values:m,setValues:u,errorText:g,hasError:p}):null,nd(x,b,S),c(_e,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),td(y,h),f?o($l,{blur:!1}):null]})})})),td=(e,t)=>o(Jc,{text:"Далее",isDisabled:e,onClick:t}),nd=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Yc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),ad={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},id={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},ld=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],rd=d((({onSubmit:e=un,onClose:t=un})=>{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?id:ad;return o(Gl,{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(w,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(C,{align:"text-center",children:h.description}),o(Al,{className:"whitespace-normal",orientation:"horizontal",items:ld,value:n,onChange:u}),o(Hl,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),sd=d((({title:e,icon:t,description:n,onClick:a=un})=>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(w,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(C,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),od={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},cd={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},dd={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},md=e=>Object.entries(e).reduce(((e,[t,n])=>t in od?[...e,{contactTypeCd:{key:od[t]},value:n}]:e),[]),ud=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in cd){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:cd[t]},...a}]}return e}),[]),hd=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:pd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in dd?[...e,{incomeTypeCd:{key:dd[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},pd=(e,t)=>Number(e)+Number(t),gd={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"},fd={...gd,amur_card:"14",owner_card:"13",travel_card:"15"},xd=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:pd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},yd=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}},bd=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}},vd=e=>e?.key?{key:e.key,text:e.value}:void 0,Nd=d((function({task:e,isFromLead:t=!1,onClose:n=un}){const a=zi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=fd[s.code],u=Boolean(gd[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],y=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:y,educationLevelCd:b,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:D,employeesNumberCd:_,opf:E,seniority:A,generalSeniority:M,jobsNumber:O,lastWorkDuration:F,positionCd:z,maritalStatusCd:V,childrenDependents:L,totalDependents:j,otherDependents:$,militaryStatusCd:q,participantIncomes:U,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:l?.key,paymentSystem:vd(i),cardCategory:vd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:y,education:vd(b),participantDateRegistration:v,housing:vd(N),beginDate:k,employment:vd(I),organizationName:T,inn:R,employerActivities:vd(B),organization:vd(P),employerOrganization:vd(D),amountWorkers:vd(_),legalForm:E,generalSeniority:A?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:F?.toString(),positionOrganization:vd(z),familyStatus:vd(V),children:L?.toString(),familyMembers:j?.toString(),dependents:$?.toString(),conscription:vd(q),confirmationIncome:vd(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:vd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...xd(U),...yd(S),...bd(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)}),[]),b=l((()=>{i.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=l((()=>{i.assign("/")}),[]);return o(Gl,{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(w,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(sd,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:y}),o(sd,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:b}),o(Hl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),wd=d((function({onClose:e=un}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Gl,{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(w,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(C,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Hl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Hl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),Cd=d((({onClose:e})=>{const t=Jt(),n=zi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Tr("/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(Gl,{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(Hl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Hl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),Sd=()=>{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")}},kd=()=>Fi(),Id=({inputs:e,programId:t,nextStepLink:n})=>{const[i,r]=a(""),[s,{setTrue:o,setFalse:c}]=on(!1),d=(()=>{const e=kd();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}),[])})(),m=(e=>{const{open:t}=sn(Cd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(n),u=(e=>{const{open:t}=sn(rd),n=sn(ed),a=t=>async n=>{try{t&&await zc({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})}})(m),h=sn(ed),p=(()=>{const{open:e}=sn(Nd),{open:t}=sn(wd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{handleSubmit:l((async n=>{const a=Xl(sa(e));var i;if(On(a(n)))try{o();const e=await(i={profile:{phone:qt(n.phone)}},Tr("/public-data/createUserProfile","POST",i).then((e=>e?.profile?.id||null)));if(e&&n?.phone){const a=async()=>{await Rd({programId:t,profileId:e,formData:n,saveUserData:d}),h.close(),u.open(n.phone,e)},i=async()=>{try{const n=await(async e=>{const t=await Tr("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:e,programId:t});if(n){const e=await(async e=>await Tr("/user-data/getTaskById","POST",e)||void 0)({taskId:n});h.close(),p.open({task:e,isFromLead:!0,onClose:a})}else await a()}catch{r("Fail")}},l=Td(n);h.open({phone:n?.phone,consents:l,onSuccess:i}),c()}}catch{r("Fail")}}),[]),responseStatus:i,isSending:s}},Td=e=>Object.keys(As).filter((t=>e[t])).map((e=>As[e]?.text)),Rd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=Bd(n);await zc(((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&&$t(l,!0),email:s,phone:qt(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 Tr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Vc((({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&&$t(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:md({phone:o&&qt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:Sd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},Bd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Pd={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Dd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Pd[e.name||""]])))}},_d=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:pl(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:Ed(i),addressFact:Ed(l),esiaAccountTypeCd:t?.esiaAccountType}},Ed=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}},Ad=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=on(!1),c=kd(),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((()=>Dd(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},Tr("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,..._d(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=Is(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}]},Md=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>sr?.flatMap((e=>e?.inputs))||[]),[sr]),[m,{isLoading:h}]=Ad(d,a),{handleSubmit:p,responseStatus:g,isSending:f}=Id({inputs:d,programId:n,nextStepLink:a}),[,{field:x,onSubmit:y}]=an(m,{onSubmit:p}),b=sn(Kl);return i((()=>{g&&b.open({responseType:g})}),[g]),o(rn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[h?o($l,{blur:!1}):null,sr.map(((e,t)=>c("div",{className:u(Ll(e.columns),"grid gap-x-m"),children:[jl(e.title),Mc({field:x,inputs:e?.inputs})]},`section-${t}`))),Fc(l,f)]})})})),Od=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(k,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Fd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",zd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Vd=10;function Ld(e=0){const t=Math.round(e*Vd);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:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:Ld(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}(l((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:h,role:"listitem",children:d})})),$d=["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: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},y=s([]),b=l(((e,t)=>{const n=[...y.current||[]];n[e]=t,y.current=n,g&&g(n),f&&f(Wd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Ud(c,v):{},...N?zd(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,i?$d[i-1]:"",{"h-full":N},t),style:w?Ud(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Ud=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Wd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Hd={"horizontal-list":"w-6","vertical-list":"h-6"},Yd=({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?Hd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),Gd=({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))},Kd=e=>t=>e.scrollWidth/t,Xd=e=>(t,n)=>{e.scrollBy({left:n*Kd(e)(t),behavior:"smooth"})},Jd=({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?Xd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?Xd(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}]},Zd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Qd=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]=Jd({itemCount:s.length}),g=em(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(qd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Gd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Zd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Yd({activeIndex:t,onClick:f,listType:a}))}):null})),em=(e=!1)=>({behavior:e?"auto":"smooth"}),tm=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"})}))),nm=d((e=>o(tm,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),am=d((e=>o(tm,{...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",lm=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?rm(t):null,l?o(nm,{className:u(sm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(am,{className:u(sm(i),m?"right-1":"right-0"),onClick:d}):null]})})),rm=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]}),sm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),om=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 y=Array.isArray(g)?g.length:0,[b,v]=Jd({itemCount:y,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(qd,{containerRef:b,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(lm,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Qd,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:y,listType:l,version:t,navButtons:x,containerRef:b,containerScroll:v})]})})),cm=({blocksToRender:e,...t})=>o(om,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Fd(!0)),children:R(e,t)},String(n))})}),dm=e=>e%2!=0,mm=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]}))),um=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:i=!1,onClick:l})=>o(mm,{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(Ae,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),hm=({isUnfolded:e,onToggle:t})=>o(um,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),pm=["ArrowDownIcon","ArrowUpIcon"],gm="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",fm=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(gm),children:[P(l,{...i.options,parent:n}),dm(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(Dr,{renderFoldableSection:({isUnfolded:e})=>c(_r,{className:u(gm),isUnfolded:e,children:[P(r,{...i.options,parent:n}),dm(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(um,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:pm[Number(n)],dataTheme:i.options?.page?.colorPalette,onClick:a})})]})},xm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[ym(n,t),fm({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[ym(n,t),cm({...a,blocksToRender:t})]});default:return null}})),ym=(e,t)=>e&&!t.length?o(Od,{...e}):null,bm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),vm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(ll,{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))))),Nm=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,bm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(wm(a)).filter(Boolean))]}),n?o("div",{children:o(Hl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),wm=e=>([t,n])=>{const a=n?.type;return"array"===a?Cm(t,e)(n):null},Cm=(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(vm,{items:a,multiple:!n?.single,...t(e)})]},e)};function Sm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const km=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Im=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>km(t[e])||km(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>km(t[e])||km(n[e])||Tm(t[e])<=Tm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>km(t[e])||km(n[e])||Tm(t[e]?.min)>=Tm(n[e]?.min)&&Tm(t[e]?.min)<=Tm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>km(t[e])||km(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>km(t[e])||km(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Tm=e=>Number(e||0),Rm=(e,{block:t,page:n,normalize:a=nn})=>{const i=t?.blocks||[],[l,{field:s,reset:o,update:c}]=an(e),d=r((()=>Sm(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),m=l===e?i:((e,t)=>(n=nn)=>e?.filter((([,e])=>Im(t,n(e)||{}))).map((([e])=>e)))(d,l)(a);return[l,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Bm={},Pm={},Dm=zt((({className:e,filtrationSchema:t=Bm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Rm(Pm,{block:i.block,page:i.options?.page}),d=o(Dn,{className:"w-64",label:n?.title,options:_m(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>_m(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Nm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Hl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(xm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),_m=e=>Sm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Em=(e=!1)=>e?"text-left":"text-center",Am={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Mm=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",Am[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Om=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(w,{headingType:"h3",as:"h2",className:Em(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(Fm)}):null]})})),Fm=({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(Mm,{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(w,{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(_e,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),zm=(e,t,n)=>{return o(om,{children:e.map((a=n,({icon:e,title:t,description:n},i)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Ae,{size:"text-h6",font:"font-normal",align:a,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Ae,{size:"text-h6",font:"font-normal",align:a,children:n}):null]},String(i))))});var a},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(k,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?zm(e,0,t):null]}))),Lm={start:"justify-start",center:"justify-center",end:"justify-end"},jm=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Lm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:$e(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(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]}),i&&l?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:i}):null]})]}))),qm=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(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(C,{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(qm,{title:e,...r}),Wm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Hm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ym=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=Wm.prefMonthsNum,prefTravelBonusRate:l=Wm.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||Hm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},Gm=zt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=an({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Ym(r,n);return o(Ls,{className:e,title:t,...l,children:c("section",{className:u(js,e),children:[c("div",{className:$s,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:qs,children:[f>=0?o(Ws,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,$e(a,{isVertical:!0}),Xs(i)]})]})})})),Km=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Xm=e=>Qs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Jm=" (c капитализацией)",Zm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:qs,children:[o(Ws,{title:`Доход в конце срока${l?Jm:""}`,value:e,postfix:n,prefix:"+"}),o(Ws,{title:`Сумма в конце срока${l?Jm:""}`,value:t,postfix:n}),$e(a,{isVertical:!0}),i?.map(Xs)]}),Qm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const eu={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},tu=(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?Qm[e?.rateType]:"",{data:n}=ba(t?`${Ut}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&nu(s,e)&&uo(a,["minSum","maxSum"],e)&&uo(n,["minDays","maxDays"],e)))||eu,{rate:m}=d,u=au(m,e),h=a+u,p=c||[eu];return{...d,...mo(["minSum","maxSum"],p),...mo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},nu=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,au=(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)},iu=zt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=an({moneyValue:Gs(r,1e5),daysValue:Ks(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=tu(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(Ls,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:$s,children:[to({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Ea,{items:[`От ${Km(b.min||0)}`,`До ${Km(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[lu(p,h),Xm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Um({rate:x,depositeName:y,isShowDepositeName:l}),Zm({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),lu=(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(xi,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(xi,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),ru=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},su={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},ou=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?mu(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=>[du({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),du({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),du({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),du({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)))||su,{rate:u}=m,h=cu(u,e),p=a+h,g=t||[su];return{...m,...mo(["minSum","maxSum"],g),...mo(["minMonths","maxMonths"],g),availableMonths:ru(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}},cu=(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)},du=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],mu=(e,t)=>e+Math.round((t-e)/2),uu=(e="rub")=>"rub"===e,hu=(e,t)=>{const{minMonths:n,maxMonths:a}=mo(["minMonths","maxMonths"],xu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:Ra(i,n,a)}},pu=(e,t)=>{const{minSum:n,maxSum:a}=mo(["minSum","maxSum"],xu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:Ra(i,n,a)}},gu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),fu=e=>{const t=uu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},xu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},yu=(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?Xm({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(xi,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},bu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,vu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Nu={text:"₽",key:"rub"},wu=zt((({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))??[Nu],g=l((e=>t=>e?{...t,...fu(t),...pu(t,e),...hu(t,e),...gu(t,e)}:t)(h),[h]),[f,{field:x}]=an({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:Nu},{normalize:g}),y=x?.("currency")?.value??Nu,b=x?.("isNewClient")?.value,v=xu(h,y),N=ou(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{no({field:x,defParams:Hs(v,b),calcParams:N,monthsValue:"minMonths",map:vu})}),[x,h]);i((()=>{!xo(d)&&v&&I()}),[d,h]);const T=w===Hs(v,b)?.rate;return o(Ls,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:$s,children:[c("div",{className:"flex gap-m",children:[to({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:Cu(y?.key)}),h&&h?.length>1?o(Mn,{label:"Валюта",options:p,...x("currency")}):null]}),Js({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),yu({...N,...s},x)]}),Um({rate:w,children:ku(I,T)}),Zm({income:C,finalSum:S,buttons:[...a,Su(n?.buttons,k)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Cu=(e="")=>uu(e)?1e3:100,Su=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},ku=(e,t=!1)=>t?null:o(Hl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Iu=e=>Tu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Tu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Tu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Ru={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Bu=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Ru],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Iu({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=>Iu({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)))||Ru)({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}},Pu=zt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=an({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Bu(s,n,l),h=eo({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ls,{className:e,title:t,...r,children:c("section",{className:u(js,e),children:[c("div",{className:$s,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}),Du({...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(qs,"@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}),$e(a,{isVertical:!0}),Xs(i)]})]})})})),Du=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(xi,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(xi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(xi,{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=Ta(e,{normalize:(e=i)=>n&&a?String(Ra(Number(Eu(e)),n,a)):Eu(e),format:He(r)}),d=l((e=>t&&t(Eu(e))),[t]);return o(fn,{onChange:d,...s,...c})})),Eu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Au=d((e=>o(_u,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Mu={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ou={amount:1500},Fu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=an(Ou),[h,p]=a(!1);return i((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Mu[r],children:[o(Au,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),l?.text?o(Hl,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.text}):null]})]})})),zu=({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(C,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Vu="relative h-full",Lu={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:i}=a.block||{},l=i?.some(Uu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return D({...a,renderProps:(n,a,i)=>c("div",{className:$u(n,{someCardsHighlighted:l}),children:[R(n,a,{className:qu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Uu(n)?zu({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},$u=(e,{someCardsHighlighted:t})=>u(Vu,t&&(Uu(e)?"pt-3xl":"pt-3xl sm:pt-16")),qu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Vu,"min-w-80",Lu[a],t&&(Uu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Fd(n),n&&"h-full"),Uu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Wu=zt((({className:e,visibleItemCount:t=0,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(om,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Hu(s?.block?.blocks):[],hasBlur:!0,children:ju({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Hu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Yu="z-10 border border-solid w-full h-full",Gu=u(Yu,"absolute hidden @xl:block border-transparent"),Ku=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(Gu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Gu,"top-6 right-8 bg-green")}),o("div",{className:u(Gu,"top-3 right-4 bg-green-light")}),c("div",{className:u(Yu,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Xu={black:"bg-black",white:"bg-white"},Ju=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(k,{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:$e([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(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Zu)]}):null,i?c(Ae,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),Zu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Xu[e]}`},String(t)),Qu=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})),eh=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(k,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?th(a):null]})}))),th=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(Qu,{...e},String(t))))}),nh=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),ah=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})})),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"}}],lh=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=>ih.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=je(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},rh(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:$e(m,{className:sh(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),rh=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",sh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),oh=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:y=false,isImageSecondary:b=!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(ah,{href:i,target:m,className:"h-full",data:nh(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe(je(l)?o(ne,{image:l}):null,x),buttons:d.length?o(lh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:y,isImageSecondary:b,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(_e,{__html:s,isDotted:r,itemSize:"list-s"}):null,ch(a,p)]})})}))),ch=(e,t)=>e?o(C,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,dh=(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(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,i?.length?o("div",{className:"text-primary-main",children:$e(i)}):null]},String(t))},mh=d((({className:e="",title:t,align:n="text-center",icon:l,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(dh),[x,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[b,v]=a(!1);return i((()=>ue.subscribe("fold",(e=>{e&&void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[je(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(Ne,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(Dr,{renderFoldableSection:()=>c("div",{children:[x,o(_r,{isUnfolded:b,children:y})]}),renderFoldButton:d.length>=s?uh(m?.parent,h,b):null}):o("div",{children:x})]})})),uh=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ue.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?fe(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),hh=()=>{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 Rr("/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)},ph=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]})]}))),gh=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(ph,{step:a,showPercentage:!1})]})})}));var fh;!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"}(fh||(fh={}));const xh=e=>Tr("/user-data/getTaskStatus","POST",e),yh=e=>Rr("/user-data/sendSignalToProcess","POST",e),bh=(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},vh=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(k,{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(Yc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(_e,{__html:i}):null]})]})})),Nh=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(vh,{interval:d,intervalExpireAction:m}):null]}),o(wh,{title:a,items:i}),o(wh,{title:l,items:r,countColumns:!0}),n?.__html?o(Jo,{__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]}))),wh=({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",Ll(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Ch(e)},t)))}):null]})]}):null},Ch=({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})]}),Sh=d((()=>o(Nh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),kh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=zi();return o(Nh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Ih=d((()=>{const{statusInfo:e}=zi();return o(Nh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Th=d((()=>{const{statusInfo:e}=zi();return o(Nh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Rh(e),buttonText:"Вернуться на главную"})})),Rh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:$t(e?.deliveryDate)}]):t},Bh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Ph=d((()=>{const[e,t]=a(fh.process),{taskId:n}=zi();i((()=>{(async()=>{for(const e of Bh)await yh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await xh({taskId:n});a&&a?.statusCd!==fh.process&&(e(),t(a.statusCd))}),[n]);bh(r,3e4);return Dh(e,(()=>t(fh.rework)))})),Dh=(e,t)=>({IN_PROCESS:o(kh,{handleExpireTimer:t}),CANCELLED:o(Sh,{}),FAILED:o(Sh,{}),DRAFT:o(Sh,{}),APPROVED:o(Th,{}),PRE_DECISION:o(Th,{}),REVISION:o(Ih,{})}[e]||o(Ih,{})),_h=e=>(t,n)=>t.filter((e=>e)).map((t=>[Eh(n,e),Ah(t,e),zh(t,e),Mh(t,e),Oh(t,e),Fh(t,e)].some(Boolean)?{...t,required:!1}:t)),Eh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,Ah=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Mh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Oh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Fh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),zh=({name:e},t)=>"snils"===e&&Vh(t),Vh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Lh=({field:e,inputs:t,params:n})=>t.map(Vl(e,n,{...Dc,..._c})),jh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=_h($h(t))(e,n);return c("div",{className:u(Ll(i),"grid gap-x-m"),children:[jl(l),Lh({field:t,inputs:s,params:a})]},`section-${r}`)})),$h=e=>t=>e(t)?.value,qh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Hl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Hl,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Uh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},Wh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},Hh=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:$t(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:md({organizationPhone:p&&qt(p)}),participantAddresses:ud({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},Yh=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:y}=e;return{birthDate:$t(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:$t(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:$t(g,!0),houseTypeCd:f,participantContacts:md({phone:qt(l),email:r}),participantAddresses:ud({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},Gh=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{}},Kh=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},Xh=(e,t)=>{switch(e){case 0:default:return{};case 1:return Yh(t);case 2:return Hh(t);case 3:return hd(t);case 4:return Uh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:ud({addressCourier:t})}:{}})(t)}},Jh=[{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}],Zh=e=>{try{return e?new Date(e):void 0}catch(e){return}},Qh=({step:e,inputs:t,onNextStep:n,onFinish:a})=>{const[i,{setTrue:s,setFalse:o}]=on(!1),c=5===e,d=zi(),m=r((()=>((e,t)=>({...Jh[e],...t,limitedBirthday:Zh(t?.limitedBirthday),dulIssueDateField:Zh(t?.dulIssueDateField),participantDateRegistration:Zh(t?.participantDateRegistration),beginDate:Zh(t?.beginDate),deliveryDate:Zh(t?.deliveryDate)}))(e,d.leadForm)),[e,d.leadForm]),u=l((e=>{const{leadForm:t}=d;c&&e.ok&&t&&(d.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate},d.leadForm=m)}),[c,m]),h=l((async i=>{const l=Xl(sa(_h(ep(i))(t,e)));if(On(l(i))){s(),d.leadForm=i;try{const{taskId:t,profileId:l,participantId:r}=d;if(t&&l&&r){const n=await Vc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...Kh(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Xh(i,a)}],...Wh(a),...Gh(a)}}))({participantId:r,taskId:t,profileId:l,step:e,formData:i}));u(n)}n(),c&&a?.()}catch(e){}finally{o()}}}),[c,u]);return[m,h,i]},ep=e=>t=>e[t],tp=d((({step:e,sections:t,isFormFinished:n,onPrevStep:a,onNextStep:i,onFinish:l})=>{const s=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),[d,m,u]=Qh({step:e,inputs:s,onNextStep:i,onFinish:l}),[,{field:h,onSubmit:p}]=an(d,{onSubmit:m});return n?o(Ph,{}):c("form",{onSubmit:p,className:"space-y-m",children:[jh({sections:t,field:h,step:e}),o(qh,{isSending:u,step:e,onPrevStep:a})]})})),np=[[{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"}]}]],ap=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...np,[{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"]}}]}]],ip=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],lp=d((({className:e,...t})=>{const[n,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(hh,[]);const h=l((()=>{d((e=>Math.min(e+1,6))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=r((()=>ap[n]),[n]),[x,{setTrue:y}]=on(!1);return o(g,{className:e,...t,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x?null:o(gh,{stepsTitles:ip,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(tp,{step:n,sections:f,isFormFinished:x,onNextStep:h,onPrevStep:p,onFinish:y},String(n))})]})})})),rp=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(ph,{step:a,showPercentage:!1})]})})})),sp=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(vh,{interval:d,intervalExpireAction:m}):null]}),o(op,{title:a,items:i}),o(op,{title:l,items:r,countColumns:!0}),n?.__html?o(Jo,{__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]}))),op=({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",Ll(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:cp(e)},t)))}):null]})]}):null},cp=({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})]}),dp=d((()=>o(sp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),mp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=zi();return o(sp,{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?"Аннуитетный":"Дифференцированный"}]})})),up=d((()=>{const{statusInfo:e}=zi();return o(sp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),hp=d((()=>{const{statusInfo:e}=zi();return o(sp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),pp=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],gp=d((()=>{const[e,t]=a(fh.process),{taskId:n}=zi();i((()=>{(async()=>{for(const e of pp)await yh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await xh({taskId:n});a&&a?.statusCd!==fh.process&&(e(),t(a.statusCd))}),[n]);bh(r,3e4);return fp(e,(()=>t(fh.rework)))})),fp=(e,t)=>({IN_PROCESS:o(mp,{handleExpireTimer:t}),CANCELLED:o(dp,{}),FAILED:o(dp,{}),DRAFT:o(dp,{}),APPROVED:o(hp,{}),PRE_DECISION:o(hp,{}),REVISION:o(up,{})}[e]||o(up,{})),xp=({field:e,inputs:t,params:n})=>t.map(Vl(e,n,{...Dc})),yp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=_h(bp(t))(e,n);return c("div",{className:u(Ll(i),"grid gap-x-m"),children:[jl(l),xp({field:t,inputs:s,params:a})]},`section-${r}`)})),bp=e=>t=>e(t)?.value,vp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Hl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Hl,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Np={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},wp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Np[a?"annuity":"differential"]}},Cp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Sp=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return Yh(t);case 2:return Hh(t);case 3:return hd(t);case 4:return Uh(t);default:return{}}},kp=[{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}],Ip=e=>{try{return e?new Date(e):void 0}catch(e){return}},Tp=({step:e,inputs:t,onNextStep:n,onFinish:a})=>{const[i,{setTrue:s,setFalse:o}]=on(!1),c=5===e,d=zi(),m=r((()=>((e,t)=>({...kp[e],...t,limitedBirthday:Ip(t?.limitedBirthday),dulIssueDateField:Ip(t?.dulIssueDateField),participantDateRegistration:Ip(t?.participantDateRegistration),beginDate:Ip(t?.beginDate),deliveryDate:Ip(t?.deliveryDate)}))(e,d.leadForm)),[e,d.leadForm]),u=l((e=>{const{leadForm:t}=d;c&&e.ok&&t&&(d.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},d.leadForm=m)}),[c,m]),h=l((async i=>{const l=Xl(sa(_h(Rp(i))(t,e)));if(On(l(i))){s(),d.leadForm=i;try{const{taskId:t,profileId:l,participantId:r}=d;if(t&&l&&r){const n=await Vc((({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:"Заемщик"},...Sp(i,a)}],...wp(a),...Cp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:t,profileId:l,step:e,formData:i}));u(n)}n(),c&&a?.()}catch(e){}finally{o()}}}),[c,u]);return[m,h,i]},Rp=e=>t=>e[t],Bp=d((({step:e,sections:t,isFormFinished:n,programsSource:a,onPrevStep:i,onNextStep:l,onFinish:s})=>{const{programId:d}=zi(),m=a?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),[h,p,g]=Tp({step:e,inputs:u,onNextStep:l,onFinish:s}),[,{field:f,onSubmit:x}]=an(h,{onSubmit:p});return n?o(gp,{}):c("form",{onSubmit:x,className:"space-y-m",children:[yp({sections:t,field:f,step:e,params:{calcData:m}}),o(vp,{step:e,isSending:g,onPrevStep:i})]})})),Pp=[[{columns:1,inputs:[{name:"calculator"}]}],...np,[{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"}]}]],Dp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],_p=zt((({className:e,programsSource:t,...n})=>{const[d,m]=a(0),u=s(null),h=l((()=>u?.current?.scrollIntoView({behavior:"smooth"})),[u]);i(hh,[]);const p=l((()=>{m((e=>Math.min(e+1,5))),h()}),[]),f=l((()=>{m((e=>Math.max(e-1,0))),h()}),[]),x=r((()=>Pp[d]),[d]),y=0===d,[b,{setTrue:v}]=on(!1);return o(g,{className:e,...n,children:c("div",{ref:u,className:"container grid grid-cols-12",children:[y||b?null:o(rp,{stepsTitles:Dp,step:d,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Bp,{step:d,sections:x,isFormFinished:b,programsSource:t,onNextStep:p,onPrevStep:f,onFinish:v},String(d))})]})})})),Ep=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Ap=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Mp=1e9,Op={sum:{min:1e4,max:Mp},period:3},Fp=zt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Rm(Op,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:zp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Vp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Nm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Au,{label:a?.title,min:500,max:Mp,...d("sum",{parse:e=>({min:Number(e),max:Mp}),format:({min:e})=>String(e)})}),o(Ea,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(xm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),zp=e=>_t((e?.paramsSource?.rateRows||[]).filter(Ep).flatMap((e=>Ap(e.minMonths,e.maxMonths)))),Vp=e=>_t(e.flatMap((e=>e||[])).filter(Ep).flatMap((e=>Ap(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Lp=[{key:"10"},{key:"50"},{key:"100"}],jp=({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(Dn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Lp,iconVersion:"black"})]})},$p="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",qp=(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:$p,"aria-label":`Страница ${l}`,children:l},String(t)):null},Up={width:"24",height:"24"},Wp=({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:Hp(1===e),...Up})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:$p,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(qp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:$p,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Hp(e===n),...Up})})]})},Hp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Yp=({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(Wp,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(jp,{itemCount:a,onItemCountChange:i}):null]}),Gp=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",hn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),Kp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Gp,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(ci,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(ci,{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(Hl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Xp=(e,t)=>o(Mm,{...e,iconBgVersion:t,className:"shrink-0"}),Jp=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:i}=a({href:`${Ut}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[Xp({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:$t(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Zp=`${Ut}/depository`,Qp={startDate:void 0,endDate:void 0,query:""},eg=zt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=an(Qp),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?$t(a,!0):"",r=i?$t(i,!0):"",s=new URLSearchParams(Zp);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}=ba(Zp+o,Dt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),y=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Kp,{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(Jp,{...e},String(e.publicId)))):o(Od,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Yp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),tg=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,ng=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:tg(a)}),o(k,{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]}))),ag=`${Ut}/region`;function ig(e="Москва"){return Fi().location??{name:e}}function lg(e="Москва"){const t=Fi(),n=l((async()=>{if(!t.location){const n=await Pt(ag);t.location=n??{name:e}}}),[t,e]);return ba(ag,n),t}var rg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(rg||(rg={}));const sg=new Intl.NumberFormat("ru",{style:"currency",currency:rg.RUB}),og=e=>e?sg.format(e):"",cg="text-m font-light text-secondary-text ",dg=`${cg} text-left`,mg=`${cg} pl-5xl text-center`,ug=`${cg} pl-5xl text-right`,hg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},pg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:dg,children:o(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:mg,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:ug,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(gg)})]}))),gg=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:hg[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:og(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:og(e?.buyExchangeRate)})})]},t)},fg={icon:"GpsIcon"},xg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Mm,{...fg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(C,{size:"text-l",color:"text-primary-main",children:t}):null,o(C,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),yg=(e,t,n)=>{const a=Number(bg(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)},bg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function vg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Ng=e=>t=>{const[,n]=vg(e.find((([e])=>e(t))));return n(t)},wg=e=>Ng(e.map((([e,t])=>[e,()=>t])));wg.if=e=>new Cg(void 0,e);class Cg{parent;predicate;unit;get entry(){return[vg(this.predicate),vg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Cg(this,e)}then(e){return new Cg(this.parent,this.predicate,e)}else(e){return Ng([...Sg(this),[()=>!0,e]])}}const Sg=e=>[...e?.parent?Sg(e.parent):[],e.entry],kg=e=>wg([[e=>e.value!==rg.RUB&&e.oppositeValue!==rg.RUB,()=>e.handleConvert(e.value,rg.RUB)],[e=>e.value===rg.RUB&&e.oppositeValue===rg.RUB,()=>e.handleConvert(e.value,rg.USD)],[e=>e.value===rg.RUB&&e.oppositeValue===rg.RUB,()=>e.handleConvert(e.value,rg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Ig(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(fn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(Dn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Tg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||rg.RUB,selectBuy:n?.[0]?.currency?.currency||rg.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:[Ig({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Rg(r,d,n),value:r.inputSell,setValue:e=>Pg(d,n)(e,r.selectSell,r.selectBuy)}),Ig({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Bg(r,d,t),value:r.inputBuy,setValue:e=>Dg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),Rg=(e,t,n)=>a=>{t({selectSell:a}),kg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Pg(t,n)(e.inputSell,a,i)}})},Bg=(e,t,n)=>a=>{t({selectBuy:a}),kg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Dg(t,n)(e.inputBuy,a,i)})},Pg=(e,t)=>(n,a,i)=>{e({inputSell:bg(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(yg(n,l,a===rg.RUB)||"")})},Dg=(e,t)=>(n,a,i)=>{e({inputBuy:bg(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(yg(n,l,a===rg.RUB)||"")})},_g=`${Ut}/exchangerates`;const Eg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=ba(_g+`?regionCode=${t}`,Dt);return n||{}}(ig()),l=Ag(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:rg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:rg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(w,{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(pg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(xg,{address:i?.address})]}),o(Tg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Ag=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Mg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Og(n))})})),Og=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},Fg=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:i})=>o(mm,{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:[Xp(i,t),e?o(Ae,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),zg=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Vg=(e=!1)=>e?"MinusIcon":"PlusIcon",Lg=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",jg=zt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();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:c,...d,children:o(Dr,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(_r,{className:u("gap-lg",zg(m)),isUnfolded:e,children:D({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>$g({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),$g=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:i,onToggle:l,isMobile:r=!1})=>{const s=t||(i?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Lg(e):Vg(e))(i,r);return"accordion"===e?o(Fg,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:l}):o(um,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},qg=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Ug(e)}))),Ug=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(jg,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Mg,{items:e.items}):null},String(t)))),Wg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Hg)}):null)),Hg=(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(Yg)})]},String(t)),Yg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Gg(e.type,e.text)}),o(C,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Gg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Kg(t)}`,children:o(Ae,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Kg=e=>e.replaceAll(/\D/g,""),Xg=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}`})})),Jg=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(Xg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Zg=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}`})})),Qg=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(Zg,{index:t,...e},String(t))))}):null]}))),ef=zt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{};n.options;const{documents:i,relatedEnterprises:l,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,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("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Wg,{items:r}),m?o(Ne,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(lh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Jg,{title:d,links:l}),o(Qg,{links:i,license:h})]})})),tf=zt((({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(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Mn,{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:nh(l,s?.key),children:f})}):null]})})})),nf={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"},af=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",nf["transparent"===e?"transparent":"default"]),...a,children:i}):null})),lf=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:a,version:i,backwardButton:r})=>{const s=_(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=l((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Wc,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):rf(p,r),o(af,{version:i,...a})]})})),rf=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,sf={"bg-white":"primary",transparent:"transparent"},of=zt((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=sf[e],portal:a,logo:i={},...l})=>{const{backwardButton:r,logo:s={}}=l.options?.page?.common??{},{internetBankButton:c}=a||{},d=i.image?.icon||i.image?.src?i:s;return o(g,{tag:"header",defaultPadding:"",version:n,...l,children:o("div",{className:"container px-lg py-2xs box-border",children:o(lf,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...l})})})})),cf=(e=!1)=>e?{}:{padding:"p-0"},df={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},mf=zt((({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",df[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:D({...c,extraProps:{className:u("w-full",Fd(r)),...cf(a)}})})}),{childrenTypes:[]}),uf=zt((e=>o(mf,{...e})),{childrenTypes:[]}),hf=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Lm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),pf=["байт","Кб","Мб","Гб","Тб","Пб"],gf=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(Ae,{size:"text-l",font:"font-light",children:[t," ",ff(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),ff=(e,t)=>e||t?o("span",{children:", "}):"",xf=(e,t)=>(n,a)=>{const i=q(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))} ${pf[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?bf(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(gf,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:yf(t),data:n?.data}),o(_e,{__html:n?.__html})]},String(a))},yf=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,bf=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},vf=d((({href:e,__html:t,target:n,onClose:a})=>{const i=_(),l=q(i)(e);return c(Gl,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(_e,{__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(Hl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Nf=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=sn(vf),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:[yf(i),o(Ae,{font:"font-light",children:e})]}):null})),wf={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Cf=zt((({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(k,{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",wf[r]),role:"list",children:i.map(Sf(d,l))}):null]})})),Sf=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?kf(t)(n,a):xf(e,t)(n,a)},kf=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(Nf,{...a,icon:e,href:If(t)?t?.href:t?.attachment?.src}),o(_e,{__html:t?.__html})]},String(n)):null},If=e=>"href"in e,Tf=zt((({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",y=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(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:$e(a,{className:"flex-wrap"}),children:[i?o(Ae,{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(_e,{__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,l?.src?o(ne,{className:"lg:hidden",image:l}):null]})]})})})),Rf=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Bf=(e=[],t={})=>e.filter((({content:e={}})=>Im(t,e))).length,Pf=(e,t)=>e===t;const Df=(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)))}(Pf,((e=Pf)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),_f=[],Ef={},Af={primary:"bg-white/30",secondary:"bg-main-divider"},Mf={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Of=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Af[t],i=Mf[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:i,children:e})})})),Ff=({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})]})]})},zf={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Vf={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Lf={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},jf={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},$f=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",zf[a],n?jf[a]:Lf[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?Vf[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Ff({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(Of,{count:m,version:Rf(n,a)})}):null]})})})),qf=d((e=>o(e?.item?.href?Uf:Wf,{...e}))),Uf=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($f,{...e,tag:"a",item:i,onClick:a})})),Wf=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o($f,{item:e,onClick:a,...n})})),Hf=(e,t,n)=>(a,i)=>o(qf,{isActive:a===e,onClick:t,type:n,item:a},String(i)),Yf=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(Hf(a,i,t))}))),Gf={categories:[],extraOptions:[],propertyType:[],stage:[]},Kf=zt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Rm(Gf,{block:i.block,page:i.options?.page}),f=l(((e=Gf)=>p(e)),[]),x=(({hotFilters:e=_f,filtrationState:t=Ef,blocks:n=_f,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Df(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Bf(n,t.filter),version:Rf(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(Yf,{...x}),o(Nm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(xm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Xf=(e,t,n)=>{const a=Rf("all"===t),i=Rf("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(Hl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Hl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},Jf=({__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(_e,{__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,Zf="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Qf=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(xi,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(Dr,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Zf,children:s}),o(_r,{className:Zf,isUnfolded:e,children:d})]}),renderFoldButton:ex(n,a)})}):null})},ex=(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:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:tx()})]}),tx=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),nx=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{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]})}),ax=()=>{},ix=e=>"all"===e?"block":"hidden",lx=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=ax,renderRemoteWorkplaceCard:r=ax,getBalloon:s=ax,getBalloonRemoteWorkplaces:d=ax,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=an(os),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=hs({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),S={filters:rx([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:cs};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[nx(h,N),m?Jf(m):null,p&&Xf(t,w,C),o("div",{className:u("pb-3xl",ix(w)),children:Qf(S)})]}),o("div",{className:"h-[600px]",children:o(xs,{children:o(Cr,{points:b,isLoad:n,className:"h-full"})})})]}),c(xs,{children:[y.map(l),v.map(r)]})]})})),rx=e=>Object.keys(os).filter((t=>e.filter((e=>ds[t](e))).length)),sx=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:dx(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(Ae,{size:"text-h4",children:dx(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Gr,{color:"green",children:dx(s)})})]}),o("div",{className:"hidden sm:block",children:o(Fr,{className:"flex-wrap",children:m?.map(cx)})}),o(Dr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:o(Fr,{className:"flex-wrap",children:m?.map(cx)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(d))},ox=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${dx(t)} №${n}`,body:e.toUpperCase()}),cx=(e,t)=>o(Er,{...e},String(t)),dx=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",mx=[];const ux=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:mx},hx={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},px={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)},gx=d((({descriptionData:e,className:t})=>{const n=ig(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=ba(`${Ut}/atms?regionCode=${e}`,ux);return{data:t||mx,isLoad:!t&&!n}}(a);return o(lx,{className:t,filterItems:fx,data:i,isLoad:l,initFilterState:hx,renderCard:sx,getBalloon:ox,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),fx=(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=>px[t](e))),n=!a.length||a.some((t=>px[t](e)));return t&&n}))},xx=({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(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:yx({workScheduleDescription:t})}),o(Dr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:yx({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(n)):null,yx=({workScheduleDescription:e})=>c("div",{children:[c(Fr,{className:"flex",children:[o(Er,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Er,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(Er,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(Er,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Er,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),bx=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),vx={branches:[],remoteWorkplaces:[]};const Nx=async e=>await Pt(e,{method:"GET"})||vx,wx=d((({className:e})=>{const t=ig(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=ba(`${Ut}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Nx);return{data:t||vx,isLoad:!t&&!n}}(n);return o(lx,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:ls,renderRemoteWorkplaceCard:xx,getBalloon:ss,getBalloonRemoteWorkplaces:bx,title:`Офисы филиала ${t?.name}`})})),Cx=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(wx,{}):o(gx,{descriptionData:e})})})),Sx=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(k,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),kx=d((({className:e,padding:t,slides:n=[],...a})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...a,children:o(om,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Ze,{className:"px-5 h-full",headlineVersion:"L",...e,...a})},String(t))))})}))),Ix=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:[je(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?Tx({__html:l,richVersion:r}):null,Rx({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Rx({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Rx({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?$e([a]):null]})]}))),Tx=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(_e,{...e,itemSize:"list-s"})}),Rx=({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(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:a,children:t})]})]}):null,Bx=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_e,{__html:t,richVersion:n})})})),Px=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(hn.split(" ").filter((e=>"rounded"!==e)),gi,"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(Ae,{color:"text-primary-text",children:t}):null]})}))),Dx=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(Px,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(Px,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),_x=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(Dn,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),Ex=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(_x,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(_x,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ax=["От 1 дня","До 365 дней"],Mx=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Ea,{min:1,max:365,value:e,items:Ax,onChange:t})]}))),Ox=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(_x,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(_x,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Fx=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(Ex,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:zx(m)}),o(Mx,{days:i,setDays:e=>m({days:e})}),o(Ox,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:Vx(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(Dx,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),zx=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Vx=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Lx=d((({days:e,tariffs:t=[]})=>{const n=$x(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:[jx("Аренда за",e),jx("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(C,{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(C,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),jx=(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})]}),$x=(e,t)=>{const n=qx(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},qx=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},Ux=(e,t)=>e.find((e=>e.branchCode===t)),Wx=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=Ux(a,n.selectedBranch),d=Hx(s?.safeBoxCaseVolumes),m=Yx(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Gx(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Fx,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(Lx,{days:n.days,tariffs:u})]})})),Hx=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Yx=(e,t)=>e?.find((e=>e.volume===t)),Gx=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Kx=`${Ut}/safeboxes`,Xx=[];const Jx=async e=>await Pt(e,{method:"GET"})||Xx,Zx=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=Cl(),p=Qx(m.selectedRegion,h),f=function(e){const{data:t}=ba(e?`${Kx}?regionCode=${e}`:null,Jx);return t||Xx}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=Ux(f,m.selectedBranch)||f,Array.isArray(b)?b.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):b?.gpsLatitude&&b?.gpsLongitude?[{coords:[b.gpsLatitude,b.gpsLongitude]}]:[]);var b;return c(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Wx,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(C,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Cr,{points:y,className:"h-[640px]"}):null]})})),Qx=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,ey={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"},ty=(e,t,n)=>(a,i)=>{const{button:l}=a;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:ny(e,n)(a,i)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[ay(a),l?.text?o(Ne,{className:"box-border py-s w-full mt-lg",version:t,...l,children:l?.text}):null]})]})},String(i))},ny=(e,t)=>(n,a)=>{const i="secondary"===t?"white":"color",l=Boolean(n?.icon?.src),r=iy(e,l),s=l?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:ly({step:n,iconVersion:i,i:a,stepVersion:t})})})},ay=e=>c("div",{children:[e?.label?o(C,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",ey.description),children:e.description}):null,o(_e,{__html:e.__html})]}),iy=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",ly=({step:e,iconVersion:t,i:n,stepVersion:a})=>{return je(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===a?ey.iconText:(i=a,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var i},ry=d((({className:e="",title:t,description:n,steps:a=[],buttons:i,stepVersion:l="gray",version:r="primary",...s})=>{const d=a.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),a?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:a.map(ty(d,r,l))}):null,$e(i,{isVertical:!0})]})})),sy=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),oy=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>c("div",{onClick:i,className:u("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Yl,{className:"absolute top-1.5 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function cy(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 dy=()=>{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 cy(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},my=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 uy=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(hy,{...e},String(t))))})]}):null,hy=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(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),py=(e,t)=>n=>n.name?o(ah,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:nh(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,gy=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(hn,"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"})]}))),fy=d((({defaultLocation:e})=>{const t=ig(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(C,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ah,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),xy=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=lg(t?.default),[s,d]=a(""),m=Cl(),u=r((()=>by(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,yy)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Gl,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(fy,{defaultLocation:t?.default}),o(gy,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&my(e.toLowerCase())(s.toLowerCase())>=.8)).map(py(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(py(f,g))]},e)))}),uy(e)]});var g,f})),yy=e=>e.name?.charAt(0)??"",by=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),vy=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:a})=>{const l=sn(xy,n),{name:r}=ig(),s=e?.current?.getBoundingClientRect(),c=X(K.SITE_URL);return i((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),i((()=>{const e=e=>{if("location"===e.data.type&&l.open({}),"reload"===e.data.type&&a?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[a]),o(oy,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:a,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Ny="burgerMenuDialog",wy=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:a=un})=>{const{open:i}=sn(vy),[r]=dy(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Ny,r),o=l((()=>i({menuRef:e,locationDialogProps:n,menuItem:t,onClose:a},{id:Ny})),[e,n,t,a]);return[s,{toggle:s?a:o}]},Cy=[],Sy=zt((({sticky:e,...t})=>{const{menuItems:n=Cy}=e??{},i=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=a(-1),[f,x]=a(""),{closeAll:y}=he(),b=l((()=>{p(-1),x(""),y()}),[y]),v=dn(b),N=s(null),[C,{toggle:S}]=wy({menuRef:N,centralMenuItem:i,locationDialogProps:t.header,onClose:b}),k=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:a,onClose:i})=>{const{open:r,close:s}=he(),c=l((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return l(((l,d)=>{const m="left"===d?n:a,u=e?.current?.getBoundingClientRect();r({id:"left"===d?n[l].title:a[l].title,dialog:o(oy,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[l].description||m[l].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),i?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[l]?.src,width:u?.width??0,onLoad:c})})})})}),[c,n,a,i])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:u,onClose:b}),I=l((e=>{e.stopPropagation(),b(),S()}),[b,S]),T=l(((e,t)=>{x(t),p(e),y(),k(e,t)}),[y,k]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(ky(T,"left",{activeIndex:h,currentItemPosition:f})),o(sy,{item:i,isActive:C,onClick:e=>I(e)}),u.map(ky(T,"right",{activeIndex:h,currentItemPosition:f}))]})})})),ky=(e,t,n)=>(a,i,l)=>o(sy,{item:a,isActive:l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t,onClick:r=>{l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t||r.stopPropagation(),e(i,t)}},a.title||String(i)),Iy="hidden sm:flex absolute z-40",Ty={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Ry=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=Jd({itemCount:t?.length||0});return i((()=>By(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:Ty[l].item,gap:Ty[l].gap,children:t.map(Hf(n,a,l))}),s.canScrollLeft?o(nm,{className:u("left-6",Iy,Ty[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(am,{className:u("right-6",Iy,Ty[l].buttonTop),onClick:s.scrollRight}):null]})})),By=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Py={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Dy=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Py[t].wrapper,e),children:o(Ry,{className:Py[t].component,tabsType:t,...n})}):null,_y=zt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Ey(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:y}=p,[b,v]=a(Oy(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[b],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)}),[y,w,h]);const C=My(x[b],b),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:[Dy({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Ay(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])=>P(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(My)?.filter(Boolean)||[]}),Ey=({__id:e,anchor:t})=>t??e??"tabs",Ay=(e,t)=>t?.length?t:e,My=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Oy=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Fy={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},zy=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Fy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Vy=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}))),Ly={Buttons:({buttons:e})=>$e(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(_e,{__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:i})=>e?o(Vy,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},jy=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 $y({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),$y=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Ly))return null;return o(Ly[n],{...t,...a})},qy=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(jy,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Uy=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Wy=(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,Hy=d((({rows:e})=>{return o(qd,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[a,...i]=e,l=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[a?.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:a.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Uy(i,t)}px)`},children:i?.map(((e,n)=>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?Wy(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Yy=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(Hy,{rows:t.rowsData})})})]},a)}))}))),Gy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Ky=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:Gy(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Xy=zt((({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(Ky,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Yy,{activeTabIndex:r,items:m}),o(Vy,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(Vy,{onClick:n,isOpen:!0})]})})),Jy=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(Xy,{...t,onClick:n})}):null]}))),Zy=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(Jy,{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(zy,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(qy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Qy({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(tm,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(tm,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const eb=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,Qy({...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]})})),tb=d((({className:e="",title:t,description:n,rowHeaders:i,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=i?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((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}]})({itemCount:p,visibleItemCount:2}),y=(h||[]).map(((e,t)=>o(Zy,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[b,v]=s>0?[y.slice(0,-s),y.slice(-s)]:[y,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(Dr,{renderFoldableSection:({isUnfolded:e})=>c(eb,{controls:x,children:[b,o(_r,{isUnfolded:e,children:v})]}),renderFoldButton:hm}):o(eb,{controls:x,children:y})})]})})),nb=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?ab():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?ib(n):null,i?o(_e,{richVersion:l,__html:i}):null]})]}))),ab=()=>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"}),ib=e=>o(C,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),lb=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]}))),rb=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(lb,{prefix:t,unit:n,suffix:a})})})),sb={AdTile:Lt,ApplicationForm:lr,ApplicationLeadForm:Md,BankAccountFiltration:Dm,BenefitsBlock:Om,BonusBenefitsBlock:Vm,ButtonsBlock:jm,CalculatorBonus:Gm,CalculatorBusinessDeposit:iu,CalculatorCredit:bo,CalculatorDeposit:wu,CalculatorRefinancing:Pu,CardTransfer:Fu,Carousel:Wu,CarouselCard:Ku,CarouselCatalogCard:Ju,CarouselLinks:eh,CarouselRecommendationCard:oh,CarouselTariffsCard:mh,CreditCardForm:lp,CreditForm:_p,DepositFiltration:Fp,Depository:eg,ErrorBlock:ng,ExchangeRateTile:Eg,Footer:ef,GrantSupport:tf,Header:of,Headline:k,HorizontalLayout:uf,ImgBlock:hf,LinkDocs:Cf,MobileAppTile:Tf,MortgageFiltration:Kf,OfficesAtmsMap:Cx,Placeholder:Sx,ProductBlock:Vt,ProductGallery:kx,RepresentativeOfficeInfo:Ix,RichTextBlock:Bx,RollupItem:jg,SafeDepositRental:Zx,StepsBlock:ry,StickyBottomMenu:Sy,TabsLayout:_y,TariffsTable:tb,TextBlock:nb,UnitBlock:rb,VerticalLayout:mf},ob=ce((()=>{i((()=>{Qt()}),[]);const e=tn();cn(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))}));const cb="cookie",db=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=on();!function(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(cb)||n()}),[],3e3);const r=l((()=>{globalThis.localStorage?.setItem(cb,"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(_e,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Yl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function mb(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);cn(globalThis.document,"keydown",t)}const ub=d((()=>{const[e,{close:t}]=dy(),n=Boolean(e.length);return mb(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})),hb=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return cy(ue.observable,"popup",{open:t,close:n}),mb(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})),pb="header",gb="footer",fb="sticky-footer",xb={},yb=d((({className:e,data:t=xb,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);ob(),lg();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?.[pb]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(i?.[pb],{...m,slotName:pb})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(i?.[gb],{...m,slotName:gb})]})]}),i?.[fb]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(i?.[fb],{...m,slotName:fb})}):null,o(ub,{}),o(hb,{}),o(db,{__html:d?.cookieContent?.__html})]})}));Object.assign(yb,{childrenTypes:[],slots:()=>[pb,gb,fb]});e.Blocks=sb,e.ContentPage=yb,e.handlerDecorator=ce,e.joinList=bm,e.locationNavigator=Jt,e.packageVersion="0.14.735",e.projectSettings=A,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).UniMobileBlocks={})}(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)=>b(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),b=(e,t)=>[e].concat(t>0?b(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>{const l=v[n]||"h3";return o(l,{role:"heading",className:u("font-sans m-0",N[t],e),children:a||i})})),C=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={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"}},k=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=S[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(w,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(C,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function R(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=I,blocksRegistry:r={},ancestors:s=T}=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 B=[],P=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:i,renderProps:l=R,...r})=>{const s=i?(e,t)=>R(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},i)))};function D({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?P(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"],E=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}}),M=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!M(e)&&(!t||"_self"===t)),z=e=>Boolean(e?.startsWith("#")),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:M,isLocalURL:O,isHash:z,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:V,hasPrefix:F});const j="/api/",$=`${j}v1/storage`,U=e=>(t,n)=>{if([!t,M(t),z(t),[E.CDN,j].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`${$}/${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(E.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&&!M(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(!O(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"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=be(e)&&"hidden lg:block";return c("div",{className:u(ye(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,be(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]})})),ye=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",be(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},be=({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(true);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,...y})=>{const b=ke(),v=_(),N=l((()=>v.back()),[]),w=y.options?.page?.common?.backwardButton,C=f&&!b;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(D({...y,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,De=(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,_e=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)),Ae=(e,t)=>e?o(C,{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:Ae(e.description,t)},String(t)):null,"__html"in e?o(_e,{...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?De(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}))),je=e=>Boolean(e?.src||e?.icon),$e=(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=>je(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:y,image:b,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:I,...T})=>{const R=b?.src?o(ne,{image:b}):null,B=o(k,{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:$e(y),backwardButton:S,...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(_e,{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)])),yt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?yt(e.get(a),[i,n]):n)})),bt=pt(((e,t)=>t.reduce(yt.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=>bt(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 Dt(e,t):null}catch(e){console.error(e)}return null}const Dt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),_t=e=>[...new Set(e)],At={},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(_t(e).filter((e=>!Et.some((t=>e.startsWith(t))))).map((async e=>[e,At[e]||=await Dt(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((()=>jt(0,t?.length)),[t]),a=t?.[n];return a?o(Ft,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),jt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),$t=(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]:$t(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(M(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!M(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:y,errors:b}]=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(),y?(t&&w(),d?.(m,e)):p()}),[t,m,y,w,d]);return[m,{errors:b,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(w,{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",yn=e=>e?xn:"border-error",bn=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:y,pattern:b,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=yn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[bn(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:y,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:y,pattern:b,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],y=l((()=>{h.current=t,f.close()}),[t]),b=l((e=>{y(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[y,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 y();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:b}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,b]),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:y=!1,maxLength:b,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=l((e=>{v&&!w&&S(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&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:Dn(a,s,t)})}),wn(r)]})})),Pn=(e="")=>e.replace(/[^\d]+/g,""),Dn=(e,t,n)=>t&&!n?`${e}*`:e,_n=e=>e?.text||e?.key||"",An=(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: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(),i&&i(e)},children:[o("span",{className:"min-h-6",children:_n(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[y,{setFalse:b,setTrue:v}]=nn(),[N,w]=a(""),C=Vn(x,n.length),S=y&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),b()}),[]),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:y,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[bn(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:_n(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"}],jn=d((({field:e,input:t})=>o(Fn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ln,...e(t?.name??"")}))),$n=(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"}`,Dt);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=ya(t,l,r);u.push(o("td",{children:o("div",{className:ba(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(),ya=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),ba=(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((()=>{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(Ca(t,"__.__.____"))},onBlur:()=>{Pa(p)?Da({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},Da=({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))}},_a=({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&&$t(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")}),Aa=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()),[y,b]=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:Aa,yearsOptions:Ea,ref:c}})({onYearSelect:b,onMonthSelect:x,onShowCalendar:g,selectedYear:y,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:[bn(t),c("div",{className:"relative",children:[_a({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:b}),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(y)},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:y,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)]}))),ja=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??"")}))),$a=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)}const si={};function oi(e,t=si){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 ci=new class{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)}};var di,mi;function ui(e){return oi(ci,e)}di=ci,mi=new class{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)}}(globalThis?.localStorage),ri(di,mi),ri(mi,di),di.bus.watch((({type:e,event:t})=>{null!=t?mi.setItem(e,t):mi.removeItem(e)}));const hi=()=>ui(),pi=(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")}},gi=(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},fi=(e,t)=>{const n=yi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},xi=(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,bi=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,vi=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(Ni(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&&bi(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),Ni=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}),wi=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Ci(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Ni(n.data?.address));const r={amountWorkers:gi(e?.amountWorkers,n.data?.employee_count),employerActivities:pi(e?.employerActivities??[],a),organization:xi(e?.organization??[],i,l),employerOrganization:fi(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Ci=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Si=d((({field:e,input:t})=>{const n=hi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),wi(n,e,t)}),[]);return o(Bn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),ki=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)]}))),Ii=d((({field:e,input:t})=>o(ki,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ti=`${qt}/outservice`,Ri=[];async function Bi(){const e=await Pt(`${Ti}/outserviceregions`);return e&&Array.isArray(e)?e:Ri}const Pi=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=Kn("outServiceRegions",Bi),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})})),Di=d((({field:e,input:t})=>o(Bn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&bi(e,t?.name??""),...e(t?.name??""),...t}))),_i=d((({field:e,input:t})=>o(Bn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&bi(e,t.name??""),...e(t?.name??""),...t}))),Ai=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]}))),Ei=d((({field:e,input:t})=>$n(e("acquiringType")?.value?.key)?o(Ai,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),Mi=d((({field:e,input:t})=>o(Bn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),Oi=e=>"_"===e,zi=e=>/\d/.test(e),Vi=e=>Oi(e)||zi(e),Fi=[..."+7 (___) ___-__-__"],Li=Fi.findIndex(Oi),ji=Fi.map(((e,t)=>Vi(e)?Fi.slice(0,t).filter(Vi).length:-1));function $i(e){const t=e.replace(/\D/g,""),n=Fi.map(((e,n)=>zi(e)?e:t.charAt(ji[n])||e)),a=ji.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(Li,a)):n).join("")}const Ui=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t($i(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})})),qi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ui,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Wi=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(qi,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&bi(e,n),...t})})),Hi=d((({field:e})=>$n(e("acquiringType")?.value?.key)?o(Ai,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Yi=d((({field:e,input:t,source:n})=>o(Fn,{placeholder:"Выберите продукт",label:"Продукт",options:Gi(n?.productList),...e(t?.name??"")}))),Gi=e=>(e??[]).map((e=>({key:e,value:e}))),Ki=`${qt}/regions`,Xi=[];function Ji(e=Ki){const{data:t}=Kn(e,Dt);return Array.isArray(t)?t:Xi}const Zi=`${qt}/outservice/outserviceregions`,Qi=d((({field:e,input:t,params:n})=>{var a;const i=Ji((a=n?.typeForm,"OUTSERVICE"===a?Zi: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??"")})})),el=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??"")})})),tl=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},nl=rn((e=>null!=e&&""!==e)),al="Некорректно заполненное поле",il="Укажите регион, город/населенный пункт, улицу, дом",ll=e=>nl(e??al),rl=e=>rn((e=>e?.key&&""!==e?.key))(e??al),sl=e=>rn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??al),ol=e=>rn((e=>"string"==typeof e&&e.length>1&&yl(e)))(e??al),cl=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??al),dl=e=>rn((e=>"string"==typeof e&&6===e.length))(e),ml=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),ul=e=>rn(ml)(e),hl=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),pl=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},gl=e=>Boolean(e.region&&e.city&&e.house),fl=()=>rn(gl)(il),xl=/^[\u0400-\u04FF\d\s]+$/u,yl=(e="")=>xl.test(e),bl=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)},vl={processPersonalDataFlg:hl,consentProviderFlg:hl,consentInformFlg:hl,consentPfrFlg:hl,consentOthersFlg:hl},Nl={addressCourier:fl(),paymentSystem:ll("Укажите тип платежной системы"),currency:ll("Укажите валюту"),cardCategory:ll("Укажите категорию карты"),codeWord:(wl="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&yl(e)))(wl??al)),confirmationIncome:rl(),methodObtain:ll(),deliveryDate:ll("Укажите дату доставки")};var wl;const Cl={organization:rl("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(il),organizationPhone:ul("Укажите номер телефона"),organizationName:ll("Укажите наименование организации"),legalForm:ll("Укажите ОПФ"),generalSeniority:sl("Укажите количество лет стажа"),lastJobExperience:sl("Укажите стаж на последнем месте работы"),experience5Years:sl("Укажите общий стаж за последние 5 лет"),jobsNumber:sl("Укажите количество мест работы за последние 5 лет"),beginDate:ll("Укажите дату заключения трудового договора"),addressFact:fl(),addressRegistration:fl(),addressRetail:rl("Выберите адрес банка"),addressMatch:ll(),sex:ll("Укажите свой пол"),limitedBirthday:rn(bl)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:ll("Укажите место рождения"),education:rl("Выберите ваше образование"),housing:rl("Выберите тип жилья"),amountWorkers:rl("Выберите информацию о количестве сотрудников"),employment:rl("Выберите информацию о трудоустройстве"),employerActivities:rl("Выберите вид деятельности организации"),employerOrganization:rl("Выберите вид организации"),positionOrganization:rl("Выберите вашу должность"),familyStatus:rl("Выберите семейное положение"),familyMembers:cl(2,"Укажите количество членов семьи"),children:cl(2,"Укажите количество детей"),dependents:cl(2,"Укажите количество иждивенцев"),totalIncome:cl(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:cl(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(pl)(e))("Некорректный номер СНИЛС"),conscription:ll(),armyIdFlg:hl,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:dl("Укажите номер паспорта"),dulIssueDateField:ll("Укажите дату выдачи паспорта"),dulSubdivisionCode:dl("Укажите код подразделения"),dulIssuedBy:ll("Укажите организацию, выдавшую паспорт"),participantDateRegistration:ll("Укажите дату регистрации"),retirementIncome:ll(),otherIncome:ll(),wages:ll(),mandatoryPayments:ll(),disablePeopleFlg:ll(),bankruptcyFlg:ll(),shareholderFlg:ll(),legalEntityName:ll(),bankEmployeeCode:ll(),partInBusiness:ll(),regionRetail:rl("Выберите регион")},Sl={fullName:ll(),addressBranch:rl(),desiredMeetingDate:ll(),product:ll(),localities:ll(),partnerComments:ll(),collectionCount:ll(),acquiringType:rl(),serviceType:rl(),annualRevenue:ll(),feedbackMethod:rl(),serviceDirection:rl(),secondaryPhone:ul("Укажите номер телефона"),region:rl(),surname:ol("Укажите свою фамилию"),name:ol("Укажите своё имя"),middleName:ol("Укажите своё отчество"),birthday:ll("Укажите дату рождения"),phone:ul("Укажите номер телефона"),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:ll(),typeForm:ll(),consentToReceiveMaterials:hl,consentDataProcessing:hl,...vl,...Cl,...Nl},kl=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(Il).map((({name:e})=>[e,Sl[e??""]])));return e=>n?Object.fromEntries(t.filter(Il).filter(Tl(e)).map((({name:e})=>[e,Sl[e??""]]))):a},Il=({name:e})=>Boolean(Sl[e??""]),Tl=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Rl=d((({field:e})=>{const t=e("secondaryPhone");return o(qi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?tl(t,Sl.secondaryPhone):t})})),Bl=d((({field:e,input:t})=>o(Fn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ni,...e(t?.name??"")}))),Pl=d((({field:e,input:t})=>o(Bn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&bi(e,"surname"),...e(t?.name??""),...t}))),Dl=["От 1 мес","До 15 лет"],_l=d((({field:e})=>o(ca,{title:"Срок, месяцев",items:Dl,min:1,max:180,...e("term")}))),Al=d((({field:e,input:t})=>o(Fn,{label:"Тип обслуживания",options:ti,...e(t?.name??"")}))),El={horizontal:"@lg:flex-row",vertical:""},Ml=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",El[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))))})]}))),Ol=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],zl=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(Ml,{className:"whitespace-normal",orientation:"horizontal",items:Ol,...e(t?.name??"",{onChange:n})})})}));const Vl={$ref:"/wcms-resources/outservice-productlist.json"},Fl={fullName:li,addressBranch:na,desiredMeetingDate:Qa,product:e=>o(Yi,{...e,source:Vl}),localities:Pi,isClient:Ii,partnerComments:Mi,collectionCount:$a,acquiringType:jn,onlineCheckout:Ei,posTerminal:Hi,serviceType:Al,term:_l,amount:ha,annualRevenue:pa,vedTypes:zl,feedbackMethod:ii,serviceDirection:Bl,bankEmpolee:ga,secondaryPhone:Rl,applicationDate:e=>o(Bn,{label:"Дата и время обращения в Банк",...e}),region:e=>ta(e?.params?.typeForm)?o(el,{...e}):o(Qi,{...e}),consentToReceiveMaterials:Za,surname:Pl,name:_i,middleName:Di,birthday:ja,phone:Wi,email:ei,inn:Si,comment:Ua},Ll=(e,t,n={})=>(a,i)=>{const l={...Fl,...n};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})?o("div",{children:l[a?.name||""]?.({field:e,input:a,params:t})},String(i)):null},jl=e=>2===e?"@xl:grid-cols-2":"",$l=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,Ul=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 ql({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Wl={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"},Hl={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")},Yl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(ql(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(Wl[i],Hl[i]),a),type:d,role:h,onClick:p,children:[s?o(Ul,{blur:!0,size:"small"}):null,e]})})),Gl=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"})}))),Kl=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(Gl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Xl=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Kl,{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(k,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Yl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Jl=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${$n(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,u={...d,...Ql(o),...Zl(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Zl=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ql=e=>e?{vedTypes:Object.fromEntries(Ol.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:Ln[0],serviceType:ti[0],feedbackMethod:ai[0],serviceDirection:ni[0],vedTypes:Ol[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},tr=d((({text:e,link:t})=>c(C,{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]}))),nr=(e,t)=>o(Yl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ar=(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(tr,{link:t})]}),wn(tl(e,hl).error)]}):o(tr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),nr(n)]}),ir={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}}},lr=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||er[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),y=r((()=>kl(f)),[f]),b=un(Xl),v=tn(),N=l((async(e,t)=>{const a=Jl({...e,...m}),i=Boolean(await ir.send(a,"lead"===d));b.open({ok:i,typeForm:n}),i&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:y,onSubmit:N}),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:[$l(e.title),(e?.inputs||[])?.map(Ll(C,{typeForm:n}))]},`section-${t}`))),ar(k?C("consentDataProcessing"):void 0,s,i)]}),h?c("div",{className:"space-y-m",children:[o(w,{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]})})),rr=[{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"}]}],sr=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})})),or=d((({field:e,input:t})=>o(ki,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),cr="/icons/MapMarkerClusterIcon.svg",dr="/icons/MapMarkerClusterYellowIcon.svg";function mr({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=ur("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=ur("workplaces",e,i),r=hr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=hr(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=hr(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 ur=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?cr:dr,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),hr=(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?cr:dr,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),pr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},gr={...pr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},fr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(gr).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"})}),xr=e=>globalThis[e];function yr(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=xr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(xr(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(xr(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))})(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}const br={...pr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},vr=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(br).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Nr=[55.753995,37.614069],wr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=yr("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(i((()=>{r.current?mr({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Cr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),mr({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(Ul,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(vr,{yandexMaps:r}),o(vr,{yandexMaps:r,direction:"out"})]}),fr(r,m,u("right-2 top-80",h))]})})),Cr=e=>{const t=[kr(Sr(e,0)),kr(Sr(e,1))];return t.every((e=>e))?t:Nr},Sr=(e,t)=>e.map((e=>e.coords?.[t])),kr=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Ir=async(e,t,n)=>{try{return(await Tr(e,t,n)).json()}catch(e){return console.error(e),null}};async function Tr(e,t,n){return globalThis?.fetch?.(`${qt}${e}`,{method:t,headers:{"Content-Type":"application/json",...Rr()},credentials:"include",body:n?JSON.stringify(n):null})}const Rr=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Br=e=>Number(e.toString().replace(",",".")),Pr=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:i,renderFoldButton:r})=>{const[s,o]=a(n),d=l((()=>{o((e=>!e))}),[]),m=i({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const Dr=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})})})),_r=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:Ar({textItems:l,subText:t,children:n,isPhone:a,...i})})),Ar=({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=e=>{const t=Fr(e);return o(_r,{label:"Режим работы",value:t,className:"max-w-none"})},Vr=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Fr=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[Vr({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Vr({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Lr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],jr=e=>Lr.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??"")}}))),$r=e=>{if(!e)return null;const t=Ur(e);return c(Or,{className:"border-none",children:[o(_r,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(qr)})}),o(_r,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Ur=e=>{const t=Lr.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},qr=({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)),Wr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(_r,{label:"Валюта",value:e.currency}):null,t?o(_r,{label:"Купить",value:String(t)}):null,n?o(_r,{label:"Продать",value:String(n)}):null]},String(a)),Hr={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"}},Yr=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",Hr[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:Hr[n].text,children:t})]}))),Gr=(new Date).getDay(),Kr=e=>{const[t]=e?.slice(Gr-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(Yr,{color:"green",children:i}):null,n&&l?o(Yr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Yr,{color:"red",children:"Выходной"})},Xr=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Jr=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(_r,{label:e,value:t&&n?n:"",subText:Xr({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),Zr=["ArrowDownIcon","ArrowUpIcon"],Qr=["Подробнее","Скрыть"],es=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Qr[Number(e)]}),o(W,{className:"text-primary-text",name:Zr[Number(e)],width:"16",height:"16"})]}),ts=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,ns=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,as=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,is=({name:e,address:t,phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=jr(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),Kr(h)]}),o("div",{className:"hidden sm:block",children:ls({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Pr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Dr,{isUnfolded:e,children:ls({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>es({isUnfolded:e,onToggle:t})})]},String(u))},ls=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=jr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Or,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(_r,{label:"Факс",value:t,isPhone:!0}),o(_r,{label:"Телефон филиала",value:e,isPhone:!0}),o(_r,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(_r,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(_r,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(_r,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Or,{children:o(_r,{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(Jr)})})}):c(Or,{children:[o(_r,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(qr)})}),zr(d)]}),r?.businessScheduleVisibleTag?$r(r?.businessScheduleDescription):null,s?.currencies?.length?o(Or,{className:"flex-wrap",children:s?.currencies?.map(Wr)}):null]})},rs=({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=jr(e),n=e?Fr(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ts(n):as(n,a):ns(n):""})(n)}`;return{header:a,body:l}},ss={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},os={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},cs={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)},ds=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>cs[t](e)))))},ms=()=>{},us=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=ms,getBalloonRemoteWorkplaces:i=ms})=>{const[l,s,o,c]=r((()=>{const l=ds(e,n),r=ds(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}},hs=e=>{const{data:t,error:n}=Kn(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,ps);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},ps=async e=>await Pt(e,{method:"POST"})||[],gs=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),fs=d((({children:e})=>gs?e:null)),xs=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=hs("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");i((()=>{(async()=>{const e=await(async e=>{const t=await Ir("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:Br(e.latitude??Nr[0]),gpsLongitude:Br(e.longitude??Nr[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=us({data:n,filtrationState:{},getBalloon:rs});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(fs,{children:o(wr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),ys=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})})),bs=d((({field:e,input:t})=>{const{data:n}=hs("EMPLOYEES_NUMBER"),a=hi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(ys,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),vs=d((({field:e,input:t})=>o(ki,{text:"Наличие военного билета",...e(t?.name??"")}))),Ns=d((({field:e,input:t})=>o(Bn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),ws=d((({field:e,input:t})=>o(ki,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),Cs=d((({field:e,input:t})=>o(La,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),Ss=d((({field:e,input:t})=>o(Bn,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&bi(e,"birthPlace")}))),ks=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const Is=d((({field:e,input:t})=>{const[n,r]=a([]),[s]=function(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?ks(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 Ir("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(m,s);r(e),Ts(e,c)||d&&d(null)})()}),[m]),o(ys,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Ts=(e,t)=>e.some((e=>e.key===t?.key)),Rs=d((({field:e,input:t})=>o(Bn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Bs=d((({field:e,input:t})=>o(Bn,{label:"Кодовое слово",...e(t?.name??""),...t}))),Ps=d((({field:e,input:t})=>{const{data:n}=hs("INCOME_CERT_UNITED");return o(ys,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Ds=d((({field:e,input:t})=>{const{data:n}=hs("MILITARY_STATUS");return o(ys,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),_s={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},As=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Kl,{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(Yl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Es=(e,t)=>{const{open:n}=un(As),a=ke();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Tr(`/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])},Ms=d((({className:e,error:t,docId:n,...a})=>{const i=Es(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)]})})),Os=d((({field:e,input:t})=>t&&t.name?o(Ms,{text:_s[t.name]?.text,docId:_s[t.name]?.docId,...e(t.name)}):null)),zs=Math.round(29.5),Vs=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Fs="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Ls="flex flex-col lg:w-1/2 gap-2xl",js="flex flex-col gap-y-xl min-w-52",$s=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}))),Us=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($s,{value:n,...i}):o(Ee,{size:"text-h3",children:"-"})]}))),qs=(e=[],t=!1)=>Ws([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ws=(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]},Hs=(e,t=0)=>e?.sum?e.sum:t,Ys=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Gs=(e,t)=>e?o(C,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Ks=({min:e=0,max:t=0,availableMonths:n,...a})=>o(ca,{items:[`От ${Xs(e)}`,`До ${Xs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Xs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Js=({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(Ml,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),Zs=e=>Js({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Qs=({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}),eo=({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))},to=(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)},no=e=>e,ao=(e=no)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),io=ao(),lo=(e=no)=>ao((t=>-e(t))),ro=lo(),so=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:oo([e,t],a),oo=([e,t],n=[])=>({[e]:n.length?ro(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?io(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),co=(e,[t,n],a)=>e>=a[t]&&e<=a[n],mo={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},uo=e=>ho({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ho({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ho({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ho({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ho=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],po=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[mo],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>uo({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=so(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=so(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>uo({row:e,userInputParams:t,paramsViewSettings:n})&&co(a,["minSum","maxSum"],e)&&co(i,["minMonths","maxMonths"],e)))||mo)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=to(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},go=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),fo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},xo=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Ws([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=dn({moneyValue:Hs(s,2e5),monthsValue:Ys(s,zs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=po(g,n,r),y=Zs({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:b}=f("moneyValue"),{onChange:v}=f("monthsValue");return i((()=>{b&&b(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((()=>{!go(s)&&h&&eo({field:f,defParams:h,calcParams:x,map:fo,monthsValue:"minMonths"})}),[n,s]),o(Vs,{className:e,title:t,...m,children:c("section",{className:u(Fs,e),children:[c("div",{className:Ls,children:[Qs({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),Ks({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),yo({...x,...r},f),o("div",{className:"sm:hidden",children:y})]}),c("div",{className:u(js,"@4xl:w-1/2"),children:[o(Us,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Us,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Us,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:y}),$e(a,{isVertical:!0}),Gs(l)]})]})})})),yo=(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]}),bo="calculator",vo=d((({field:e,params:t})=>{const n=l((t=>{e(bo).onChange?.(t)}),[]);return o(xo,{...t?.calcData,padding:"p-0",defaultParams:wo(e(bo).value),onChange:n})})),No={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},wo=(e,t=!1)=>{const n=t?Co(No):No;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},Co=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),So=d((({field:e,input:t})=>{const{data:n}=hs("CREDIT_IN_RSHB");return o(ys,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),ko=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ml,{label:gn({label:t,errors:a?.errors}),...a}),wn(n)]}))),Io=[{id:"810",text:"Рубли"}],To=d((({field:e,input:t})=>o(ko,{label:"Валюта",orientation:"horizontal",items:Io,...e(t?.name??"")}))),Ro=d((({field:e,input:t})=>o(La,{label:"Дата доставки",...e(t?.name??"")}))),Bo=d((({field:e,input:t})=>o(Bn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Po=d((({field:e,input:t})=>o(ki,{text:"Являюсь инвалидом",...e(t?.name??"")}))),Do=d((({field:e,input:t})=>o(La,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&bi(e,t?.name??"")}))),_o=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&&bi(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:i,daDataQueryPrefix:n})})),Ao=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&bi(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Eo=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&bi(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),Mo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Bn,{disabled:t?.filledByEsia&&bi(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),Oo=d((({field:e,input:t})=>{const{data:n}=hs("EDUCATION_LEVEL");return o(ys,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),zo=d((({field:e,input:t})=>{const{data:n}=hs("ORGANIZATION_ACTIVITY_TYPE"),a=hi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(ys,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Vo=d((({field:e,input:t})=>{const{data:n}=hs("ORGANIZATION_KIND"),a=hi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(ys,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Fo=d((({field:e,input:t})=>{const{data:n}=hs("EMPLOYMENT_INFO_UNITED");return o(ys,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Lo=d((({field:e,input:t})=>o(Bn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),jo=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})})),$o=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})})),Uo=d((({field:e,input:t})=>{const{data:n}=hs("MARITAL_STATUS");return o(ys,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),qo=d((({field:e,input:t})=>o(Bn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),Wo=d((({field:e,input:t})=>{const{data:n}=hs("HOUSE_TYPE");return o(ys,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Ho=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(_e,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Yo=d((({input:e})=>o(Ho,{__html:e?.label}))),Go=d((({field:e,input:t})=>o(Bn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Ko=d((({field:e,input:t})=>o(Bn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),Xo=d((({field:e,input:t})=>o(Bn,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),Jo=d((({field:e,input:t})=>o(Bn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),Zo=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&bi(e,t.name??"")}))),Qo=d((({field:e,input:t})=>o(Bn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),ec=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],tc=d((({field:e,input:t})=>o(ko,{orientation:"horizontal",items:ec,...e(t?.name??"")}))),nc=d((({field:e,input:t})=>{const{data:n}=hs("ORGANIZATION_TYPE"),a=hi();return i((()=>{n&&(a.organization=n)}),[n]),o(ys,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),ac=d((({field:e,input:t})=>{const n=hi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),wi(n,e,t)}),[]);return o(Bn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),ic=d((({field:e,input:t})=>o(Bn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),lc=d((({field:e,input:t})=>o(La,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),rc=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})})),sc=e=>e.map((e=>({key:e.type,text:e.name})));const oc=e=>e?.key,cc=d((({field:e,input:t})=>{const[n,l]=a([]),s=ui();var c;c=async()=>{const{programId:e}=s;if(e){const t=await(async e=>{const t=await Ir("/public-data/creditProgramConditions","POST",{creditProgramId:e});return sc(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(ko,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:oc,parse:e=>n?.find((t=>t.key===e))})})})),dc=d((({field:e,input:t})=>{const{data:n}=hs("POSITION");return o(ys,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),mc=d((({field:e,input:t})=>{const{data:n}=hs("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??"")})})),uc=d((({field:e,input:t})=>o(Bn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),hc=["male","female"],pc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],gc=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 Ir("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return hc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(ko,{label:"Пол",orientation:"horizontal",items:pc,...e(t?.name??"")})})),fc=d((({field:e,input:t})=>o(ki,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),xc=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})})),yc=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(xc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),wn(a)]}))),bc=d((({field:e,input:t})=>o(yc,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),vc=d((({field:e,input:t})=>o(Bn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Nc=d((({field:e,input:t})=>o(Bn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),wc={limitedBirthday:Zo},Cc={processPersonalDataFlg:Os,consentProviderFlg:Os,consentOthersFlg:Os,consentInformFlg:Os,consentPfrFlg:Os},Sc={organization:nc,organizationAddress:vi,organizationPhone:Wi,organizationName:ac,legalForm:Jo,generalSeniority:qo,lastJobExperience:Ko,experience5Years:jo,jobsNumber:Go,beginDate:Cs,addressFact:sr,addressRegistration:vi,addressRetail:xs,addressMatch:or,sex:gc,limitedBirthday:Zo,birthPlace:Ss,education:Oo,housing:Wo,amountWorkers:bs,employment:Fo,employerActivities:zo,employerOrganization:Vo,positionOrganization:dc,familyStatus:Uo,familyMembers:$o,children:Rs,dependents:Bo,totalIncome:vc,expenses:Lo,snils:bc,conscription:Ds,armyIdFlg:vs,dulSerie:Eo,dulNumber:Ao,dulIssueDateField:Do,dulSubdivisionCode:Mo,dulIssuedBy:_o,participantDateRegistration:lc,retirementIncome:uc,otherIncome:ic,wages:Nc,mandatoryPayments:Qo,disablePeopleFlg:Po,bankruptcyFlg:ws,shareholderFlg:fc,legalEntityName:Xo,creditInRshbCd:So,bankEmployeeCode:Ns,partInBusiness:rc,regionRetail:mc,infoCard:Yo,calculator:vo,confirmationIncome:Ps},kc={addressCourier:vi,paymentSystem:cc,currency:To,cardCategory:Is,codeWord:Bs,methodObtain:tc,deliveryDate:Ro},Ic=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(tl(t(e?.name),Sl[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Pr,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:n})=>o(Dr,{isUnfolded:n,className:"flex flex-col pl-2xl",children:e.map(Ll(t,{},Cc))}),renderFoldButton:Tc(c("div",{children:[o(Ya,{value:a,onChange:n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}},text:"Согласие на все документы"},n),wn(i?"Отметьте все обязательные соглашения":"")]}))})})})),Tc=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Rc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Bc(t||[]);return n.length>2?c("div",{children:[a.map(Ll(e,{},{...wc})),o(Ic,{inputs:n,field:e})]}):(t||[])?.map(Ll(e,{},{...wc}))},Bc=e=>({consentInputs:e?.filter((e=>Object.keys(_s).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(_s).includes(e.name||"")))||[]}),Pc=(e,t)=>o(Yl,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Dc=e=>Tr("/user-data/updateUserProfile","PUT",e),_c=e=>Tr("/user-data/updateUserTask","PUT",e),Ac={width:"103",height:"21"},Ec={"bg-white":"color",transparent:"white"},Mc={"bg-white":"text-primary-main",transparent:"text-white"},Oc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Ec[e]},className:Mc[e],width:n?.width,height:n?.height}),zc={"bg-white":"text-primary-text",transparent:"text-white"},Vc=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:[Oc(l,n?.image,Ac),r?a??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:zc[l],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Fc=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},Tr("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),y=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Tr(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(y,[]),o(Kl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Vc,{}),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:y,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(Yl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Yl,{type:"submit",disabled:!d,onClick:x,version:"secondary",children:"Отправить"})]}),p?o(Ul,{blur:!1}):null]})})})),Lc=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")}`,$c=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:Uc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Uc=(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 ${yn(!n||!a)} rounded-md caret-transparent outline-none`},qc=d((({isDisabled:e,onClick:t,text:n})=>o(Yl,{type:"button",onClick:t,disabled:e,children:o(Ee,{font:"font-normal",children:n})}))),Wc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Hc=({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),y=p>2||x||!e.every(Boolean),b=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Ir("/sms/checkCode","POST",e).then(Wc))({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:b,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:y,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},Yc=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:y,setTimeNextReq:b,setIsTimerStarted:v,setAttempts:N}=Hc({values:m,onSuccess:s}),w=un(Fc),C=Ut(e),S=l((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},Tr("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(N(0),b(180),v(!0)):w.open({phoneNumber:C,sendCode:S})}),[C,d]);return i((()=>{S()}),[]),o(Kl,{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(k,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o($c,{values:m,setValues:u,errorText:g,hasError:p}):null,Kc(x,b,S),c(_e,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),Gc(y,h),f?o(Ul,{blur:!1}):null]})})})),Gc=(e,t)=>o(qc,{text:"Далее",isDisabled:e,onClick:t}),Kc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Lc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Xc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Jc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Zc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],Qc=d((({onSubmit:e=fn,onClose:t=fn})=>{const[n,i]=a(""),[r,s]=a(!1),d=Es(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?Jc:Xc;return o(Kl,{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(w,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(C,{align:"text-center",children:h.description}),o(Ml,{className:"whitespace-normal",orientation:"horizontal",items:Zc,value:n,onChange:u}),o(Yl,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),ed=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(w,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(C,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),td={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},nd={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},ad={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},id=e=>Object.entries(e).reduce(((e,[t,n])=>t in td?[...e,{contactTypeCd:{key:td[t]},value:n}]:e),[]),ld=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in nd){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:nd[t]},...a}]}return e}),[]),rd=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:sd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in ad?[...e,{incomeTypeCd:{key:ad[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},sd=(e,t)=>Number(e)+Number(t),od={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"},cd={...od,amur_card:"14",owner_card:"13",travel_card:"15"},dd=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:sd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},md=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}},ud=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}},hd=e=>e?.key?{key:e.key,text:e.value}:void 0,pd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=hi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=cd[s.code],u=Boolean(od[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],y=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:y,educationLevelCd:b,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:D,employeesNumberCd:_,opf:A,seniority:E,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:j,otherDependents:$,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:hd(i),cardCategory:hd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:y,education:hd(b),participantDateRegistration:v,housing:hd(N),beginDate:k,employment:hd(I),organizationName:T,inn:R,employerActivities:hd(B),organization:hd(P),employerOrganization:hd(D),amountWorkers:hd(_),legalForm:A,generalSeniority:E?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:hd(V),familyStatus:hd(F),children:L?.toString(),familyMembers:j?.toString(),dependents:$?.toString(),conscription:hd(U),confirmationIncome:hd(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:hd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...dd(q),...md(S),...ud(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)}),[]),b=l((()=>{i.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=l((()=>{i.assign("/")}),[]);return o(Kl,{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(w,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(ed,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:y}),o(ed,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:b}),o(Yl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),gd=d((function({onClose:e=fn}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Kl,{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(w,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(C,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Yl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Yl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),fd=d((({onClose:e})=>{const t=Jt(),n=hi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Ir("/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(Kl,{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(Yl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Yl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),xd=()=>{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")}},yd=()=>ui(),bd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:i,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=yd();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(fd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=un(Qc),n=un(Yc),a=t=>async n=>{try{t&&await Dc({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(Yc),h=(()=>{const{open:e}=un(pd),{open:t}=un(gd);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)}},Ir("/public-data/createUserProfile","POST",n).then((e=>e?.profile?.id||null)));if(a&&t?.phone){const n=async()=>{await Nd({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 Ir("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:a,programId:e});if(t){const e=await(async e=>await Ir("/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=vd(t);u.open({phone:t?.phone,consents:l,onSuccess:i}),r()}}catch{o(!1)}var n}),[])}},vd=e=>Object.keys(_s).filter((t=>e[t])).map((e=>_s[e]?.text)),Nd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=wd(n);await Dc(((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&&$t(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 Ir("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await _c((({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&&$t(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:id({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:xd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},wd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Cd={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Sd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Cd[e.name||""]])))}},kd=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:$i(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:Id(i),addressFact:Id(l),esiaAccountTypeCd:t?.esiaAccountType}},Id=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}},Td=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=yd(),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((()=>Sd(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},Ir("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...kd(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=ks(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}]},Rd=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>rr?.flatMap((e=>e?.inputs))||[]),[rr]),m=r((()=>kl(d)),[d]),[h,{isLoading:p}]=Td(d,a),{isSending:g,ok:f,handleSubmit:x}=bd({programId:n,nextStepLink:a}),[,{field:y,onSubmit:b}]=dn(h,{formValidator:m,onSubmit:x}),v=un(Xl);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:b,className:"space-y-m relative",children:[p?o(Ul,{blur:!1}):null,rr.map(((e,t)=>c("div",{className:u(jl(e.columns),"grid gap-x-m"),children:[$l(e.title),Rc({field:y,inputs:e?.inputs})]},`section-${t}`))),Pc(l,g)]})})})),Bd=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(k,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Pd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Dd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),_d=10;function Ad(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 Ed=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:Ad(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}(l((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:h,role:"listitem",children:d})})),Md=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Od=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},y=s([]),b=l(((e,t)=>{const n=[...y.current||[]];n[e]=t,y.current=n,g&&g(n),f&&f(Vd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?zd(c,v):{},...N?Dd(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(Ed,{className:u(m,i?Md[i-1]:"",{"h-full":N},t),style:w?zd(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),zd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Vd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Fd={"horizontal-list":"w-6","vertical-list":"h-6"},Ld=({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?Fd[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))},$d=e=>t=>e.scrollWidth/t,Ud=e=>(t,n)=>{e.scrollBy({left:n*$d(e)(t),behavior:"smooth"})},qd=({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?[lo()(i),ao()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?Ud(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?Ud(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}]},Wd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Hd=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]=qd({itemCount:s.length}),g=Yd(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(Od,{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",Wd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Ld({activeIndex:t,onClick:f,listType:a}))}):null})),Yd=(e=!1)=>({behavior:e?"auto":"smooth"}),Gd=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"})}))),Kd=d((e=>o(Gd,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Xd=d((e=>o(Gd,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Jd="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Zd=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?Qd(t):null,l?o(Kd,{className:u(em(i),m?"left-1":"left-0"),onClick:s}):null,r?o(Xd,{className:u(em(i),m?"right-1":"right-0"),onClick:d}):null]})})),Qd=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(Jd,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(Jd,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),em=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),tm=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 y=Array.isArray(g)?g.length:0,[b,v]=qd({itemCount:y,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(Od,{containerRef:b,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(Zd,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Hd,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:y,listType:l,version:t,navButtons:x,containerRef:b,containerScroll:v})]})})),nm=({blocksToRender:e,...t})=>o(tm,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Pd(!0)),children:R(e,t)},String(n))})}),am=e=>e%2!=0,im=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]}))),lm=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:i=!1,onClick:l})=>o(im,{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}))),rm=({isUnfolded:e,onToggle:t})=>o(lm,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),sm=["ArrowDownIcon","ArrowUpIcon"],om="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",cm=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(om),children:[P(l,{...i.options,parent:n}),am(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(Pr,{renderFoldableSection:({isUnfolded:e})=>c(Dr,{className:u(om),isUnfolded:e,children:[P(r,{...i.options,parent:n}),am(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(lm,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:sm[Number(n)],dataTheme:i.options?.page?.colorPalette,onClick:a})})]})},dm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[mm(n,t),cm({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[mm(n,t),nm({...a,blocksToRender:t})]});default:return null}})),mm=(e,t)=>e&&!t.length?o(Bd,{...e}):null,um=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),hm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Ai,{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))))),pm=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,um(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(gm(a)).filter(Boolean))]}),n?o("div",{children:o(Yl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),gm=e=>([t,n])=>{const a=n?.type;return"array"===a?fm(t,e)(n):null},fm=(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(hm,{items:a,multiple:!n?.single,...t(e)})]},e)},xm=e=>e;function ym(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const bm=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,vm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>bm(t[e])||bm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>bm(t[e])||bm(n[e])||Nm(t[e])<=Nm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>bm(t[e])||bm(n[e])||Nm(t[e]?.min)>=Nm(n[e]?.min)&&Nm(t[e]?.min)<=Nm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>bm(t[e])||bm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>bm(t[e])||bm(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Nm=e=>Number(e||0),wm=(e,{block:t,page:n,normalize:a=xm})=>{const i=t?.blocks||[],[l,s]=dn(e),o=r((()=>ym(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),c=l===e?i:((e,t)=>(n=xm)=>e?.filter((([,e])=>vm(t,n(e)||{}))).map((([e])=>e)))(o,l)(a);return[l,{blocksToRender:c,blocksWithProps:o},s]},Cm={},Sm={},km=Vt((({className:e,filtrationSchema:t=Cm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=wm(Sm,{block:i.block,page:i.options?.page}),d=o(Mn,{className:"w-64",label:n?.title,options:Im(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Im(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(pm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Yl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(dm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Im=e=>ym(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Tm=(e=!1)=>e?"text-left":"text-center",Rm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Bm=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",Rm[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Pm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(w,{headingType:"h3",as:"h2",className:Tm(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(Dm)}):null]})})),Dm=({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(Bm,{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(w,{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(_e,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),_m=(e,t,n)=>{return o(tm,{children:e.map((a=n,({icon:e,title:t,description:n},i)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:a,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Ee,{size:"text-h6",font:"font-normal",align:a,children:n}):null]},String(i))))});var a},Am=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(k,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?_m(e,0,t):null]}))),Em={start:"justify-start",center:"justify-center",end:"justify-end"},Mm=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Em[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:$e(e)})})),Om=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]})]}))),zm=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(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),Vm=({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(Om,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(Us,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(zm,{title:e,...r}),Fm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Lm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},jm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=Fm.prefMonthsNum,prefTravelBonusRate:l=Fm.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||Lm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},$m=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}=jm(r,n);return o(Vs,{className:e,title:t,...l,children:c("section",{className:u(Fs,e),children:[c("div",{className:Ls,children:[Qs({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Qs({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Vm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:js,children:[f>=0?o(Us,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,$e(a,{isVertical:!0}),Gs(i)]})]})})})),Um=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,qm=e=>Js({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Wm=" (c капитализацией)",Hm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:js,children:[o(Us,{title:`Доход в конце срока${l?Wm:""}`,value:e,postfix:n,prefix:"+"}),o(Us,{title:`Сумма в конце срока${l?Wm:""}`,value:t,postfix:n}),$e(a,{isVertical:!0}),i?.map(Gs)]}),Ym={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Gm={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Km=(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?Ym[e?.rateType]:"",{data:n}=Kn(t?`${qt}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Xm(s,e)&&co(a,["minSum","maxSum"],e)&&co(n,["minDays","maxDays"],e)))||Gm,{rate:m}=d,u=Jm(m,e),h=a+u,p=c||[Gm];return{...d,...oo(["minSum","maxSum"],p),...oo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Xm=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Jm=(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)},Zm=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=dn({moneyValue:Hs(r,1e5),daysValue:Ys(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Km(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(Vs,{className:e,title:t,...d,children:c("section",{className:u(Fs,e),children:[c("div",{className:Ls,children:[Qs({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ca,{items:[`От ${Um(b.min||0)}`,`До ${Um(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Qm(p,h),qm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Vm({rate:x,depositeName:y,isShowDepositeName:l}),Hm({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),Qm=(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})]})]}),eu=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},tu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},nu=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?lu(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=>[iu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),iu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),iu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),iu({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,co(a,["minSum","maxSum"],t),co(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||tu,{rate:u}=m,h=au(u,e),p=a+h,g=t||[tu];return{...m,...oo(["minSum","maxSum"],g),...oo(["minMonths","maxMonths"],g),availableMonths:eu(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}},au=(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)},iu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],lu=(e,t)=>e+Math.round((t-e)/2),ru=(e="rub")=>"rub"===e,su=(e,t)=>{const{minMonths:n,maxMonths:a}=oo(["minMonths","maxMonths"],mu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:ia(i,n,a)}},ou=(e,t)=>{const{minSum:n,maxSum:a}=oo(["minSum","maxSum"],mu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:ia(i,n,a)}},cu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),du=e=>{const t=ru(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},mu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},uu=(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?Js({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Js({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),hu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?qm({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Js({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),hu(e.isShowNewClient),e.isShowNewClient?o(Ya,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},hu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,pu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},gu={text:"₽",key:"rub"},fu=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))??[gu],g=l((e=>t=>e?{...t,...du(t),...ou(t,e),...su(t,e),...cu(t,e)}:t)(h),[h]),[f,{field:x}]=dn({moneyValue:Hs(d,2e4),monthsValue:Ys(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:gu},{normalizer:g}),y=x?.("currency")?.value??gu,b=x?.("isNewClient")?.value,v=mu(h,y),N=nu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{eo({field:x,defParams:qs(v,b),calcParams:N,monthsValue:"minMonths",map:pu})}),[x,h]);i((()=>{!go(d)&&v&&I()}),[d,h]);const T=w===qs(v,b)?.rate;return o(Vs,{className:e,title:t,...m,children:c("section",{className:u(Fs,e),children:[c("div",{className:Ls,children:[c("div",{className:"flex gap-m",children:[Qs({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:xu(y?.key)}),h&&h?.length>1?o(Fn,{label:"Валюта",options:p,...x("currency")}):null]}),Ks({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),uu({...N,...s},x)]}),Vm({rate:w,children:bu(I,T)}),Hm({income:C,finalSum:S,buttons:[...a,yu(n?.buttons,k)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),xu=(e="")=>ru(e)?1e3:100,yu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},bu=(e,t=!1)=>t?null:o(Yl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),vu=e=>Nu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Nu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],wu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Cu=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[wu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>vu({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=so(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=so(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>vu({row:e,userInputParams:t,paramsViewSettings:n})&&co(a+r,["minSum","maxSum"],e)&&co(l,["minSumOld","maxSumOld"],e)&&co(r,["minSumExtra","maxSumExtra"],e)&&co(i,["minMonths","maxMonths"],e)))||wu)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=to(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}},Su=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=Cu(s,n,l),h=Zs({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Vs,{className:e,title:t,...r,children:c("section",{className:u(Fs,e),children:[c("div",{className:Ls,children:[Qs({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Qs({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Ks({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),ku({...m,...l},d),m.isExtraMoney?Qs({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(js,"@4xl:w-1/2"),children:[o(Us,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Us,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Us,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Us,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),$e(a,{isVertical:!0}),Gs(i)]})]})})})),ku=(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})]}),Iu=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(Tu(e)),n,a)):Tu(e),format:He(r)}),d=l((e=>t&&t(Tu(e))),[t]);return o(vn,{onChange:d,...s,...c})})),Tu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ru=d((e=>o(Iu,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Bu={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Pu={amount:1500},Du=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=dn(Pu),[h,p]=a(!1);return i((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Bu[r],children:[o(Ru,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),l?.text?o(Yl,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.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(C,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Au="relative h-full",Eu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Mu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(Vu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return D({...a,renderProps:(n,a,i)=>c("div",{className:Ou(n,{someCardsHighlighted:l}),children:[R(n,a,{className:zu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Vu(n)?_u({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Ou=(e,{someCardsHighlighted:t})=>u(Au,t&&(Vu(e)?"pt-3xl":"pt-3xl sm:pt-16")),zu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Au,"min-w-80",Eu[a],t&&(Vu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Pd(n),n&&"h-full"),Vu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Fu=Vt((({className:e,visibleItemCount:t=0,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(tm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Lu(s?.block?.blocks):[],hasBlur:!0,children:Mu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Lu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],ju="z-10 border border-solid w-full h-full",$u=u(ju,"absolute hidden @xl:block border-transparent"),Uu=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($u,"top-9 right-12 bg-green-dark")}),o("div",{className:u($u,"top-6 right-8 bg-green")}),o("div",{className:u($u,"top-3 right-4 bg-green-light")}),c("div",{className:u(ju,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),qu={black:"bg-black",white:"bg-white"},Wu=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(k,{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:$e([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(Hu)]}):null,i?c(Ee,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),Hu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${qu[e]}`},String(t)),Yu=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})),Gu=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(k,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?Ku(a):null]})}))),Ku=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(Yu,{...e},String(t))))}),Xu=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Ju=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})})),Zu=[{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"}}],Qu=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=>Zu.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=je(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},eh(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:$e(m,{className:th(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),eh=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",th=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),nh=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:y=false,isImageSecondary:b=!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(Ju,{href:i,target:m,className:"h-full",data:Xu(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe(je(l)?o(ne,{image:l}):null,x),buttons:d.length?o(Qu,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:y,isImageSecondary:b,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(_e,{__html:s,isDotted:r,itemSize:"list-s"}):null,ah(a,p)]})})}))),ah=(e,t)=>e?o(C,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ih=new me,lh=(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:$e(i)}):null]},String(t))},rh=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(lh),[y,b]=d>0?[x.slice(0,d),x.slice(d)]:[x,[]],[v,N]=a(!1);i((()=>ih.subscribe("fold",(e=>{e&&h?.parent&&e.parent===h?.parent&&N(e.isUnfolded)}))),[h?.parent]);const C=l((()=>{ih.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:[je(r)?o("div",{className:"self-center",children:o(ne,{image:r})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,s?.text?o(Ne,{className:"w-full mt-m mb-lg",...s}):null,b.length?o(Pr,{renderFoldableSection:()=>c("div",{children:[y,o(Dr,{isUnfolded:v,children:b})]}),renderFoldButton:()=>m.length>=d?o(sh,{data:p,isUnfolded:v,onClick:C}):null}):o("div",{children:y})]})})),sh=d((({data:e,isUnfolded:t=!1,onClick:n})=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",type:"button",onClick:n,...t?fe(e):{},children:[o("div",{children:t?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:t?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}))),oh=()=>{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 Tr("/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)},ch=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]})]}))),dh=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(ch,{step:a,showPercentage:!1})]})})})),mh=e=>(t,n)=>t.filter((e=>e)).map((t=>[uh(n,e),hh(t,e),xh(t,e),ph(t,e),gh(t,e),fh(t,e)].some(Boolean)?{...t,required:!1}:t)),uh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,hh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,ph=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,gh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),fh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),xh=({name:e},t)=>"snils"===e&&yh(t),yh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key;var bh;!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"}(bh||(bh={}));const vh=e=>Ir("/user-data/getTaskStatus","POST",e),Nh=e=>Tr("/user-data/sendSignalToProcess","POST",e),wh=(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},Ch=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(k,{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(Lc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(_e,{__html:i}):null]})]})})),Sh=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Ch,{interval:d,intervalExpireAction:m}):null]}),o(kh,{title:a,items:i}),o(kh,{title:l,items:r,countColumns:!0}),n?.__html?o(Ho,{__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]}))),kh=({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:Ih(e)},t)))}):null]})]}):null},Ih=({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})]}),Th=d((()=>o(Sh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Rh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=hi();return o(Sh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Bh=d((()=>{const{statusInfo:e}=hi();return o(Sh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Ph=d((()=>{const{statusInfo:e}=hi();return o(Sh,{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:$t(e?.deliveryDate)}]):t},_h=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Ah=d((()=>{const[e,t]=a(bh.process),{taskId:n}=hi();i((()=>{(async()=>{for(const e of _h)await Nh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await vh({taskId:n});a&&a?.statusCd!==bh.process&&(e(),t(a.statusCd))}),[n]);wh(r,3e4);return Eh(e,(()=>t(bh.rework)))})),Eh=(e,t)=>({IN_PROCESS:o(Rh,{handleExpireTimer:t}),CANCELLED:o(Th,{}),FAILED:o(Th,{}),DRAFT:o(Th,{}),APPROVED:o(Ph,{}),PRE_DECISION:o(Ph,{}),REVISION:o(Bh,{})}[e]||o(Bh,{})),Mh={...Sc,...kc},Oh=({field:e,inputs:t,params:n})=>t.map(Ll(e,n,Mh)),zh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=mh(Vh(t))(e,n);return c("div",{className:u(jl(i),"grid gap-x-m"),children:[$l(l),Oh({field:t,inputs:s,params:a})]},`section-${r}`)})),Vh=e=>t=>e(t)?.value,Fh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Yl,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Lh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},jh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},$h=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:$t(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:id({organizationPhone:p&&Ut(p)}),participantAddresses:ld({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},Uh=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:y}=e;return{birthDate:$t(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:$t(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:$t(g,!0),houseTypeCd:f,participantContacts:id({phone:Ut(l),email:r}),participantAddresses:ld({addressRegistration:x,addressFact:y}),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:n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{}},Wh=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},Hh=(e,t)=>{switch(e){case 0:default:return{};case 1:return Uh(t);case 2:return $h(t);case 3:return rd(t);case 4:return Lh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:ld({addressCourier:t})}:{}})(t)}},Yh=[{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}],Gh=e=>{try{return e?new Date(e):void 0}catch(e){return}},Kh=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=hi(),d=r((()=>((e,t)=>({...Yh[e],...t,limitedBirthday:Gh(t?.limitedBirthday),dulIssueDateField:Gh(t?.dulIssueDateField),participantDateRegistration:Gh(t?.participantDateRegistration),beginDate:Gh(t?.beginDate),deliveryDate:Gh(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 _c((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...Wh(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Hh(i,a)}],...jh(a),...qh(a)}}))({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]},Xh=d((({step:e,sections:t,isFormFinished:n,onPrevStep:a,onNextStep:i,onFinish:s})=>{const d=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),m=l((t=>kl(mh((e=>t[e]))(d,e))(t)),[d]),[u,h,p]=Kh({step:e,onNextStep:i,onFinish:s}),[,{field:g,onSubmit:f}]=dn(u,{formValidator:m,onSubmit:h});return n?o(Ah,{}):c("form",{onSubmit:f,className:"space-y-m",children:[zh({sections:t,field:g,step:e}),o(Fh,{isSending:p,step:e,onPrevStep:a})]})})),Jh=[[{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"}]}]],Zh=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...Jh,[{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"]}}]}]],Qh=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],ep=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=l((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);i(oh,[]);const u=l((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=l((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=Zh[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(dh,{stepsTitles:Qh,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Xh,{step:n,sections:p,isFormFinished:f,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),tp=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(ch,{step:a,showPercentage:!1})]})})})),np=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Ch,{interval:d,intervalExpireAction:m}):null]}),o(ap,{title:a,items:i}),o(ap,{title:l,items:r,countColumns:!0}),n?.__html?o(Ho,{__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]}))),ap=({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:ip(e)},t)))}):null]})]}):null},ip=({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})]}),lp=d((()=>o(np,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),rp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=hi();return o(np,{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?"Аннуитетный":"Дифференцированный"}]})})),sp=d((()=>{const{statusInfo:e}=hi();return o(np,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),op=d((()=>{const{statusInfo:e}=hi();return o(np,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),cp=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],dp=d((()=>{const[e,t]=a(bh.process),{taskId:n}=hi();i((()=>{(async()=>{for(const e of cp)await Nh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await vh({taskId:n});a&&a?.statusCd!==bh.process&&(e(),t(a.statusCd))}),[n]);wh(r,3e4);return mp(e,(()=>t(bh.rework)))})),mp=(e,t)=>({IN_PROCESS:o(rp,{handleExpireTimer:t}),CANCELLED:o(lp,{}),FAILED:o(lp,{}),DRAFT:o(lp,{}),APPROVED:o(op,{}),PRE_DECISION:o(op,{}),REVISION:o(sp,{})}[e]||o(sp,{})),up=({field:e,inputs:t,params:n})=>t.map(Ll(e,n,{...Sc})),hp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=mh(pp(t))(e,n);return c("div",{className:u(jl(i),"grid gap-x-m"),children:[$l(l),up({field:t,inputs:s,params:a})]},`section-${r}`)})),pp=e=>t=>e(t)?.value,gp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Yl,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),fp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},xp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:fp[a?"annuity":"differential"]}},yp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},bp=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return Uh(t);case 2:return $h(t);case 3:return rd(t);case 4:return Lh(t);default:return{}}},vp=[{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}],Np=e=>{try{return e?new Date(e):void 0}catch(e){return}},wp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=hi(),d=r((()=>((e,t)=>({...vp[e],...t,limitedBirthday:Np(t?.limitedBirthday),dulIssueDateField:Np(t?.dulIssueDateField),participantDateRegistration:Np(t?.participantDateRegistration),beginDate:Np(t?.beginDate),deliveryDate:Np(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 _c((({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:"Заемщик"},...bp(i,a)}],...xp(a),...yp(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]},Cp=d((({step:e,sections:t,isFormFinished:n,programsSource:a,onPrevStep:i,onNextStep:s,onFinish:d})=>{const{programId:m}=hi(),u=a?.[m??""],h=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),p=l((t=>kl(mh((e=>t[e]))(h,e))(t)),[h]),[g,f,x]=wp({step:e,onNextStep:s,onFinish:d}),[,{field:y,onSubmit:b}]=dn(g,{formValidator:p,onSubmit:f});return n?o(dp,{}):c("form",{onSubmit:b,className:"space-y-m",children:[hp({sections:t,field:y,step:e,params:{calcData:u}}),o(gp,{step:e,isSending:x,onPrevStep:i})]})})),Sp=[[{columns:1,inputs:[{name:"calculator"}]}],...Jh,[{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"}]}]],kp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Ip=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(oh,[]);const h=l((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Sp[r],x=0===r,[y,{setTrue:b}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||y?null:o(tp,{stepsTitles:kp,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Cp,{step:r,sections:f,isFormFinished:y,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:b},String(r))})]})})})),Tp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Rp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Bp=1e9,Pp={sum:{min:1e4,max:Bp},period:3},Dp=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=wm(Pp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:_p(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Ap(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(pm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Ru,{label:a?.title,min:500,max:Bp,...d("sum",{parse:e=>({min:Number(e),max:Bp}),format:({min:e})=>String(e)})}),o(ca,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(dm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),_p=e=>_t((e?.paramsSource?.rateRows||[]).filter(Tp).flatMap((e=>Rp(e.minMonths,e.maxMonths)))),Ap=e=>_t(e.flatMap((e=>e||[])).filter(Tp).flatMap((e=>Rp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Ep=[{key:"10"},{key:"50"},{key:"100"}],Mp=({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:Ep,iconVersion:"black"})]})},Op="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",zp=(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:Op,"aria-label":`Страница ${l}`,children:l},String(t)):null},Vp={width:"24",height:"24"},Fp=({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:Lp(1===e),...Vp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Op,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(zp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Op,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Lp(e===n),...Vp})})]})},Lp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",jp=({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(Fp,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Mp,{itemCount:a,onItemCountChange:i}):null]}),$p=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})]})})),Up=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o($p,{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(Yl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),qp=(e,t)=>o(Bm,{...e,iconBgVersion:t,className:"shrink-0"}),Wp=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:[qp({icon:"DocDownloadIcon",iconVersion:"black"}),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:$t(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Hp=`${qt}/depository`,Yp={startDate:void 0,endDate:void 0,query:""},Gp=Vt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(Yp),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?$t(a,!0):"",r=i?$t(i,!0):"",s=new URLSearchParams(Hp);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(Hp+o,Dt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),y=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Up,{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(Wp,{...e},String(e.publicId)))):o(Bd,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(jp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),Kp=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,Xp=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:Kp(a)}),o(k,{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]}))),Jp=`${qt}/region`;function Zp(e="Москва"){return ui().location??{name:e}}function Qp(e="Москва"){const t=ui(),n=l((async()=>{if(!t.location){const n=await Pt(Jp);t.location=n??{name:e}}}),[t,e]);return Kn(Jp,n),t}var eg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(eg||(eg={}));const tg=new Intl.NumberFormat("ru",{style:"currency",currency:eg.RUB}),ng=e=>e?tg.format(e):"",ag="text-m font-light text-secondary-text ",ig=`${ag} text-left`,lg=`${ag} pl-5xl text-center`,rg=`${ag} pl-5xl text-right`,sg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},og=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:ig,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:lg,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:rg,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(cg)})]}))),cg=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:sg[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:ng(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:ng(e?.buyExchangeRate)})})]},t)},dg={icon:"GpsIcon"},mg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Bm,{...dg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(C,{size:"text-l",color:"text-primary-main",children:t}):null,o(C,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),ug=(e,t,n)=>{const a=Number(hg(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)},hg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function pg(e){if(!e)throw new Error("Value should be fulfilled");return e}const gg=e=>t=>{const[,n]=pg(e.find((([e])=>e(t))));return n(t)},fg=e=>gg(e.map((([e,t])=>[e,()=>t])));fg.if=e=>new xg(void 0,e);class xg{parent;predicate;unit;get entry(){return[pg(this.predicate),pg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new xg(this,e)}then(e){return new xg(this.parent,this.predicate,e)}else(e){return gg([...yg(this),[()=>!0,e]])}}const yg=e=>[...e?.parent?yg(e.parent):[],e.entry],bg=e=>fg([[e=>e.value!==eg.RUB&&e.oppositeValue!==eg.RUB,()=>e.handleConvert(e.value,eg.RUB)],[e=>e.value===eg.RUB&&e.oppositeValue===eg.RUB,()=>e.handleConvert(e.value,eg.USD)],[e=>e.value===eg.RUB&&e.oppositeValue===eg.RUB,()=>e.handleConvert(e.value,eg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function vg(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 Ng=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||eg.RUB,selectBuy:n?.[0]?.currency?.currency||eg.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:[vg({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:wg(r,d,n),value:r.inputSell,setValue:e=>Sg(d,n)(e,r.selectSell,r.selectBuy)}),vg({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Cg(r,d,t),value:r.inputBuy,setValue:e=>kg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),wg=(e,t,n)=>a=>{t({selectSell:a}),bg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Sg(t,n)(e.inputSell,a,i)}})},Cg=(e,t,n)=>a=>{t({selectBuy:a}),bg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>kg(t,n)(e.inputBuy,a,i)})},Sg=(e,t)=>(n,a,i)=>{e({inputSell:hg(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(ug(n,l,a===eg.RUB)||"")})},kg=(e,t)=>(n,a,i)=>{e({inputBuy:hg(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(ug(n,l,a===eg.RUB)||"")})},Ig=`${qt}/exchangerates`;const Tg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=Kn(Ig+`?regionCode=${t}`,Dt);return n||{}}(Zp()),l=Rg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:eg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:eg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(w,{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(og,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(mg,{address:i?.address})]}),o(Ng,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Rg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Bg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Pg(n))})})),Pg=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},Dg=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:i})=>o(im,{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:[qp(i,t),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}))),_g=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Ag=(e=!1)=>e?"MinusIcon":"PlusIcon",Eg=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Mg=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();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:c,...d,children:o(Pr,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Dr,{className:u("gap-lg",_g(m)),isUnfolded:e,children:D({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Og({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Og=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:i,onToggle:l,isMobile:r=!1})=>{const s=t||(i?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Eg(e):Ag(e))(i,r);return"accordion"===e?o(Dg,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:l}):o(lm,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},zg=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Vg(e)}))),Vg=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Mg,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Bg,{items:e.items}):null},String(t)))),Fg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Lg)}):null)),Lg=(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(jg)})]},String(t)),jg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:$g(e.type,e.text)}),o(C,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),$g=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Ug(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Ug=e=>e.replaceAll(/\D/g,""),qg=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}`})})),Wg=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(qg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Hg=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}`})})),Yg=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(Hg,{index:t,...e},String(t))))}):null]}))),Gg=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{};n.options;const{documents:i,relatedEnterprises:l,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(zg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Fg,{items:r}),m?o(Ne,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Qu,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Wg,{title:d,links:l}),o(Yg,{links:i,license:h})]})})),Kg=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(w,{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:Xu(l,s?.key),children:f})}):null]})})})),Xg={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"},Jg=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",Xg["transparent"===e?"transparent":"default"]),...a,children:i}):null})),Zg=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:a,version:i,backwardButton:r})=>{const s=_(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=l((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Vc,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):Qg(p,r),o(Jg,{version:i,...a})]})})),Qg=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,ef={"bg-white":"primary",transparent:"transparent"},tf=Vt((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=ef[e],portal:a,logo:i={},...l})=>{const{backwardButton:r,logo:s={}}=l.options?.page?.common??{},{internetBankButton:c}=a||{},d=i.image?.icon||i.image?.src?i:s;return o(g,{tag:"header",defaultPadding:"",version:n,...l,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Zg,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...l})})})})),nf=(e=!1)=>e?{}:{padding:"p-0"},af={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},lf=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",af[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:D({...c,extraProps:{className:u("w-full",Pd(r)),...nf(a)}})})}),{childrenTypes:[]}),rf=Vt((e=>o(lf,{...e})),{childrenTypes:[]}),sf=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Em[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),of=["байт","Кб","Мб","Гб","Тб","Пб"],cf=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," ",df(d,m),o(Ee,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),df=(e,t)=>e||t?o("span",{children:", "}):"",mf=(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))} ${of[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?hf(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(cf,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:uf(t),data:n?.data}),o(_e,{__html:n?.__html})]},String(a))},uf=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,hf=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},pf=d((({href:e,__html:t,target:n,onClose:a})=>{const i=_(),l=U(i)(e);return c(Kl,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(_e,{__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(Yl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),gf=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=un(pf),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:[uf(i),o(Ee,{font:"font-light",children:e})]}):null})),ff={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},xf=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(k,{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",ff[r]),role:"list",children:i.map(yf(d,l))}):null]})})),yf=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?bf(t)(n,a):mf(e,t)(n,a)},bf=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(gf,{...a,icon:e,href:vf(t)?t?.href:t?.attachment?.src}),o(_e,{__html:t?.__html})]},String(n)):null},vf=e=>"href"in e,Nf=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",y=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(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:$e(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(_e,{__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]})]})})})),wf=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Cf=(e=[],t={})=>e.filter((({content:e={}})=>vm(t,e))).length,Sf=(e,t)=>e===t;const kf=(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)))}(Sf,((e=Sf)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),If=[],Tf={},Rf={primary:"bg-white/30",secondary:"bg-main-divider"},Bf={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Pf=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Rf[t],i=Bf[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})})})),Df=({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})]})]})},_f={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Af={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Ef={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Mf={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Of=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",_f[a],n?Mf[a]:Ef[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?Af[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Df({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(Pf,{count:m,version:wf(n,a)})}):null]})})})),zf=d((e=>o(e?.item?.href?Vf:Ff,{...e}))),Vf=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(Of,{...e,tag:"a",item:i,onClick:a})})),Ff=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(Of,{item:e,onClick:a,...n})})),Lf=(e,t,n)=>(a,i)=>o(zf,{isActive:a===e,onClick:t,type:n,item:a},String(i)),jf=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(Lf(a,i,t))}))),$f={categories:[],extraOptions:[],propertyType:[],stage:[]},Uf=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=wm($f,{block:i.block,page:i.options?.page}),f=l(((e=$f)=>p(e)),[]),x=(({hotFilters:e=If,filtrationState:t=Tf,blocks:n=If,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>kf(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Cf(n,t.filter),version:wf(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(jf,{...x}),o(pm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(dm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),qf=(e,t,n)=>{const a=wf("all"===t),i=wf("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(Yl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Yl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},Wf=({__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(_e,{__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,Hf="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Yf=({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,[]];return o("div",{children:e?.length?o("div",{children:o(Pr,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Hf,children:s}),o(Dr,{className:Hf,isUnfolded:e,children:d})]}),renderFoldButton:Gf(n,a)})}):null})},Gf=(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:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Kf()})]}),Kf=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Xf=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{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]})}),Jf=()=>{},Zf=e=>"all"===e?"block":"hidden",Qf=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Jf,renderRemoteWorkplaceCard:r=Jf,getBalloon:s=Jf,getBalloonRemoteWorkplaces:d=Jf,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(ss),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=us({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),S={filters:ex([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:os};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Xf(h,N),m?Wf(m):null,p&&qf(t,w,C),o("div",{className:u("pb-3xl",Zf(w)),children:Yf(S)})]}),o("div",{className:"h-[600px]",children:o(fs,{children:o(wr,{points:b,isLoad:n,className:"h-full"})})})]}),c(fs,{children:[y.map(l),v.map(r)]})]})})),ex=e=>Object.keys(ss).filter((t=>e.filter((e=>cs[t](e))).length)),tx=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ix(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:ix(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(Yr,{color:"green",children:ix(s)})})]}),o("div",{className:"hidden sm:block",children:o(Or,{className:"flex-wrap",children:m?.map(ax)})}),o(Pr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Dr,{isUnfolded:e,children:o(Or,{className:"flex-wrap",children:m?.map(ax)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>es({isUnfolded:e,onToggle:t})})]},String(d))},nx=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${ix(t)} №${n}`,body:e.toUpperCase()}),ax=(e,t)=>o(_r,{...e},String(t)),ix=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",lx=[];const rx=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:lx},sx={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},ox={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)},cx=d((({descriptionData:e,className:t})=>{const n=Zp(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=Kn(`${qt}/atms?regionCode=${e}`,rx);return{data:t||lx,isLoad:!t&&!n}}(a);return o(Qf,{className:t,filterItems:dx,data:i,isLoad:l,initFilterState:sx,renderCard:tx,getBalloon:nx,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),dx=(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=>ox[t](e))),n=!a.length||a.some((t=>ox[t](e)));return t&&n}))},mx=({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:ux({workScheduleDescription:t})}),o(Pr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Dr,{isUnfolded:e,children:ux({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>es({isUnfolded:e,onToggle:t})})]},String(n)):null,ux=({workScheduleDescription:e})=>c("div",{children:[c(Or,{className:"flex",children:[o(_r,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(_r,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(_r,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(_r,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(_r,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),hx=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),px={branches:[],remoteWorkplaces:[]};const gx=async e=>await Pt(e,{method:"GET"})||px,fx=d((({className:e})=>{const t=Zp(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=Kn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,gx);return{data:t||px,isLoad:!t&&!n}}(n);return o(Qf,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:is,renderRemoteWorkplaceCard:mx,getBalloon:rs,getBalloonRemoteWorkplaces:hx,title:`Офисы филиала ${t?.name}`})})),xx=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(fx,{}):o(cx,{descriptionData:e})})})),yx=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(k,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),bx=d((({className:e,padding:t,slides:n=[],...a})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...a,children:o(tm,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Ze,{className:"px-5 h-full",headlineVersion:"L",...e,...a})},String(t))))})}))),vx=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:[je(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?Nx({__html:l,richVersion:r}):null,wx({label:"Адрес",data:e,iconName:"GeolocationIcon"}),wx({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),wx({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?$e([a]):null]})]}))),Nx=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(_e,{...e,itemSize:"list-s"})}),wx=({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,Cx=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_e,{__html:t,richVersion:n})})})),Sx=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]})}))),kx=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(Sx,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(Sx,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),Ix=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})})),Tx=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(Ix,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Ix,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Rx=["От 1 дня","До 365 дней"],Bx=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:Rx,onChange:t})]}))),Px=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(Ix,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Ix,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Dx=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(Tx,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:_x(m)}),o(Bx,{days:i,setDays:e=>m({days:e})}),o(Px,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:Ax(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(kx,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),_x=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ax=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ex=d((({days:e,tariffs:t=[]})=>{const n=Ox(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:[Mx("Аренда за",e),Mx("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(C,{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(C,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),Mx=(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})]}),Ox=(e,t)=>{const n=zx(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},zx=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},Vx=(e,t)=>e.find((e=>e.branchCode===t)),Fx=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=Vx(a,n.selectedBranch),d=Lx(s?.safeBoxCaseVolumes),m=jx(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=$x(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Dx,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(Ex,{days:n.days,tariffs:u})]})})),Lx=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],jx=(e,t)=>e?.find((e=>e.volume===t)),$x=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ux=`${qt}/safeboxes`,qx=[];const Wx=async e=>await Pt(e,{method:"GET"})||qx,Hx=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=Ji(),p=Yx(m.selectedRegion,h),f=function(e){const{data:t}=Kn(e?`${Ux}?regionCode=${e}`:null,Wx);return t||qx}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=Vx(f,m.selectedBranch)||f,Array.isArray(b)?b.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):b?.gpsLatitude&&b?.gpsLongitude?[{coords:[b.gpsLatitude,b.gpsLongitude]}]:[]);var b;return c(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Fx,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(C,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(wr,{points:y,className:"h-[640px]"}):null]})})),Yx=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Gx={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"},Kx=(e,t,n)=>(a,i)=>{const{button:l}=a;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Xx(e,n)(a,i)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Jx(a),l?.text?o(Ne,{className:"box-border py-s w-full mt-lg",version:t,...l,children:l?.text}):null]})]})},String(i))},Xx=(e,t)=>(n,a)=>{const i="secondary"===t?"white":"color",l=Boolean(n?.icon?.src),r=Zx(e,l),s=l?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Qx({step:n,iconVersion:i,i:a,stepVersion:t})})})},Jx=e=>c("div",{children:[e?.label?o(C,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",Gx.description),children:e.description}):null,o(_e,{__html:e.__html})]}),Zx=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Qx=({step:e,iconVersion:t,i:n,stepVersion:a})=>{return je(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===a?Gx.iconText:(i=a,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var i},ey=d((({className:e="",title:t,description:n,steps:a=[],buttons:i,stepVersion:l="gray",version:r="primary",...s})=>{const d=a.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),a?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:a.map(Kx(d,r,l))}):null,$e(i,{isVertical:!0})]})})),ty=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),ny=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>c("div",{onClick:i,className:u("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Gl,{className:"absolute top-1.5 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function ay(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 iy=()=>{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 ay(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},ly=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 ry=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(sy,{...e},String(t))))})]}):null,sy=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]})})),oy=(e,t)=>n=>n.name?o(Ju,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Xu(e,n.name),children:o(Ee,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,cy=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"})]}))),dy=d((({defaultLocation:e})=>{const t=Zp(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(C,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Ju,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),my=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=Qp(t?.default),[s,d]=a(""),m=Ji(),u=r((()=>hy(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,uy)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Kl,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(dy,{defaultLocation:t?.default}),o(cy,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&ly(e.toLowerCase())(s.toLowerCase())>=.8)).map(oy(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(oy(f,g))]},e)))}),ry(e)]});var g,f})),uy=e=>e.name?.charAt(0)??"",hy=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),py=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:a})=>{const l=un(my,n),{name:r}=Zp(),s=e?.current?.getBoundingClientRect(),c=X(K.SITE_URL);return i((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),i((()=>{const e=e=>{if("location"===e.data.type&&l.open({}),"reload"===e.data.type&&a?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[a]),o(ny,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:a,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),gy="burgerMenuDialog",fy=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:a=fn})=>{const{open:i}=un(py),[r]=iy(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(gy,r),o=l((()=>i({menuRef:e,locationDialogProps:n,menuItem:t,onClose:a},{id:gy})),[e,n,t,a]);return[s,{toggle:s?a:o}]},xy=[],yy=Vt((({sticky:e,...t})=>{const{menuItems:n=xy}=e??{},i=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=a(-1),[f,x]=a(""),{closeAll:y}=he(),b=l((()=>{p(-1),x(""),y()}),[y]),v=pn(b),N=s(null),[C,{toggle:S}]=fy({menuRef:N,centralMenuItem:i,locationDialogProps:t.header,onClose:b}),k=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:a,onClose:i})=>{const{open:r,close:s}=he(),c=l((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return l(((l,d)=>{const m="left"===d?n:a,u=e?.current?.getBoundingClientRect();r({id:"left"===d?n[l].title:a[l].title,dialog:o(ny,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[l].description||m[l].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),i?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[l]?.src,width:u?.width??0,onLoad:c})})})})}),[c,n,a,i])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:u,onClose:b}),I=l((e=>{e.stopPropagation(),b(),S()}),[b,S]),T=l(((e,t)=>{x(t),p(e),y(),k(e,t)}),[y,k]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(by(T,"left",{activeIndex:h,currentItemPosition:f})),o(ty,{item:i,isActive:C,onClick:e=>I(e)}),u.map(by(T,"right",{activeIndex:h,currentItemPosition:f}))]})})})),by=(e,t,n)=>(a,i,l)=>o(ty,{item:a,isActive:l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t,onClick:r=>{l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t||r.stopPropagation(),e(i,t)}},a.title||String(i)),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:l="default"})=>{const[r,s]=qd({itemCount:t?.length||0});return i((()=>Cy(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Od,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ny[l].item,gap:Ny[l].gap,children:t.map(Lf(n,a,l))}),s.canScrollLeft?o(Kd,{className:u("left-6",vy,Ny[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Xd,{className:u("right-6",vy,Ny[l].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:y}=p,[b,v]=a(Py(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[b],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)}),[y,w,h]);const C=By(x[b],b),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:[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])=>P(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),Dy={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:Dy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ay=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}))),Ey={Buttons:({buttons:e})=>$e(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(_e,{__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(Ay,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},My=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 Oy({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Oy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Ey))return null;return o(Ey[n],{...t,...a})},zy=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(My,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Vy=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(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(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Ly=d((({rows:e})=>{return o(Od,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[a,...i]=e,l=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[a?.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:a.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Vy(i,t)}px)`},children:i?.map(((e,n)=>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?Fy(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),jy=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(Ly,{rows:t.rowsData})})})]},a)}))}))),$y=(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(Ee,{size:"text-xl",font:"font-light",color:$y(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"link",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(Uy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(jy,{activeTabIndex:r,items:m}),o(Ay,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Ay,{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: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(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(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(zy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Yy({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(Gd,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(Gd,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Gy=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,Yy({...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]})})),Ky=d((({className:e="",title:t,description:n,rowHeaders:i,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=i?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((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}]})({itemCount:p,visibleItemCount:2}),y=(h||[]).map(((e,t)=>o(Hy,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[b,v]=s>0?[y.slice(0,-s),y.slice(-s)]:[y,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(Pr,{renderFoldableSection:({isUnfolded:e})=>c(Gy,{controls:x,children:[b,o(Dr,{isUnfolded:e,children:v})]}),renderFoldButton:rm}):o(Gy,{controls:x,children:y})})]})})),Xy=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?Jy():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?Zy(n):null,i?o(_e,{richVersion:l,__html:i}):null]})]}))),Jy=()=>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"}),Zy=e=>o(C,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Qy=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]}))),eb=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(Qy,{prefix:t,unit:n,suffix:a})})})),tb={AdTile:Lt,ApplicationForm:lr,ApplicationLeadForm:Rd,BankAccountFiltration:km,BenefitsBlock:Pm,BonusBenefitsBlock:Am,ButtonsBlock:Mm,CalculatorBonus:$m,CalculatorBusinessDeposit:Zm,CalculatorCredit:xo,CalculatorDeposit:fu,CalculatorRefinancing:Su,CardTransfer:Du,Carousel:Fu,CarouselCard:Uu,CarouselCatalogCard:Wu,CarouselLinks:Gu,CarouselRecommendationCard:nh,CarouselTariffsCard:rh,CreditCardForm:ep,CreditForm:Ip,DepositFiltration:Dp,Depository:Gp,ErrorBlock:Xp,ExchangeRateTile:Tg,Footer:Gg,GrantSupport:Kg,Header:tf,Headline:k,HorizontalLayout:rf,ImgBlock:sf,LinkDocs:xf,MobileAppTile:Nf,MortgageFiltration:Uf,OfficesAtmsMap:xx,Placeholder:yx,ProductBlock:Ft,ProductGallery:bx,RepresentativeOfficeInfo:vx,RichTextBlock:Cx,RollupItem:Mg,SafeDepositRental:Hx,StepsBlock:ey,StickyBottomMenu:yy,TabsLayout:Iy,TariffsTable:Ky,TextBlock:Xy,UnitBlock:eb,VerticalLayout:lf},nb=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))}));const ab="cookie",ib=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();!function(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(ab)||n()}),[],3e3);const r=l((()=>{globalThis.localStorage?.setItem(ab,"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(_e,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Gl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function lb(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}const rb=d((()=>{const[e,{close:t}]=iy(),n=Boolean(e.length);return lb(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})),sb=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return ay(ue.observable,"popup",{open:t,close:n}),lb(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})),ob="header",cb="footer",db="sticky-footer",mb={},ub=d((({className:e,data:t=mb,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);nb(),Qp();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?.[ob]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(i?.[ob],{...m,slotName:ob})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(i?.[cb],{...m,slotName:cb})]})]}),i?.[db]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(i?.[db],{...m,slotName:db})}):null,o(rb,{}),o(sb,{}),o(ib,{__html:d?.cookieContent?.__html})]})}));Object.assign(ub,{childrenTypes:[],slots:()=>[ob,cb,db]});e.Blocks=tb,e.ContentPage=ub,e.handlerDecorator=ce,e.joinList=um,e.locationNavigator=Jt,e.packageVersion="0.14.737",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})}));