@redneckz/wildless-cms-uni-blocks 0.14.725 → 0.14.727

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 (851) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +1802 -1817
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  5. package/bundle/components/ApplicationLeadForm/GroupedConsents.d.ts +8 -1
  6. package/bundle/components/ApplicationLeadForm/consents.d.ts +2 -2
  7. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  8. package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
  9. package/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +1 -1
  10. package/bundle/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.d.ts +1 -1
  11. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
  12. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -1
  13. package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
  14. package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
  15. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  16. package/bundle/components/CreditCardForm/formStateMap.d.ts +1 -1
  17. package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  18. package/bundle/components/CreditCardForm/getDeliveryCreditCardData.d.ts +1 -1
  19. package/bundle/components/CreditCardForm/getInitialFormState.d.ts +1 -1
  20. package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
  21. package/bundle/components/CreditCardForm/renderStep.d.ts +1 -1
  22. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
  23. package/bundle/components/CreditForm/formStateMap.d.ts +1 -1
  24. package/bundle/components/CreditForm/getCalcData.d.ts +1 -1
  25. package/bundle/components/CreditForm/getInitialFormState.d.ts +1 -1
  26. package/bundle/components/CreditForm/renderInfo.d.ts +1 -1
  27. package/bundle/components/CreditForm/renderInputs.d.ts +2 -2
  28. package/bundle/components/CreditForm/renderStep.d.ts +1 -1
  29. package/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  30. package/bundle/components/CreditForm/utils.d.ts +1 -1
  31. package/bundle/hooks/useLeadFormData.d.ts +2 -2
  32. package/bundle/hooks/useRetailFormStore.d.ts +10 -10
  33. package/bundle/services/retail/adaptors/getAdditionalInfoData.d.ts +1 -1
  34. package/bundle/services/retail/adaptors/getCalculatorData.d.ts +1 -1
  35. package/bundle/services/retail/adaptors/getCardOptionsData.d.ts +1 -1
  36. package/bundle/services/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  37. package/bundle/services/retail/adaptors/getDeliveryCreditData.d.ts +1 -1
  38. package/bundle/services/retail/adaptors/getEmploymentData.d.ts +1 -1
  39. package/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  40. package/bundle/services/retail/adaptors/getPersonalInfoData.d.ts +1 -1
  41. package/bundle/services/retail/external/types.d.ts +10 -0
  42. package/bundle/services/retail/external/utils.d.ts +2 -0
  43. package/bundle/services/retail/inputs.d.ts +75 -0
  44. package/{dist/api/RetailAPI → bundle/services/retail}/model/LeadFormData.d.ts +1 -1
  45. package/bundle/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.d.ts +18 -18
  46. package/bundle/services/retail/model/RetailFormContent.d.ts +63 -0
  47. package/bundle/{components/CreditCardForm → services/retail/utils}/calculateInputs.d.ts +2 -2
  48. package/bundle/services/retail/utils/getOrganizationParams.d.ts +17 -0
  49. package/bundle/services/retail/utils/getUpdateUserProfile.d.ts +3 -0
  50. package/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +1 -1
  51. package/bundle/ui-kit/DraftDialog/utils.d.ts +2 -2
  52. package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  53. package/bundle/ui-kit/FormField/Fields/consentToReceiveMaterialsField.d.ts +2 -0
  54. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +6 -1
  55. package/bundle/ui-kit/FormField/SelectField.d.ts +2 -2
  56. package/bundle/ui-kit/FormField/getField.d.ts +2 -1
  57. package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  58. package/bundle/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  59. package/bundle/ui-kit/FormField/getPremium.d.ts +1 -1
  60. package/bundle/ui-kit/FormField/validators.d.ts +1 -1
  61. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  62. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  63. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  64. package/dist/components/ApplicationLeadForm/GroupedConsents.d.ts +8 -1
  65. package/dist/components/ApplicationLeadForm/GroupedConsents.js +2 -1
  66. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  67. package/dist/components/ApplicationLeadForm/consents.d.ts +2 -2
  68. package/dist/components/ApplicationLeadForm/consents.js +0 -3
  69. package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  70. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  71. package/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -2
  72. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  73. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
  74. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  75. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +1 -1
  76. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  77. package/dist/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.d.ts +1 -1
  78. package/{mobile/dist/components/ApplicationForm → dist/components/ApplicationLeadForm}/renderInputs.js +4 -3
  79. package/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -0
  80. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
  81. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  82. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  83. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -1
  84. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  85. package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
  86. package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
  87. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  88. package/dist/components/CreditCardForm/formStateMap.d.ts +1 -1
  89. package/dist/components/CreditCardForm/formStateMap.js +1 -1
  90. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  91. package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  92. package/dist/components/CreditCardForm/getDeliveryCreditCardData.d.ts +1 -1
  93. package/dist/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  94. package/dist/components/CreditCardForm/getInitialFormState.d.ts +1 -1
  95. package/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
  96. package/dist/components/CreditCardForm/renderInputs.js +2 -1
  97. package/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  98. package/dist/components/CreditCardForm/renderStep.d.ts +1 -1
  99. package/dist/components/CreditCardForm/renderStep.js +1 -1
  100. package/dist/components/CreditCardForm/renderStep.js.map +1 -1
  101. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
  102. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
  103. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  104. package/dist/components/CreditForm/formStateMap.d.ts +1 -1
  105. package/dist/components/CreditForm/getCalcData.d.ts +1 -1
  106. package/dist/components/CreditForm/getInitialFormState.d.ts +1 -1
  107. package/dist/components/CreditForm/renderInfo.d.ts +1 -1
  108. package/dist/components/CreditForm/renderInfo.js.map +1 -1
  109. package/dist/components/CreditForm/renderInputs.d.ts +2 -2
  110. package/dist/components/CreditForm/renderInputs.js +2 -1
  111. package/dist/components/CreditForm/renderInputs.js.map +1 -1
  112. package/dist/components/CreditForm/renderStep.d.ts +1 -1
  113. package/dist/components/CreditForm/renderStep.js +1 -1
  114. package/dist/components/CreditForm/renderStep.js.map +1 -1
  115. package/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  116. package/dist/components/CreditForm/useCreditFormAPI.js +1 -1
  117. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  118. package/dist/components/CreditForm/utils.d.ts +1 -1
  119. package/dist/hooks/useCreditFormStore.d.ts +0 -0
  120. package/dist/hooks/useCreditFormStore.js +1 -0
  121. package/dist/hooks/useCreditFormStore.js.map +1 -0
  122. package/dist/hooks/useLeadFormData.d.ts +2 -2
  123. package/dist/hooks/useLeadFormData.js.map +1 -1
  124. package/dist/hooks/useRetailFormStore.d.ts +10 -10
  125. package/dist/services/retail/adaptors/getAdditionalInfoData.d.ts +1 -1
  126. package/dist/services/retail/adaptors/getCalculatorData.d.ts +1 -1
  127. package/dist/services/retail/adaptors/getCardOptionsData.d.ts +1 -1
  128. package/dist/services/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  129. package/dist/services/retail/adaptors/getDeliveryCreditData.d.ts +1 -1
  130. package/dist/services/retail/adaptors/getEmploymentData.d.ts +1 -1
  131. package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  132. package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  133. package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  134. package/dist/services/retail/adaptors/getPersonalInfoData.d.ts +1 -1
  135. package/dist/services/retail/external/types.d.ts +10 -0
  136. package/dist/services/retail/external/types.js +2 -0
  137. package/dist/services/retail/external/types.js.map +1 -0
  138. package/dist/services/retail/external/utils.d.ts +2 -0
  139. package/dist/services/retail/external/utils.js +7 -0
  140. package/dist/services/retail/external/utils.js.map +1 -0
  141. package/dist/services/retail/inputs.d.ts +75 -0
  142. package/dist/services/retail/inputs.js +137 -0
  143. package/dist/services/retail/inputs.js.map +1 -0
  144. package/dist/services/retail/model/EOrganizationActivityTypes.js.map +1 -0
  145. package/{bundle/api/RetailAPI → dist/services/retail}/model/LeadFormData.d.ts +1 -1
  146. package/dist/services/retail/model/LeadFormData.js.map +1 -0
  147. package/{lib/components/ApplicationLeadForm → dist/services/retail/model}/LeadFormState.d.ts +18 -18
  148. package/dist/services/retail/model/LeadFormState.js.map +1 -0
  149. package/dist/services/retail/model/RetailFormContent.d.ts +63 -0
  150. package/dist/services/retail/model/RetailFormContent.js +4 -0
  151. package/dist/services/retail/model/RetailFormContent.js.map +1 -0
  152. package/{bundle/components/CreditForm → dist/services/retail/utils}/calculateInputs.d.ts +2 -2
  153. package/dist/services/retail/utils/calculateInputs.js.map +1 -0
  154. package/dist/services/retail/utils/getOrganizationParams.d.ts +17 -0
  155. package/dist/services/retail/utils/getOrganizationParams.js.map +1 -0
  156. package/dist/services/retail/utils/getUpdateUserProfile.d.ts +3 -0
  157. package/dist/{api/RetailAPI → services/retail}/utils/getUpdateUserProfile.js +3 -4
  158. package/dist/services/retail/utils/getUpdateUserProfile.js.map +1 -0
  159. package/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +1 -1
  160. package/dist/ui-kit/DraftDialog/utils.d.ts +2 -2
  161. package/dist/ui-kit/DraftDialog/utils.js.map +1 -1
  162. package/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  163. package/dist/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  164. package/dist/ui-kit/FormField/Fields/AddressFactField.js +1 -1
  165. package/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  166. package/dist/ui-kit/FormField/Fields/AddressField.js +1 -1
  167. package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  168. package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
  169. package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  170. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.d.ts +2 -0
  171. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +10 -0
  172. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -0
  173. package/dist/ui-kit/FormField/NameFieldDef.d.ts +6 -1
  174. package/dist/ui-kit/FormField/SelectField.d.ts +2 -2
  175. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  176. package/dist/ui-kit/FormField/getField.d.ts +2 -1
  177. package/dist/ui-kit/FormField/getField.js +4 -131
  178. package/dist/ui-kit/FormField/getField.js.map +1 -1
  179. package/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  180. package/dist/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  181. package/dist/ui-kit/FormField/getObjectValidator.js +70 -60
  182. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  183. package/dist/ui-kit/FormField/getPremium.d.ts +1 -1
  184. package/dist/ui-kit/FormField/updateOrganizationFields.js +1 -1
  185. package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
  186. package/dist/ui-kit/FormField/validators.d.ts +1 -1
  187. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  188. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  189. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  190. package/lib/components/ApplicationLeadForm/GroupedConsents.d.ts +8 -1
  191. package/lib/components/ApplicationLeadForm/GroupedConsents.js +2 -1
  192. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  193. package/lib/components/ApplicationLeadForm/consents.d.ts +2 -2
  194. package/lib/components/ApplicationLeadForm/consents.js +0 -3
  195. package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  196. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  197. package/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -2
  198. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  199. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
  200. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  201. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +1 -1
  202. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  203. package/lib/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.d.ts +1 -1
  204. package/lib/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.js +4 -3
  205. package/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -0
  206. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
  207. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  208. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  209. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -1
  210. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  211. package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
  212. package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
  213. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  214. package/lib/components/CreditCardForm/formStateMap.d.ts +1 -1
  215. package/lib/components/CreditCardForm/formStateMap.js +1 -1
  216. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  217. package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  218. package/lib/components/CreditCardForm/getDeliveryCreditCardData.d.ts +1 -1
  219. package/lib/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  220. package/lib/components/CreditCardForm/getInitialFormState.d.ts +1 -1
  221. package/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
  222. package/lib/components/CreditCardForm/renderInputs.js +2 -1
  223. package/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  224. package/lib/components/CreditCardForm/renderStep.d.ts +1 -1
  225. package/lib/components/CreditCardForm/renderStep.js +1 -1
  226. package/lib/components/CreditCardForm/renderStep.js.map +1 -1
  227. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
  228. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
  229. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  230. package/lib/components/CreditForm/formStateMap.d.ts +1 -1
  231. package/lib/components/CreditForm/getCalcData.d.ts +1 -1
  232. package/lib/components/CreditForm/getInitialFormState.d.ts +1 -1
  233. package/lib/components/CreditForm/renderInfo.d.ts +1 -1
  234. package/lib/components/CreditForm/renderInfo.js.map +1 -1
  235. package/lib/components/CreditForm/renderInputs.d.ts +2 -2
  236. package/lib/components/CreditForm/renderInputs.js +2 -1
  237. package/lib/components/CreditForm/renderInputs.js.map +1 -1
  238. package/lib/components/CreditForm/renderStep.d.ts +1 -1
  239. package/lib/components/CreditForm/renderStep.js +1 -1
  240. package/lib/components/CreditForm/renderStep.js.map +1 -1
  241. package/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  242. package/lib/components/CreditForm/useCreditFormAPI.js +1 -1
  243. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  244. package/lib/components/CreditForm/utils.d.ts +1 -1
  245. package/lib/hooks/useCreditFormStore.d.ts +0 -0
  246. package/lib/hooks/useCreditFormStore.js +1 -0
  247. package/lib/hooks/useCreditFormStore.js.map +1 -0
  248. package/lib/hooks/useLeadFormData.d.ts +2 -2
  249. package/lib/hooks/useLeadFormData.js.map +1 -1
  250. package/lib/hooks/useRetailFormStore.d.ts +10 -10
  251. package/lib/services/retail/adaptors/getAdditionalInfoData.d.ts +1 -1
  252. package/lib/services/retail/adaptors/getCalculatorData.d.ts +1 -1
  253. package/lib/services/retail/adaptors/getCardOptionsData.d.ts +1 -1
  254. package/lib/services/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  255. package/lib/services/retail/adaptors/getDeliveryCreditData.d.ts +1 -1
  256. package/lib/services/retail/adaptors/getEmploymentData.d.ts +1 -1
  257. package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  258. package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  259. package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  260. package/lib/services/retail/adaptors/getPersonalInfoData.d.ts +1 -1
  261. package/lib/services/retail/external/types.d.ts +10 -0
  262. package/lib/services/retail/external/types.js +2 -0
  263. package/lib/services/retail/external/types.js.map +1 -0
  264. package/lib/services/retail/external/utils.d.ts +2 -0
  265. package/lib/services/retail/external/utils.js +3 -0
  266. package/lib/services/retail/external/utils.js.map +1 -0
  267. package/lib/services/retail/inputs.d.ts +75 -0
  268. package/lib/services/retail/inputs.js +135 -0
  269. package/lib/services/retail/inputs.js.map +1 -0
  270. package/lib/services/retail/model/EOrganizationActivityTypes.js.map +1 -0
  271. package/lib/{api/RetailAPI → services/retail}/model/LeadFormData.d.ts +1 -1
  272. package/lib/services/retail/model/LeadFormData.js.map +1 -0
  273. package/{dist/components/ApplicationLeadForm → lib/services/retail/model}/LeadFormState.d.ts +18 -18
  274. package/lib/services/retail/model/LeadFormState.js.map +1 -0
  275. package/lib/services/retail/model/RetailFormContent.d.ts +63 -0
  276. package/lib/services/retail/model/RetailFormContent.js +4 -0
  277. package/lib/services/retail/model/RetailFormContent.js.map +1 -0
  278. package/{dist/components/CreditCardForm → lib/services/retail/utils}/calculateInputs.d.ts +2 -2
  279. package/lib/services/retail/utils/calculateInputs.js.map +1 -0
  280. package/lib/services/retail/utils/getOrganizationParams.d.ts +17 -0
  281. package/lib/services/retail/utils/getOrganizationParams.js.map +1 -0
  282. package/lib/services/retail/utils/getUpdateUserProfile.d.ts +3 -0
  283. package/{mobile/lib/api/RetailAPI → lib/services/retail}/utils/getUpdateUserProfile.js +1 -2
  284. package/lib/services/retail/utils/getUpdateUserProfile.js.map +1 -0
  285. package/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +1 -1
  286. package/lib/ui-kit/DraftDialog/utils.d.ts +2 -2
  287. package/lib/ui-kit/DraftDialog/utils.js.map +1 -1
  288. package/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  289. package/lib/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  290. package/lib/ui-kit/FormField/Fields/AddressFactField.js +1 -1
  291. package/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  292. package/lib/ui-kit/FormField/Fields/AddressField.js +1 -1
  293. package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  294. package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
  295. package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  296. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.d.ts +2 -0
  297. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +8 -0
  298. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -0
  299. package/lib/ui-kit/FormField/NameFieldDef.d.ts +6 -1
  300. package/lib/ui-kit/FormField/SelectField.d.ts +2 -2
  301. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  302. package/lib/ui-kit/FormField/getField.d.ts +2 -1
  303. package/lib/ui-kit/FormField/getField.js +4 -131
  304. package/lib/ui-kit/FormField/getField.js.map +1 -1
  305. package/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  306. package/lib/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  307. package/lib/ui-kit/FormField/getObjectValidator.js +71 -61
  308. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  309. package/lib/ui-kit/FormField/getPremium.d.ts +1 -1
  310. package/lib/ui-kit/FormField/updateOrganizationFields.js +1 -1
  311. package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
  312. package/lib/ui-kit/FormField/validators.d.ts +1 -1
  313. package/mobile/bundle/bundle.umd.js +1802 -1817
  314. package/mobile/bundle/bundle.umd.min.js +1 -1
  315. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  316. package/mobile/bundle/components/ApplicationLeadForm/GroupedConsents.d.ts +8 -1
  317. package/mobile/bundle/components/ApplicationLeadForm/consents.d.ts +2 -2
  318. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  319. package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
  320. package/mobile/bundle/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +1 -1
  321. package/mobile/bundle/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.d.ts +1 -1
  322. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
  323. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -1
  324. package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
  325. package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
  326. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  327. package/mobile/bundle/components/CreditCardForm/formStateMap.d.ts +1 -1
  328. package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  329. package/mobile/bundle/components/CreditCardForm/getDeliveryCreditCardData.d.ts +1 -1
  330. package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +1 -1
  331. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
  332. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +1 -1
  333. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
  334. package/mobile/bundle/components/CreditForm/formStateMap.d.ts +1 -1
  335. package/mobile/bundle/components/CreditForm/getCalcData.d.ts +1 -1
  336. package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +1 -1
  337. package/mobile/bundle/components/CreditForm/renderInfo.d.ts +1 -1
  338. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -2
  339. package/mobile/bundle/components/CreditForm/renderStep.d.ts +1 -1
  340. package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  341. package/mobile/bundle/components/CreditForm/utils.d.ts +1 -1
  342. package/mobile/bundle/hooks/useLeadFormData.d.ts +2 -2
  343. package/mobile/bundle/hooks/useRetailFormStore.d.ts +10 -10
  344. package/mobile/bundle/services/retail/adaptors/getAdditionalInfoData.d.ts +1 -1
  345. package/mobile/bundle/services/retail/adaptors/getCalculatorData.d.ts +1 -1
  346. package/mobile/bundle/services/retail/adaptors/getCardOptionsData.d.ts +1 -1
  347. package/mobile/bundle/services/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  348. package/mobile/bundle/services/retail/adaptors/getDeliveryCreditData.d.ts +1 -1
  349. package/mobile/bundle/services/retail/adaptors/getEmploymentData.d.ts +1 -1
  350. package/mobile/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  351. package/mobile/bundle/services/retail/adaptors/getPersonalInfoData.d.ts +1 -1
  352. package/mobile/bundle/services/retail/external/types.d.ts +10 -0
  353. package/mobile/bundle/services/retail/external/utils.d.ts +2 -0
  354. package/mobile/bundle/services/retail/inputs.d.ts +75 -0
  355. package/mobile/bundle/{api/RetailAPI → services/retail}/model/LeadFormData.d.ts +1 -1
  356. package/mobile/bundle/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.d.ts +18 -18
  357. package/mobile/bundle/services/retail/model/RetailFormContent.d.ts +63 -0
  358. package/{dist/components/CreditForm → mobile/bundle/services/retail/utils}/calculateInputs.d.ts +2 -2
  359. package/mobile/bundle/services/retail/utils/getOrganizationParams.d.ts +17 -0
  360. package/mobile/bundle/services/retail/utils/getUpdateUserProfile.d.ts +3 -0
  361. package/mobile/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +1 -1
  362. package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +2 -2
  363. package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  364. package/mobile/bundle/ui-kit/FormField/Fields/consentToReceiveMaterialsField.d.ts +2 -0
  365. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +6 -1
  366. package/mobile/bundle/ui-kit/FormField/SelectField.d.ts +2 -2
  367. package/mobile/bundle/ui-kit/FormField/getField.d.ts +2 -1
  368. package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  369. package/mobile/bundle/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  370. package/mobile/bundle/ui-kit/FormField/getPremium.d.ts +1 -1
  371. package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -1
  372. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  373. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  374. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  375. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.d.ts +8 -1
  376. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +2 -1
  377. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  378. package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +2 -2
  379. package/mobile/dist/components/ApplicationLeadForm/consents.js +0 -3
  380. package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  381. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  382. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -2
  383. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  384. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
  385. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  386. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +1 -1
  387. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  388. package/mobile/dist/components/ApplicationLeadForm/renderInputs.d.ts +2 -0
  389. package/{dist/components/ApplicationForm → mobile/dist/components/ApplicationLeadForm}/renderInputs.js +4 -3
  390. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -0
  391. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
  392. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  393. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  394. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -1
  395. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  396. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
  397. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
  398. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  399. package/mobile/dist/components/CreditCardForm/formStateMap.d.ts +1 -1
  400. package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -1
  401. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  402. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  403. package/mobile/dist/components/CreditCardForm/getDeliveryCreditCardData.d.ts +1 -1
  404. package/mobile/dist/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  405. package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +1 -1
  406. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
  407. package/mobile/dist/components/CreditCardForm/renderInputs.js +2 -1
  408. package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  409. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +1 -1
  410. package/mobile/dist/components/CreditCardForm/renderStep.js +1 -1
  411. package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -1
  412. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
  413. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
  414. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  415. package/mobile/dist/components/CreditForm/formStateMap.d.ts +1 -1
  416. package/mobile/dist/components/CreditForm/getCalcData.d.ts +1 -1
  417. package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +1 -1
  418. package/mobile/dist/components/CreditForm/renderInfo.d.ts +1 -1
  419. package/mobile/dist/components/CreditForm/renderInfo.js.map +1 -1
  420. package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -2
  421. package/mobile/dist/components/CreditForm/renderInputs.js +2 -1
  422. package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -1
  423. package/mobile/dist/components/CreditForm/renderStep.d.ts +1 -1
  424. package/mobile/dist/components/CreditForm/renderStep.js +1 -1
  425. package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
  426. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  427. package/mobile/dist/components/CreditForm/useCreditFormAPI.js +1 -1
  428. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  429. package/mobile/dist/components/CreditForm/utils.d.ts +1 -1
  430. package/mobile/dist/hooks/useCreditFormStore.d.ts +0 -0
  431. package/mobile/dist/hooks/useCreditFormStore.js +1 -0
  432. package/mobile/dist/hooks/useCreditFormStore.js.map +1 -0
  433. package/mobile/dist/hooks/useLeadFormData.d.ts +2 -2
  434. package/mobile/dist/hooks/useLeadFormData.js.map +1 -1
  435. package/mobile/dist/hooks/useRetailFormStore.d.ts +10 -10
  436. package/mobile/dist/services/retail/adaptors/getAdditionalInfoData.d.ts +1 -1
  437. package/mobile/dist/services/retail/adaptors/getCalculatorData.d.ts +1 -1
  438. package/mobile/dist/services/retail/adaptors/getCardOptionsData.d.ts +1 -1
  439. package/mobile/dist/services/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  440. package/mobile/dist/services/retail/adaptors/getDeliveryCreditData.d.ts +1 -1
  441. package/mobile/dist/services/retail/adaptors/getEmploymentData.d.ts +1 -1
  442. package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  443. package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  444. package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  445. package/mobile/dist/services/retail/adaptors/getPersonalInfoData.d.ts +1 -1
  446. package/mobile/dist/services/retail/external/types.d.ts +10 -0
  447. package/mobile/dist/services/retail/external/types.js +2 -0
  448. package/mobile/dist/services/retail/external/types.js.map +1 -0
  449. package/mobile/dist/services/retail/external/utils.d.ts +2 -0
  450. package/mobile/dist/services/retail/external/utils.js +7 -0
  451. package/mobile/dist/services/retail/external/utils.js.map +1 -0
  452. package/mobile/dist/services/retail/inputs.d.ts +75 -0
  453. package/mobile/dist/services/retail/inputs.js +137 -0
  454. package/mobile/dist/services/retail/inputs.js.map +1 -0
  455. package/mobile/dist/services/retail/model/EOrganizationActivityTypes.js.map +1 -0
  456. package/mobile/dist/services/retail/model/LeadFormData.d.ts +7 -0
  457. package/mobile/dist/services/retail/model/LeadFormData.js.map +1 -0
  458. package/mobile/dist/services/retail/model/LeadFormState.d.ts +146 -0
  459. package/mobile/dist/services/retail/model/LeadFormState.js.map +1 -0
  460. package/mobile/dist/services/retail/model/RetailFormContent.d.ts +63 -0
  461. package/mobile/dist/services/retail/model/RetailFormContent.js +4 -0
  462. package/mobile/dist/services/retail/model/RetailFormContent.js.map +1 -0
  463. package/mobile/dist/services/retail/utils/calculateInputs.d.ts +5 -0
  464. package/mobile/dist/services/retail/utils/calculateInputs.js.map +1 -0
  465. package/mobile/dist/services/retail/utils/getOrganizationParams.d.ts +17 -0
  466. package/mobile/dist/services/retail/utils/getOrganizationParams.js.map +1 -0
  467. package/mobile/dist/services/retail/utils/getUpdateUserProfile.d.ts +3 -0
  468. package/mobile/dist/{api/RetailAPI → services/retail}/utils/getUpdateUserProfile.js +3 -4
  469. package/mobile/dist/services/retail/utils/getUpdateUserProfile.js.map +1 -0
  470. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +1 -1
  471. package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +2 -2
  472. package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -1
  473. package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  474. package/mobile/dist/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  475. package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js +1 -1
  476. package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  477. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +1 -1
  478. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  479. package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
  480. package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  481. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.d.ts +2 -0
  482. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +10 -0
  483. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -0
  484. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +6 -1
  485. package/mobile/dist/ui-kit/FormField/SelectField.d.ts +2 -2
  486. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  487. package/mobile/dist/ui-kit/FormField/getField.d.ts +2 -1
  488. package/mobile/dist/ui-kit/FormField/getField.js +4 -131
  489. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  490. package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  491. package/mobile/dist/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  492. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +70 -60
  493. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  494. package/mobile/dist/ui-kit/FormField/getPremium.d.ts +1 -1
  495. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +1 -1
  496. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
  497. package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -1
  498. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  499. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  500. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +0 -9
  501. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.d.ts +8 -1
  502. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +2 -1
  503. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  504. package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +2 -2
  505. package/mobile/lib/components/ApplicationLeadForm/consents.js +0 -3
  506. package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  507. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  508. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -2
  509. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  510. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +1 -1
  511. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  512. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +1 -1
  513. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  514. package/mobile/lib/components/ApplicationLeadForm/renderInputs.d.ts +2 -0
  515. package/mobile/lib/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.js +4 -3
  516. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -0
  517. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -1
  518. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  519. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  520. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +1 -1
  521. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  522. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +1 -1
  523. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
  524. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  525. package/mobile/lib/components/CreditCardForm/formStateMap.d.ts +1 -1
  526. package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -1
  527. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  528. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  529. package/mobile/lib/components/CreditCardForm/getDeliveryCreditCardData.d.ts +1 -1
  530. package/mobile/lib/components/CreditCardForm/getDeliveryCreditCardData.js.map +1 -1
  531. package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +1 -1
  532. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
  533. package/mobile/lib/components/CreditCardForm/renderInputs.js +2 -1
  534. package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  535. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +1 -1
  536. package/mobile/lib/components/CreditCardForm/renderStep.js +1 -1
  537. package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -1
  538. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
  539. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -1
  540. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  541. package/mobile/lib/components/CreditForm/formStateMap.d.ts +1 -1
  542. package/mobile/lib/components/CreditForm/getCalcData.d.ts +1 -1
  543. package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +1 -1
  544. package/mobile/lib/components/CreditForm/renderInfo.d.ts +1 -1
  545. package/mobile/lib/components/CreditForm/renderInfo.js.map +1 -1
  546. package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -2
  547. package/mobile/lib/components/CreditForm/renderInputs.js +2 -1
  548. package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -1
  549. package/mobile/lib/components/CreditForm/renderStep.d.ts +1 -1
  550. package/mobile/lib/components/CreditForm/renderStep.js +1 -1
  551. package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
  552. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  553. package/mobile/lib/components/CreditForm/useCreditFormAPI.js +1 -1
  554. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  555. package/mobile/lib/components/CreditForm/utils.d.ts +1 -1
  556. package/mobile/lib/hooks/useCreditFormStore.d.ts +0 -0
  557. package/mobile/lib/hooks/useCreditFormStore.js +1 -0
  558. package/mobile/lib/hooks/useCreditFormStore.js.map +1 -0
  559. package/mobile/lib/hooks/useLeadFormData.d.ts +2 -2
  560. package/mobile/lib/hooks/useLeadFormData.js.map +1 -1
  561. package/mobile/lib/hooks/useRetailFormStore.d.ts +10 -10
  562. package/mobile/lib/services/retail/adaptors/getAdditionalInfoData.d.ts +1 -1
  563. package/mobile/lib/services/retail/adaptors/getCalculatorData.d.ts +1 -1
  564. package/mobile/lib/services/retail/adaptors/getCardOptionsData.d.ts +1 -1
  565. package/mobile/lib/services/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  566. package/mobile/lib/services/retail/adaptors/getDeliveryCreditData.d.ts +1 -1
  567. package/mobile/lib/services/retail/adaptors/getEmploymentData.d.ts +1 -1
  568. package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  569. package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  570. package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  571. package/mobile/lib/services/retail/adaptors/getPersonalInfoData.d.ts +1 -1
  572. package/mobile/lib/services/retail/external/types.d.ts +10 -0
  573. package/mobile/lib/services/retail/external/types.js +2 -0
  574. package/mobile/lib/services/retail/external/types.js.map +1 -0
  575. package/mobile/lib/services/retail/external/utils.d.ts +2 -0
  576. package/mobile/lib/services/retail/external/utils.js +3 -0
  577. package/mobile/lib/services/retail/external/utils.js.map +1 -0
  578. package/mobile/lib/services/retail/inputs.d.ts +75 -0
  579. package/mobile/lib/services/retail/inputs.js +135 -0
  580. package/mobile/lib/services/retail/inputs.js.map +1 -0
  581. package/mobile/lib/services/retail/model/EOrganizationActivityTypes.js.map +1 -0
  582. package/mobile/lib/services/retail/model/LeadFormData.d.ts +7 -0
  583. package/mobile/lib/services/retail/model/LeadFormData.js.map +1 -0
  584. package/mobile/lib/services/retail/model/LeadFormState.d.ts +146 -0
  585. package/mobile/lib/services/retail/model/LeadFormState.js.map +1 -0
  586. package/mobile/lib/services/retail/model/RetailFormContent.d.ts +63 -0
  587. package/mobile/lib/services/retail/model/RetailFormContent.js +4 -0
  588. package/mobile/lib/services/retail/model/RetailFormContent.js.map +1 -0
  589. package/mobile/lib/services/retail/utils/calculateInputs.d.ts +5 -0
  590. package/mobile/lib/services/retail/utils/calculateInputs.js.map +1 -0
  591. package/mobile/lib/services/retail/utils/getOrganizationParams.d.ts +17 -0
  592. package/mobile/lib/services/retail/utils/getOrganizationParams.js.map +1 -0
  593. package/mobile/lib/services/retail/utils/getUpdateUserProfile.d.ts +3 -0
  594. package/{lib/api/RetailAPI → mobile/lib/services/retail}/utils/getUpdateUserProfile.js +1 -2
  595. package/mobile/lib/services/retail/utils/getUpdateUserProfile.js.map +1 -0
  596. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +1 -1
  597. package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +2 -2
  598. package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -1
  599. package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  600. package/mobile/lib/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  601. package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js +1 -1
  602. package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  603. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +1 -1
  604. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  605. package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
  606. package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  607. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.d.ts +2 -0
  608. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +8 -0
  609. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -0
  610. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +6 -1
  611. package/mobile/lib/ui-kit/FormField/SelectField.d.ts +2 -2
  612. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  613. package/mobile/lib/ui-kit/FormField/getField.d.ts +2 -1
  614. package/mobile/lib/ui-kit/FormField/getField.js +4 -131
  615. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  616. package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  617. package/mobile/lib/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  618. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +71 -61
  619. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  620. package/mobile/lib/ui-kit/FormField/getPremium.d.ts +1 -1
  621. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +1 -1
  622. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
  623. package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -1
  624. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  625. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -10
  626. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +14 -4
  627. package/mobile/src/components/ApplicationLeadForm/consents.ts +2 -5
  628. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -3
  629. package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +1 -1
  630. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +1 -1
  631. package/mobile/src/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.tsx +6 -8
  632. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -2
  633. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
  634. package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +1 -1
  635. package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +1 -1
  636. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +1 -1
  637. package/mobile/src/components/CreditCardForm/formStateMap.tsx +2 -2
  638. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -1
  639. package/mobile/src/components/CreditCardForm/getDeliveryCreditCardData.ts +1 -1
  640. package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +1 -1
  641. package/mobile/src/components/CreditCardForm/renderInputs.tsx +4 -3
  642. package/mobile/src/components/CreditCardForm/renderStep.tsx +6 -2
  643. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -2
  644. package/mobile/src/components/CreditForm/CreditFormStep.tsx +1 -1
  645. package/mobile/src/components/CreditForm/formStateMap.tsx +1 -1
  646. package/mobile/src/components/CreditForm/getCalcData.ts +1 -1
  647. package/mobile/src/components/CreditForm/getInitialFormState.tsx +1 -1
  648. package/mobile/src/components/CreditForm/renderInfo.tsx +1 -1
  649. package/mobile/src/components/CreditForm/renderInputs.tsx +4 -3
  650. package/mobile/src/components/CreditForm/renderStep.tsx +2 -2
  651. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
  652. package/mobile/src/components/CreditForm/utils.ts +1 -1
  653. package/mobile/src/hooks/useCreditFormStore.tsx +0 -0
  654. package/mobile/src/hooks/useLeadFormData.ts +4 -4
  655. package/mobile/src/hooks/useRetailFormStore.tsx +5 -5
  656. package/mobile/src/services/retail/adaptors/getAdditionalInfoData.ts +1 -1
  657. package/mobile/src/services/retail/adaptors/getCalculatorData.ts +1 -1
  658. package/mobile/src/services/retail/adaptors/getCardOptionsData.tsx +1 -1
  659. package/mobile/src/services/retail/adaptors/getCreditFormTaskData.ts +1 -1
  660. package/mobile/src/services/retail/adaptors/getDeliveryCreditData.ts +1 -1
  661. package/mobile/src/services/retail/adaptors/getEmploymentData.tsx +1 -1
  662. package/mobile/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -2
  663. package/mobile/src/services/retail/adaptors/getPersonalInfoData.tsx +1 -1
  664. package/mobile/src/services/retail/external/types.ts +10 -0
  665. package/mobile/src/services/retail/external/utils.ts +2 -0
  666. package/mobile/src/services/retail/inputs.tsx +140 -0
  667. package/mobile/src/{api/RetailAPI → services/retail}/model/LeadFormData.ts +1 -1
  668. package/mobile/src/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.ts +20 -18
  669. package/mobile/src/services/retail/model/RetailFormContent.ts +101 -0
  670. package/mobile/src/{components/CreditCardForm → services/retail/utils}/calculateInputs.ts +4 -4
  671. package/mobile/src/{api/RetailAPI → services/retail}/utils/getOrganizationParams.ts +6 -6
  672. package/mobile/src/{api/RetailAPI → services/retail}/utils/getUpdateUserProfile.ts +3 -4
  673. package/mobile/src/ui-kit/DraftDialog/parseDraftTask.ts +1 -1
  674. package/mobile/src/ui-kit/DraftDialog/utils.ts +2 -2
  675. package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +2 -2
  676. package/mobile/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -1
  677. package/mobile/src/ui-kit/FormField/Fields/AddressFactField.tsx +1 -1
  678. package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +1 -1
  679. package/mobile/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +5 -1
  680. package/mobile/src/ui-kit/FormField/Fields/EmailField.tsx +1 -1
  681. package/mobile/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +1 -1
  682. package/mobile/src/ui-kit/FormField/Fields/consentToReceiveMaterialsField.tsx +14 -0
  683. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +76 -63
  684. package/mobile/src/ui-kit/FormField/SelectField.tsx +3 -3
  685. package/mobile/src/ui-kit/FormField/getField.tsx +11 -135
  686. package/mobile/src/ui-kit/FormField/getNamesFromInput.tsx +1 -1
  687. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +75 -62
  688. package/mobile/src/ui-kit/FormField/getPremium.tsx +1 -1
  689. package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +3 -3
  690. package/mobile/src/ui-kit/FormField/validators.ts +1 -1
  691. package/package.json +1 -1
  692. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  693. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -10
  694. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +14 -4
  695. package/src/components/ApplicationLeadForm/consents.ts +2 -5
  696. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -3
  697. package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +1 -1
  698. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +1 -1
  699. package/src/components/{ApplicationForm → ApplicationLeadForm}/renderInputs.tsx +6 -8
  700. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -2
  701. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
  702. package/src/components/ApplicationLeadForm/useLeadFormStore.ts +1 -1
  703. package/src/components/ApplicationLeadForm/useSaveUserData.ts +1 -1
  704. package/src/components/CreditCardForm/CreditCardFormContent.ts +1 -1
  705. package/src/components/CreditCardForm/formStateMap.tsx +2 -2
  706. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -1
  707. package/src/components/CreditCardForm/getDeliveryCreditCardData.ts +1 -1
  708. package/src/components/CreditCardForm/getInitialFormState.tsx +1 -1
  709. package/src/components/CreditCardForm/renderInputs.tsx +4 -3
  710. package/src/components/CreditCardForm/renderStep.tsx +6 -2
  711. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -2
  712. package/src/components/CreditForm/CreditFormStep.tsx +1 -1
  713. package/src/components/CreditForm/formStateMap.tsx +1 -1
  714. package/src/components/CreditForm/getCalcData.ts +1 -1
  715. package/src/components/CreditForm/getInitialFormState.tsx +1 -1
  716. package/src/components/CreditForm/renderInfo.tsx +1 -1
  717. package/src/components/CreditForm/renderInputs.tsx +4 -3
  718. package/src/components/CreditForm/renderStep.tsx +2 -2
  719. package/src/components/CreditForm/useCreditFormAPI.tsx +3 -3
  720. package/src/components/CreditForm/utils.ts +1 -1
  721. package/src/hooks/useCreditFormStore.tsx +0 -0
  722. package/src/hooks/useLeadFormData.ts +4 -4
  723. package/src/hooks/useRetailFormStore.tsx +5 -5
  724. package/src/icons/IconName.ts +4 -4
  725. package/src/services/retail/adaptors/getAdditionalInfoData.ts +1 -1
  726. package/src/services/retail/adaptors/getCalculatorData.ts +1 -1
  727. package/src/services/retail/adaptors/getCardOptionsData.tsx +1 -1
  728. package/src/services/retail/adaptors/getCreditFormTaskData.ts +1 -1
  729. package/src/services/retail/adaptors/getDeliveryCreditData.ts +1 -1
  730. package/src/services/retail/adaptors/getEmploymentData.tsx +1 -1
  731. package/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -2
  732. package/src/services/retail/adaptors/getPersonalInfoData.tsx +1 -1
  733. package/src/services/retail/external/types.ts +10 -0
  734. package/src/services/retail/external/utils.ts +2 -0
  735. package/src/services/retail/inputs.tsx +140 -0
  736. package/src/{api/RetailAPI → services/retail}/model/LeadFormData.ts +1 -1
  737. package/src/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.ts +20 -18
  738. package/src/services/retail/model/RetailFormContent.ts +101 -0
  739. package/{mobile/src/components/CreditForm → src/services/retail/utils}/calculateInputs.ts +4 -4
  740. package/src/{api/RetailAPI → services/retail}/utils/getOrganizationParams.ts +6 -6
  741. package/src/{api/RetailAPI → services/retail}/utils/getUpdateUserProfile.ts +3 -4
  742. package/src/ui-kit/DraftDialog/parseDraftTask.ts +1 -1
  743. package/src/ui-kit/DraftDialog/utils.ts +2 -2
  744. package/src/ui-kit/FormField/CustomFieldProps.ts +2 -2
  745. package/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -1
  746. package/src/ui-kit/FormField/Fields/AddressFactField.tsx +1 -1
  747. package/src/ui-kit/FormField/Fields/AddressField.tsx +1 -1
  748. package/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +5 -1
  749. package/src/ui-kit/FormField/Fields/EmailField.tsx +1 -1
  750. package/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +1 -1
  751. package/src/ui-kit/FormField/Fields/consentToReceiveMaterialsField.tsx +14 -0
  752. package/src/ui-kit/FormField/NameFieldDef.ts +76 -63
  753. package/src/ui-kit/FormField/SelectField.tsx +3 -3
  754. package/src/ui-kit/FormField/getField.tsx +11 -135
  755. package/src/ui-kit/FormField/getNamesFromInput.tsx +1 -1
  756. package/src/ui-kit/FormField/getObjectValidator.tsx +75 -62
  757. package/src/ui-kit/FormField/getPremium.tsx +1 -1
  758. package/src/ui-kit/FormField/updateOrganizationFields.ts +3 -3
  759. package/src/ui-kit/FormField/validators.ts +1 -1
  760. package/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +0 -17
  761. package/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +0 -3
  762. package/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +0 -1
  763. package/dist/api/RetailAPI/model/LeadFormData.js.map +0 -1
  764. package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +0 -17
  765. package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +0 -1
  766. package/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +0 -3
  767. package/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +0 -1
  768. package/dist/components/ApplicationForm/renderInputs.js.map +0 -1
  769. package/dist/components/ApplicationLeadForm/LeadFormState.js.map +0 -1
  770. package/dist/components/CreditCardForm/calculateInputs.js.map +0 -1
  771. package/dist/components/CreditForm/calculateInputs.js.map +0 -1
  772. package/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +0 -1
  773. package/lib/api/RetailAPI/model/LeadFormData.js.map +0 -1
  774. package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +0 -17
  775. package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +0 -1
  776. package/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +0 -3
  777. package/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +0 -1
  778. package/lib/components/ApplicationForm/renderInputs.js.map +0 -1
  779. package/lib/components/ApplicationLeadForm/LeadFormState.js.map +0 -1
  780. package/lib/components/CreditCardForm/calculateInputs.d.ts +0 -5
  781. package/lib/components/CreditCardForm/calculateInputs.js.map +0 -1
  782. package/lib/components/CreditForm/calculateInputs.d.ts +0 -5
  783. package/lib/components/CreditForm/calculateInputs.js.map +0 -1
  784. package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +0 -17
  785. package/mobile/bundle/api/RetailAPI/utils/getUpdateUserProfile.d.ts +0 -3
  786. package/mobile/bundle/components/CreditCardForm/calculateInputs.d.ts +0 -5
  787. package/mobile/bundle/components/CreditForm/calculateInputs.d.ts +0 -5
  788. package/mobile/dist/api/RetailAPI/model/EOrganizationActivityTypes.js.map +0 -1
  789. package/mobile/dist/api/RetailAPI/model/LeadFormData.d.ts +0 -7
  790. package/mobile/dist/api/RetailAPI/model/LeadFormData.js.map +0 -1
  791. package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +0 -17
  792. package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +0 -1
  793. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +0 -3
  794. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.js.map +0 -1
  795. package/mobile/dist/components/ApplicationForm/renderInputs.d.ts +0 -2
  796. package/mobile/dist/components/ApplicationForm/renderInputs.js.map +0 -1
  797. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -146
  798. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.js.map +0 -1
  799. package/mobile/dist/components/CreditCardForm/calculateInputs.d.ts +0 -5
  800. package/mobile/dist/components/CreditCardForm/calculateInputs.js +0 -31
  801. package/mobile/dist/components/CreditCardForm/calculateInputs.js.map +0 -1
  802. package/mobile/dist/components/CreditForm/calculateInputs.d.ts +0 -5
  803. package/mobile/dist/components/CreditForm/calculateInputs.js +0 -31
  804. package/mobile/dist/components/CreditForm/calculateInputs.js.map +0 -1
  805. package/mobile/lib/api/RetailAPI/model/EOrganizationActivityTypes.js.map +0 -1
  806. package/mobile/lib/api/RetailAPI/model/LeadFormData.d.ts +0 -7
  807. package/mobile/lib/api/RetailAPI/model/LeadFormData.js.map +0 -1
  808. package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +0 -17
  809. package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +0 -1
  810. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +0 -3
  811. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.js.map +0 -1
  812. package/mobile/lib/components/ApplicationForm/renderInputs.d.ts +0 -2
  813. package/mobile/lib/components/ApplicationForm/renderInputs.js.map +0 -1
  814. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -146
  815. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.js.map +0 -1
  816. package/mobile/lib/components/CreditCardForm/calculateInputs.d.ts +0 -5
  817. package/mobile/lib/components/CreditCardForm/calculateInputs.js +0 -27
  818. package/mobile/lib/components/CreditCardForm/calculateInputs.js.map +0 -1
  819. package/mobile/lib/components/CreditForm/calculateInputs.d.ts +0 -5
  820. package/mobile/lib/components/CreditForm/calculateInputs.js +0 -27
  821. package/mobile/lib/components/CreditForm/calculateInputs.js.map +0 -1
  822. package/src/components/CreditCardForm/calculateInputs.ts +0 -51
  823. package/src/components/CreditForm/calculateInputs.ts +0 -51
  824. /package/bundle/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.d.ts +0 -0
  825. /package/dist/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.d.ts +0 -0
  826. /package/dist/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.js +0 -0
  827. /package/dist/{api/RetailAPI → services/retail}/model/LeadFormData.js +0 -0
  828. /package/dist/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.js +0 -0
  829. /package/dist/{components/CreditCardForm → services/retail/utils}/calculateInputs.js +0 -0
  830. /package/dist/{api/RetailAPI → services/retail}/utils/getOrganizationParams.js +0 -0
  831. /package/lib/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.d.ts +0 -0
  832. /package/lib/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.js +0 -0
  833. /package/lib/{api/RetailAPI → services/retail}/model/LeadFormData.js +0 -0
  834. /package/lib/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.js +0 -0
  835. /package/lib/{components/CreditCardForm → services/retail/utils}/calculateInputs.js +0 -0
  836. /package/lib/{api/RetailAPI → services/retail}/utils/getOrganizationParams.js +0 -0
  837. /package/mobile/bundle/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.d.ts +0 -0
  838. /package/mobile/dist/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.d.ts +0 -0
  839. /package/mobile/dist/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.js +0 -0
  840. /package/mobile/dist/{api/RetailAPI → services/retail}/model/LeadFormData.js +0 -0
  841. /package/mobile/dist/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.js +0 -0
  842. /package/{dist/components/CreditForm → mobile/dist/services/retail/utils}/calculateInputs.js +0 -0
  843. /package/mobile/dist/{api/RetailAPI → services/retail}/utils/getOrganizationParams.js +0 -0
  844. /package/mobile/lib/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.d.ts +0 -0
  845. /package/mobile/lib/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.js +0 -0
  846. /package/mobile/lib/{api/RetailAPI → services/retail}/model/LeadFormData.js +0 -0
  847. /package/mobile/lib/{components/ApplicationLeadForm → services/retail/model}/LeadFormState.js +0 -0
  848. /package/{lib/components/CreditForm → mobile/lib/services/retail/utils}/calculateInputs.js +0 -0
  849. /package/mobile/lib/{api/RetailAPI → services/retail}/utils/getOrganizationParams.js +0 -0
  850. /package/mobile/src/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.ts +0 -0
  851. /package/src/{api/RetailAPI → services/retail}/model/EOrganizationActivityTypes.ts +0 -0
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),i=n("useEffect"),l=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:a,...i}=t||{},l=n?.slots?.default,r=a||l&&l();return e(Object.assign(i,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:i,block:l,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],i||a,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>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={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},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=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=S,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},i)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const _=["CDN","BASE_PATH"],A=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return _.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),E=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),F=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),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:E,isLocalURL:M,isHash:O,withoutQuery:F,joinPath:z,hasPrefix:V});const $="/api/",j=`${$}v1/storage`,q=e=>(t,n)=>{if([!t,E(t),O(t),[A.CDN,$].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`${j}/${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=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&&!E(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=D();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=D(),{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(!M(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 ke({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 Se=()=>{const[e,t]=a(false);return i((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...y})=>{const b=Se(),v=D(),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&&ke({version:t,handleClick:N,text:w}),i?o("div",{className:"relative h-full",children:i}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Pe(P({...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(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(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}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(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=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons: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:je(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=(kt=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-kt.length]))).reduceRight(at,nt);var kt;const St=(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)),St(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((()=>{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=>!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?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((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Vt,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},qt=e=>e?.replace(/[^+\d]/g,""),Ut="/api/v1";const Wt=e=>e?{phone:qt(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber: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(E(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!E(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}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(N,{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(Ee,{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),k=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);i((()=>{v&&C.current?.focus()}),[v,C]);const S=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:k,onFocus:x,onBlur:y,disabled:w},e):o("input",{type:r,className:u("h-14",xn,S,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:k,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(Ee,{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 kn({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 Sn=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:k}]=on(),S=dn(C),I=l((e=>{v&&!w&&k(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&n&&d(In(n))}),[n]);const T=kn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:S,onBlur:C,onFocus:k,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=En(x,n.length),k=y&&!C,S=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",k?"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",An(m,d,C)),onClick:k?I:S,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Rn(r)||h}),_n(k,g)]}),p&&k?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"}),An=(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"),En=(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="Укажите регион, город/населенный пункт, улицу, дом",$n=e=>zn(e??Vn),jn=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={typeForm:$n(),surname:Un("Укажите свою фамилию"),name:Un("Укажите своё имя"),middleName:Un("Укажите своё отчество"),region:jn(),addressBranch:jn(),phone:Gn("Укажите номер телефона"),secondaryPhone:(aa="Укажите номер телефона",Fn((e=>!e||Yn(e)))(aa)),organizationPhone:Gn("Укажите номер телефона"),birthday:$n("Укажите дату рождения"),limitedBirthday:Fn(ta)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:$n("Укажите место рождения"),education:jn("Выберите ваше образование"),housing:jn("Выберите тип жилья"),employment:jn("Выберите информацию о трудоустройстве"),organization:jn("Выберите тип организации"),amountWorkers:jn("Выберите информацию о количестве сотрудников"),employerActivities:jn("Выберите вид деятельности организации"),employerOrganization:jn("Выберите вид организации"),positionOrganization:jn("Выберите вашу должность"),dulSerie:(e=>Fn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:Hn("Укажите номер паспорта"),dulIssueDateField:$n("Укажите дату выдачи паспорта"),dulSubdivisionCode:Hn("Укажите код подразделения"),dulIssuedBy:$n("Укажите организацию, выдавшую паспорт"),email:(e=>Fn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:$n(),inn:(e=>Fn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:$n("Укажите ОПФ"),organizationName:$n("Укажите наименование организации"),generalSeniority:qn("Укажите количество лет стажа"),lastJobExperience:qn("Укажите стаж на последнем месте работы"),experience5Years:qn("Укажите общий стаж за последние 5 лет"),jobsNumber:qn("Укажите количество мест работы за последние 5 лет"),beginDate:$n("Укажите дату заключения трудового договора"),addressFact:Zn(),partnerComments:$n(),collectionCount:$n(),comment:$n(),acquiringType:jn(),feedbackMethod:jn(),serviceType:jn(),serviceDirection:jn(),regionRetail:jn("Выберите регион"),meetingDay:$n(),product:$n(),localities:$n(),consentDataProcessing:Kn,annualRevenue:$n(),consentToReceiveMaterials:Kn,processPersonalDataFlg:Kn,consentProviderFlg:Kn,consentPfrFlg:Kn,consentOthersFlg:Kn,consentInformFlg:Kn,familyStatus:jn("Выберите семейное положение"),children:Wn(2,"Укажите количество детей"),familyMembers:Wn(2,"Укажите количество членов семьи"),dependents:Wn(2,"Укажите количество иждивенцев"),totalIncome:Wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Wn(10,"Укажите сумму обязательных выплат"),snils:(e=>Fn(Xn)(e))("Некорректный номер СНИЛС"),conscription:$n(),armyIdFlg:Kn,sex:$n("Укажите свой пол"),addressRegistration:Zn(),organizationAddress:Fn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(Ln),participantDateRegistration:$n("Укажите дату регистрации"),retirementIncome:$n(),otherIncome:$n(),wages:$n(),mandatoryPayments:$n(),disablePeopleFlg:$n(),bankruptcyFlg:$n(),shareholderFlg:$n(),legalEntityName:$n(),bankEmployeeCode:$n(),partInBusiness:$n(),addressRetail:jn("Выберите адрес банка"),addressMatch:$n(),codeWord:(e=>Fn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&ea(e)))(e??Vn))("Необходимо ввести кодовое слово"),confirmationIncome:jn(),deliveryDate:$n("Укажите дату доставки"),addressCourier:Zn(),cardCategory:$n("Укажите категорию карты"),paymentSystem:$n("Укажите тип платежной системы"),currency:$n("Укажите валюту")};var aa;const ia=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,na?.[e||""]])).filter((([,e])=>e)))},la=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},ra=(e,t,n=!1)=>n&&t?la(e,t):e,sa=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],oa=d((({field:e,input:t})=>o(Mn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:sa,...ra(e("acquiringType"),na.acquiringType,t?.required)}))),ca=(e="")=>Boolean("trade"===e||"all"===e),da=e=>null!=e,ma=new Map,ua=(e,t=ma)=>n=>{const a=pa(n),i=t.get(a);if(a&&da(i))return i;const l=e(...n);return a&&da(l)&&t.set(a,Promise.resolve(l)),l},ha=e=>Boolean(e?.every((e=>Array.isArray(e)?ha(e):!e||"string"==typeof e))),pa=e=>ha(e)?e.toString():"",ga=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function fa(e,t,{fallback:n,cache:l}={}){const s=r((()=>xa(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(da))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await ua(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&ga(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function xa(e){return Array.isArray(e)?e:e instanceof Function?xa(e()):[e]}const ya=`${Ut}/branches`,ba=[];const va=async e=>await Pt(e,{method:"GET"})||ba;function Na(e=!1){const{data:t}=fa(`${Ut}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Dt);return Array.isArray(t)?t:[]}const wa=(e="")=>"ULTRASERVICE"===e,Ca=d((({field:e,input:t,params:n})=>{const a=wa(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?Na(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=fa(e?`${ya}?regionCode=${e}`:null,va);return t||ba}(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}))),...ra(e("addressBranch"),na.addressBranch,t?.required),isSearch:!0})})),ka=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(Sn,{label:"Адрес",disabled:r,...ra(e(n),na[n],t?.required),value:a.fullAddress,onChange:c,...t,onDaDataChange:s})})),Sa=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Ia=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(Ta(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(Sn,{disabled:t?.filledByEsia&&Sa(e,n),label:"Адрес",...ra(e(n),na[n],t?.required),value:a.fullAddress,onChange:r,...t,onDaDataChange:i})})),Ta=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}),Ra=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)}))}))),Ba="appearance-none w-5 h-5 border-solid flex-none",Pa=[{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"}],Da=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(Ra,{paths:Pa,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",Aa(a)),onClick:s,children:[o("div",{className:u(Ba,"m-0",i?"rounded-full border-2":Ma(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Ea(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,_a(n)]})})})),_a=e=>e?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:e})}):null,Aa=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Ea=(e=!1)=>e?"radio":"checkbox",Ma=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Oa=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Da,{text:t,value:n,disabled:i,onChange:r},a),yn(l)]}))),Fa=d((({field:e,input:t})=>o(Oa,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...ra(e("addressMatch"),na.addressMatch,t?.required)}))),za=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"})}))),Va="/icons/MapMarkerClusterIcon.svg",La="/icons/MapMarkerClusterYellowIcon.svg";function $a({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=ja("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=ja("workplaces",e,i),r=qa(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=qa(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=qa(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 ja=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Va:La,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),qa=(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?Va:La,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Ua={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Wa={...Ua,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Ha=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Wa).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"})}),Ya=e=>globalThis[e],Ga=(e,t)=>{const n=document.getElementById(t);if(n){const t=Ya(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Ya(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(Ya(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))};const Ka=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return Ga(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Xa={...Ua,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Ja=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(Xa).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Za=[55.753995,37.614069],Qa=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=Ka();if(i((()=>{r.current?$a({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:ei(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),$a({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(za,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Ja,{yandexMaps:r}),o(Ja,{yandexMaps:r,direction:"out"})]}),Ha(r,m,u("right-2 top-80",h))]})})),ei=e=>{const t=[ni(ti(e,0)),ni(ti(e,1))];return t.every((e=>e))?t:Za},ti=(e,t)=>e.map((e=>e.coords?.[t])),ni=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,ai=async(e,t,n)=>{try{return(await ii(e,t,n)).json()}catch(e){return console.error(e),null}};async function ii(e,t,n){return globalThis?.fetch?.(`${Ut}${e}`,{method:t,headers:{"Content-Type":"application/json",...li()},credentials:"include",body:n?JSON.stringify(n):null})}const li=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ri=e=>Number(e.toString().replace(",",".")),si=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 oi=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})})})),ci=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:di({textItems:l,subText:t,children:n,isPhone:a,...i})})),di=({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||mi(n,s),i?o(Ee,{color:a,size:"text-m",children:i}):null]}),mi=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ee,{size:"text-l",children:t?o("a",{href:`tel:${ui(e)}`,children:e.trim()}):e.trim()},String(n)))),ui=e=>e.replace(/\D/g,""),hi=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}))),pi=e=>{const t=fi(e);return o(ci,{label:"Режим работы",value:t,className:"max-w-none"})},gi=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",fi=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[gi({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),gi({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},xi=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],yi=e=>xi.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??"")}}))),bi=e=>{if(!e)return null;const t=vi(e);return c(hi,{className:"border-none",children:[o(ci,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Ni)})}),o(ci,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},vi=e=>{const t=xi.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},Ni=({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)),wi=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(ci,{label:"Валюта",value:e.currency}):null,t?o(ci,{label:"Купить",value:String(t)}):null,n?o(ci,{label:"Продать",value:String(n)}):null]},String(a)),Ci={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"}},ki=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",Ci[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:Ci[n].text,children:t})]}))),Si=(new Date).getDay(),Ii=e=>{const[t]=e?.slice(Si-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(ki,{color:"green",children:i}):null,n&&l?o(ki,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(ki,{color:"red",children:"Выходной"})},Ti=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Ri=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(ci,{label:e,value:t&&n?n:"",subText:Ti({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),Bi=["ArrowDownIcon","ArrowUpIcon"],Pi=["Подробнее","Скрыть"],Di=({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:Pi[Number(e)]}),o(W,{className:"text-primary-text",name:Bi[Number(e)],width:"16",height:"16"})]}),_i=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Ai=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Ei=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Mi=({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=yi(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]}),Ii(h)]}),o("div",{className:"hidden sm:block",children:Oi({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(si,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(oi,{isUnfolded:e,children:Oi({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Di({isUnfolded:e,onToggle:t})})]},String(u))},Oi=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=yi(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(hi,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(ci,{label:"Факс",value:t,isPhone:!0}),o(ci,{label:"Телефон филиала",value:e,isPhone:!0}),o(ci,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(ci,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(ci,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(ci,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(hi,{children:o(ci,{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(Ri)})})}):c(hi,{children:[o(ci,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Ni)})}),pi(d)]}),r?.businessScheduleVisibleTag?bi(r?.businessScheduleDescription):null,s?.currencies?.length?o(hi,{className:"flex-wrap",children:s?.currencies?.map(wi)}):null]})},Fi=({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=yi(e),n=e?fi(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?_i(n):Ei(n,a):Ai(n):""})(n)}`;return{header:a,body:l}},zi={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Vi={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Li={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)},$i=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Li[t](e)))))},ji=()=>{},qi=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=ji,getBalloonRemoteWorkplaces:i=ji})=>{const[l,s,o,c]=r((()=>{const l=$i(e,n),r=$i(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}},Ui=e=>{const{data:t,error:n}=fa(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,Wi);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},Wi=async e=>await Pt(e,{method:"POST"})||[],Hi=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Yi=d((({children:e})=>Hi?e:null)),Gi=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=Ui("REGION_RF"),s=e("regionRetail")?.value||{},d=e("addressRetail");i((()=>{(async()=>{const e=await(async e=>{const t=await ai("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:ri(e.latitude??Za[0]),gpsLongitude:ri(e.longitude??Za[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&e?.("addressRetail")?.onChange?.("")}),[s.key]);const{points:m}=qi({data:n,filtrationState:{},getBalloon:Fi}),u=Boolean(s?.key);return c("div",{children:[o(Mn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...ra(e("addressRetail"),na.addressRetail,t?.required&&u),isSearch:!0}),o("div",{className:"h-[600px]",children:o(Yi,{children:o(Qa,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),Ki=(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}},Xi=(e,t,n)=>Math.max(t,Math.min(e,n));function Ji(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Zi({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=Ji(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const Qi=1,el=100,tl=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:Qi),max:s=(i.length?i.length-1:el),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=Ki(e,{normalize:(e=0)=>i.length?nl(i)(e):Xi(e,r,s),format:He()}),f=l((e=>{p&&p(Ji(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",hn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Zi({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),al(a)]})})),nl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),al=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))))}),il=["От 1 000 ₽","До 1 000 000 000 ₽"],ll=d((({field:e})=>o(tl,{title:"Сумма, ₽",items:il,min:1e3,max:1e9,...e("amount")})));function rl(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}const sl={};function ol(e,t=sl){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 cl=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 dl,ml;function ul(e){return ol(cl,e)}dl=cl,ml=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),rl(dl,ml),rl(ml,dl),dl.bus.watch((({type:e,event:t})=>{null!=t?ml.setItem(e,t):ml.removeItem(e)}));const hl=()=>ul(),pl=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,...ra(e(n),na[n],a?.required),...r})})),gl=d((({field:e,input:t})=>{const{data:n}=Ui("EMPLOYEES_NUMBER"),a=hl();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(pl,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),fl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...ra(e("annualRevenue"),na.annualRevenue,t?.required)}))),xl=d((({field:e,input:t})=>o(Oa,{text:"Наличие военного билета",...ra(e("armyIdFlg"),na.armyIdFlg,t?.required)}))),yl=d((({field:e,input:t})=>o(Sn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...ra(e("bankEmployeeCode"),na.bankEmployeeCode,t?.required),...t}))),bl=d((({field:e})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),vl=d((({field:e,input:t})=>o(Oa,{text:"В отношении меня ведётся производство по делу о банкротстве",...ra(e("bankruptcyFlg"),na.bankruptcyFlg,t?.required)}))),Nl=({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=wl(t,e),c=Cl(t,l,r);u.push(o("td",{children:o("div",{className:kl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},wl=(e,t)=>t&&e.toDateString()===t.toDateString(),Cl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),kl=(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"),Sl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Il=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:Sl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Nl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),Tl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Rl(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Bl),l=a.map(((e,t)=>Dl(e)?a.slice(0,t).filter(Dl).length:-1)),r=a.map(((e,t)=>Pl(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const Bl=e=>"_"===e,Pl=e=>/\d/.test(e),Dl=e=>Bl(e)||Pl(e),_l=1940,Al={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},El=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]),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(Rl(t,"__.__.____"))},onBlur:()=>{if(Ml(p)){const[n,a,i]=p.split(".");d?.(new Date(Number(i),Number(a)-1,Number(n))),e(Number(a)-1),t(Number(i))}else g(l||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Al})]})})),Ml=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=_l&&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++;if(Number(t)>0&&Number(t)<=i)return!0}return!1},Ol=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(El,{onChange:a,disabled:r,onClick:e,value:t&&jt(t),setSelectedMonth:i,setSelectedYear:l,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Fl=Tl.map((e=>({key:e}))),zl=Array.from({length:(new Date).getFullYear()-_l+1},((e,t)=>_l+t)).reverse().map((e=>({key:String(e)}))),Vl=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Ll=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},$l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},jl={className:"min-w-32",iconVersion:"black",isBorder:!1},ql=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:k,yearsOptions:S,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(Tl.indexOf(e));const t=Vl(r,Tl.indexOf(e));Ll({maxDateOfMonth:t,selectedYear:r,selectedMonth:Tl.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:Fl,yearsOptions:zl,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:[Ol({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,{...$l,className:"-rotate-90 cursor-pointer"})}),o(Dn,{onChange:w,value:{key:Tl[f]},options:k,...jl}),o(Dn,{onChange:C,value:{key:String(y)},options:S,...jl}),o("div",{className:"my-auto",onClick:N,children:o(W,{...$l,className:"rotate-90 cursor-pointer"})})]}),o(Il,{today:n,currentMonth:f,currentYear:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),Ul=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ql,{label:mn({label:t,errors:a}),valid:Boolean(!n),...i}),yn(n)]}))),Wl=d((({field:e,input:t})=>o(Ul,{label:"Дата начала работы на текущем месте",...ra(e("beginDate"),na.beginDate,t?.required),...t}))),Hl=d((({field:e,input:t})=>o(Ul,{label:"Дата рождения",...ra(e("birthday"),na.birthday,t?.required)}))),Yl=d((({field:e,input:t})=>o(Sn,{label:"Место рождения",...ra(e("birthPlace"),na.birthPlace,t?.required),...t,disabled:t?.filledByEsia&&Sa(e,"birthPlace")}))),Gl=e=>{try{return JSON.parse(String(e))}catch(e){return null}};function Kl(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?Gl(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 Xl=d((({field:e,input:t})=>{const[n,l]=a([]),[r]=Kl("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 ai("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(d,r);l(e),Jl(e,s)||c&&c(null)})()}),[d]),o(pl,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Jl=(e,t)=>e.some((e=>e.key===t?.key)),Zl=d((({field:e,input:t})=>o(Sn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...ra(e("children"),na.children,t?.required),...t}))),Ql=d((({field:e,input:t})=>o(Sn,{label:"Кодовое слово",...ra(e("codeWord"),na.codeWord,t?.required),...t}))),er=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...ra(e("collectionCount"),na.collectionCount,t?.required)}))),tr=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...ra(e("comment"),na.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),nr=d((({field:e,input:t})=>{const{data:n}=Ui("INCOME_CERT_UNITED");return o(pl,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),ar=d((({field:e,input:t})=>{const{data:n}=Ui("MILITARY_STATUS");return o(pl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),ir={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}};function lr({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const rr={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"},sr={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")},or=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(lr(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(rr[i],sr[i]),a),type:d,role:h,onClick:p,children:[s?o(za,{blur:!0,size:"small"}):null,e]})})),cr=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"})}))),dr=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(cr,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),mr=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(dr,{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(or,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),ur=(e,t)=>{const{open:n}=sn(mr),a=Se();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await ii(`/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])},hr=d((({className:e,error:t,docId:n,...a})=>{const i=ur(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Da,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ee,{children:"Ознакомиться"})}):null]}),yn(t)]})})),pr=d((({field:e,input:t})=>t&&t.name?o(hr,{text:ir[t.name]?.text,docId:ir[t.name]?.docId,...ra(e(t.name),na[t.name],t?.required)}):null)),gr=Math.round(29.5),fr=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),xr="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",yr="flex flex-col lg:w-1/2 gap-2xl",br="flex flex-col gap-y-xl min-w-52",vr=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}))),Nr=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(vr,{value:n,...i}):o(Ee,{size:"text-h3",children:"-"})]}))),wr=(e=[],t=!1)=>Cr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Cr=(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]},kr=(e,t=0)=>e?.sum?e.sum:t,Sr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ir=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Tr=({min:e=0,max:t=0,availableMonths:n,...a})=>o(tl,{items:[`От ${Rr(e)}`,`До ${Rr(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Rr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Br={horizontal:"@lg:flex-row",vertical:""},Pr=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(Ee,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Br[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Da,{isRadio:!0,text:t,value:n===e,onChange:()=>i&&i(e),disabled:l},String(e))))})]}))),Dr=({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(Pr,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),_r=e=>Dr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ar=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(tl,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),Er=({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?.(Xi(t?.[i],n.minMonths,n.maxMonths))},Mr=(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)},Or=e=>e,Fr=(e=Or)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),zr=Fr(),Vr=(e=Or)=>Fr((t=>-e(t))),Lr=Vr(),$r=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:jr([e,t],a),jr=([e,t],n=[])=>({[e]:n.length?Lr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?zr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),qr=(e,[t,n],a)=>e>=a[t]&&e<=a[n],Ur={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Wr=e=>Hr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Hr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Hr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Hr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Hr=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Yr=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[Ur],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Wr({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=$r(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=$r(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>Wr({row:e,userInputParams:t,paramsViewSettings:n})&&qr(a,["minSum","maxSum"],e)&&qr(i,["minMonths","maxMonths"],e)))||Ur)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=Mr(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},Gr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Kr={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Xr=zt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Cr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f,isDirty:x}]=an({moneyValue:kr(s,2e5),monthsValue:Sr(s,gr),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=Yr(g,n,r),b=_r({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return i((()=>{v&&v(Xi(g.moneyValue,y.minSum,y.maxSum))}),[y.minSum,y.maxSum]),i((()=>{N&&N(Xi(g.monthsValue,y.minMonths,y.maxMonths))}),[y.minMonths,y.maxMonths]),i((()=>{!Gr(s)&&h&&Er({field:f,defParams:h,calcParams:y,map:Kr,monthsValue:"minMonths"})}),[n,s]),o(fr,{className:e,title:t,...m,children:c("section",{className:u(xr,e),children:[c("div",{className:yr,children:[Ar({title:"Сумма кредита, ₽",step:500,min:y.minSum,max:y.maxSum,...f("moneyValue"),value:y.moneyValue}),Tr({title:"Срок кредита, месяцев",min:y.minMonths,max:y.maxMonths,...f("monthsValue"),value:y.monthsValue}),Jr({...y,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(br,"@4xl:w-1/2"),children:[o(Nr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Nr,{title:"Ставка",value:y?.rate,fractionDigits:2,postfix:"%"}),o(Nr,{title:"Ежемесячный платёж",value:y.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),je(a,{isVertical:!0}),Ir(l)]})]})})})),Jr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Da,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Da,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Da,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Da,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Zr={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},Qr=(e,t=!1)=>{const n=t?es(Zr):Zr;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},es=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),ts="calculator",ns=d((({field:e,params:t})=>{const n=l((t=>{e(ts).onChange?.(t)}),[]);return o(Xr,{...t?.calcData,padding:"p-0",defaultParams:Qr(e(ts).value),onChange:n})})),as=d((({field:e,input:t})=>{const{data:n}=Ui("CREDIT_IN_RSHB");return o(pl,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),is=d((({className:e,label:t,onChange:n,error:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Pr,{label:mn({label:t,errors:i?.errors}),onChange:e=>n&&n(e),...i}),yn(a)]}))),ls=[{id:"810",text:"Рубли"}],rs=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency"),{data:i}=Ui("CURRENCY"),l=i?.map((e=>({id:e.key,text:e.value})))??ls;return o(is,{label:"Валюта",orientation:"horizontal",items:l,value:n,onChange:e=>a?.(e),...ra(e("currency"),na.currency,t?.required)})})),ss=d((({field:e,input:t})=>o(Ul,{label:"Дата доставки",...ra(e("deliveryDate"),na.deliveryDate,t?.required)}))),os=d((({field:e,input:t})=>o(Sn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...ra(e("dependents"),na.dependents,t?.required),...t}))),cs=d((({field:e,input:t})=>o(Ul,{label:"Желаемая дата встречи",...ra(e("desiredMeetingDate"),na.meetingDay,t?.required)}))),ds=d((({field:e,input:t})=>o(Oa,{text:"Являюсь инвалидом",...ra(e("disablePeopleFlg"),na.disablePeopleFlg,t?.required)}))),ms="dulIssueDateField",us=d((({field:e,input:t})=>o(Ul,{label:"Дата выдачи",...ra(e(ms),na.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Sa(e,ms)}))),hs="dulIssuedBy",ps=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Sn,{disabled:t?.filledByEsia&&Sa(e,hs),label:"Кем выдан",...t,...ra(e(hs),na.dulIssuedBy,t?.required),onDaDataChange:i,daDataQueryPrefix:n})})),gs=d((({field:e,input:t})=>o(Sn,{disabled:t?.filledByEsia&&Sa(e,"dulNumber"),label:"Номер документа",isInteger:!0,maxLength:6,...ra(e("dulNumber"),na.dulNumber,t?.required)}))),fs=d((({field:e,input:t})=>o(Sn,{disabled:t?.filledByEsia&&Sa(e,"dulSerie"),label:"Серия документа",isInteger:!0,maxLength:4,...ra(e("dulSerie"),na.dulSerie,t?.required)}))),xs="dulSubdivisionCode",ys=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Sn,{disabled:t?.filledByEsia&&Sa(e,xs),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...ra(e(xs),na.dulSubdivisionCode,t?.required),onDaDataChange:n})})),bs=d((({field:e,input:t})=>{const{data:n}=Ui("EDUCATION_LEVEL");return o(pl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),vs=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(Sn,{label:"Электронная почта",...ra(e("email"),na.email,n),...a})})),Ns=d((({field:e,input:t})=>{const{data:n}=Ui("ORGANIZATION_ACTIVITY_TYPE"),a=hl();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(pl,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),ws=d((({field:e,input:t})=>{const{data:n}=Ui("ORGANIZATION_KIND"),a=hl();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(pl,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Cs=d((({field:e,input:t})=>{const{data:n}=Ui("EMPLOYMENT_INFO_UNITED");return o(pl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ks=d((({field:e,input:t})=>o(Sn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...ra(e("expenses"),na.expenses,t?.required),...t}))),Ss="experience5Years",Is=d((({field:e,input:t})=>{const n=l((t=>e(Ss)?.onChange?.(String(Xi(Number(t),0,5)))),[]);return o(Sn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...ra(e(Ss),na[Ss],t?.required),...t,onChange:n})})),Ts=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(Sn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),Rs=d((({field:e,input:t})=>{const{data:n}=Ui("MARITAL_STATUS");return o(pl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Bs=[{key:"ULTRASERVICE",text:"Ультра"}],Ps=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ds=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],_s=d((({field:e,input:t})=>o(Mn,{label:"Способ получения ответа",options:Ds,...ra(e("feedbackMethod"),na.feedbackMethod,t?.required)}))),As=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...ra(e("fullName"),na.fullName,t?.required),...t}))),Es=d((({field:e,input:t})=>o(Sn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...ra(e("generalSeniority"),na.generalSeniority,t?.required),...t}))),Ms=d((({field:e,input:t})=>{const{data:n}=Ui("HOUSE_TYPE");return o(pl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Os=(e,t)=>{if(!t)return null;const n=Ls(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")}},Fs=(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},zs=(e,t)=>{const n=Ls(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},Vs=(e,t,n)=>{const a=Ls(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},Ls=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,$s=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=js(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Ta(n.data?.address));const r={amountWorkers:Fs(e?.amountWorkers,n.data?.employee_count),employerActivities:Os(e?.employerActivities??[],a),organization:Vs(e?.organization??[],i,l),employerOrganization:zs(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},js=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),qs=d((({field:e,input:t})=>{const n=hl(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),$s(n,e,t)}),[]);return o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...ra(e("inn"),na.inn,t?.required),onDaDataChange:a})})),Us=d((({field:e})=>o(Oa,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ws=d((({field:e,input:t})=>o(Sn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...ra(e("jobsNumber"),na.jobsNumber,t?.required),...t}))),Hs=d((({field:e,input:t})=>o(Sn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...ra(e("lastJobExperience"),na.lastJobExperience,t?.required),...t}))),Ys=d((({field:e,input:t})=>o(Sn,{label:"Наименование юридического лица",...t,...ra(e("legalEntityName"),na.legalEntityName,t?.required),disabled:!e?.("shareholderFlg")?.value}))),Gs=d((({field:e,input:t})=>o(Sn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...ra(e("legalForm"),na.legalForm,t?.required),...t}))),Ks="limitedBirthday",Xs=d((({field:e,input:t})=>o(Ul,{label:"Дата рождения",...ra(e(Ks),na.limitedBirthday,t?.required),disabled:t?.filledByEsia&&Sa(e,Ks)}))),Js=`${Ut}/outservice`,Zs=[];async function Qs(){const e=await Pt(`${Js}/outserviceregions`);return e&&Array.isArray(e)?e:Zs}const eo=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=fa("outServiceRegions",Qs),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,...ra(e("localities"),na.localities,t?.required),isSearch:!0})})),to=d((({field:e,input:t})=>o(Sn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...ra(e("mandatoryPayments"),na.mandatoryPayments,t?.required),...t}))),no=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],ao=d((({field:e,input:t})=>o(is,{orientation:"horizontal",items:no,...ra(e("methodObtain"),na.methodObtain,t?.required)}))),io="middleName",lo=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Sa(e,io),...ra(e(io),na.middleName,t?.required),...t}))),ro=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Sa(e,t.name??""),...ra(e("name"),na.name,t?.required),...t}))),so=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]}))),oo=d((({field:e})=>ca(e("acquiringType")?.value?.key)?o(so,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),co=d((({field:e,input:t})=>{const{data:n}=Ui("ORGANIZATION_TYPE"),a=hl();return i((()=>{n&&(a.organization=n)}),[n]),o(pl,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),mo=d((({field:e,input:t})=>{const n=hl(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),$s(n,e,t)}),[]);return o(Sn,{label:"Наименование организации",...t,...ra(e("organizationName"),na.organizationName,t?.required),onDaDataChange:a})})),uo=d((({field:e,input:t})=>o(Sn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...ra(e("otherIncome"),na.otherIncome,t?.required),...t}))),ho=d((({field:e,input:t})=>o(Ul,{label:"Дата регистрации по месту жительства",...ra(e("participantDateRegistration"),na.participantDateRegistration,t?.required)}))),po="partInBusiness",go=d((({field:e,input:t})=>{const n=l((t=>e(po)?.onChange?.(String(Xi(Number(t),0,100)))),[]);return o(Sn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...ra(e(po),na.partInBusiness,t?.required),...t,onChange:n})})),fo=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(Sn,{...ra(e("partnerComments"),na.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),xo=e=>e.map((e=>({key:e.type,text:e.name}))),yo=d((({field:e,input:t})=>{const{value:n,onChange:r}=e("paymentSystem"),[s]=Kl("programId"),[c,d]=a([]);i((()=>{s&&(async()=>{const e=await(async e=>{const t=await ai("/public-data/creditProgramConditions","POST",{creditProgramId:e});return xo(t?.paymentSystems||[])})(s);d(e||[])})()}),[]);const m=l((e=>r?.(c?.find((t=>t.key===e)))),[c,r]);return o(is,{label:"Платежная система",orientation:"horizontal",items:bo(c),...ra(e("paymentSystem"),na.paymentSystem,t?.required),value:n?.key,onChange:m})})),bo=e=>e?.map((e=>({id:e.key,text:e.text})))??[],vo=e=>"_"===e,No=e=>/\d/.test(e),wo=e=>vo(e)||No(e),Co=[..."+7 (___) ___-__-__"],ko=Co.findIndex(vo),So=Co.map(((e,t)=>wo(e)?Co.slice(0,t).filter(wo).length:-1));function Io(e){const t=e.replace(/\D/g,""),n=Co.map(((e,n)=>No(e)?e:t.charAt(So[n])||e)),a=So.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ko,a)):n).join("")}const To=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(Io(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})})),Ro=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(To,{"aria-label":t,label:mn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),yn(n)]}))),Bo=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Ro,{label:"Телефон",...ra(e(n),na.phone,t?.required),disabled:t?.filledByEsia&&Sa(e,n),...t})})),Po=d((({field:e,input:t})=>{const{data:n}=Ui("POSITION");return o(pl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Do=d((({field:e})=>ca(e("acquiringType")?.value?.key)?o(so,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),_o=d((({field:e,source:t})=>o(Mn,{placeholder:"Выберите продукт",label:"Продукт",options:Ao(t?.productList),...la(e("product"),na.product)}))),Ao=e=>(e??[]).map((e=>({key:e,value:e}))),Eo=`${Ut}/outservice/outserviceregions`,Mo=`${Ut}/regions`,Oo=[];function Fo(e=Mo){const{data:t}=fa(e,Dt);return Array.isArray(t)?t:Oo}const zo=d((({field:e,input:t,params:n})=>{var a;const i=Fo((a=n?.typeForm,"OUTSERVICE"===a?Eo:void 0));return o(Mn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...ra(e("region"),na.region,t?.required)})})),Vo=d((({field:e,input:t})=>{const n=Na(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Mn,{label:"Регион",placeholder:"Выберите регион",options:a,...ra(e("region"),na.region,t?.required)})})),Lo=d((({field:e,input:t})=>{const{data:n}=Ui("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Mn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...ra(e("regionRetail"),na.regionRetail,t?.required)})})),$o=d((({field:e,input:t})=>o(Sn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...ra(e("retirementIncome"),na.retirementIncome,t?.required),...t}))),jo=d((({field:e})=>{const t=e("secondaryPhone");return o(Ro,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?la(t,na.secondaryPhone):t})})),qo=d((({field:e,input:t})=>o(Mn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ps,...ra(e("serviceDirection"),na.serviceDirection,t?.required)}))),Uo=["male","female"],Wo=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],Ho=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 ai("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return Uo.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(is,{label:"Пол",orientation:"horizontal",items:Wo,...ra(e("sex"),na.sex,t?.required)})})),Yo=d((({field:e,input:t})=>o(Oa,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...ra(e("shareholderFlg"),na.shareholderFlg,t?.required)}))),Go=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Rl(e,"___-___-___ __")):t?.(Rl(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})})),Ko=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(Go,{"aria-label":t,label:mn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),yn(a)]}))),Xo=d((({field:e,input:t})=>o(Ko,{label:"СНИЛС",maxLength:14,...ra(e("snils"),na.snils,t?.required),...t}))),Jo=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Sa(e,"surname"),...ra(e("surname"),na.surname,t?.required),...t}))),Zo=["От 1 мес","До 15 лет"],Qo=d((({field:e})=>o(tl,{title:"Срок, месяцев",items:Zo,min:1,max:180,...e("term")}))),ec=d((({field:e,input:t})=>o(Sn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ra(e("totalIncome"),na.totalIncome,t?.required),...t}))),tc=d((({field:e,input:t})=>o(Mn,{label:"Тип обслуживания",options:Bs,...ra(e("serviceType"),na.serviceType,t?.required)}))),nc=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ac=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(Pr,{className:"whitespace-normal",orientation:"horizontal",items:nc,value:t,onChange:e=>n&&n(e)})})})),ic=d((({field:e,input:t})=>o(Sn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ra(e("wages"),na.wages,t?.required),...t})));const lc={$ref:"/wcms-resources/outservice-productlist.json"},rc={fullName:e=>o(As,{...e}),addressBranch:e=>o(Ca,{...e}),desiredMeetingDate:e=>o(cs,{...e}),product:e=>o(_o,{...e,source:lc}),localities:e=>o(eo,{...e}),isClient:e=>o(Us,{...e}),partnerComments:e=>o(fo,{...e}),collectionCount:e=>o(er,{...e}),acquiringType:e=>o(oa,{...e}),onlineCheckout:e=>o(oo,{...e}),posTerminal:e=>o(Do,{...e}),serviceType:e=>o(tc,{...e}),term:e=>o(Qo,{...e}),amount:e=>o(ll,{...e}),annualRevenue:e=>o(fl,{...e}),vedTypes:e=>o(ac,{...e}),feedbackMethod:e=>o(_s,{...e}),serviceDirection:e=>o(qo,{...e}),bankEmpolee:e=>o(bl,{...e}),secondaryPhone:e=>o(jo,{...e}),applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>wa(e?.params?.typeForm)?o(Vo,{...e}):o(zo,{...e}),consentToReceiveMaterials:e=>o(pr,{...e}),surname:e=>o(Jo,{...e}),name:e=>o(ro,{...e}),middleName:e=>o(lo,{...e}),birthday:e=>o(Hl,{...e}),phone:e=>o(Bo,{...e}),email:e=>o(vs,{...e}),inn:e=>o(qs,{...e}),comment:e=>o(tr,{...e})},sc={processPersonalDataFlg:e=>o(pr,{...e}),consentProviderFlg:e=>o(pr,{...e}),consentOthersFlg:e=>o(pr,{...e}),consentInformFlg:e=>o(pr,{...e}),consentPfrFlg:e=>o(pr,{...e}),organizationPhone:e=>o(Bo,{...e}),legalForm:e=>o(Gs,{...e}),organizationName:e=>o(mo,{...e}),generalSeniority:e=>o(Es,{...e}),lastJobExperience:e=>o(Hs,{...e}),experience5Years:e=>o(Is,{...e}),jobsNumber:e=>o(Ws,{...e}),beginDate:e=>o(Wl,{...e}),addressFact:e=>o(ka,{...e}),organizationAddress:e=>o(Ia,{...e}),sex:e=>o(Ho,{...e}),limitedBirthday:e=>o(Xs,{...e}),birthPlace:e=>o(Yl,{...e}),education:e=>o(bs,{...e}),housing:e=>o(Ms,{...e}),employment:e=>o(Cs,{...e}),organization:e=>o(co,{...e}),amountWorkers:e=>o(gl,{...e}),employerActivities:e=>o(Ns,{...e}),employerOrganization:e=>o(ws,{...e}),positionOrganization:e=>o(Po,{...e}),familyStatus:e=>o(Rs,{...e}),children:e=>o(Zl,{...e}),familyMembers:e=>o(Ts,{...e}),dependents:e=>o(os,{...e}),totalIncome:e=>o(ec,{...e}),expenses:e=>o(ks,{...e}),snils:e=>o(Xo,{...e}),conscription:e=>o(ar,{...e}),armyIdFlg:e=>o(xl,{...e}),dulSerie:e=>o(fs,{...e}),dulNumber:e=>o(gs,{...e}),dulIssueDateField:e=>o(us,{...e}),dulSubdivisionCode:e=>o(ys,{...e}),dulIssuedBy:e=>o(ps,{...e}),addressRegistration:e=>o(Ia,{...e}),addressCourier:e=>o(Ia,{...e}),participantDateRegistration:e=>o(ho,{...e}),retirementIncome:e=>o($o,{...e}),otherIncome:e=>o(uo,{...e}),wages:e=>o(ic,{...e}),mandatoryPayments:e=>o(to,{...e}),disablePeopleFlg:e=>o(ds,{...e}),bankruptcyFlg:e=>o(vl,{...e}),shareholderFlg:e=>o(Yo,{...e}),legalEntityName:e=>o(Ys,{...e}),creditInRshbCd:e=>o(as,{...e}),bankEmployeeCode:e=>o(yl,{...e}),partInBusiness:e=>o(go,{...e}),regionRetail:e=>o(Lo,{...e}),addressRetail:e=>o(Gi,{...e}),addressMatch:e=>o(Fa,{...e}),calculator:e=>o(ns,{...e})},oc={paymentSystem:e=>o(yo,{...e}),currency:e=>o(rs,{...e}),cardCategory:e=>o(Xl,{...e}),codeWord:e=>o(Ql,{...e}),confirmationIncome:e=>o(nr,{...e}),methodObtain:e=>o(ao,{...e}),deliveryDate:e=>o(ss,{...e})},cc=(e,t)=>(n,a)=>{const i={...rc,...sc,...oc};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:n,field:e})?o("div",{children:i[n?.name||""]?.({field:e,input:n,params:t})},String(a)):null},dc=e=>2===e?"@xl:grid-cols-2":"",mc=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,uc=d((({responseType:e,typeForm:t,onClose:n})=>{const a="OK"===e,i="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(dr,{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(or,{type:"button",onClick:n,children:"Хорошо"})]})})})),hc=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],pc=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||""}${ca(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,u={...d,...fc(o),...gc(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},gc=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},fc=e=>e?{vedTypes:Object.fromEntries(nc.map((({id:t})=>[t,t===e])))}:{},xc={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:sa[0],serviceType:Bs[0],feedbackMethod:Ds[0],serviceDirection:Ps[0],vedTypes:nc[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},yc=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ee,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ee,{children:t.text})}):null]}))),bc=(e,t)=>o(or,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),vc=(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(Da,{...e}),o(yc,{link:t})]}),yn(la(e,Kn).error)]}):o(yc,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),bc(n)]}),Nc={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}}},wc=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,"ved"===e.fieldType&&e?.defaultValue||xc[e.name||""]]))),typeForm:{key:t,text:""}}))(x,n),[b,v]=a(""),w=sn(uc),C=l((async(e,t)=>{const a=Cc(x,e),i=hc(ia(a));if(!On(i(e)))return console.warn("validation fail");const l=pc({...e,...h}),r=await Nc.send(l,"lead"===m)?"OK":"Fail";if(v(r),r&&w.open({typeForm:n,responseType:r}),"OK"===r&&g){const e=tn();Xt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[n]),[,{field:k,onSubmit:S,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:S,children:[r.map(((e,t)=>c("div",{className:u(dc(e.columns),"grid gap-x-m"),children:[mc(e.title),(e?.inputs||[])?.map(cc(k,{typeForm:n}))]},`section-${t}`))),vc(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Cc=(e,t)=>e.filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)})))),kc=d((({inputs:e=[],typeForm:t="",field:n,key:a})=>{const i=e.every((e=>Boolean(n(e.name).value))),l=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(la(n(e?.name),na[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(si,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:a})=>o(oi,{isUnfolded:a,className:"flex flex-col pl-2xl",children:e.map(cc(n,{typeForm:t}))}),renderFoldButton:Sc(c("div",{children:[o(Da,{value:i,onChange:t=>{for(const a of e){const e=n(a.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},a),yn(l?"Отметьте все обязательные соглашения":"")]}))})})})),Sc=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"})})]}),Ic=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:a,restInputs:i}=Tc(n||[]);return a.length>2?c("div",{children:[i.map(cc(e,{typeForm:t})),o(kc,{inputs:a,field:e})]}):(n||[])?.map(cc(e,{typeForm:t}))},Tc=e=>({consentInputs:e?.filter((e=>Object.keys(ir).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(ir).includes(e.name||"")))||[]}),Rc=[{columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0},{fieldType:"common",name:"name",required:!0,dadata:!0},{fieldType:"common",name:"middleName",dadata:!0},{fieldType:"common",name:"limitedBirthday",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"processPersonalDataFlg",required:!0},{fieldType:"common",name:"consentProviderFlg",required:!0},{fieldType:"common",name:"consentOthersFlg",required:!0},{fieldType:"common",name:"consentInformFlg"},{fieldType:"common",name:"consentPfrFlg"}]}],Bc=(e,t)=>o(or,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Pc=e=>ii("/user-data/updateUserProfile","PUT",e),Dc=e=>ii("/user-data/updateUserTask","PUT",e),_c={width:"118",height:"24"},Ac={"bg-white":"color",transparent:"white"},Ec={"bg-white":"text-primary-main",transparent:"text-white"},Mc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Ac[e]},className:Ec[e],width:n?.width,height:n?.height}),Oc={"bg-white":"text-primary-text",transparent:"text-white"},Fc=d((({className:e,href:t="/",logo:n,children:a,targetBlank:i,bgColor:l="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:i?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...fe(s),children:[Mc(l,n?.image,_c),r?a??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:Oc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),zc=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},ii("/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=>ii(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(g,[]),o(dr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Fc,{}),onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o("div",{onClick: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(or,{onClick:close,version:"secondary",children:"Вернуться"}),o(or,{type:"submit",disabled:!d,onClick:p,version:"secondary",children:"Отправить"})]})]})})})),Vc=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:Lc(e)})))),Lc=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:jc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),jc=(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`},qc=d((({isDisabled:e,onClick:t,text:n})=>o(or,{type:"button",onClick:t,disabled:e,children:o(Ee,{font:"font-normal",children:n})}))),Uc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Wc=({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=>ai("/sms/checkCode","POST",e).then(Uc))({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}},Hc=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}=Wc({values:m,onSuccess:s}),w=sn(zc),C=qt(e),S=l((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},ii("/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(dr,{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,Gc(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}`)))})]}),Yc(y,h),f?o(za,{blur:!1}):null]})})})),Yc=(e,t)=>o(qc,{text:"Далее",isDisabled:e,onClick:t}),Gc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Vc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Kc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Xc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Jc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],Zc=d((({onSubmit:e=un,onClose:t=un})=>{const[n,i]=a(""),[r,s]=a(!1),d=ur(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?Xc:Kc;return o(dr,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(Pr,{className:"whitespace-normal",orientation:"horizontal",items:Jc,value:n,onChange:u}),o(or,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),Qc=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(N,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(w,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),ed={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},td={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},nd={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},ad=e=>Object.entries(e).reduce(((e,[t,n])=>t in ed?[...e,{contactTypeCd:{key:ed[t]},value:n}]:e),[]),id=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in td){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:td[t]},...a}]}return e}),[]),ld=e=>{const{familyStatus:t,dependents:n,familyMembers: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:a,incomeCertificateCd:l,otherDependents:n,childrenDependents:i,militaryStatusCd:g,participantIncomes:(f={wages:r,mandatoryPayments:s,incomeAverage:rd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in nd?[...e,{incomeTypeCd:{key:nd[t]},value:Number(n||0)}]:e),[])),snils:h?.replaceAll(" ","").replaceAll("-",""),armyIdFlg:p};var f},rd=(e,t)=>Number(e)+Number(t),sd={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"},od={...sd,amur_card:"14",owner_card:"13",travel_card:"15"},cd=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:rd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},dd=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}},md=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}},ud=e=>e?.key?{key:e.key,text:e.value}:void 0,hd=d((function({task:e,isFromLead:t=!1,onClose:n=un}){const a=hl(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=od[s.code],u=Boolean(sd[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:k=[],employmentContractDate:S,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:D,employeesNumberCd:_,opf:A,seniority:E,generalSeniority:M,jobsNumber:O,lastWorkDuration:F,positionCd:z,maritalStatusCd:V,childrenDependents:L,totalDependents:$,otherDependents:j,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:ud(i),cardCategory:ud(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:y,education:ud(b),participantDateRegistration:v,housing:ud(N),beginDate:S,employment:ud(I),organizationName:T,inn:R,employerActivities:ud(B),organization:ud(P),employerOrganization:ud(D),amountWorkers:ud(_),legalForm:A,generalSeniority:E?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:F?.toString(),positionOrganization:ud(z),familyStatus:ud(V),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:ud(q),confirmationIncome:ud(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:ud(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...cd(U),...dd(k),...md(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(dr,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:n,children:c("div",{className:"flex flex-col gap-lg mt-xs md:mt-0",children:[o(N,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(Qc,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:y}),o(Qc,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:b}),o(or,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),pd=d((function({onClose:e=un}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(dr,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:e,children:c("div",{className:"flex flex-col gap-lg",children:[o(N,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(w,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(or,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(or,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),gd=d((({onClose:e})=>{const t=Jt(),n=hl(),a=l((async()=>{const e=await(n={redirectUri:t.href},ai("/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(dr,{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(or,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(or,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),fd=()=>{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")}},xd=()=>ul(),yd=({inputs:e,programId:t,nextStepLink:n})=>{const[i,r]=a(""),[s,{setTrue:o,setFalse:c}]=on(!1),d=(()=>{const e=xd();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(gd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(n),u=(e=>{const{open:t}=sn(Zc),n=sn(Hc),a=t=>async n=>{try{t&&await Pc({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(Hc),p=(()=>{const{open:e}=sn(hd),{open:t}=sn(pd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{handleSubmit:l((async n=>{const a=hc(ia(e));var i;if(On(a(n)))try{o();const e=await(i={profile:{phone:qt(n.phone)}},ai("/public-data/createUserProfile","POST",i).then((e=>e?.profile?.id||null)));if(e&&n?.phone){const a=async()=>{await vd({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 ai("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:e,programId:t});if(n){const e=await(async e=>await ai("/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=bd(n);h.open({phone:n?.phone,consents:l,onSuccess:i}),c()}}catch{r("Fail")}}),[]),responseStatus:i,isSending:s}},bd=e=>Object.keys(ir).filter((t=>e[t])).map((e=>ir[e]?.text)),vd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=Nd(n);await Pc(((e,t)=>{const{name:n="",surname:a="",middleName:i="",limitedBirthday:l="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:i,birthDate:l&&jt(l,!0),email:s,phone: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 ai("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Dc((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:i,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:ad({phone:o&&qt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:fd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},Nd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},wd={typeForm:"",region:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",organizationPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:sa[0],serviceType:Bs[0],feedbackMethod:Ds[0],serviceDirection:Ps[0],vedTypes:nc[0],birthday:void 0,limitedBirthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,addressRegistration:"",participantDateRegistration:void 0,currency:"",paymentSystem:{name:"",type:""},cardCategory:{key:"",text:""},codeWord:"",addressRetail:{key:"",text:""}},Cd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||wd[e.name||""]]))),typeForm:{key:"",text:""}}},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:Io(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:Sd(i),addressFact:Sd(l),esiaAccountTypeCd:t?.esiaAccountType}},Sd=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}},Id=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=on(!1),c=xd(),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((()=>Cd(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},ai("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...kd(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=Gl(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}]},Td=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>Rc?.flatMap((e=>e?.inputs))||[]),[Rc]),[m,{isLoading:h}]=Id(d,a),{handleSubmit:p,responseStatus:g,isSending:f}=yd({inputs:d,programId:n,nextStepLink:a}),[,{field:x,onSubmit:y}]=an(m,{onSubmit:p}),b=sn(uc);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(za,{blur:!1}):null,Rc.map(((e,t)=>c("div",{className:u(dc(e.columns),"grid gap-x-m"),children:[mc(e.title),Ic({field:x,inputs:e?.inputs})]},`section-${t}`))),Bc(l,f)]})})})),Rd=d((({title:e,description:t})=>{const n=Se();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"})]})})),Bd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Pd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Dd=10;function _d(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}function Ad(e=0){const t=Math.round(e*Dd);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:i,children:r,onIntersection:s})=>{const c=_d(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),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(zd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Fd(c,v):{},...N?Pd(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(k=(e,n)=>o(Ed,{className:u(m,i?Md[i-1]:"",{"h-full":N},t),style:w?Fd(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(p)});var k})),Fd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),zd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Vd={"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?Vd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),$d=({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))},jd=e=>t=>e.scrollWidth/t,qd=e=>(t,n)=>{e.scrollBy({left:n*jd(e)(t),behavior:"smooth"})},Ud=({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?[Vr()(i),Fr()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?qd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?qd(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=l(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},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=Se(),[h,p]=Ud({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($d({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]=Ud({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:B(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Bd(!0)),children:T(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:[B(l,{...i.options,parent:n}),am(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(si,{renderFoldableSection:({isUnfolded:e})=>c(oi,{className:u(om),isUnfolded:e,children:[B(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(Rd,{...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(so,{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(or,{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)};function xm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const ym=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,bm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>ym(t[e])||ym(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>ym(t[e])||ym(n[e])||vm(t[e])<=vm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>ym(t[e])||ym(n[e])||vm(t[e]?.min)>=vm(n[e]?.min)&&vm(t[e]?.min)<=vm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>ym(t[e])||ym(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>ym(t[e])||ym(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),vm=e=>Number(e||0),Nm=(e,{block:t,page:n,normalize:a=nn})=>{const i=t?.blocks||[],[l,{field:s,reset:o,update:c}]=an(e),d=r((()=>xm(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),m=l===e?i:((e,t)=>(n=nn)=>e?.filter((([,e])=>bm(t,n(e)||{}))).map((([e])=>e)))(d,l)(a);return[l,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},wm={},Cm={},km=zt((({className:e,filtrationSchema:t=wm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Nm(Cm,{block:i.block,page:i.options?.page}),d=o(Dn,{className:"w-64",label:n?.title,options:Sm(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Sm(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(or,{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}:{}})}),Sm=e=>xm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Im=(e=!1)=>e?"text-left":"text-center",Tm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Rm=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",Tm[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Bm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=Se();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Im(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(Pm)}):null]})})),Pm=({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(Rm,{className:"shrink-0",iconBgVersion:l,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(_e,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Dm=e=>({icon:t,title:n,description:a},i)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),_m=(e,t,n)=>o("div",{className:`grid gap-2xs ${Am(t)}`,children:e.map(Dm(n))}),Am=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Em=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,a,t):null]}))),Mm={start:"justify-start",center:"justify-center",end:"justify-end"},Om=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Mm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:je(e)})})),Fm=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(w,{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(Fm,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(Nr,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(zm,{title:e,...r}),Lm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},$m={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=Lm.prefMonthsNum,prefTravelBonusRate:l=Lm.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||$m,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},qm=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}=jm(r,n);return o(fr,{className:e,title:t,...l,children:c("section",{className:u(xr,e),children:[c("div",{className:yr,children:[Ar({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Ar({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:br,children:[f>=0?o(Nr,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),Ir(i)]})]})})})),Um=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Wm=e=>Dr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Hm=" (c капитализацией)",Ym=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:br,children:[o(Nr,{title:`Доход в конце срока${l?Hm:""}`,value:e,postfix:n,prefix:"+"}),o(Nr,{title:`Сумма в конце срока${l?Hm:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),i?.map(Ir)]}),Gm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Km={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Xm=(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?Gm[e?.rateType]:"",{data:n}=fa(t?`${Ut}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Jm(s,e)&&qr(a,["minSum","maxSum"],e)&&qr(n,["minDays","maxDays"],e)))||Km,{rate:m}=d,u=Zm(m,e),h=a+u,p=c||[Km];return{...d,...jr(["minSum","maxSum"],p),...jr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Jm=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Zm=(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)},Qm=zt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=an({moneyValue:kr(r,1e5),daysValue:Sr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Xm(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(fr,{className:e,title:t,...d,children:c("section",{className:u(xr,e),children:[c("div",{className:yr,children:[Ar({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(tl,{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:[eu(p,h),Wm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Vm({rate:x,depositeName:y,isShowDepositeName:l}),Ym({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),eu=(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(Da,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Da,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),tu=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},nu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},au=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?ru(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=>[lu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),lu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),lu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),lu({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,qr(a,["minSum","maxSum"],t),qr(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||nu,{rate:u}=m,h=iu(u,e),p=a+h,g=t||[nu];return{...m,...jr(["minSum","maxSum"],g),...jr(["minMonths","maxMonths"],g),availableMonths:tu(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}},iu=(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)},lu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],ru=(e,t)=>e+Math.round((t-e)/2),su=(e="rub")=>"rub"===e,ou=(e,t)=>{const{minMonths:n,maxMonths:a}=jr(["minMonths","maxMonths"],uu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:Xi(i,n,a)}},cu=(e,t)=>{const{minSum:n,maxSum:a}=jr(["minSum","maxSum"],uu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:Xi(i,n,a)}},du=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),mu=e=>{const t=su(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},uu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},hu=(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?Dr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Dr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),pu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Wm({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Dr({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),pu(e.isShowNewClient),e.isShowNewClient?o(Da,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},pu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,gu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},fu={text:"₽",key:"rub"},xu=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))??[fu],g=l((e=>t=>e?{...t,...mu(t),...cu(t,e),...ou(t,e),...du(t,e)}:t)(h),[h]),[f,{field:x}]=an({moneyValue:kr(d,2e4),monthsValue:Sr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:fu},{normalize:g}),y=x?.("currency")?.value??fu,b=x?.("isNewClient")?.value,v=uu(h,y),N=au(f,v,s),{rate:w,income:C,finalSum:k,type:S=""}=N,I=l((()=>{Er({field:x,defParams:wr(v,b),calcParams:N,monthsValue:"minMonths",map:gu})}),[x,h]);i((()=>{!Gr(d)&&v&&I()}),[d,h]);const T=w===wr(v,b)?.rate;return o(fr,{className:e,title:t,...m,children:c("section",{className:u(xr,e),children:[c("div",{className:yr,children:[c("div",{className:"flex gap-m",children:[Ar({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:yu(y?.key)}),h&&h?.length>1?o(Mn,{label:"Валюта",options:p,...x("currency")}):null]}),Tr({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),hu({...N,...s},x)]}),Vm({rate:w,children:vu(I,T)}),Ym({income:C,finalSum:k,buttons:[...a,bu(n?.buttons,S)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),yu=(e="")=>su(e)?1e3:100,bu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},vu=(e,t=!1)=>t?null:o(or,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Nu=e=>wu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&wu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),wu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Cu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ku=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Cu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Nu({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=$r(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=$r(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>Nu({row:e,userInputParams:t,paramsViewSettings:n})&&qr(a+r,["minSum","maxSum"],e)&&qr(l,["minSumOld","maxSumOld"],e)&&qr(r,["minSumExtra","maxSumExtra"],e)&&qr(i,["minMonths","maxMonths"],e)))||Cu)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=Mr(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=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=ku(s,n,l),h=_r({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(fr,{className:e,title:t,...r,children:c("section",{className:u(xr,e),children:[c("div",{className:yr,children:[Ar({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Ar({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Tr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Iu({...m,...l},d),m.isExtraMoney?Ar({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(br,"@4xl:w-1/2"),children:[o(Nr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Nr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Nr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Nr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(a,{isVertical:!0}),Ir(i)]})]})})})),Iu=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Da,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Da,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Da,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Tu=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=Ki(e,{normalize:(e=i)=>n&&a?String(Xi(Number(Ru(e)),n,a)):Ru(e),format:He(r)}),d=l((e=>t&&t(Ru(e))),[t]);return o(fn,{onChange:d,...s,...c})})),Ru=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Bu=d((e=>o(Tu,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Pu={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Du={amount:1500},_u=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=an(Du),[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(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Pu[r],children:[o(Bu,{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(or,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.text}):null]})]})})),Au=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Eu="relative h-full",Mu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Ou=({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 P({...a,renderProps:(n,a,i)=>c("div",{className:Fu(n,{someCardsHighlighted:l}),children:[T(n,a,{className:zu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Vu(n)?Au({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Fu=(e,{someCardsHighlighted:t})=>u(Eu,t&&(Vu(e)?"pt-3xl":"pt-3xl sm:pt-16")),zu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Eu,"min-w-80",Mu[a],t&&(Vu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Bd(n),n&&"h-full"),Vu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Lu=zt((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:i=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(tm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?$u(s?.block?.blocks):[],hasBlur:!0,children:Ou({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),$u=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",qu=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(qu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(qu,"top-6 right-8 bg-green")}),o("div",{className:u(qu,"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}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Wu={black:"bg-black",white:"bg-white"},Hu=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:je([l],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Yu)]}):null,i?c(Ee,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),Yu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Wu[e]}`},String(t)),Gu=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})),Ku=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?Xu(a):null]})}))),Xu=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(Gu,{...e},String(t))))}),Ju=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Zu=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})})),Qu=[{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"}}],eh=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=>Qu.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(a)?a:r,c=n?{text:i}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&i&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??l}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},th(i));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:nh(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),th=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",nh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ah=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=true,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(Zu,{href:i,target:m,className:"h-full",data:Ju(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($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(eh,{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,ih(a,p)]})})}))),ih=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,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:je(i)}):null]},String(t))},rh=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(lh),[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:[$e(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(N,{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(si,{renderFoldableSection:()=>c("div",{children:[x,o(oi,{isUnfolded:b,children:y})]}),renderFoldButton:d.length>=s?sh(m?.parent,h,b):null}):o("div",{children:x})]})})),sh=(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"})]}),oh=d((({className:e,contacts:t,info:n,version:a="secondary",...i})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...i,children:[n?.length?ch(n):null,t?.length?ch(t):null]}))),ch=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>dh({column:e,i:t})))}),dh=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},i)=>c("div",{children:[o(k,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(i))))},`col-${String(t)}`):null,mh=()=>{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 ii("/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)},uh=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]})]}))),hh=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(uh,{step:a,showPercentage:!1})]})})}));var ph;!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"}(ph||(ph={}));const gh=e=>ai("/user-data/getTaskStatus","POST",e),fh=e=>ii("/user-data/sendSignalToProcess","POST",e),xh=(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},yh=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]})]}))),bh=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(Vc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(_e,{__html:i}):null]})]})})),vh=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(bh,{interval:d,intervalExpireAction:m}):null]}),o(Nh,{title:a,items:i}),o(Nh,{title:l,items:r,countColumns:!0}),n?.__html?o(yh,{__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]}))),Nh=({title:e,items:t,countColumns:n=!1})=>{const a=Se();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",dc(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:wh(e)},t)))}):null]})]}):null},wh=({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})]}),Ch=d((()=>o(vh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),kh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=hl();return o(vh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Sh=d((()=>{const{statusInfo:e}=hl();return o(vh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Ih=d((()=>{const{statusInfo:e}=hl();return o(vh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Th(e),buttonText:"Вернуться на главную"})})),Th=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:jt(e?.deliveryDate)}]):t},Rh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Bh=d((()=>{const[e,t]=a(ph.process),{taskId:n}=hl();i((()=>{(async()=>{for(const e of Rh)await fh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await gh({taskId:n});a&&a?.statusCd!==ph.process&&(e(),t(a.statusCd))}),[n]);xh(r,3e4);return Ph(e,(()=>t(ph.rework)))})),Ph=(e,t)=>({IN_PROCESS:o(kh,{handleExpireTimer:t}),CANCELLED:o(Ch,{}),FAILED:o(Ch,{}),DRAFT:o(Ch,{}),APPROVED:o(Ih,{}),PRE_DECISION:o(Ih,{}),REVISION:o(Sh,{})}[e]||o(Sh,{})),Dh=e=>(t,n)=>t.filter((e=>e)).map((t=>[_h(n,e),Ah(t,e),Fh(t,e),Eh(t,e),Mh(t,e),Oh(t,e)].some(Boolean)?{...t,required:!1}:t)),_h=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,Ah=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Eh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Mh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Oh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Fh=({name:e},t)=>"snils"===e&&zh(t),zh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Vh=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(yh,{__html:e},`${t}_${n}`))):null},Lh=({field:e,inputs:t,params:n})=>t.map(cc(e,n)),$h=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Dh(jh(t))(e,n),o=s.filter((e=>!Oh(e,jh(t))));return c("div",{className:u(dc(i),"grid gap-x-m"),children:[Vh(o),mc(l),Lh({field:t,inputs:s,params:a})]},`section-${r}`)})),jh=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(or,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(or,{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:jt(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:i,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:ad({organizationPhone:p&&qt(p)}),participantAddresses:id({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:jt(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:ad({phone:qt(l),email:r}),participantAddresses:id({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:(i=n,i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"}}:{};var i},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 ld(t);case 4:return Uh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:id({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:""},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:{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=hl(),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=hc(ia(Dh(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 Dc((({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(Bh,{}):c("form",{onSubmit:p,className:"space-y-m",children:[$h({sections:t,field:h,step:e}),o(qh,{isSending:u,step:e,onPrevStep:a})]})})),np=[[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"limitedBirthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0,filledByEsia:!0},{fieldType:"common",name:"phone",required:!0,filledByEsia:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment",required:!0},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!0},{fieldType:"common",name:"amountWorkers",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!0},{fieldType:"common",name:"employerOrganization",required:!0},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!0},{fieldType:"common",name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"wages",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}]],ap=[[{title:"Параметры карты",inputs:[]},{inputs:[{fieldType:"common",name:"currency",required:!0},{fieldType:"common",name:"paymentSystem",required:!0},{fieldType:"common",name:"cardCategory",required:!0},{fieldType:"common",name:"codeWord",required:!0}]}],...np,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",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(mh,[]);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(hh,{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(uh,{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(bh,{interval:d,intervalExpireAction:m}):null]}),o(op,{title:a,items:i}),o(op,{title:l,items:r,countColumns:!0}),n?.__html?o(yh,{__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=Se();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",dc(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(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),dp=d((()=>o(sp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),mp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=hl();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}=hl();return o(sp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),hp=d((()=>{const{statusInfo:e}=hl();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(ph.process),{taskId:n}=hl();i((()=>{(async()=>{for(const e of pp)await fh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await gh({taskId:n});a&&a?.statusCd!==ph.process&&(e(),t(a.statusCd))}),[n]);xh(r,3e4);return fp(e,(()=>t(ph.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=e=>(t,n)=>t.filter((e=>e)).map((t=>[yp(n,e),bp(t,e),Cp(t,e),vp(t,e),Np(t,e),wp(t,e)].some(Boolean)?{...t,required:!1}:t)),yp=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,bp=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,vp=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Np=({name:e},t)=>"addressFact"===e&&t("addressMatch"),wp=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Cp=({name:e},t)=>"snils"===e&&kp(t),kp=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Sp=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(yh,{__html:e},`${t}_${n}`))):null},Ip=({field:e,inputs:t,params:n})=>t.map(cc(e,n)),Tp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=xp(Rp(t))(e,n);return c("div",{className:u(dc(i),"grid gap-x-m"),children:[Sp(s),mc(l),Ip({field:t,inputs:s,params:a})]},`section-${r}`)})),Rp=e=>t=>e(t)?.value,Bp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(or,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(or,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Pp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Dp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Pp[a?"annuity":"differential"]}},_p=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Ap=(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 ld(t);case 4:return Uh(t);default:return{}}},Ep=[{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}],Mp=e=>{try{return e?new Date(e):void 0}catch(e){return}},Op=({step:e,inputs:t,onNextStep:n,onFinish:a})=>{const[i,{setTrue:s,setFalse:o}]=on(!1),c=5===e,d=hl(),m=r((()=>((e,t)=>({...Ep[e],...t,limitedBirthday:Mp(t?.limitedBirthday),dulIssueDateField:Mp(t?.dulIssueDateField),participantDateRegistration:Mp(t?.participantDateRegistration),beginDate:Mp(t?.beginDate),deliveryDate:Mp(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=hc(ia(xp(Fp(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 Dc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Ap(i,a)}],...Dp(a),..._p(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]},Fp=e=>t=>e[t],zp=d((({step:e,sections:t,isFormFinished:n,programsSource:a,onPrevStep:i,onNextStep:l,onFinish:s})=>{const{programId:d}=hl(),m=a?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),[h,p,g]=Op({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:[Tp({sections:t,field:f,step:e,params:{calcData:m}}),o(Bp,{step:e,isSending:g,onPrevStep:i})]})})),Vp=[[{columns:1,inputs:[{fieldType:"common",name:"calculator"}]}],...np,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],Lp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],$p=zt((({className:e,programsSource:t,...n})=>{const[d,m]=a(0),u=s(null),h=l((()=>u?.current?.scrollIntoView({behavior:"smooth"})),[u]);i(mh,[]);const p=l((()=>{m((e=>Math.min(e+1,5))),h()}),[]),f=l((()=>{m((e=>Math.max(e-1,0))),h()}),[]),x=r((()=>Vp[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:Lp,step:d,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(zp,{step:d,sections:x,isFormFinished:b,programsSource:t,onNextStep:p,onPrevStep:f,onFinish:v},String(d))})]})})})),jp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,qp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Up=1e9,Wp={sum:{min:1e4,max:Up},period:3},Hp=zt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Nm(Wp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:Yp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Gp(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(Bu,{label:a?.title,min:500,max:Up,...d("sum",{parse:e=>({min:Number(e),max:Up}),format:({min:e})=>String(e)})}),o(tl,{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:"Адрес справочника"}})}),Yp=e=>_t((e?.paramsSource?.rateRows||[]).filter(jp).flatMap((e=>qp(e.minMonths,e.maxMonths)))),Gp=e=>_t(e.flatMap((e=>e||[])).filter(jp).flatMap((e=>qp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Kp=[{key:"10"},{key:"50"},{key:"100"}],Xp=({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:Kp,iconVersion:"black"})]})},Jp="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:Jp,"aria-label":`Страница ${l}`,children:l},String(t)):null},Qp={width:"24",height:"24"},eg=({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:tg(1===e),...Qp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Jp,"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:Jp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:tg(e===n),...Qp})})]})},tg=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",ng=({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(eg,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Xp,{itemCount:a,onItemCountChange:i}):null]}),ag=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})]})})),ig=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(ag,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(ql,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(ql,{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(or,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),lg=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:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ee,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),rg=`${Ut}/depository`,sg={startDate:void 0,endDate:void 0,query:""},og=zt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=an(sg),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?jt(a,!0):"",r=i?jt(i,!0):"",s=new URLSearchParams(rg);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}=fa(rg+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(ig,{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(lg,{...e},String(e.publicId)))):o(Rd,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(ng,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),cg=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,dg=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:cg(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]}))),mg=`${Ut}/region`;function ug(e="Москва"){return ul().location??{name:e}}function hg(e="Москва"){const t=ul(),n=l((async()=>{if(!t.location){const n=await Pt(mg);t.location=n??{name:e}}}),[t,e]);return fa(mg,n),t}var pg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(pg||(pg={}));const gg=new Intl.NumberFormat("ru",{style:"currency",currency:pg.RUB}),fg=e=>e?gg.format(e):"",xg="text-m font-light text-secondary-text ",yg=`${xg} text-left`,bg=`${xg} pl-5xl text-center`,vg=`${xg} pl-5xl text-right`,Ng={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},wg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:yg,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:bg,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:vg,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:Ng[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:fg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:fg(e?.buyExchangeRate)})})]},t)},kg={icon:"GpsIcon"},Sg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Rm,{...kg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ig=(e,t,n)=>{const a=Number(Tg(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)},Tg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Rg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bg=e=>t=>{const[,n]=Rg(e.find((([e])=>e(t))));return n(t)},Pg=e=>Bg(e.map((([e,t])=>[e,()=>t])));Pg.if=e=>new Dg(void 0,e);class Dg{parent;predicate;unit;get entry(){return[Rg(this.predicate),Rg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Dg(this,e)}then(e){return new Dg(this.parent,this.predicate,e)}else(e){return Bg([..._g(this),[()=>!0,e]])}}const _g=e=>[...e?.parent?_g(e.parent):[],e.entry],Ag=e=>Pg([[e=>e.value!==pg.RUB&&e.oppositeValue!==pg.RUB,()=>e.handleConvert(e.value,pg.RUB)],[e=>e.value===pg.RUB&&e.oppositeValue===pg.RUB,()=>e.handleConvert(e.value,pg.USD)],[e=>e.value===pg.RUB&&e.oppositeValue===pg.RUB,()=>e.handleConvert(e.value,pg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Eg(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 Mg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||pg.RUB,selectBuy:n?.[0]?.currency?.currency||pg.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:[Eg({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Og(r,d,n),value:r.inputSell,setValue:e=>zg(d,n)(e,r.selectSell,r.selectBuy)}),Eg({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Fg(r,d,t),value:r.inputBuy,setValue:e=>Vg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),Og=(e,t,n)=>a=>{t({selectSell:a}),Ag({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{zg(t,n)(e.inputSell,a,i)}})},Fg=(e,t,n)=>a=>{t({selectBuy:a}),Ag({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Vg(t,n)(e.inputBuy,a,i)})},zg=(e,t)=>(n,a,i)=>{e({inputSell:Tg(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(Ig(n,l,a===pg.RUB)||"")})},Vg=(e,t)=>(n,a,i)=>{e({inputBuy:Tg(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(Ig(n,l,a===pg.RUB)||"")})},Lg=`${Ut}/exchangerates`;const $g=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=fa(Lg+`?regionCode=${t}`,Dt);return n||{}}(ug()),l=jg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:pg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:pg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[l?o(wg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(Sg,{address:i?.address})]}),o(Mg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),jg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],qg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Ug(n))})})),Ug=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},Wg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Hg=["all","footer"],Yg=d((({className:e,navigationItems:t})=>{const n=pe();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(Wg(Hg)).map(n).map(Gg)})})),Gg=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(Wg(Hg));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:i,target:l,onClick:r,...fe(s),children:n}),d?o(qg,{items:d}):null]},String(t))},Kg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Xg)}):null)),Xg=(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:Zg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Zg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Qg(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Qg=e=>e.replaceAll(/\D/g,""),ef=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}`})})),tf=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(ef,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),nf="w-full lg:w-52";function af(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const lf=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 rf=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},sf=(e=[])=>e.reduce(((e,t)=>e+t),0),of=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),cf=e=>t=>e.map((([e,n])=>[lf(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>mf(t,e))).reduce(rf(Math.max,0),new Map),df=e=>t=>{return xm(t,t.map((({title:e})=>e)).map((e=>t=>{const n=of(t||"");return n.length?sf(e.map((e=>zr(n.map(lf(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},mf=(e,t)=>new Map(e.map((e=>[e,t]))),uf=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=fa(e?.length?e:null,hf),[s,o]=a(null);return af((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=of(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(cf(l)).reduce(rf(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return df(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},hf=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(z(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),pf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[i,l]=uf({basePathList:a,initialQuery:e}),s=r((()=>gf(t)(i)),[t,i]);return o(dr,{head:o(ag,{autoFocus:!0,...l}),onClose:n,children:o(Yg,{navigationItems:s})})})),gf=e=>t=>e?.length&&t?.length?xm(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:z("/",t)})))}))):[],ff=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=sn(pf,n),m=l((e=>{r(e),xf(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(ag,{value:i,placeholder:t?.placeholder,onChange:m}),o(cr,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),xf=e=>e&&e.length>=3,yf=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:i,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Fc,{className:nf,logo:l,data:i,showTitle:!1}),o(ff,{className:"grow",navigationItems:t,...e})]})},bf=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}`})})),vf=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(bf,{index:t,...e},String(t))))}):null]}))),Nf=zt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},i=n.options?.page?.common??{},{documents:l,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[yf(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Yg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(nf,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Kg,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(eh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(tf,{title:m,links:r}),o(vf,{links:l,license:p})]})})),wf=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?Cf(a):null]}))),Cf=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>kf(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Sf(e)}),c("div",{className:"text-s",children:[o(Ee,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ee,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},kf=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Sf=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),If=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(N,{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:Ju(l,s?.key),children:f})}):null]})})}));function Tf(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>Rf(t)(e)));return n.find((([,e])=>Rf(t,!0)(e)))??n[n.length-1]??[]}const Rf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=F(Bf(e)(n));return t?a===F(n):a.startsWith(F(n))},Bf=e=>t=>{const n=X(K.SITE_URL);return E(t)?e.href:z(n,e.pathname)},Pf=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=on(!1),h=dn(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),i=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${i}px`:a.left>e.left&&(i>a.left?n.current.style.left="":n.current.style.left=`${i}px`)}}),[r]);return cn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),i((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:_f(t,n)})]})})),Df=d((({isActive:e,...t})=>{const n=pe(),{text:a,href:i,target:l,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:i,target:l,onClick:r,role:"link",...fe(t?.data),children:a})})),_f=(e,t)=>e?.map(((e,n)=>o(Df,{isActive:e===t,...e},e?.text??String(n)))),Af={default:"w-6 h-6",large:"w-12 h-12"},Ef=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:i,ariaLabel:l="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Af[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:i,"aria-label":l,onClick:c,...fe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Mf="chatbot",Of="text-page__btn-chat",Ff={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},zf=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:l})=>{const r=(e=>{i((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Ff[e??""];return n=>{if(t)if("personal"!==e)Ga(Mf,t);else{const e=n.target;e?.classList.contains(Of)||e?.classList.add(Of),document.getElementById("webchat-js-container:webchat_rshb")||Ga(Mf,t)}}})(e);return o(Ef,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),Vf=d((({className:e="",active:t,dataItemName:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(l);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...fe(i),children:[o("span",{className:Lf(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Lf=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),$f=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=_d(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Vf,{...i,children:n})})})),jf={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"},qf=d((({version:e,text:t,mobileText:n,...a})=>{const i=Se()?n:t;return i?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",jf["transparent"===e?"transparent":"default"]),...a,children:i}):null})),Uf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:i,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=Tf(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?Wf(t):Hf(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o($f,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Pf,{items:p,activeItem:m,ariaLabel:i}):null,A.CHAT_BOT?o(zf,{version:t,iconVersion:d,chat:A.CHAT_BOT,ariaLabel:l}):null,o(qf,{version:t,...n})]})})),Wf=e=>t=>Math.max(t,e+1),Hf=e=>t=>Math.min(t,e),Yf=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(Gf,{...e},String(t))))})]}):null,Gf=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]})})),Kf=(e,t)=>n=>n.name?o(Zu,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Ju(e,n.name),children:o(Ee,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Xf=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"})]}))),Jf=d((({defaultLocation:e})=>{const t=ug(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Zu,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Zf=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=hg(t?.default),[s,d]=a(""),m=Fo(),u=r((()=>ex(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,Qf)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(dr,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Jf,{defaultLocation:t?.default}),o(Xf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&lf(e.toLowerCase())(s.toLowerCase())>=.8)).map(Kf(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(Kf(f,g))]},e)))}),Yf(e)]});var g,f})),Qf=e=>e.name?.charAt(0)??"",ex=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),tx=d((({className:e="",active:t,flat:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(nx(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(i),children:o("span",{suppressHydrationWarning:!0,className:ax(t,n),children:d||a})})})),nx=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),ax=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),ix=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=ug(n?.branches?.default),r=sn(pf,n),s=sn(Zf,n),d=l((()=>r.open({})),[r]),m=l((()=>s.open({})),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(tx,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:Ju(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(tx,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Ef,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),lx=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=_d(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(tx,{...i,children:n})})})),rx=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},y=r((()=>e.map(((e,t)=>e=>{p(e?sx(t):ox(t))}))),[e]),{dataFooter:b,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Fc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(lx,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:y[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Pf,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(ix,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),sx=e=>t=>Math.max(t,e+1),ox=e=>t=>Math.min(t,e),cx={"bg-white":"primary",transparent:"transparent"},dx=["all","header"],mx=zt((({className:e,bgColor:t="bg-white",logo:n={},version:a=cx[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=hx(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Tf(m),{internetBankButton:f}=i||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(rx,{activeTopItem:p,navigationItems:m?.filter(Wg(dx)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",ux(a))}),p?.items?.length&&o(Uf,{subItems:p?.items?.filter(Wg(dx)),version:a,internetBankButton:f})]})})})),ux=e=>"transparent"===e?"opacity-30":"",hx=e=>({navigation:e?.navigation??{},common:e?.common??{}}),px=(e=!1)=>e?{}:{padding:"p-0"},gx={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},fx=zt((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",gx[n],e),padding:t,version:i,isTheme:l,...s,children:P({...s,extraProps:{...px(a),className:Bd(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),xx=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Mm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),yx=(e,t=0)=>{const{itemCount:n,visibleItemCount:i}=e,[r,s]=a(t),o=l((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=l((()=>s((e=>Math.max(e-1,0)))),[n]),d=i?n>i&&r<n-i:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function bx({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 vx=d((({className:e="",cards:t=[],button:n})=>{const[i,r]=a(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=yx({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?Nx({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,bx({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function Nx({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const i=460*e,l=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${i}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${l}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?wx("страховая сумма",e.sum):null,e?.fee?wx("страховой взнос",e.fee):null]}),Cx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function wx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ee,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ee,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Cx(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const kx=d((({className:e="",title:t,insuranceTabs:n=[],button:i,...r})=>{const[s,d]=a(0),m=l((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Sx({insuranceTabs:n,button:i})})]})})),Sx=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(vx,{button:t,cards:e},String(n)))):null};const Ix={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Tx={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Rx=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:i,investmentColumns:l,...r}=e,s=l?[...l]:[];return i&&s.unshift(i),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[um(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Bx)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(_x)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(_e,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Bx=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Px(a,i,e.cells)}`,children:l.length?o("div",{className:"w-full "+(i?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:l.map(Dx)}):null},`column_${t}`)},Px=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Dx=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Tx[n]} ${Ix[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ee,{align:"text-center",children:e.text})},`cell_${t}`):null},_x=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Ax=["байт","Кб","Мб","Гб","Тб","Пб"],Ex=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," ",Mx(d,m),o(Ee,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Mx=(e,t)=>e||t?o("span",{children:", "}):"",Ox=(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))} ${Ax[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?zx(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ex,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:Fx(t),data:n?.data}),o(_e,{__html:n?.__html})]},String(a))},Fx=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,zx=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},Vx=d((({href:e,__html:t,target:n,onClose:a})=>{const i=D(),l=q(i)(e);return c(dr,{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(or,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Lx=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=sn(Vx),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:[Fx(i),o(Ee,{font:"font-light",children:e})]}):null})),$x={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},jx=zt((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=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",$x[r]),role:"list",children:i.map(qx(d,l))}):null]})})),qx=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?Ux(t)(n,a):Ox(e,t)(n,a)},Ux=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(Lx,{...a,icon:e,href:Wx(t)?t?.href:t?.attachment?.src}),o(_e,{__html:t?.__html})]},String(n)):null},Wx=e=>"href"in e,Hx=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(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:je(a,{className:"flex-wrap"}),children:[i?o(Ee,{size:"text-xl","font-weight":"font-light",children:i}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(_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]})]})})})),Yx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Gx=(e=[],t={})=>e.filter((({content:e={}})=>bm(t,e))).length,Kx=(e,t)=>e===t;const Xx=(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)))}(Kx,((e=Kx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Jx=[],Zx={},Qx={primary:"bg-white/30",secondary:"bg-main-divider"},ey={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},ty=d((({count:e,version:t="secondary"})=>{const n=Se(),a=n?"bg-main-divider":Qx[t],i=ey[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})})})),ny=({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})]})]})},ay={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},iy={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},ly={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},ry={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},sy=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",ay[a],n?ry[a]:ly[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?iy[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[ny({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(ty,{count:m,version:Yx(n,a)})}):null]})})})),oy=d((e=>o(e?.item?.href?cy:dy,{...e}))),cy=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(sy,{...e,tag:"a",item:i,onClick:a})})),dy=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(sy,{item:e,onClick:a,...n})})),my=(e,t,n)=>(a,i)=>o(oy,{isActive:a===e,onClick:t,type:n,item:a},String(i)),uy=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(my(a,i,t))}))),hy={categories:[],extraOptions:[],propertyType:[],stage:[]},py=zt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Nm(hy,{block:i.block,page:i.options?.page}),f=l(((e=hy)=>p(e)),[]),x=(({hotFilters:e=Jx,filtrationState:t=Zx,blocks:n=Jx,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Xx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Gx(n,t.filter),version:Yx(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(uy,{...x}),o(pm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(dm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),gy=(e,t,n)=>{const a=Yx("all"===t),i=Yx("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(or,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(or,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},fy=({__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,xy="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",yy=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Da,{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(si,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:xy,children:s}),o(oi,{className:xy,isUnfolded:e,children:d})]}),renderFoldButton:by(n,a)})}):null})},by=(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:vy()})]}),vy=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Ny=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ee,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),wy=()=>{},Cy=e=>"all"===e?"block":"hidden",ky=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=wy,renderRemoteWorkplaceCard:r=wy,getBalloon:s=wy,getBalloonRemoteWorkplaces:d=wy,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=an(zi),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=qi({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),k={filters:Sy([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:Vi};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Ny(h,N),m?fy(m):null,p&&gy(t,w,C),o("div",{className:u("pb-3xl",Cy(w)),children:yy(k)})]}),o("div",{className:"h-[600px]",children:o(Yi,{children:o(Qa,{points:b,isLoad:n,className:"h-full"})})})]}),c(Yi,{children:[y.map(l),v.map(r)]})]})})),Sy=e=>Object.keys(zi).filter((t=>e.filter((e=>Li[t](e))).length)),Iy=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:By(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:By(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(ki,{color:"green",children:By(s)})})]}),o("div",{className:"hidden sm:block",children:o(hi,{className:"flex-wrap",children:m?.map(Ry)})}),o(si,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(oi,{isUnfolded:e,children:o(hi,{className:"flex-wrap",children:m?.map(Ry)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Di({isUnfolded:e,onToggle:t})})]},String(d))},Ty=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${By(t)} №${n}`,body:e.toUpperCase()}),Ry=(e,t)=>o(ci,{...e},String(t)),By=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Py=[];const Dy=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Py},_y={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Ay={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)},Ey=d((({descriptionData:e,className:t})=>{const n=ug(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=fa(`${Ut}/atms?regionCode=${e}`,Dy);return{data:t||Py,isLoad:!t&&!n}}(a);return o(ky,{className:t,filterItems:My,data:i,isLoad:l,initFilterState:_y,renderCard:Iy,getBalloon:Ty,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),My=(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=>Ay[t](e))),n=!a.length||a.some((t=>Ay[t](e)));return t&&n}))},Oy=({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:Fy({workScheduleDescription:t})}),o(si,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(oi,{isUnfolded:e,children:Fy({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Di({isUnfolded:e,onToggle:t})})]},String(n)):null,Fy=({workScheduleDescription:e})=>c("div",{children:[c(hi,{className:"flex",children:[o(ci,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(ci,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(ci,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(ci,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(ci,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),zy=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Vy={branches:[],remoteWorkplaces:[]};const Ly=async e=>await Pt(e,{method:"GET"})||Vy,$y=d((({className:e})=>{const t=ug(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=fa(`${Ut}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Ly);return{data:t||Vy,isLoad:!t&&!n}}(n);return o(ky,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:Mi,renderRemoteWorkplaceCard:Oy,getBalloon:Fi,getBalloonRemoteWorkplaces:zy,title:`Офисы филиала ${t?.name}`})})),jy=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($y,{}):o(Ey,{descriptionData:e})})})),qy=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,{})]}))),Uy="hidden sm:flex absolute z-40 top-10",Wy=zt((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=Ud({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...i,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*l}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...i})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Od,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Hy({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(Kd,{className:u("left-6",Uy),onClick:d.scrollLeft}):null,d.canScrollRight?o(Xd,{className:u("right-6",Uy),onClick:d.scrollRight}):null]})]})})),Hy=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const i=a===e,l=i?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Yy=d((({address:e,email:t,telephone:n,button:a,className:i="",__html:l,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",i),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?Gy({__html:l,richVersion:r}):null,Ky({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Ky({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Ky({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),Gy=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(_e,{...e,itemSize:"list-s"})}),Ky=({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,Xy=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_e,{__html:t,richVersion:n})})})),Jy=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:[null,e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Zy=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Qy=(e=!1)=>e?"MinusIcon":"PlusIcon",eb=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",tb=zt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Se();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(si,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(oi,{className:u("gap-lg",Zy(m)),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>nb({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),nb=({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?eb(e):Qy(e))(i,r);return"accordion"===e?o(Jy,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:l}):o(lm,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},ab=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)),Ba,"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]})}))),ib=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(ab,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(ab,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),lb=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})})),rb=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(lb,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(lb,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),sb=["От 1 дня","До 365 дней"],ob=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(tl,{min:1,max:365,value:e,items:sb,onChange:t})]}))),cb=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(lb,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(lb,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),db=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(rb,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:mb(m)}),o(ob,{days:i,setDays:e=>m({days:e})}),o(cb,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:ub(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(ib,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),mb=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},ub=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},hb=d((({days:e,tariffs:t=[]})=>{const n=gb(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:[pb("Аренда за",e),pb("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),pb=(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})]}),gb=(e,t)=>{const n=fb(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},fb=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},xb=(e,t)=>e.find((e=>e.branchCode===t)),yb=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=xb(a,n.selectedBranch),d=bb(s?.safeBoxCaseVolumes),m=vb(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Nb(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(db,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(hb,{days:n.days,tariffs:u})]})})),bb=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],vb=(e,t)=>e?.find((e=>e.volume===t)),Nb=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,wb=`${Ut}/safeboxes`,Cb=[];const kb=async e=>await Pt(e,{method:"GET"})||Cb,Sb=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=Fo(),p=Ib(m.selectedRegion,h),f=function(e){const{data:t}=fa(e?`${wb}?regionCode=${e}`:null,kb);return t||Cb}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=xb(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(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(yb,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Qa,{points:y,className:"h-[640px]"}):null]})})),Ib=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Tb=e=>e<4?"w-72":"w-52",Rb={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"},Bb=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:i=[],stepVersion:l="gray",title:r,version:s="primary",...d})=>{const m=i.length>3,h=Rb,p=(e=>e?"":"opacity-0")(a),f=Se();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(k,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Im(f)}),i?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:um(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Pb(h,m,l)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:i.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:i}=x,{label:l,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Tb(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Ee,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(_e,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{className:"box-border py-s w-full mt-auto",version:i,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),Pb=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Db(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||l},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:i+1})},String(i));var r},Db=e=>e?"h-16 w-16":"h-24 w-24",_b=d((()=>o("div",{className:"hidden",role:"none"}))),Ab="hidden sm:flex absolute z-40",Eb={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Mb=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=Ud({itemCount:t?.length||0});return i((()=>Ob(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:Eb[l].item,gap:Eb[l].gap,children:t.map(my(n,a,l))}),s.canScrollLeft?o(Kd,{className:u("left-6",Ab,Eb[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Xd,{className:u("right-6",Ab,Eb[l].buttonTop),onClick:s.scrollRight}):null]})})),Ob=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Fb={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},zb=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Fb[t].wrapper,e),children:o(Mb,{className:Fb[t].component,tabsType:t,...n})}):null,Vb=zt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Lb(n??{}),p=D(),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(qb(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=jb(x[b],b),k=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:[zb({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:$b(t,x),activeItem:N,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(jb)?.filter(Boolean)||[]}),Lb=({__id:e,anchor:t})=>t??e??"tabs",$b=(e,t)=>t?.length?t:e,jb=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",qb=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Ub={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Wb=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Ub[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Hb=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}))),Yb={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(_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(Hb,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Gb=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 Kb({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Kb=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Yb))return null;return o(Yb[n],{...t,...a})},Xb=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(Gb,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Jb=(e,t)=>140*sf(e.slice(0,t).map((e=>e?.cols?.length??1))),Zb=(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,Qb=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=yx({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((i=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,l=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Jb(a,i)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Zb(e.cols,i):null]},`row${t}`)))})})]},String(t))})),bx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),ev=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(Qb,{rows:t.rowsData})})})]},a)}))}))),tv=(e=!1)=>""+(e?"text-white":"text-secondary-text"),nv=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:tv(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),av=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(nv,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(ev,{activeTabIndex:r,items:m}),o(Hb,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Hb,{onClick:n,isOpen:!0})]})})),iv=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(av,{...t,onClick:n})}):null]}))),lv=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(iv,{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(Wb,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Xb,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),rv=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,bx({...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]})})),sv=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:i,hiddenRowsNum:l=0,...r})=>{const s=i?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=yx({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(lv,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,y]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?o(si,{renderFoldableSection:({isUnfolded:e})=>c(rv,{controls:p,children:[x,o(oi,{isUnfolded:e,children:y})]}),renderFoldButton:rm}):o(rv,{controls:p,children:f})})]})})),ov=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?cv():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?dv(n):null,i?o(_e,{richVersion:l,__html:i}):null]})]}))),cv=()=>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"}),dv=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),mv=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]}))),uv=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(mv,{prefix:t,unit:n,suffix:a})})})),hv=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=D();return o(g,{className:u("relative flex flex-col",gx[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:i,isTheme:l,...c,children:P({...c,extraProps:{className:u("w-full",Bd(r)),...px(a)}})})}),{childrenTypes:[]}),pv=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",gv=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=D();return c(g,{className:e,defaultPadding:pv(e),...i,children:[o(k,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(l)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(l)(n)})}):null]})})),fv={AdTile:Lt,ApplicationForm:wc,ApplicationLeadForm:Td,BankAccountFiltration:km,BenefitsBlock:Bm,BonusBenefitsBlock:Em,ButtonsBlock:Om,CalculatorBonus:qm,CalculatorBusinessDeposit:Qm,CalculatorCredit:Xr,CalculatorDeposit:xu,CalculatorRefinancing:Su,CardTransfer:_u,Carousel:Lu,CarouselCard:Uu,CarouselCatalogCard:Hu,CarouselLinks:Ku,CarouselRecommendationCard:ah,CarouselTariffsCard:rh,ContactsBlock:oh,CreditCardForm:lp,CreditForm:$p,DepositFiltration:Hp,Depository:og,ErrorBlock:dg,ExchangeRateTile:$g,Footer:Nf,GracePeriod:wf,GrantSupport:If,Header:mx,Headline:k,HorizontalLayout:fx,ImgBlock:xx,InsuranceAmountBlock:kx,InvestmentInfo:Rx,LinkDocs:jx,MobileAppTile:Hx,MortgageFiltration:py,OfficesAtmsMap:jy,Placeholder:qy,ProductBlock:Vt,ProductGallery:Wy,RepresentativeOfficeInfo:Yy,RichTextBlock:Xy,RollupItem:tb,SafeDepositRental:Sb,StepsBlock:Bb,StickyBottomMenu:_b,TabsLayout:Vb,TariffsTable:sv,TextBlock:ov,UnitBlock:uv,VerticalLayout:hv,Video:gv},xv=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))})),yv="cookie",bv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=on();af((()=>{globalThis.localStorage?.getItem(yv)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem(yv,"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(cr,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function vv(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);cn(globalThis.document,"keydown",t)}function Nv(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 wv=()=>{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 Nv(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},Cv=d((()=>{const[e,{close:t}]=wv(),n=Boolean(e.length);return vv(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})),kv=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return Nv(ue.observable,"popup",{open:t,close:n}),vv(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})),Sv="header",Iv="footer",Tv="sticky-footer",Rv={},Bv=d((({className:e,data:t=Rv,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);xv(),hg();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?.[Sv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(i?.[Sv],{...m,slotName:Sv})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),B(i?.[Iv],{...m,slotName:Iv})]})]}),i?.[Tv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(i?.[Tv],{...m,slotName:Tv})}):null,o(Cv,{}),o(kv,{}),o(bv,{__html:d?.cookieContent?.__html})]})}));Object.assign(Bv,{childrenTypes:[],slots:()=>[Sv,Iv,Tv]});e.Blocks=fv,e.ContentPage=Bv,e.handlerDecorator=ce,e.joinList=um,e.locationNavigator=Jt,e.packageVersion="0.14.724",e.projectSettings=A,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),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={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},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=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=S,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},i)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const _=["CDN","BASE_PATH"],A=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return _.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),E=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...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:E,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:F,hasPrefix:V});const $="/api/",j=`${$}v1/storage`,q=e=>(t,n)=>{if([!t,E(t),O(t),[A.CDN,$].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`${j}/${t}/attachment`;const a=t?.startsWith("/");return F(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=D(),m="normal"===l?`${n}.svg`:`sprites.svg#${n}`,h=q(d)(F(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&&!E(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=D();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=D(),{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(!M(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 ke({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 Se=()=>{const[e,t]=a(false);return i((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...y})=>{const b=Se(),v=D(),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&&ke({version:t,handleClick:N,text:w}),i?o("div",{className:"relative h-full",children:i}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Pe(P({...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(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children: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)})]}))),Fe=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)),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:Fe,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(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=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons: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:je(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=(kt=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-kt.length]))).reduceRight(at,nt);var kt;const St=(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)),St(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 Ft(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=Ft((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Vt,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},qt=e=>e?.replace(/[^+\d]/g,""),Ut="/api/v1";const Wt=e=>e?{phone:qt(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber: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(E(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!E(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}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(N,{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(Ee,{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),k=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);i((()=>{v&&C.current?.focus()}),[v,C]);const S=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:k,onFocus:x,onBlur:y,disabled:w},e):o("input",{type:r,className:u("h-14",xn,S,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:k,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(Ee,{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 kn({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 Sn=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:k}]=on(),S=dn(C),I=l((e=>{v&&!w&&k(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&n&&d(In(n))}),[n]);const T=kn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:S,onBlur:C,onFocus:k,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=En(x,n.length),k=y&&!C,S=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",k?"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",An(m,d,C)),onClick:k?I:S,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Rn(r)||h}),_n(k,g)]}),p&&k?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"}),An=(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"),En=(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,zn=e=>t=>n=>e(n)?[]:[t],Fn=zn((e=>null!=e&&""!==e)),Vn="Некорректно заполненное поле",Ln="Укажите регион, город/населенный пункт, улицу, дом",$n=e=>Fn(e??Vn),jn=e=>zn((e=>e?.key&&""!==e?.key))(e??Vn),qn=e=>zn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??Vn),Un=e=>zn((e=>"string"==typeof e&&e.length>1&&ea(e)))(e??Vn),Wn=(e,t)=>zn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??Vn),Hn=e=>zn((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=>zn(Yn)(e),Kn=zn((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=()=>zn(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:$n("Укажите тип платежной системы"),currency:$n("Укажите валюту"),cardCategory:$n("Укажите категорию карты"),codeWord:(ia="Необходимо ввести кодовое слово",zn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&ea(e)))(ia??Vn)),confirmationIncome:jn(),methodObtain:$n(),deliveryDate:$n("Укажите дату доставки")};var ia;const la={organization:jn("Выберите тип организации"),organizationAddress:zn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(Ln),organizationPhone:Gn("Укажите номер телефона"),organizationName:$n("Укажите наименование организации"),legalForm:$n("Укажите ОПФ"),generalSeniority:qn("Укажите количество лет стажа"),lastJobExperience:qn("Укажите стаж на последнем месте работы"),experience5Years:qn("Укажите общий стаж за последние 5 лет"),jobsNumber:qn("Укажите количество мест работы за последние 5 лет"),beginDate:$n("Укажите дату заключения трудового договора"),addressFact:Zn(),addressRegistration:Zn(),addressRetail:jn("Выберите адрес банка"),addressMatch:$n(),sex:$n("Укажите свой пол"),limitedBirthday:zn(ta)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:$n("Укажите место рождения"),education:jn("Выберите ваше образование"),housing:jn("Выберите тип жилья"),amountWorkers:jn("Выберите информацию о количестве сотрудников"),employment:jn("Выберите информацию о трудоустройстве"),employerActivities:jn("Выберите вид деятельности организации"),employerOrganization:jn("Выберите вид организации"),positionOrganization:jn("Выберите вашу должность"),familyStatus:jn("Выберите семейное положение"),familyMembers:Wn(2,"Укажите количество членов семьи"),children:Wn(2,"Укажите количество детей"),dependents:Wn(2,"Укажите количество иждивенцев"),totalIncome:Wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Wn(10,"Укажите сумму обязательных выплат"),snils:(e=>zn(Xn)(e))("Некорректный номер СНИЛС"),conscription:$n(),armyIdFlg:Kn,dulSerie:(e=>zn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:Hn("Укажите номер паспорта"),dulIssueDateField:$n("Укажите дату выдачи паспорта"),dulSubdivisionCode:Hn("Укажите код подразделения"),dulIssuedBy:$n("Укажите организацию, выдавшую паспорт"),participantDateRegistration:$n("Укажите дату регистрации"),retirementIncome:$n(),otherIncome:$n(),wages:$n(),mandatoryPayments:$n(),disablePeopleFlg:$n(),bankruptcyFlg:$n(),shareholderFlg:$n(),legalEntityName:$n(),bankEmployeeCode:$n(),partInBusiness:$n(),regionRetail:jn("Выберите регион")},ra={fullName:$n(),addressBranch:jn(),desiredMeetingDate:$n(),product:$n(),localities:$n(),partnerComments:$n(),collectionCount:$n(),acquiringType:jn(),serviceType:jn(),annualRevenue:$n(),feedbackMethod:jn(),serviceDirection:jn(),secondaryPhone:Gn("Укажите номер телефона"),region:jn(),surname:Un("Укажите свою фамилию"),name:Un("Укажите своё имя"),middleName:Un("Укажите своё отчество"),birthday:$n("Укажите дату рождения"),phone:Gn("Укажите номер телефона"),email:(e=>zn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>zn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:$n(),typeForm:$n(),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 ka(e=!1){const{data:t}=ba(`${Ut}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Dt);return Array.isArray(t)?t:[]}const Sa=(e="")=>"ULTRASERVICE"===e,Ia=d((({field:e,input:t,params:n})=>{const a=Sa(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?ka(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,Aa=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?Ea(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(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",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)]})})),Ea=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))))}),Oa=["От 1 000 ₽","До 1 000 000 000 ₽"],za=d((({field:e})=>o(Aa,{title:"Сумма, ₽",items:Oa,min:1e3,max:1e9,...e("amount")}))),Fa=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...ca(e("annualRevenue"),ra.annualRevenue,t?.required)}))),Va=d((({field:e})=>o(Sn,{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=$a(t,e),c=ja(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},$a=(e,t)=>t&&e.toDateString()===t.toDateString(),ja=(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]),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:()=>{if(ei(p)){const[n,a,i]=p.split(".");d?.(new Date(Number(i),Number(a)-1,Number(n))),e(Number(a)-1),t(Number(i))}else 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++;if(Number(t)>0&&Number(t)<=i)return!0}return!1},ti=({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&&jt(t),setSelectedMonth:i,setSelectedYear:l,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),ni=Ha.map((e=>({key:e}))),ai=Array.from({length:(new Date).getFullYear()-Ja+1},((e,t)=>Ja+t)).reverse().map((e=>({key:String(e)}))),ii=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},li=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},ri={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},si={className:"min-w-32",iconVersion:"black",isBorder:!1},oi=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:k,yearsOptions:S,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=ii(r,Ha.indexOf(e));li({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:ni,yearsOptions:ai,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:[ti({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,{...ri,className:"-rotate-90 cursor-pointer"})}),o(Dn,{onChange:w,value:{key:Ha[f]},options:k,...si}),o(Dn,{onChange:C,value:{key:String(y)},options:S,...si}),o("div",{className:"my-auto",onClick:N,children:o(W,{...ri,className:"rotate-90 cursor-pointer"})})]}),o(Wa,{today:n,currentMonth:f,currentYear:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),ci=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(oi,{label:mn({label:t,errors:a}),valid:Boolean(!n),...i}),yn(n)]}))),di=d((({field:e,input:t})=>o(ci,{label:"Дата рождения",...ca(e("birthday"),ra.birthday,t?.required)}))),mi=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...ca(e("collectionCount"),ra.collectionCount,t?.required)}))),ui=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...ca(e("comment"),ra.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),hi=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)}))}))),pi="appearance-none w-5 h-5 border-solid flex-none",gi=[{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"}],fi=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(hi,{paths:gi,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",yi(a)),onClick:s,children:[o("div",{className:u(pi,"m-0",i?"rounded-full border-2":vi(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:bi(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,xi(n)]})})})),xi=e=>e?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:e})}):null,yi=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",bi=(e=!1)=>e?"radio":"checkbox",vi=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Ni="consentToReceiveMaterials",wi=d((({field:e,input:t})=>o(fi,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...ca(e(Ni),ra[Ni],t?.required)}))),Ci=d((({field:e,input:t})=>o(ci,{label:"Желаемая дата встречи",...ca(e("desiredMeetingDate"),ra.desiredMeetingDate,t?.required)}))),ki=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(Sn,{label:"Электронная почта",...ca(e("email"),ra.email,n),...a})})),Si=[{key:"ULTRASERVICE",text:"Ультра"}],Ii=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ti=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Ri=d((({field:e,input:t})=>o(Mn,{label:"Способ получения ответа",options:Ti,...ca(e("feedbackMethod"),ra.feedbackMethod,t?.required)}))),Bi=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...ca(e("fullName"),ra.fullName,t?.required),...t})));function Pi(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}const Di={};function _i(e,t=Di){const n=s(null),o=function(){const[,e]=a(0);return l((()=>e((e=>(e+1)%65536))),[])}();return i((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,a)=>(n.current||=new Set,n.current.add(a),e.getItem(a)),has:(t,a)=>(n.current||=new Set,n.current.add(a),e.hasItem(a)),set:(t,n,a)=>(e.setItem(n,a),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const 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 Ei,Mi;function Oi(e){return _i(Ai,e)}Ei=Ai,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),Pi(Ei,Mi),Pi(Mi,Ei),Ei.bus.watch((({type:e,event:t})=>{null!=t?Mi.setItem(e,t):Mi.removeItem(e)}));const zi=()=>Oi(),Fi=(e,t)=>{if(!t)return null;const n=ji(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")}},Vi=(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},Li=(e,t)=>{const n=ji(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},$i=(e,t,n)=>{const a=ji(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},ji=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,qi=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Ui=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(Wi(t))}),[]),r=l((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Sn,{disabled:t?.filledByEsia&&qi(e,n),label:"Адрес",...ca(e(n),ra[n],t?.required),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),Wi=e=>({apartment:e?.data?.flat,city:e?.data?.city,district:e?.data?.area_with_type,fullAddress:e?.unrestricted_value,fiasCode:e?.data?.fias_id,house:e?.data?.house,locality:e?.data?.settlement_with_type,okatoRegionCode:e?.data?.okato,postcode:e?.data?.postal_code,region:e?.data?.region,regionCode:e?.data?.region_kladr_id?e?.data?.region_kladr_id.substring(0,2):"",street:e?.data?.street,qc:e?.data?.qc,qcComplete:e?.data?.qc_complete,qcHouse:e?.data?.qc_house}),Hi=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Yi(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Wi(n.data?.address));const r={amountWorkers:Vi(e?.amountWorkers,n.data?.employee_count),employerActivities:Fi(e?.employerActivities??[],a),organization:$i(e?.organization??[],i,l),employerOrganization:Li(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Yi=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Gi=d((({field:e,input:t})=>{const n=zi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Hi(n,e,t)}),[]);return o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...ca(e("inn"),ra.inn,t?.required),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(fi,{text:t,value:n,disabled:i,onChange:r},a),yn(l)]}))),Xi=d((({field:e})=>o(Ki,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ji=`${Ut}/outservice`,Zi=[];async function Qi(){const e=await Pt(`${Ji}/outserviceregions`);return e&&Array.isArray(e)?e:Zi}const el=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=ba("outServiceRegions",Qi),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})})),tl="middleName",nl=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&qi(e,tl),...ca(e(tl),ra.middleName,t?.required),...t}))),al=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&qi(e,t.name??""),...ca(e("name"),ra.name,t?.required),...t}))),il=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]}))),ll=d((({field:e})=>ua(e("acquiringType")?.value?.key)?o(il,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),rl=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(Sn,{...ca(e("partnerComments"),ra.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),sl=e=>"_"===e,ol=e=>/\d/.test(e),cl=e=>sl(e)||ol(e),dl=[..."+7 (___) ___-__-__"],ml=dl.findIndex(sl),ul=dl.map(((e,t)=>cl(e)?dl.slice(0,t).filter(cl).length:-1));function hl(e){const t=e.replace(/\D/g,""),n=dl.map(((e,n)=>ol(e)?e:t.charAt(ul[n])||e)),a=ul.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ml,a)):n).join("")}const pl=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(hl(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})})),gl=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(pl,{"aria-label":t,label:mn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),yn(n)]}))),fl=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(gl,{label:"Телефон",...ca(e(n),ra.phone,t?.required),disabled:t?.filledByEsia&&qi(e,n),...t})})),xl=d((({field:e})=>ua(e("acquiringType")?.value?.key)?o(il,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),yl=d((({field:e,source:t})=>o(Mn,{placeholder:"Выберите продукт",label:"Продукт",options:bl(t?.productList),...oa(e("product"),ra.product)}))),bl=e=>(e??[]).map((e=>({key:e,value:e}))),vl=`${Ut}/outservice/outserviceregions`,Nl=`${Ut}/regions`,wl=[];function Cl(e=Nl){const{data:t}=ba(e,Dt);return Array.isArray(t)?t:wl}const kl=d((({field:e,input:t,params:n})=>{var a;const i=Cl((a=n?.typeForm,"OUTSERVICE"===a?vl: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)})})),Sl=d((({field:e,input:t})=>{const n=ka(!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)})})),Il=d((({field:e})=>{const t=e("secondaryPhone");return o(gl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?oa(t,ra.secondaryPhone):t})})),Tl=d((({field:e,input:t})=>o(Mn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ii,...ca(e("serviceDirection"),ra.serviceDirection,t?.required)}))),Rl=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&qi(e,"surname"),...ca(e("surname"),ra.surname,t?.required),...t}))),Bl=["От 1 мес","До 15 лет"],Pl=d((({field:e})=>o(Aa,{title:"Срок, месяцев",items:Bl,min:1,max:180,...e("term")}))),Dl=d((({field:e,input:t})=>o(Mn,{label:"Тип обслуживания",options:Si,...ca(e("serviceType"),ra.serviceType,t?.required)}))),_l={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(Ee,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",_l[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(fi,{isRadio:!0,text:t,value:n===e,onChange:()=>i&&i(e),disabled:l},String(e))))})]}))),El=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Ml=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:El,value:t,onChange:e=>n&&n(e)})})}));const Ol={$ref:"/wcms-resources/outservice-productlist.json"},zl={fullName:e=>o(Bi,{...e}),addressBranch:e=>o(Ia,{...e}),desiredMeetingDate:e=>o(Ci,{...e}),product:e=>o(yl,{...e,source:Ol}),localities:e=>o(el,{...e}),isClient:e=>o(Xi,{...e}),partnerComments:e=>o(rl,{...e}),collectionCount:e=>o(mi,{...e}),acquiringType:e=>o(ma,{...e}),onlineCheckout:e=>o(ll,{...e}),posTerminal:e=>o(xl,{...e}),serviceType:e=>o(Dl,{...e}),term:e=>o(Pl,{...e}),amount:e=>o(za,{...e}),annualRevenue:e=>o(Fa,{...e}),vedTypes:e=>o(Ml,{...e}),feedbackMethod:e=>o(Ri,{...e}),serviceDirection:e=>o(Tl,{...e}),bankEmpolee:e=>o(Va,{...e}),secondaryPhone:e=>o(Il,{...e}),applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Sa(e?.params?.typeForm)?o(Sl,{...e}):o(kl,{...e}),consentToReceiveMaterials:e=>o(wi,{...e}),surname:e=>o(Rl,{...e}),name:e=>o(al,{...e}),middleName:e=>o(nl,{...e}),birthday:e=>o(di,{...e}),phone:e=>o(fl,{...e}),email:e=>o(ki,{...e}),inn:e=>o(Gi,{...e}),comment:e=>o(ui,{...e})},Fl=(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},Vl=e=>2===e?"@xl:grid-cols-2":"",Ll=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{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 jl({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const ql={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"},Ul={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")},Wl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(jl(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(ql[i],Ul[i]),a),type:d,role:h,onClick:p,children:[s?o($l,{blur:!0,size:"small"}):null,e]})})),Hl=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"})}))),Yl=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(Hl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Gl=d((({responseType:e,typeForm:t,onClose:n})=>{const a="OK"===e,i="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Yl,{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(Wl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Kl=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Xl=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,...Zl(o),...Jl(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Jl=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Zl=e=>e?{vedTypes:Object.fromEntries(El.map((({id:t})=>[t,t===e])))}:{},Ql={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:da[0],serviceType:Si[0],feedbackMethod:Ti[0],serviceDirection:Ii[0],vedTypes:El[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},er=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ee,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ee,{children:t.text})}):null]}))),tr=(e,t)=>o(Wl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),nr=(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(fi,{...e}),o(er,{link:t})]}),yn(oa(e,Kn).error)]}):o(er,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),tr(n)]}),ar={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}}},ir=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,"ved"===e.fieldType&&e?.defaultValue||Ql[e.name||""]]))),typeForm:{key:t,text:""}}))(x,n),[b,v]=a(""),w=sn(Gl),C=l((async(e,t)=>{const a=lr(x,e),i=Kl(sa(a));if(!On(i(e)))return console.warn("validation fail");const l=Xl({...e,...h}),r=await ar.send(l,"lead"===m)?"OK":"Fail";if(v(r),r&&w.open({typeForm:n,responseType:r}),"OK"===r&&g){const e=tn();Xt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[n]),[,{field:k,onSubmit:S,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:S,children:[r.map(((e,t)=>c("div",{className:u(Vl(e.columns),"grid gap-x-m"),children:[Ll(e.title),(e?.inputs||[])?.map(Fl(k,{typeForm:n}))]},`section-${t}`))),nr(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),lr=(e,t)=>e.filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)})))),rr=[{columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0},{fieldType:"common",name:"name",required:!0,dadata:!0},{fieldType:"common",name:"middleName",dadata:!0},{fieldType:"common",name:"limitedBirthday",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"processPersonalDataFlg",required:!0},{fieldType:"common",name:"consentProviderFlg",required:!0},{fieldType:"common",name:"consentOthersFlg",required:!0},{fieldType:"common",name:"consentInformFlg"},{fieldType:"common",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(Sn,{label:"Адрес",disabled:r,...ca(e(n),ra[n],t?.required),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),or=d((({field:e,input:t})=>o(Ki,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...ca(e("addressMatch"),ra.addressMatch,t?.required)}))),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],yr=(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)}))};const br=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return yr(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),vr={...pr,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();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:kr(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($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"})]}),fr(r,m,u("right-2 top-80",h))]})})),kr=e=>{const t=[Ir(Sr(e,0)),Ir(Sr(e,1))];return t.every((e=>e))?t:wr},Sr=(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})})})),Ar=d((({value:e,subText:t,children:n,isPhone:a,...i})=>{const l=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[l.length,n,t].every((e=>!e))?null:Er({textItems:l,subText:t,children:n,isPhone:a,...i})})),Er=({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||Mr(n,s),i?o(Ee,{color:a,size:"text-m",children:i}):null]}),Mr=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ee,{size:"text-l",children:t?o("a",{href:`tel:${Or(e)}`,children:e.trim()}):e.trim()},String(n)))),Or=e=>e.replace(/\D/g,""),zr=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}))),Fr=e=>{const t=Lr(e);return o(Ar,{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)},$r=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],jr=e=>$r.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(zr,{className:"border-none",children:[o(Ar,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Wr)})}),o(Ar,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Ur=e=>{const t=$r.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(Ee,{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(Ar,{label:"Валюта",value:e.currency}):null,t?o(Ar,{label:"Купить",value:String(t)}):null,n?o(Ar,{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(Ee,{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(Ar,{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=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]}),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=jr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(zr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ar,{label:"Факс",value:t,isPhone:!0}),o(Ar,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ar,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ar,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Ar,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Ar,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(zr,{children:o(Ar,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(Zr)})})}):c(zr,{children:[o(Ar,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Wr)})}),Fr(d)]}),r?.businessScheduleVisibleTag?qr(r?.businessScheduleDescription):null,s?.currencies?.length?o(zr,{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=jr(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=Ft((({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(Ki,{text:"Наличие военного билета",...ca(e("armyIdFlg"),ra.armyIdFlg,t?.required)}))),ws=d((({field:e,input:t})=>o(Sn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...ca(e("bankEmployeeCode"),ra.bankEmployeeCode,t?.required),...t}))),Cs=d((({field:e,input:t})=>o(Ki,{text:"В отношении меня ведётся производство по делу о банкротстве",...ca(e("bankruptcyFlg"),ra.bankruptcyFlg,t?.required)}))),ks=d((({field:e,input:t})=>o(ci,{label:"Дата начала работы на текущем месте",...ca(e("beginDate"),ra.beginDate,t?.required),...t}))),Ss=d((({field:e,input:t})=>o(Sn,{label:"Место рождения",...ca(e("birthPlace"),ra.birthPlace,t?.required),...t,disabled:t?.filledByEsia&&qi(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(Sn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...ca(e("children"),ra.children,t?.required),...t}))),Ds=d((({field:e,input:t})=>o(Sn,{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})})),As=d((({field:e,input:t})=>{const{data:n}=ps("MILITARY_STATUS");return o(bs,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Es={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},Ms=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Yl,{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(Wl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Os=(e,t)=>{const{open:n}=sn(Ms),a=Se();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])},zs=d((({className:e,error:t,docId:n,...a})=>{const i=Os(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(fi,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ee,{children:"Ознакомиться"})}):null]}),yn(t)]})})),Fs=d((({field:e,input:t})=>t&&t.name?o(zs,{text:Es[t.name]?.text,docId:Es[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(N,{className:"text-center",title:t}):null,n]}))),$s="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",js="flex flex-col lg:w-1/2 gap-2xl",qs="flex flex-col gap-y-xl min-w-52",Us=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ee,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),Ws=d((({className:e,title:t,value:n,color:a="text-secondary-text",...i})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Us,{value:n,...i}):o(Ee,{size:"text-h3",children:"-"})]}))),Hs=(e=[],t=!1)=>Ys([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ys=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Gs=(e,t=0)=>e?.sum?e.sum:t,Ks=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Xs=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Js=({min:e=0,max:t=0,availableMonths:n,...a})=>o(Aa,{items:[`От ${Zs(e)}`,`До ${Zs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Zs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Qs=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:i,onChange:l,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(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(Aa,{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=Ft((({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($s,e),children:[c("div",{className:js,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}),je(a,{isVertical:!0}),Xs(l)]})]})})})),vo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(fi,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(fi,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(fi,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(fi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),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]))),ko="calculator",So=d((({field:e,params:t})=>{const n=l((t=>{e(ko).onChange?.(t)}),[]);return o(bo,{...t?.calcData,padding:"p-0",defaultParams:wo(e(ko).value),onChange:n})})),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=[{id:"810",text:"Рубли"}],Bo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency"),{data:i}=ps("CURRENCY"),l=i?.map((e=>({id:e.key,text:e.value})))??Ro;return o(To,{label:"Валюта",orientation:"horizontal",items:l,value:n,onChange:e=>a?.(e),...ca(e("currency"),ra.currency,t?.required)})})),Po=d((({field:e,input:t})=>o(ci,{label:"Дата доставки",...ca(e("deliveryDate"),ra.deliveryDate,t?.required)}))),Do=d((({field:e,input:t})=>o(Sn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...ca(e("dependents"),ra.dependents,t?.required),...t}))),_o=d((({field:e,input:t})=>o(Ki,{text:"Являюсь инвалидом",...ca(e("disablePeopleFlg"),ra.disablePeopleFlg,t?.required)}))),Ao="dulIssueDateField",Eo=d((({field:e,input:t})=>o(ci,{label:"Дата выдачи",...ca(e(Ao),ra.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&qi(e,Ao)}))),Mo="dulIssuedBy",Oo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Sn,{disabled:t?.filledByEsia&&qi(e,Mo),label:"Кем выдан",...t,...ca(e(Mo),ra.dulIssuedBy,t?.required),onDaDataChange:i,daDataQueryPrefix:n})})),zo=d((({field:e,input:t})=>o(Sn,{disabled:t?.filledByEsia&&qi(e,"dulNumber"),label:"Номер документа",isInteger:!0,maxLength:6,...ca(e("dulNumber"),ra.dulNumber,t?.required)}))),Fo=d((({field:e,input:t})=>o(Sn,{disabled:t?.filledByEsia&&qi(e,"dulSerie"),label:"Серия документа",isInteger:!0,maxLength:4,...ca(e("dulSerie"),ra.dulSerie,t?.required)}))),Vo="dulSubdivisionCode",Lo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Sn,{disabled:t?.filledByEsia&&qi(e,Vo),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...ca(e(Vo),ra.dulSubdivisionCode,t?.required),onDaDataChange:n})})),$o=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})})),qo=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})})),Uo=d((({field:e,input:t})=>{const{data:n}=ps("EMPLOYMENT_INFO_UNITED");return o(bs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Wo=d((({field:e,input:t})=>o(Sn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...ca(e("expenses"),ra.expenses,t?.required),...t}))),Ho="experience5Years",Yo=d((({field:e,input:t})=>{const n=l((t=>e(Ho)?.onChange?.(String(Ra(Number(t),0,5)))),[]);return o(Sn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...ca(e(Ho),ra[Ho],t?.required),...t,onChange:n})})),Go=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(Sn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),Ko=d((({field:e,input:t})=>{const{data:n}=ps("MARITAL_STATUS");return o(bs,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Xo=d((({field:e,input:t})=>o(Sn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...ca(e("generalSeniority"),ra.generalSeniority,t?.required),...t}))),Jo=d((({field:e,input:t})=>{const{data:n}=ps("HOUSE_TYPE");return o(bs,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Zo=d((({field:e,input:t})=>o(Sn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...ca(e("jobsNumber"),ra.jobsNumber,t?.required),...t}))),Qo=d((({field:e,input:t})=>o(Sn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...ca(e("lastJobExperience"),ra.lastJobExperience,t?.required),...t}))),ec=d((({field:e,input:t})=>o(Sn,{label:"Наименование юридического лица",...t,...ca(e("legalEntityName"),ra.legalEntityName,t?.required),disabled:!e?.("shareholderFlg")?.value}))),tc=d((({field:e,input:t})=>o(Sn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...ca(e("legalForm"),ra.legalForm,t?.required),...t}))),nc="limitedBirthday",ac=d((({field:e,input:t})=>o(ci,{label:"Дата рождения",...ca(e(nc),ra.limitedBirthday,t?.required),disabled:t?.filledByEsia&&qi(e,nc)}))),ic=d((({field:e,input:t})=>o(Sn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...ca(e("mandatoryPayments"),ra.mandatoryPayments,t?.required),...t}))),lc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],rc=d((({field:e,input:t})=>o(To,{orientation:"horizontal",items:lc,...ca(e("methodObtain"),ra.methodObtain,t?.required)}))),sc=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})})),oc=d((({field:e,input:t})=>{const n=zi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Hi(n,e,t)}),[]);return o(Sn,{label:"Наименование организации",...t,...ca(e("organizationName"),ra.organizationName,t?.required),onDaDataChange:a})})),cc=d((({field:e,input:t})=>o(Sn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...ca(e("otherIncome"),ra.otherIncome,t?.required),...t}))),dc=d((({field:e,input:t})=>o(ci,{label:"Дата регистрации по месту жительства",...ca(e("participantDateRegistration"),ra.participantDateRegistration,t?.required)}))),mc="partInBusiness",uc=d((({field:e,input:t})=>{const n=l((t=>e(mc)?.onChange?.(String(Ra(Number(t),0,100)))),[]);return o(Sn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...ca(e(mc),ra.partInBusiness,t?.required),...t,onChange:n})})),hc=e=>e.map((e=>({key:e.type,text:e.name}))),pc=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 hc(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:gc(c),...ca(e("paymentSystem"),ra.paymentSystem,t?.required),value:n?.key,onChange:m})})),gc=e=>e?.map((e=>({id:e.key,text:e.text})))??[],fc=d((({field:e,input:t})=>{const{data:n}=ps("POSITION");return o(bs,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),xc=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)})})),yc=d((({field:e,input:t})=>o(Sn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...ca(e("retirementIncome"),ra.retirementIncome,t?.required),...t}))),bc=["male","female"],vc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],Nc=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 bc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(To,{label:"Пол",orientation:"horizontal",items:vc,...ca(e("sex"),ra.sex,t?.required)})})),wc=d((({field:e,input:t})=>o(Ki,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...ca(e("shareholderFlg"),ra.shareholderFlg,t?.required)}))),Cc=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(Cc,{"aria-label":t,label:mn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),yn(a)]}))),Sc=d((({field:e,input:t})=>o(kc,{label:"СНИЛС",maxLength:14,...ca(e("snils"),ra.snils,t?.required),...t}))),Ic=d((({field:e,input:t})=>o(Sn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ca(e("totalIncome"),ra.totalIncome,t?.required),...t}))),Tc=d((({field:e,input:t})=>o(Sn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ca(e("wages"),ra.wages,t?.required),...t}))),Rc={limitedBirthday:e=>o(ac,{...e})},Bc={processPersonalDataFlg:e=>o(Fs,{...e}),consentProviderFlg:e=>o(Fs,{...e}),consentOthersFlg:e=>o(Fs,{...e}),consentInformFlg:e=>o(Fs,{...e}),consentPfrFlg:e=>o(Fs,{...e})},Pc={organization:e=>o(sc,{...e}),organizationAddress:e=>o(Ui,{...e}),organizationPhone:e=>o(fl,{...e}),organizationName:e=>o(oc,{...e}),legalForm:e=>o(tc,{...e}),generalSeniority:e=>o(Xo,{...e}),lastJobExperience:e=>o(Qo,{...e}),experience5Years:e=>o(Yo,{...e}),jobsNumber:e=>o(Zo,{...e}),beginDate:e=>o(ks,{...e}),addressFact:e=>o(sr,{...e}),addressRegistration:e=>o(Ui,{...e}),addressRetail:e=>o(ys,{...e}),addressMatch:e=>o(or,{...e}),sex:e=>o(Nc,{...e}),limitedBirthday:e=>o(ac,{...e}),birthPlace:e=>o(Ss,{...e}),education:e=>o($o,{...e}),housing:e=>o(Jo,{...e}),amountWorkers:e=>o(vs,{...e}),employment:e=>o(Uo,{...e}),employerActivities:e=>o(jo,{...e}),employerOrganization:e=>o(qo,{...e}),positionOrganization:e=>o(fc,{...e}),familyStatus:e=>o(Ko,{...e}),familyMembers:e=>o(Go,{...e}),children:e=>o(Ps,{...e}),dependents:e=>o(Do,{...e}),totalIncome:e=>o(Ic,{...e}),expenses:e=>o(Wo,{...e}),snils:e=>o(Sc,{...e}),conscription:e=>o(As,{...e}),armyIdFlg:e=>o(Ns,{...e}),dulSerie:e=>o(Fo,{...e}),dulNumber:e=>o(zo,{...e}),dulIssueDateField:e=>o(Eo,{...e}),dulSubdivisionCode:e=>o(Lo,{...e}),dulIssuedBy:e=>o(Oo,{...e}),participantDateRegistration:e=>o(dc,{...e}),retirementIncome:e=>o(yc,{...e}),otherIncome:e=>o(cc,{...e}),wages:e=>o(Tc,{...e}),mandatoryPayments:e=>o(ic,{...e}),disablePeopleFlg:e=>o(_o,{...e}),bankruptcyFlg:e=>o(Cs,{...e}),shareholderFlg:e=>o(wc,{...e}),legalEntityName:e=>o(ec,{...e}),creditInRshbCd:e=>o(Io,{...e}),bankEmployeeCode:e=>o(ws,{...e}),partInBusiness:e=>o(uc,{...e}),regionRetail:e=>o(xc,{...e}),calculator:e=>o(So,{...e})},Dc={addressCourier:e=>o(Ui,{...e}),paymentSystem:e=>o(pc,{...e}),currency:e=>o(Bo,{...e}),cardCategory:e=>o(Rs,{...e}),codeWord:e=>o(Ds,{...e}),confirmationIncome:e=>o(_s,{...e}),methodObtain:e=>o(rc,{...e}),deliveryDate:e=>o(Po,{...e})},_c=d((({inputs:e=[],typeForm:t="",field:n,key:a})=>{const i=e.every((e=>Boolean(n(e.name).value))),l=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(oa(n(e?.name),ra[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Dr,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:a})=>o(_r,{isUnfolded:a,className:"flex flex-col pl-2xl",children:e.map(Fl(n,{typeForm:t},Bc))}),renderFoldButton:Ac(c("div",{children:[o(fi,{value:i,onChange:t=>{for(const a of e){const e=n(a.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},a),yn(l?"Отметьте все обязательные соглашения":"")]}))})})})),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"})})]}),Ec=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:a,restInputs:i}=Mc(n||[]);return a.length>2?c("div",{children:[i.map(Fl(e,{typeForm:t},{...Rc})),o(_c,{inputs:a,field:e})]}):(n||[])?.map(Fl(e,{typeForm:t},{...Rc}))},Mc=e=>({consentInputs:e?.filter((e=>Object.keys(Es).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(Es).includes(e.name||"")))||[]}),Oc=(e,t)=>o(Wl,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),zc=e=>Rr("/user-data/updateUserProfile","PUT",e),Fc=e=>Rr("/user-data/updateUserTask","PUT",e),Vc={width:"118",height:"24"},Lc={"bg-white":"color",transparent:"white"},$c={"bg-white":"text-primary-main",transparent:"text-white"},jc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Lc[e]},className:$c[e],width:n?.width,height:n?.height}),qc={"bg-white":"text-primary-text",transparent:"text-white"},Uc=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:[jc(l,n?.image,Vc),r?a??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:qc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),Wc=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(Yl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Uc,{}),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(Wl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Wl,{type:"submit",disabled:!d,onClick:p,version:"secondary",children:"Отправить"})]})]})})})),Hc=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:Yc(e)})))),Yc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Gc=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:Kc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Kc=(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`},Xc=d((({isDisabled:e,onClick:t,text:n})=>o(Wl,{type:"button",onClick:t,disabled:e,children:o(Ee,{font:"font-normal",children:n})}))),Jc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Zc=({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(Jc))({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}},Qc=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}=Zc({values:m,onSuccess:s}),w=sn(Wc),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(Yl,{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(Gc,{values:m,setValues:u,errorText:g,hasError:p}):null,td(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}`)))})]}),ed(y,h),f?o($l,{blur:!1}):null]})})})),ed=(e,t)=>o(Xc,{text:"Далее",isDisabled:e,onClick:t}),td=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Hc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),nd={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},ad={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},id=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],ld=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?ad:nd;return o(Yl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(Al,{className:"whitespace-normal",orientation:"horizontal",items:id,value:n,onChange:u}),o(Wl,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),rd=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(N,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(w,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),sd={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},od={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},cd={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},dd=e=>Object.entries(e).reduce(((e,[t,n])=>t in sd?[...e,{contactTypeCd:{key:sd[t]},value:n}]:e),[]),md=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in od){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:od[t]},...a}]}return e}),[]),ud=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:hd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in cd?[...e,{incomeTypeCd:{key:cd[t]},value:Number(n||0)}]:e),[])),snils:h?.replaceAll(" ","").replaceAll("-",""),armyIdFlg:p};var f},hd=(e,t)=>Number(e)+Number(t),pd={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"},gd={...pd,amur_card:"14",owner_card:"13",travel_card:"15"},fd=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:hd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},xd=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}},yd=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}},bd=e=>e?.key?{key:e.key,text:e.value}:void 0,vd=d((function({task:e,isFromLead:t=!1,onClose:n=un}){const a=zi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=gd[s.code],u=Boolean(pd[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:k=[],employmentContractDate:S,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:D,employeesNumberCd:_,opf:A,seniority:E,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:F,maritalStatusCd:V,childrenDependents:L,totalDependents:$,otherDependents:j,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:bd(i),cardCategory:bd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:y,education:bd(b),participantDateRegistration:v,housing:bd(N),beginDate:S,employment:bd(I),organizationName:T,inn:R,employerActivities:bd(B),organization:bd(P),employerOrganization:bd(D),amountWorkers:bd(_),legalForm:A,generalSeniority:E?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:bd(F),familyStatus:bd(V),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:bd(q),confirmationIncome:bd(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:bd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...fd(U),...xd(k),...yd(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(Yl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:n,children:c("div",{className:"flex flex-col gap-lg mt-xs md:mt-0",children:[o(N,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(rd,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:y}),o(rd,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:b}),o(Wl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),Nd=d((function({onClose:e=un}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Yl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:e,children:c("div",{className:"flex flex-col gap-lg",children:[o(N,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(w,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Wl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Wl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),wd=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(Yl,{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(Wl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Wl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),Cd=()=>{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=()=>Oi(),Sd=({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(wd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(n),u=(e=>{const{open:t}=sn(ld),n=sn(Qc),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(Qc),p=(()=>{const{open:e}=sn(vd),{open:t}=sn(Nd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{handleSubmit:l((async n=>{const a=Kl(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 Td({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=Id(n);h.open({phone:n?.phone,consents:l,onSuccess:i}),c()}}catch{r("Fail")}}),[]),responseStatus:i,isSending:s}},Id=e=>Object.keys(Es).filter((t=>e[t])).map((e=>Es[e]?.text)),Td=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=Rd(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&&jt(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 Fc((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:i,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:dd({phone:o&&qt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:Cd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},Rd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Bd={typeForm:"",region:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",organizationPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:da[0],serviceType:Si[0],feedbackMethod:Ti[0],serviceDirection:Ii[0],vedTypes:El[0],limitedBirthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentDataProcessing:!1,processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,addressRegistration:"",participantDateRegistration:void 0,currency:"",paymentSystem:{name:"",type:""},cardCategory:{key:"",text:""},codeWord:"",addressRetail:{key:"",text:""}},Pd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Bd[e.name||""]]))),typeForm:{key:"",text:""}}},Dd=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:hl(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:_d(i),addressFact:_d(l),esiaAccountTypeCd:t?.esiaAccountType}},_d=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((()=>Pd(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,...Dd(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}]},Ed=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>rr?.flatMap((e=>e?.inputs))||[]),[rr]),[m,{isLoading:h}]=Ad(d,a),{handleSubmit:p,responseStatus:g,isSending:f}=Sd({inputs:d,programId:n,nextStepLink:a}),[,{field:x,onSubmit:y}]=an(m,{onSubmit:p}),b=sn(Gl);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,rr.map(((e,t)=>c("div",{className:u(Vl(e.columns),"grid gap-x-m"),children:[Ll(e.title),Ec({field:x,inputs:e?.inputs})]},`section-${t}`))),Oc(l,f)]})})})),Md=d((({title:e,description:t})=>{const n=Se();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"})]})})),Od=(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`}),Fd=10;function Vd(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}function Ld(e=0){const t=Math.round(e*Fd);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const $d=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:i,children:r,onIntersection:s})=>{const c=Vd(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),jd=["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:(k=(e,n)=>o($d,{className:u(m,i?jd[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(k):k(e,0))(p)});var k})),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=Se(),[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:B(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Od(!0)),children:T(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(Ee,{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:[B(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:[B(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(Md,{...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(il,{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(Wl,{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(Ee,{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 km(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Sm=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=>Sm(t[e])||Sm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Sm(t[e])||Sm(n[e])||Tm(t[e])<=Tm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Sm(t[e])||Sm(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=>Sm(t[e])||Sm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Sm(t[e])||Sm(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((()=>km(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=Ft((({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(Wl,{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=>km(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Am=(e=!1)=>e?"text-left":"text-center",Em={"":"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",Em[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Om=d((({className:e="",title:t,benefitList:n,...a})=>{const i=Se();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Am(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(zm)}):null]})})),zm=({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(N,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(_e,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Fm=e=>({icon:t,title:n,description:a},i)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),Vm=(e,t,n)=>o("div",{className:`grid gap-2xs ${Lm(t)}`,children:e.map(Fm(n))}),Lm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},$m=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?Vm(e,a,t):null]}))),jm={start:"justify-start",center:"justify-center",end:"justify-end"},qm=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",jm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:je(e)})})),Um=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]})]}))),Wm=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),Hm=({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(Um,{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(Wm,{title:e,...r}),Ym={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Gm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Km=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=Ym.prefMonthsNum,prefTravelBonusRate:l=Ym.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||Gm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},Xm=Ft((({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}=Km(r,n);return o(Ls,{className:e,title:t,...l,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),to({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Hm({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,je(a,{isVertical:!0}),Xs(i)]})]})})})),Jm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Zm=e=>Qs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Qm=" (c капитализацией)",eu=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:qs,children:[o(Ws,{title:`Доход в конце срока${l?Qm:""}`,value:e,postfix:n,prefix:"+"}),o(Ws,{title:`Сумма в конце срока${l?Qm:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),i?.map(Xs)]}),tu={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const nu={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},au=(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?tu[e?.rateType]:"",{data:n}=ba(t?`${Ut}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&iu(s,e)&&uo(a,["minSum","maxSum"],e)&&uo(n,["minDays","maxDays"],e)))||nu,{rate:m}=d,u=lu(m,e),h=a+u,p=c||[nu];return{...d,...mo(["minSum","maxSum"],p),...mo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},iu=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,lu=(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)},ru=Ft((({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=au(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(Ls,{className:e,title:t,...d,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Aa,{items:[`От ${Jm(b.min||0)}`,`До ${Jm(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[su(p,h),Zm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Hm({rate:x,depositeName:y,isShowDepositeName:l}),eu({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),su=(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(fi,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(fi,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),ou=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},cu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},du=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?hu(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=>[uu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),uu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),uu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),uu({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)))||cu,{rate:u}=m,h=mu(u,e),p=a+h,g=t||[cu];return{...m,...mo(["minSum","maxSum"],g),...mo(["minMonths","maxMonths"],g),availableMonths:ou(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}},mu=(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)},uu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],hu=(e,t)=>e+Math.round((t-e)/2),pu=(e="rub")=>"rub"===e,gu=(e,t)=>{const{minMonths:n,maxMonths:a}=mo(["minMonths","maxMonths"],bu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:Ra(i,n,a)}},fu=(e,t)=>{const{minSum:n,maxSum:a}=mo(["minSum","maxSum"],bu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:Ra(i,n,a)}},xu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),yu=e=>{const t=pu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},bu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},vu=(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]}),Nu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Zm({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]}),Nu(e.isShowNewClient),e.isShowNewClient?o(fi,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},Nu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,wu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Cu={text:"₽",key:"rub"},ku=Ft((({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))??[Cu],g=l((e=>t=>e?{...t,...yu(t),...fu(t,e),...gu(t,e),...xu(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:Cu},{normalize:g}),y=x?.("currency")?.value??Cu,b=x?.("isNewClient")?.value,v=bu(h,y),N=du(f,v,s),{rate:w,income:C,finalSum:k,type:S=""}=N,I=l((()=>{no({field:x,defParams:Hs(v,b),calcParams:N,monthsValue:"minMonths",map:wu})}),[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($s,e),children:[c("div",{className:js,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:Su(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}),vu({...N,...s},x)]}),Hm({rate:w,children:Tu(I,T)}),eu({income:C,finalSum:k,buttons:[...a,Iu(n?.buttons,S)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Su=(e="")=>pu(e)?1e3:100,Iu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},Tu=(e,t=!1)=>t?null:o(Wl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Ru=e=>Bu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Bu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Bu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Pu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Du=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Pu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ru({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=>Ru({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)))||Pu)({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}},_u=Ft((({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=Du(s,n,l),h=eo({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ls,{className:e,title:t,...r,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),to({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Js({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Au({...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}),je(a,{isVertical:!0}),Xs(i)]})]})})})),Au=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(fi,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(fi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(fi,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Eu=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(Mu(e)),n,a)):Mu(e),format:He(r)}),d=l((e=>t&&t(Mu(e))),[t]);return o(fn,{onChange:d,...s,...c})})),Mu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ou=d((e=>o(Eu,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),zu={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Fu={amount:1500},Vu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=an(Fu),[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(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:zu[r],children:[o(Ou,{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(Wl,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.text}):null]})]})})),Lu=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),$u="relative h-full",ju={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},qu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(Hu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,i)=>c("div",{className:Uu(n,{someCardsHighlighted:l}),children:[T(n,a,{className:Wu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Hu(n)?Lu({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Uu=(e,{someCardsHighlighted:t})=>u($u,t&&(Hu(e)?"pt-3xl":"pt-3xl sm:pt-16")),Wu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u($u,"min-w-80",ju[a],t&&(Hu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Od(n),n&&"h-full"),Hu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Yu=Ft((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:i=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(om,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Gu(s?.block?.blocks):[],hasBlur:!0,children:qu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Gu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Ku="z-10 border border-solid w-full h-full",Xu=u(Ku,"absolute hidden @xl:block border-transparent"),Ju=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(Xu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Xu,"top-6 right-8 bg-green")}),o("div",{className:u(Xu,"top-3 right-4 bg-green-light")}),c("div",{className:u(Ku,"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}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Zu={black:"bg-black",white:"bg-white"},Qu=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:je([l],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(eh)]}):null,i?c(Ee,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),eh=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Zu[e]}`},String(t)),th=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})),nh=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?ah(a):null]})}))),ah=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(th,{...e},String(t))))}),ih=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),lh=d((({className:e="",href:t,target:n,onClick:a,data: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})})),rh=[{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"}}],sh=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=>rh.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(a)?a:r,c=n?{text:i}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&i&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??l}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},oh(i));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:ch(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),oh=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ch=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),dh=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=true,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(lh,{href:i,target:m,className:"h-full",data:ih(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($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(sh,{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,mh(a,p)]})})}))),mh=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,uh=(e,t)=>{const{title:n,description:a,buttons:i}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:je(i)}):null]},String(t))},hh=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(uh),[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:[$e(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(N,{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?ph(m?.parent,h,b):null}):o("div",{children:x})]})})),ph=(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"})]}),gh=d((({className:e,contacts:t,info:n,version:a="secondary",...i})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...i,children:[n?.length?fh(n):null,t?.length?fh(t):null]}))),fh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>xh({column:e,i:t})))}),xh=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},i)=>c("div",{children:[o(k,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(i))))},`col-${String(t)}`):null,yh=()=>{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)},bh=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),vh=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(bh,{step:a,showPercentage:!1})]})})}));var Nh;!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"}(Nh||(Nh={}));const wh=e=>Tr("/user-data/getTaskStatus","POST",e),Ch=e=>Rr("/user-data/sendSignalToProcess","POST",e),kh=(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},Sh=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]})]}))),Ih=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(Hc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(_e,{__html:i}):null]})]})})),Th=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(Ih,{interval:d,intervalExpireAction:m}):null]}),o(Rh,{title:a,items:i}),o(Rh,{title:l,items:r,countColumns:!0}),n?.__html?o(Sh,{__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]}))),Rh=({title:e,items:t,countColumns:n=!1})=>{const a=Se();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",Vl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Bh(e)},t)))}):null]})]}):null},Bh=({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})]}),Ph=d((()=>o(Th,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Dh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=zi();return o(Th,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),_h=d((()=>{const{statusInfo:e}=zi();return o(Th,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Ah=d((()=>{const{statusInfo:e}=zi();return o(Th,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Eh(e),buttonText:"Вернуться на главную"})})),Eh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:jt(e?.deliveryDate)}]):t},Mh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Oh=d((()=>{const[e,t]=a(Nh.process),{taskId:n}=zi();i((()=>{(async()=>{for(const e of Mh)await Ch({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await wh({taskId:n});a&&a?.statusCd!==Nh.process&&(e(),t(a.statusCd))}),[n]);kh(r,3e4);return zh(e,(()=>t(Nh.rework)))})),zh=(e,t)=>({IN_PROCESS:o(Dh,{handleExpireTimer:t}),CANCELLED:o(Ph,{}),FAILED:o(Ph,{}),DRAFT:o(Ph,{}),APPROVED:o(Ah,{}),PRE_DECISION:o(Ah,{}),REVISION:o(_h,{})}[e]||o(_h,{})),Fh=e=>(t,n)=>t.filter((e=>e)).map((t=>[Vh(n,e),Lh(t,e),Uh(t,e),$h(t,e),jh(t,e),qh(t,e)].some(Boolean)?{...t,required:!1}:t)),Vh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,Lh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,$h=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,jh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),qh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Uh=({name:e},t)=>"snils"===e&&Wh(t),Wh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Hh=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Sh,{__html:e},`${t}_${n}`))):null},Yh=({field:e,inputs:t,params:n})=>t.map(Fl(e,n,{...Pc,...Dc})),Gh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Fh(Kh(t))(e,n),o=s.filter((e=>!qh(e,Kh(t))));return c("div",{className:u(Vl(i),"grid gap-x-m"),children:[Hh(o),Ll(l),Yh({field:t,inputs:s,params:a})]},`section-${r}`)})),Kh=e=>t=>e(t)?.value,Xh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Wl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Wl,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Jh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},Zh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},Qh=e=>{const{beginDate:t,employment:n,organizationName:a,inn:i,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f,partInBusiness:x}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:i,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:dd({organizationPhone:p&&qt(p)}),participantAddresses:md({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},ep=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:jt(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:dd({phone:qt(l),email:r}),participantAddresses:md({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},tp=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(i=n,i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"}}:{};var i},np=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},ap=(e,t)=>{switch(e){case 0:default:return{};case 1:return ep(t);case 2:return Qh(t);case 3:return ud(t);case 4:return Jh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:md({addressCourier:t})}:{}})(t)}},ip=[{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}],lp=e=>{try{return e?new Date(e):void 0}catch(e){return}},rp=({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)=>({...ip[e],...t,limitedBirthday:lp(t?.limitedBirthday),dulIssueDateField:lp(t?.dulIssueDateField),participantDateRegistration:lp(t?.participantDateRegistration),beginDate:lp(t?.beginDate),deliveryDate:lp(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=Kl(sa(Fh(sp(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 Fc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...np(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...ap(i,a)}],...Zh(a),...tp(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]},sp=e=>t=>e[t],op=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]=rp({step:e,inputs:s,onNextStep:i,onFinish:l}),[,{field:h,onSubmit:p}]=an(d,{onSubmit:m});return n?o(Oh,{}):c("form",{onSubmit:p,className:"space-y-m",children:[Gh({sections:t,field:h,step:e}),o(Xh,{isSending:u,step:e,onPrevStep:a})]})})),cp=[[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"limitedBirthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0,filledByEsia:!0},{fieldType:"common",name:"phone",required:!0,filledByEsia:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment",required:!0},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!0},{fieldType:"common",name:"amountWorkers",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!0},{fieldType:"common",name:"employerOrganization",required:!0},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!0},{fieldType:"common",name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"wages",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}]],dp=[[{title:"Параметры карты",inputs:[]},{inputs:[{fieldType:"common",name:"currency",required:!0},{fieldType:"common",name:"paymentSystem",required:!0},{fieldType:"common",name:"cardCategory",required:!0},{fieldType:"common",name:"codeWord",required:!0}]}],...cp,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],mp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],up=d((({className:e,...t})=>{const[n,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(yh,[]);const h=l((()=>{d((e=>Math.min(e+1,6))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=r((()=>dp[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(vh,{stepsTitles:mp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(op,{step:n,sections:f,isFormFinished:x,onNextStep:h,onPrevStep:p,onFinish:y},String(n))})]})})})),hp=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(bh,{step:a,showPercentage:!1})]})})})),pp=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Ih,{interval:d,intervalExpireAction:m}):null]}),o(gp,{title:a,items:i}),o(gp,{title:l,items:r,countColumns:!0}),n?.__html?o(Sh,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),gp=({title:e,items:t,countColumns:n=!1})=>{const a=Se();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",Vl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:fp(e)},t)))}):null]})]}):null},fp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),xp=d((()=>o(pp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),yp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=zi();return o(pp,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:`${t?.calculator?.moneyValue?.toLocaleString()??"0"} ₽`},{label:"Срок кредита",description:`${t?.calculator?.monthsValue??"0"} мес`},{label:"Тип платежа",description:t?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),bp=d((()=>{const{statusInfo:e}=zi();return o(pp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),vp=d((()=>{const{statusInfo:e}=zi();return o(pp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Np=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],wp=d((()=>{const[e,t]=a(Nh.process),{taskId:n}=zi();i((()=>{(async()=>{for(const e of Np)await Ch({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await wh({taskId:n});a&&a?.statusCd!==Nh.process&&(e(),t(a.statusCd))}),[n]);kh(r,3e4);return Cp(e,(()=>t(Nh.rework)))})),Cp=(e,t)=>({IN_PROCESS:o(yp,{handleExpireTimer:t}),CANCELLED:o(xp,{}),FAILED:o(xp,{}),DRAFT:o(xp,{}),APPROVED:o(vp,{}),PRE_DECISION:o(vp,{}),REVISION:o(bp,{})}[e]||o(bp,{})),kp=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Sh,{__html:e},`${t}_${n}`))):null},Sp=({field:e,inputs:t,params:n})=>t.map(Fl(e,n,{...Pc})),Ip=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Fh(Tp(t))(e,n);return c("div",{className:u(Vl(i),"grid gap-x-m"),children:[kp(s),Ll(l),Sp({field:t,inputs:s,params:a})]},`section-${r}`)})),Tp=e=>t=>e(t)?.value,Rp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Wl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Wl,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Bp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Pp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Bp[a?"annuity":"differential"]}},Dp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},_p=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return ep(t);case 2:return Qh(t);case 3:return ud(t);case 4:return Jh(t);default:return{}}},Ap=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:void 0,bankEmployeeCode:void 0}],Ep=e=>{try{return e?new Date(e):void 0}catch(e){return}},Mp=({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)=>({...Ap[e],...t,limitedBirthday:Ep(t?.limitedBirthday),dulIssueDateField:Ep(t?.dulIssueDateField),participantDateRegistration:Ep(t?.participantDateRegistration),beginDate:Ep(t?.beginDate),deliveryDate:Ep(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=Kl(sa(Fh(Op(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 Fc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},..._p(i,a)}],...Pp(a),...Dp(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]},Op=e=>t=>e[t],zp=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]=Mp({step:e,inputs:u,onNextStep:l,onFinish:s}),[,{field:f,onSubmit:x}]=an(h,{onSubmit:p});return n?o(wp,{}):c("form",{onSubmit:x,className:"space-y-m",children:[Ip({sections:t,field:f,step:e,params:{calcData:m}}),o(Rp,{step:e,isSending:g,onPrevStep:i})]})})),Fp=[[{columns:1,inputs:[{fieldType:"common",name:"calculator"}]}],...cp,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],Vp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Lp=Ft((({className:e,programsSource:t,...n})=>{const[d,m]=a(0),u=s(null),h=l((()=>u?.current?.scrollIntoView({behavior:"smooth"})),[u]);i(yh,[]);const p=l((()=>{m((e=>Math.min(e+1,5))),h()}),[]),f=l((()=>{m((e=>Math.max(e-1,0))),h()}),[]),x=r((()=>Fp[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(hp,{stepsTitles:Vp,step:d,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(zp,{step:d,sections:x,isFormFinished:b,programsSource:t,onNextStep:p,onPrevStep:f,onFinish:v},String(d))})]})})})),$p=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,jp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),qp=1e9,Up={sum:{min:1e4,max:qp},period:3},Wp=Ft((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Rm(Up,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:Hp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Yp(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(Ou,{label:a?.title,min:500,max:qp,...d("sum",{parse:e=>({min:Number(e),max:qp}),format:({min:e})=>String(e)})}),o(Aa,{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:"Адрес справочника"}})}),Hp=e=>_t((e?.paramsSource?.rateRows||[]).filter($p).flatMap((e=>jp(e.minMonths,e.maxMonths)))),Yp=e=>_t(e.flatMap((e=>e||[])).filter($p).flatMap((e=>jp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Gp=[{key:"10"},{key:"50"},{key:"100"}],Kp=({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:Gp,iconVersion:"black"})]})},Xp="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",Jp=(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:Xp,"aria-label":`Страница ${l}`,children:l},String(t)):null},Zp={width:"24",height:"24"},Qp=({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:eg(1===e),...Zp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Xp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Jp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Xp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:eg(e===n),...Zp})})]})},eg=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",tg=({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(Qp,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Kp,{itemCount:a,onItemCountChange:i}):null]}),ng=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})]})})),ag=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(ng,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(oi,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(oi,{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(Wl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),ig=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:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ee,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),lg=`${Ut}/depository`,rg={startDate:void 0,endDate:void 0,query:""},sg=Ft((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=an(rg),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?jt(a,!0):"",r=i?jt(i,!0):"",s=new URLSearchParams(lg);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(lg+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(ag,{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(ig,{...e},String(e.publicId)))):o(Md,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(tg,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),og=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,cg=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:og(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]}))),dg=`${Ut}/region`;function mg(e="Москва"){return Oi().location??{name:e}}function ug(e="Москва"){const t=Oi(),n=l((async()=>{if(!t.location){const n=await Pt(dg);t.location=n??{name:e}}}),[t,e]);return ba(dg,n),t}var hg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(hg||(hg={}));const pg=new Intl.NumberFormat("ru",{style:"currency",currency:hg.RUB}),gg=e=>e?pg.format(e):"",fg="text-m font-light text-secondary-text ",xg=`${fg} text-left`,yg=`${fg} pl-5xl text-center`,bg=`${fg} pl-5xl text-right`,vg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ng=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:xg,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:yg,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:bg,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(wg)})]}))),wg=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:vg[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:gg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:gg(e?.buyExchangeRate)})})]},t)},Cg={icon:"GpsIcon"},kg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Mm,{...Cg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Sg=(e,t,n)=>{const a=Number(Ig(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)},Ig=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Tg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Rg=e=>t=>{const[,n]=Tg(e.find((([e])=>e(t))));return n(t)},Bg=e=>Rg(e.map((([e,t])=>[e,()=>t])));Bg.if=e=>new Pg(void 0,e);class Pg{parent;predicate;unit;get entry(){return[Tg(this.predicate),Tg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pg(this,e)}then(e){return new Pg(this.parent,this.predicate,e)}else(e){return Rg([...Dg(this),[()=>!0,e]])}}const Dg=e=>[...e?.parent?Dg(e.parent):[],e.entry],_g=e=>Bg([[e=>e.value!==hg.RUB&&e.oppositeValue!==hg.RUB,()=>e.handleConvert(e.value,hg.RUB)],[e=>e.value===hg.RUB&&e.oppositeValue===hg.RUB,()=>e.handleConvert(e.value,hg.USD)],[e=>e.value===hg.RUB&&e.oppositeValue===hg.RUB,()=>e.handleConvert(e.value,hg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Ag(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 Eg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||hg.RUB,selectBuy:n?.[0]?.currency?.currency||hg.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:[Ag({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Mg(r,d,n),value:r.inputSell,setValue:e=>zg(d,n)(e,r.selectSell,r.selectBuy)}),Ag({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Og(r,d,t),value:r.inputBuy,setValue:e=>Fg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),Mg=(e,t,n)=>a=>{t({selectSell:a}),_g({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{zg(t,n)(e.inputSell,a,i)}})},Og=(e,t,n)=>a=>{t({selectBuy:a}),_g({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Fg(t,n)(e.inputBuy,a,i)})},zg=(e,t)=>(n,a,i)=>{e({inputSell:Ig(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(Sg(n,l,a===hg.RUB)||"")})},Fg=(e,t)=>(n,a,i)=>{e({inputBuy:Ig(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(Sg(n,l,a===hg.RUB)||"")})},Vg=`${Ut}/exchangerates`;const Lg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=ba(Vg+`?regionCode=${t}`,Dt);return n||{}}(mg()),l=$g(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:hg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:hg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[l?o(Ng,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(kg,{address:i?.address})]}),o(Eg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),$g=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],jg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(qg(n))})})),qg=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},Ug=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Wg=["all","footer"],Hg=d((({className:e,navigationItems:t})=>{const n=pe();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(Ug(Wg)).map(n).map(Yg)})})),Yg=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(Ug(Wg));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:i,target:l,onClick:r,...fe(s),children:n}),d?o(jg,{items:d}):null]},String(t))},Gg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Kg)}):null)),Kg=(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(Xg)})]},String(t)),Xg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Jg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Jg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Zg(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Zg=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}`})})),ef=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}))),tf="w-full lg:w-52";function nf(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const af=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 lf=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},rf=(e=[])=>e.reduce(((e,t)=>e+t),0),sf=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),of=e=>t=>e.map((([e,n])=>[af(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>df(t,e))).reduce(lf(Math.max,0),new Map),cf=e=>t=>{return km(t,t.map((({title:e})=>e)).map((e=>t=>{const n=sf(t||"");return n.length?rf(e.map((e=>ro(n.map(af(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},df=(e,t)=>new Map(e.map((e=>[e,t]))),mf=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=ba(e?.length?e:null,uf),[s,o]=a(null);return nf((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=sf(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(of(l)).reduce(lf(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return cf(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},uf=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),hf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[i,l]=mf({basePathList:a,initialQuery:e}),s=r((()=>pf(t)(i)),[t,i]);return o(Yl,{head:o(ng,{autoFocus:!0,...l}),onClose:n,children:o(Hg,{navigationItems:s})})})),pf=e=>t=>e?.length&&t?.length?km(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[],gf=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=sn(hf,n),m=l((e=>{r(e),ff(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(ng,{value:i,placeholder:t?.placeholder,onChange:m}),o(Hl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),ff=e=>e&&e.length>=3,xf=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:i,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Uc,{className:tf,logo:l,data:i,showTitle:!1}),o(gf,{className:"grow",navigationItems:t,...e})]})},yf=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}`})})),bf=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(yf,{index:t,...e},String(t))))}):null]}))),vf=Ft((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},i=n.options?.page?.common??{},{documents:l,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[xf(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Hg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(tf,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Gg,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(sh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(ef,{title:m,links:r}),o(bf,{links:l,license:p})]})})),Nf=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?wf(a):null]}))),wf=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>Cf(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:kf(e)}),c("div",{className:"text-s",children:[o(Ee,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ee,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Cf=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),kf=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Sf=Ft((({className:e,title:t,button:n,regionSource:i,data:l,...r})=>{const[s,d]=a({key:""}),m=i?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(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:ih(l,s?.key),children:f})}):null]})})}));function If(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>Tf(t)(e)));return n.find((([,e])=>Tf(t,!0)(e)))??n[n.length-1]??[]}const Tf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(Rf(e)(n));return t?a===z(n):a.startsWith(z(n))},Rf=e=>t=>{const n=X(K.SITE_URL);return E(t)?e.href:F(n,e.pathname)},Bf=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=on(!1),h=dn(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),i=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${i}px`:a.left>e.left&&(i>a.left?n.current.style.left="":n.current.style.left=`${i}px`)}}),[r]);return cn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),i((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Df(t,n)})]})})),Pf=d((({isActive:e,...t})=>{const n=pe(),{text:a,href:i,target:l,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:i,target:l,onClick:r,role:"link",...fe(t?.data),children:a})})),Df=(e,t)=>e?.map(((e,n)=>o(Pf,{isActive:e===t,...e},e?.text??String(n)))),_f={default:"w-6 h-6",large:"w-12 h-12"},Af=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:i,ariaLabel:l="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${_f[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:i,"aria-label":l,onClick:c,...fe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Ef="chatbot",Mf="text-page__btn-chat",Of={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},zf=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:l})=>{const r=(e=>{i((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Of[e??""];return n=>{if(t)if("personal"!==e)yr(Ef,t);else{const e=n.target;e?.classList.contains(Mf)||e?.classList.add(Mf),document.getElementById("webchat-js-container:webchat_rshb")||yr(Ef,t)}}})(e);return o(Af,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),Ff=d((({className:e="",active:t,dataItemName:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(l);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...fe(i),children:[o("span",{className:Vf(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Vf=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Lf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=Vd(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Ff,{...i,children:n})})})),$f={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"},jf=d((({version:e,text:t,mobileText:n,...a})=>{const i=Se()?n:t;return i?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",$f["transparent"===e?"transparent":"default"]),...a,children:i}):null})),qf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:i,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=If(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?Uf(t):Wf(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Lf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Bf,{items:p,activeItem:m,ariaLabel:i}):null,A.CHAT_BOT?o(zf,{version:t,iconVersion:d,chat:A.CHAT_BOT,ariaLabel:l}):null,o(jf,{version:t,...n})]})})),Uf=e=>t=>Math.max(t,e+1),Wf=e=>t=>Math.min(t,e),Hf=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(Yf,{...e},String(t))))})]}):null,Yf=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]})})),Gf=(e,t)=>n=>n.name?o(lh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:ih(e,n.name),children:o(Ee,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Kf=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"})]}))),Xf=d((({defaultLocation:e})=>{const t=mg(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(lh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Jf=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=ug(t?.default),[s,d]=a(""),m=Cl(),u=r((()=>Qf(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,Zf)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Yl,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Xf,{defaultLocation:t?.default}),o(Kf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&af(e.toLowerCase())(s.toLowerCase())>=.8)).map(Gf(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(Gf(f,g))]},e)))}),Hf(e)]});var g,f})),Zf=e=>e.name?.charAt(0)??"",Qf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),ex=d((({className:e="",active:t,flat:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(tx(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(i),children:o("span",{suppressHydrationWarning:!0,className:nx(t,n),children:d||a})})})),tx=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),nx=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),ax=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=mg(n?.branches?.default),r=sn(hf,n),s=sn(Jf,n),d=l((()=>r.open({})),[r]),m=l((()=>s.open({})),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(ex,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:ih(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(ex,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Af,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),ix=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=Vd(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(ex,{...i,children:n})})})),lx=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},y=r((()=>e.map(((e,t)=>e=>{p(e?rx(t):sx(t))}))),[e]),{dataFooter:b,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Uc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(ix,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:y[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Bf,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(ax,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),rx=e=>t=>Math.max(t,e+1),sx=e=>t=>Math.min(t,e),ox={"bg-white":"primary",transparent:"transparent"},cx=["all","header"],dx=Ft((({className:e,bgColor:t="bg-white",logo:n={},version:a=ox[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=ux(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=If(m),{internetBankButton:f}=i||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(lx,{activeTopItem:p,navigationItems:m?.filter(Ug(cx)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",mx(a))}),p?.items?.length&&o(qf,{subItems:p?.items?.filter(Ug(cx)),version:a,internetBankButton:f})]})})})),mx=e=>"transparent"===e?"opacity-30":"",ux=e=>({navigation:e?.navigation??{},common:e?.common??{}}),hx=(e=!1)=>e?{}:{padding:"p-0"},px={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},gx=Ft((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",px[n],e),padding:t,version:i,isTheme:l,...s,children:P({...s,extraProps:{...hx(a),className:Od(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),fx=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",jm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),xx=(e,t=0)=>{const{itemCount:n,visibleItemCount:i}=e,[r,s]=a(t),o=l((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=l((()=>s((e=>Math.max(e-1,0)))),[n]),d=i?n>i&&r<n-i:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function yx({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 bx=d((({className:e="",cards:t=[],button:n})=>{const[i,r]=a(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=xx({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?vx({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,yx({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function vx({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const i=460*e,l=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${i}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${l}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?Nx("страховая сумма",e.sum):null,e?.fee?Nx("страховой взнос",e.fee):null]}),wx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function Nx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ee,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ee,{size:"text-l",color:"text-secondary-text",children:e})})]})}function wx(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Cx=d((({className:e="",title:t,insuranceTabs:n=[],button:i,...r})=>{const[s,d]=a(0),m=l((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:kx({insuranceTabs:n,button:i})})]})})),kx=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(bx,{button:t,cards:e},String(n)))):null};const Sx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Ix={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Tx=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:i,investmentColumns:l,...r}=e,s=l?[...l]:[];return i&&s.unshift(i),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[bm(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Rx)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Dx)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(_e,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Rx=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Bx(a,i,e.cells)}`,children:l.length?o("div",{className:"w-full "+(i?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:l.map(Px)}):null},`column_${t}`)},Bx=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Px=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Ix[n]} ${Sx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ee,{align:"text-center",children:e.text})},`cell_${t}`):null},Dx=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,_x=["байт","Кб","Мб","Гб","Тб","Пб"],Ax=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," ",Ex(d,m),o(Ee,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Ex=(e,t)=>e||t?o("span",{children:", "}):"",Mx=(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))} ${_x[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?zx(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ax,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:Ox(t),data:n?.data}),o(_e,{__html:n?.__html})]},String(a))},Ox=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,zx=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},Fx=d((({href:e,__html:t,target:n,onClose:a})=>{const i=D(),l=q(i)(e);return c(Yl,{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(Wl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Vx=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=sn(Fx),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:[Ox(i),o(Ee,{font:"font-light",children:e})]}):null})),Lx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},$x=Ft((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=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",Lx[r]),role:"list",children:i.map(jx(d,l))}):null]})})),jx=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?qx(t)(n,a):Mx(e,t)(n,a)},qx=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(Vx,{...a,icon:e,href:Ux(t)?t?.href:t?.attachment?.src}),o(_e,{__html:t?.__html})]},String(n)):null},Ux=e=>"href"in e,Wx=Ft((({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(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:je(a,{className:"flex-wrap"}),children:[i?o(Ee,{size:"text-xl","font-weight":"font-light",children:i}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(_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]})]})})})),Hx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Yx=(e=[],t={})=>e.filter((({content:e={}})=>Im(t,e))).length,Gx=(e,t)=>e===t;const Kx=(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)))}(Gx,((e=Gx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Xx=[],Jx={},Zx={primary:"bg-white/30",secondary:"bg-main-divider"},Qx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},ey=d((({count:e,version:t="secondary"})=>{const n=Se(),a=n?"bg-main-divider":Zx[t],i=Qx[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})})})),ty=({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})]})]})},ny={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},ay={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},iy={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},ly={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},ry=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",ny[a],n?ly[a]:iy[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?ay[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[ty({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(ey,{count:m,version:Hx(n,a)})}):null]})})})),sy=d((e=>o(e?.item?.href?oy:cy,{...e}))),oy=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(ry,{...e,tag:"a",item:i,onClick:a})})),cy=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(ry,{item:e,onClick:a,...n})})),dy=(e,t,n)=>(a,i)=>o(sy,{isActive:a===e,onClick:t,type:n,item:a},String(i)),my=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(dy(a,i,t))}))),uy={categories:[],extraOptions:[],propertyType:[],stage:[]},hy=Ft((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Rm(uy,{block:i.block,page:i.options?.page}),f=l(((e=uy)=>p(e)),[]),x=(({hotFilters:e=Xx,filtrationState:t=Jx,blocks:n=Xx,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Kx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Yx(n,t.filter),version:Hx(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(my,{...x}),o(Nm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(xm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),py=(e,t,n)=>{const a=Hx("all"===t),i=Hx("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(Wl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Wl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},gy=({__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,fy="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",xy=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(fi,{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:fy,children:s}),o(_r,{className:fy,isUnfolded:e,children:d})]}),renderFoldButton:yy(n,a)})}):null})},yy=(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:by()})]}),by=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),vy=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ee,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Ny=()=>{},wy=e=>"all"===e?"block":"hidden",Cy=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Ny,renderRemoteWorkplaceCard:r=Ny,getBalloon:s=Ny,getBalloonRemoteWorkplaces:d=Ny,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"),k={filters:ky([...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:[vy(h,N),m?gy(m):null,p&&py(t,w,C),o("div",{className:u("pb-3xl",wy(w)),children:xy(k)})]}),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)]})]})})),ky=e=>Object.keys(os).filter((t=>e.filter((e=>ds[t](e))).length)),Sy=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Ry(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:Ry(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(Gr,{color:"green",children:Ry(s)})})]}),o("div",{className:"hidden sm:block",children:o(zr,{className:"flex-wrap",children:m?.map(Ty)})}),o(Dr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:o(zr,{className:"flex-wrap",children:m?.map(Ty)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(d))},Iy=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Ry(t)} №${n}`,body:e.toUpperCase()}),Ty=(e,t)=>o(Ar,{...e},String(t)),Ry=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",By=[];const Py=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:By},Dy={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},_y={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)},Ay=d((({descriptionData:e,className:t})=>{const n=mg(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=ba(`${Ut}/atms?regionCode=${e}`,Py);return{data:t||By,isLoad:!t&&!n}}(a);return o(Cy,{className:t,filterItems:Ey,data:i,isLoad:l,initFilterState:Dy,renderCard:Sy,getBalloon:Iy,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Ey=(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=>_y[t](e))),n=!a.length||a.some((t=>_y[t](e)));return t&&n}))},My=({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:Oy({workScheduleDescription:t})}),o(Dr,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_r,{isUnfolded:e,children:Oy({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(n)):null,Oy=({workScheduleDescription:e})=>c("div",{children:[c(zr,{className:"flex",children:[o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ar,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),zy=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Fy={branches:[],remoteWorkplaces:[]};const Vy=async e=>await Pt(e,{method:"GET"})||Fy,Ly=d((({className:e})=>{const t=mg(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=ba(`${Ut}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Vy);return{data:t||Fy,isLoad:!t&&!n}}(n);return o(Cy,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:ls,renderRemoteWorkplaceCard:My,getBalloon:ss,getBalloonRemoteWorkplaces:zy,title:`Офисы филиала ${t?.name}`})})),$y=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(Ly,{}):o(Ay,{descriptionData:e})})})),jy=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,{})]}))),qy="hidden sm:flex absolute z-40 top-10",Uy=Ft((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=Jd({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...i,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*l}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...i})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(qd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Wy({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(nm,{className:u("left-6",qy),onClick:d.scrollLeft}):null,d.canScrollRight?o(am,{className:u("right-6",qy),onClick:d.scrollRight}):null]})]})})),Wy=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const i=a===e,l=i?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Hy=d((({address:e,email:t,telephone:n,button:a,className:i="",__html:l,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",i),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?Yy({__html:l,richVersion:r}):null,Gy({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Gy({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Gy({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),Yy=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(_e,{...e,itemSize:"list-s"})}),Gy=({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,Ky=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_e,{__html:t,richVersion:n})})})),Xy=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:[null,e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Jy=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Zy=(e=!1)=>e?"MinusIcon":"PlusIcon",Qy=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",eb=Ft((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Se();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",Jy(m)),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>tb({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),tb=({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?Qy(e):Zy(e))(i,r);return"accordion"===e?o(Xy,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:l}):o(um,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},nb=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)),pi,"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]})}))),ab=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(nb,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(nb,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),ib=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})})),lb=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(ib,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(ib,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),rb=["От 1 дня","До 365 дней"],sb=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Aa,{min:1,max:365,value:e,items:rb,onChange:t})]}))),ob=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(ib,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(ib,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),cb=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(lb,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:db(m)}),o(sb,{days:i,setDays:e=>m({days:e})}),o(ob,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:mb(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(ab,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),db=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},mb=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ub=d((({days:e,tariffs:t=[]})=>{const n=pb(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:[hb("Аренда за",e),hb("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),hb=(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})]}),pb=(e,t)=>{const n=gb(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},gb=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},fb=(e,t)=>e.find((e=>e.branchCode===t)),xb=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=fb(a,n.selectedBranch),d=yb(s?.safeBoxCaseVolumes),m=bb(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=vb(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(cb,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(ub,{days:n.days,tariffs:u})]})})),yb=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],bb=(e,t)=>e?.find((e=>e.volume===t)),vb=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Nb=`${Ut}/safeboxes`,wb=[];const Cb=async e=>await Pt(e,{method:"GET"})||wb,kb=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=Sb(m.selectedRegion,h),f=function(e){const{data:t}=ba(e?`${Nb}?regionCode=${e}`:null,Cb);return t||wb}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=fb(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(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(xb,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Cr,{points:y,className:"h-[640px]"}):null]})})),Sb=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Ib=e=>e<4?"w-72":"w-52",Tb={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"},Rb=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:i=[],stepVersion:l="gray",title:r,version:s="primary",...d})=>{const m=i.length>3,h=Tb,p=(e=>e?"":"opacity-0")(a),f=Se();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(k,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Am(f)}),i?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:bm(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Bb(h,m,l)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:i.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:i}=x,{label:l,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Ib(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Ee,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(_e,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{className:"box-border py-s w-full mt-auto",version:i,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),Bb=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Pb(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||l},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:i+1})},String(i));var r},Pb=e=>e?"h-16 w-16":"h-24 w-24",Db=d((()=>o("div",{className:"hidden",role:"none"}))),_b="hidden sm:flex absolute z-40",Ab={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Eb=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=Jd({itemCount:t?.length||0});return i((()=>Mb(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:Ab[l].item,gap:Ab[l].gap,children:t.map(dy(n,a,l))}),s.canScrollLeft?o(nm,{className:u("left-6",_b,Ab[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(am,{className:u("right-6",_b,Ab[l].buttonTop),onClick:s.scrollRight}):null]})})),Mb=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Ob={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},zb=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Ob[t].wrapper,e),children:o(Eb,{className:Ob[t].component,tabsType:t,...n})}):null,Fb=Ft((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Vb(n??{}),p=D(),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(jb(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=$b(x[b],b),k=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:[zb({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Lb(t,x),activeItem:N,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map($b)?.filter(Boolean)||[]}),Vb=({__id:e,anchor:t})=>t??e??"tabs",Lb=(e,t)=>t?.length?t:e,$b=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",jb=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),qb={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Ub=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:qb[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Wb=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}))),Hb={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(_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(Wb,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Yb=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 Gb({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Gb=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Hb))return null;return o(Hb[n],{...t,...a})},Kb=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(Yb,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Xb=(e,t)=>140*rf(e.slice(0,t).map((e=>e?.cols?.length??1))),Jb=(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,Zb=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=xx({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((i=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,l=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Xb(a,i)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Jb(e.cols,i):null]},`row${t}`)))})})]},String(t))})),yx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),Qb=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(Zb,{rows:t.rowsData})})})]},a)}))}))),ev=(e=!1)=>""+(e?"text-white":"text-secondary-text"),tv=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:ev(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),nv=Ft((({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(tv,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Qb,{activeTabIndex:r,items:m}),o(Wb,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Wb,{onClick:n,isOpen:!0})]})})),av=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(nv,{...t,onClick:n})}):null]}))),iv=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(av,{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(Ub,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Kb,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),lv=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,yx({...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]})})),rv=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:i,hiddenRowsNum:l=0,...r})=>{const s=i?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=xx({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(iv,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,y]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?o(Dr,{renderFoldableSection:({isUnfolded:e})=>c(lv,{controls:p,children:[x,o(_r,{isUnfolded:e,children:y})]}),renderFoldButton:hm}):o(lv,{controls:p,children:f})})]})})),sv=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?ov():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?cv(n):null,i?o(_e,{richVersion:l,__html:i}):null]})]}))),ov=()=>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"}),cv=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),dv=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]}))),mv=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(dv,{prefix:t,unit:n,suffix:a})})})),uv=Ft((({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=D();return o(g,{className:u("relative flex flex-col",px[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:i,isTheme:l,...c,children:P({...c,extraProps:{className:u("w-full",Od(r)),...hx(a)}})})}),{childrenTypes:[]}),hv=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",pv=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=D();return c(g,{className:e,defaultPadding:hv(e),...i,children:[o(k,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(l)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(l)(n)})}):null]})})),gv={AdTile:Lt,ApplicationForm:ir,ApplicationLeadForm:Ed,BankAccountFiltration:Dm,BenefitsBlock:Om,BonusBenefitsBlock:$m,ButtonsBlock:qm,CalculatorBonus:Xm,CalculatorBusinessDeposit:ru,CalculatorCredit:bo,CalculatorDeposit:ku,CalculatorRefinancing:_u,CardTransfer:Vu,Carousel:Yu,CarouselCard:Ju,CarouselCatalogCard:Qu,CarouselLinks:nh,CarouselRecommendationCard:dh,CarouselTariffsCard:hh,ContactsBlock:gh,CreditCardForm:up,CreditForm:Lp,DepositFiltration:Wp,Depository:sg,ErrorBlock:cg,ExchangeRateTile:Lg,Footer:vf,GracePeriod:Nf,GrantSupport:Sf,Header:dx,Headline:k,HorizontalLayout:gx,ImgBlock:fx,InsuranceAmountBlock:Cx,InvestmentInfo:Tx,LinkDocs:$x,MobileAppTile:Wx,MortgageFiltration:hy,OfficesAtmsMap:$y,Placeholder:jy,ProductBlock:Vt,ProductGallery:Uy,RepresentativeOfficeInfo:Hy,RichTextBlock:Ky,RollupItem:eb,SafeDepositRental:kb,StepsBlock:Rb,StickyBottomMenu:Db,TabsLayout:Fb,TariffsTable:rv,TextBlock:sv,UnitBlock:mv,VerticalLayout:uv,Video:pv},fv=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))})),xv="cookie",yv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=on();nf((()=>{globalThis.localStorage?.getItem(xv)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem(xv,"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(Hl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function bv(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);cn(globalThis.document,"keydown",t)}function vv(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 Nv=()=>{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 vv(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},wv=d((()=>{const[e,{close:t}]=Nv(),n=Boolean(e.length);return bv(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})),Cv=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return vv(ue.observable,"popup",{open:t,close:n}),bv(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})),kv="header",Sv="footer",Iv="sticky-footer",Tv={},Rv=d((({className:e,data:t=Tv,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);fv(),ug();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?.[kv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(i?.[kv],{...m,slotName:kv})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),B(i?.[Sv],{...m,slotName:Sv})]})]}),i?.[Iv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(i?.[Iv],{...m,slotName:Iv})}):null,o(wv,{}),o(Cv,{}),o(yv,{__html:d?.cookieContent?.__html})]})}));Object.assign(Rv,{childrenTypes:[],slots:()=>[kv,Sv,Iv]});e.Blocks=gv,e.ContentPage=Rv,e.handlerDecorator=ce,e.joinList=bm,e.locationNavigator=Jt,e.packageVersion="0.14.726",e.projectSettings=A,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));