@redneckz/wildless-cms-uni-blocks 0.14.762 → 0.14.763
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.
- package/bundle/bundle.umd.js +201 -211
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -3
- package/bundle/components/CreditCardForm/PendingStatusContent.d.ts +1 -1
- package/bundle/components/CreditForm/CreditFormStatus.d.ts +1 -3
- package/bundle/components/CreditForm/PendingStatusContent.d.ts +1 -1
- package/bundle/hooks/useInterval.d.ts +4 -1
- package/bundle/hooks/useLink.d.ts +1 -2
- package/bundle/ui-kit/Button/Button.d.ts +3 -1
- package/bundle/ui-kit/Button/IconButton.d.ts +6 -0
- package/bundle/ui-kit/DatePicker/Calendar.d.ts +0 -1
- package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/bundle/ui-kit/Icon/RoundedIcon.d.ts +0 -1
- package/bundle/ui-kit/InfoCard/InfoCard.d.ts +0 -2
- package/bundle/ui-kit/Link/Link.d.ts +12 -0
- package/bundle/ui-kit/LinkButton/ArrowButton.d.ts +3 -5
- package/bundle/ui-kit/LinkButton/renderArrows.d.ts +1 -1
- package/bundle/ui-kit/LinkButton/useFormSubmit.d.ts +0 -1
- package/bundle/ui-kit/TimerCircle/Timer.d.ts +1 -3
- package/bundle/ui-kit/TimerCircle/TimerCircle.d.ts +2 -3
- package/bundle/ui-kit/TimerCircle/useCountDownTimer.d.ts +8 -0
- package/bundle/utils/adjustHref.d.ts +0 -2
- package/bundle/utils/url.d.ts +4 -4
- package/dist/components/ApplicationForm/Footnote.js +2 -2
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationLeadForm/Footnote.js +2 -2
- package/dist/components/ApplicationLeadForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -3
- package/dist/components/CreditCardForm/CreditCardFormStatus.js +3 -7
- package/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -5
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/PendingStatusContent.d.ts +1 -1
- package/dist/components/CreditCardForm/PendingStatusContent.js +3 -3
- package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatus.d.ts +1 -3
- package/dist/components/CreditForm/CreditFormStatus.js +4 -8
- package/dist/components/CreditForm/CreditFormStatus.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js +6 -6
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/PendingStatusContent.d.ts +1 -1
- package/dist/components/CreditForm/PendingStatusContent.js +3 -3
- package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/GrantSupport/GrantSupport.js +2 -8
- package/dist/components/GrantSupport/GrantSupport.js.map +1 -1
- package/dist/components/OfficesAtmsMap/FiltrationForm.js +1 -1
- package/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/dist/components/OfficesAtmsMap/FoldableCardContent.js +1 -1
- package/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js +1 -0
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +1 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/hooks/useInterval.d.ts +4 -1
- package/dist/hooks/useInterval.js +9 -5
- package/dist/hooks/useInterval.js.map +1 -1
- package/dist/hooks/useLink.d.ts +1 -2
- package/dist/hooks/useLink.js +12 -25
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/GridBlocks.js +1 -1
- package/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/dist/ui-kit/Button/Button.d.ts +3 -1
- package/dist/ui-kit/Button/Button.js +20 -13
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/Button/ButtonTitle.js +1 -1
- package/dist/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/dist/ui-kit/Button/IconButton.d.ts +6 -0
- package/dist/ui-kit/Button/IconButton.js +9 -0
- package/dist/ui-kit/Button/IconButton.js.map +1 -0
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -4
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/dist/ui-kit/DatePicker/Calendar.d.ts +0 -1
- package/dist/ui-kit/DatePicker/Calendar.js +2 -6
- package/dist/ui-kit/DatePicker/Calendar.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePicker.js +9 -5
- package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/DialogManager/DialogManager.js +1 -1
- package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js +5 -2
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/dist/ui-kit/Icon/RoundedIcon.d.ts +0 -1
- package/dist/ui-kit/Icon/RoundedIcon.js +5 -7
- package/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/dist/ui-kit/InfoCard/InfoCard.d.ts +0 -2
- package/dist/ui-kit/InfoCard/InfoCard.js +1 -2
- package/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.js +2 -3
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +4 -3
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Link/Link.d.ts +12 -0
- package/dist/ui-kit/Link/Link.js +29 -0
- package/dist/ui-kit/Link/Link.js.map +1 -0
- package/dist/ui-kit/LinkButton/ArrowButton.d.ts +3 -5
- package/dist/ui-kit/LinkButton/ArrowButton.js +4 -10
- package/dist/ui-kit/LinkButton/ArrowButton.js.map +1 -1
- package/dist/ui-kit/LinkButton/renderArrows.d.ts +1 -1
- package/dist/ui-kit/LinkButton/renderArrows.js +1 -7
- package/dist/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/dist/ui-kit/LinkButton/useFormSubmit.d.ts +0 -1
- package/dist/ui-kit/LinkButton/useFormSubmit.js +1 -2
- package/dist/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
- package/dist/ui-kit/PopupManager/PopupManager.js +1 -1
- package/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/dist/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/dist/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +2 -2
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.mobile.js +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +1 -1
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/dist/ui-kit/TimerCircle/Timer.d.ts +1 -3
- package/dist/ui-kit/TimerCircle/Timer.js +4 -19
- package/dist/ui-kit/TimerCircle/Timer.js.map +1 -1
- package/dist/ui-kit/TimerCircle/TimerCircle.d.ts +2 -3
- package/dist/ui-kit/TimerCircle/TimerCircle.js +7 -12
- package/dist/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/dist/ui-kit/TimerCircle/useCountDownTimer.d.ts +8 -0
- package/dist/ui-kit/TimerCircle/useCountDownTimer.js +28 -0
- package/dist/ui-kit/TimerCircle/useCountDownTimer.js.map +1 -0
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +8 -4
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/utils/adjustHref.d.ts +0 -2
- package/dist/utils/adjustHref.js +8 -11
- package/dist/utils/adjustHref.js.map +1 -1
- package/dist/utils/url.d.ts +4 -4
- package/dist/utils/url.js +6 -11
- package/dist/utils/url.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/Footnote.js +2 -2
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationLeadForm/Footnote.js +2 -2
- package/lib/components/ApplicationLeadForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -3
- package/lib/components/CreditCardForm/CreditCardFormStatus.js +3 -7
- package/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -5
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/PendingStatusContent.d.ts +1 -1
- package/lib/components/CreditCardForm/PendingStatusContent.js +3 -3
- package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatus.d.ts +1 -3
- package/lib/components/CreditForm/CreditFormStatus.js +4 -8
- package/lib/components/CreditForm/CreditFormStatus.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js +6 -6
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/PendingStatusContent.d.ts +1 -1
- package/lib/components/CreditForm/PendingStatusContent.js +3 -3
- package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/GrantSupport/GrantSupport.js +2 -8
- package/lib/components/GrantSupport/GrantSupport.js.map +1 -1
- package/lib/components/OfficesAtmsMap/FiltrationForm.js +1 -1
- package/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/lib/components/OfficesAtmsMap/FoldableCardContent.js +1 -1
- package/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js +1 -0
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +2 -2
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +1 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/hooks/useInterval.d.ts +4 -1
- package/lib/hooks/useInterval.js +9 -5
- package/lib/hooks/useInterval.js.map +1 -1
- package/lib/hooks/useLink.d.ts +1 -2
- package/lib/hooks/useLink.js +12 -25
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/GridBlocks.js +1 -1
- package/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/lib/ui-kit/Button/Button.d.ts +3 -1
- package/lib/ui-kit/Button/Button.js +19 -12
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/Button/ButtonTitle.js +1 -1
- package/lib/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/lib/ui-kit/Button/IconButton.d.ts +6 -0
- package/lib/ui-kit/Button/IconButton.js +7 -0
- package/lib/ui-kit/Button/IconButton.js.map +1 -0
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -4
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/lib/ui-kit/DatePicker/Calendar.d.ts +0 -1
- package/lib/ui-kit/DatePicker/Calendar.js +3 -7
- package/lib/ui-kit/DatePicker/Calendar.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePicker.js +10 -6
- package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/DialogManager/DialogManager.js +1 -1
- package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js +5 -2
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/lib/ui-kit/Icon/RoundedIcon.d.ts +0 -1
- package/lib/ui-kit/Icon/RoundedIcon.js +5 -7
- package/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/lib/ui-kit/InfoCard/InfoCard.d.ts +0 -2
- package/lib/ui-kit/InfoCard/InfoCard.js +1 -2
- package/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.js +2 -3
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +4 -3
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Link/Link.d.ts +12 -0
- package/lib/ui-kit/Link/Link.js +27 -0
- package/lib/ui-kit/Link/Link.js.map +1 -0
- package/lib/ui-kit/LinkButton/ArrowButton.d.ts +3 -5
- package/lib/ui-kit/LinkButton/ArrowButton.js +3 -9
- package/lib/ui-kit/LinkButton/ArrowButton.js.map +1 -1
- package/lib/ui-kit/LinkButton/renderArrows.d.ts +1 -1
- package/lib/ui-kit/LinkButton/renderArrows.js +2 -8
- package/lib/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/lib/ui-kit/LinkButton/useFormSubmit.d.ts +0 -1
- package/lib/ui-kit/LinkButton/useFormSubmit.js +1 -2
- package/lib/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
- package/lib/ui-kit/PopupManager/PopupManager.js +1 -1
- package/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/lib/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/lib/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +2 -2
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.mobile.js +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +2 -2
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/lib/ui-kit/TimerCircle/Timer.d.ts +1 -3
- package/lib/ui-kit/TimerCircle/Timer.js +4 -19
- package/lib/ui-kit/TimerCircle/Timer.js.map +1 -1
- package/lib/ui-kit/TimerCircle/TimerCircle.d.ts +2 -3
- package/lib/ui-kit/TimerCircle/TimerCircle.js +7 -12
- package/lib/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/lib/ui-kit/TimerCircle/useCountDownTimer.d.ts +8 -0
- package/lib/ui-kit/TimerCircle/useCountDownTimer.js +25 -0
- package/lib/ui-kit/TimerCircle/useCountDownTimer.js.map +1 -0
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +8 -4
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/utils/adjustHref.d.ts +0 -2
- package/lib/utils/adjustHref.js +6 -9
- package/lib/utils/adjustHref.js.map +1 -1
- package/lib/utils/url.d.ts +4 -4
- package/lib/utils/url.js +6 -11
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +201 -211
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -3
- package/mobile/bundle/components/CreditCardForm/PendingStatusContent.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/CreditFormStatus.d.ts +1 -3
- package/mobile/bundle/components/CreditForm/PendingStatusContent.d.ts +1 -1
- package/mobile/bundle/hooks/useInterval.d.ts +4 -1
- package/mobile/bundle/hooks/useLink.d.ts +1 -2
- package/mobile/bundle/ui-kit/Button/Button.d.ts +3 -1
- package/mobile/bundle/ui-kit/Button/IconButton.d.ts +6 -0
- package/mobile/bundle/ui-kit/DatePicker/Calendar.d.ts +0 -1
- package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/mobile/bundle/ui-kit/Icon/RoundedIcon.d.ts +0 -1
- package/mobile/bundle/ui-kit/InfoCard/InfoCard.d.ts +0 -2
- package/mobile/bundle/ui-kit/Link/Link.d.ts +12 -0
- package/mobile/bundle/ui-kit/LinkButton/ArrowButton.d.ts +3 -5
- package/mobile/bundle/ui-kit/LinkButton/renderArrows.d.ts +1 -1
- package/mobile/bundle/ui-kit/LinkButton/useFormSubmit.d.ts +0 -1
- package/mobile/bundle/ui-kit/TimerCircle/Timer.d.ts +1 -3
- package/mobile/bundle/ui-kit/TimerCircle/TimerCircle.d.ts +2 -3
- package/mobile/bundle/ui-kit/TimerCircle/useCountDownTimer.d.ts +8 -0
- package/mobile/bundle/utils/adjustHref.d.ts +0 -2
- package/mobile/bundle/utils/url.d.ts +4 -4
- package/mobile/dist/components/ApplicationForm/Footnote.js +2 -2
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/Footnote.js +2 -2
- package/mobile/dist/components/ApplicationLeadForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -3
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js +3 -7
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -5
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.d.ts +1 -1
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +3 -3
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatus.d.ts +1 -3
- package/mobile/dist/components/CreditForm/CreditFormStatus.js +4 -8
- package/mobile/dist/components/CreditForm/CreditFormStatus.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +6 -6
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditForm/PendingStatusContent.d.ts +1 -1
- package/mobile/dist/components/CreditForm/PendingStatusContent.js +3 -3
- package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +2 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/GrantSupport/GrantSupport.js +2 -8
- package/mobile/dist/components/GrantSupport/GrantSupport.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +1 -0
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/hooks/useInterval.d.ts +4 -1
- package/mobile/dist/hooks/useInterval.js +9 -5
- package/mobile/dist/hooks/useInterval.js.map +1 -1
- package/mobile/dist/hooks/useLink.d.ts +1 -2
- package/mobile/dist/hooks/useLink.js +12 -25
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/mobile/dist/ui-kit/Button/Button.d.ts +3 -1
- package/mobile/dist/ui-kit/Button/Button.js +20 -13
- package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonTitle.js +1 -1
- package/mobile/dist/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/mobile/dist/ui-kit/Button/IconButton.d.ts +6 -0
- package/mobile/dist/ui-kit/Button/IconButton.js +9 -0
- package/mobile/dist/ui-kit/Button/IconButton.js.map +1 -0
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -4
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/Calendar.d.ts +0 -1
- package/mobile/dist/ui-kit/DatePicker/Calendar.js +2 -6
- package/mobile/dist/ui-kit/DatePicker/Calendar.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js +9 -5
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/DialogManager.js +1 -1
- package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +5 -2
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/RoundedIcon.d.ts +0 -1
- package/mobile/dist/ui-kit/Icon/RoundedIcon.js +5 -7
- package/mobile/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/mobile/dist/ui-kit/InfoCard/InfoCard.d.ts +0 -2
- package/mobile/dist/ui-kit/InfoCard/InfoCard.js +1 -2
- package/mobile/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js +2 -3
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +4 -3
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Link/Link.d.ts +12 -0
- package/mobile/dist/ui-kit/Link/Link.js +29 -0
- package/mobile/dist/ui-kit/Link/Link.js.map +1 -0
- package/mobile/dist/ui-kit/LinkButton/ArrowButton.d.ts +3 -5
- package/mobile/dist/ui-kit/LinkButton/ArrowButton.js +4 -10
- package/mobile/dist/ui-kit/LinkButton/ArrowButton.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/renderArrows.d.ts +1 -1
- package/mobile/dist/ui-kit/LinkButton/renderArrows.js +1 -7
- package/mobile/dist/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/useFormSubmit.d.ts +0 -1
- package/mobile/dist/ui-kit/LinkButton/useFormSubmit.js +1 -2
- package/mobile/dist/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
- package/mobile/dist/ui-kit/PopupManager/PopupManager.js +1 -1
- package/mobile/dist/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/mobile/dist/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/mobile/dist/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +2 -2
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +1 -1
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/dist/ui-kit/TimerCircle/Timer.d.ts +1 -3
- package/mobile/dist/ui-kit/TimerCircle/Timer.js +4 -19
- package/mobile/dist/ui-kit/TimerCircle/Timer.js.map +1 -1
- package/mobile/dist/ui-kit/TimerCircle/TimerCircle.d.ts +2 -3
- package/mobile/dist/ui-kit/TimerCircle/TimerCircle.js +7 -12
- package/mobile/dist/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/mobile/dist/ui-kit/TimerCircle/useCountDownTimer.d.ts +8 -0
- package/mobile/dist/ui-kit/TimerCircle/useCountDownTimer.js +28 -0
- package/mobile/dist/ui-kit/TimerCircle/useCountDownTimer.js.map +1 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +8 -4
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/utils/adjustHref.d.ts +0 -2
- package/mobile/dist/utils/adjustHref.js +8 -11
- package/mobile/dist/utils/adjustHref.js.map +1 -1
- package/mobile/dist/utils/url.d.ts +4 -4
- package/mobile/dist/utils/url.js +6 -11
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js +2 -2
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/Footnote.js +2 -2
- package/mobile/lib/components/ApplicationLeadForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -3
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js +3 -7
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +5 -5
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.d.ts +1 -1
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +3 -3
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +1 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatus.d.ts +1 -3
- package/mobile/lib/components/CreditForm/CreditFormStatus.js +4 -8
- package/mobile/lib/components/CreditForm/CreditFormStatus.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +6 -6
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditForm/PendingStatusContent.d.ts +1 -1
- package/mobile/lib/components/CreditForm/PendingStatusContent.js +3 -3
- package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +2 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/GrantSupport/GrantSupport.js +2 -8
- package/mobile/lib/components/GrantSupport/GrantSupport.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +1 -0
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/hooks/useInterval.d.ts +4 -1
- package/mobile/lib/hooks/useInterval.js +9 -5
- package/mobile/lib/hooks/useInterval.js.map +1 -1
- package/mobile/lib/hooks/useLink.d.ts +1 -2
- package/mobile/lib/hooks/useLink.js +12 -25
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/mobile/lib/ui-kit/Button/Button.d.ts +3 -1
- package/mobile/lib/ui-kit/Button/Button.js +19 -12
- package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonTitle.js +1 -1
- package/mobile/lib/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/mobile/lib/ui-kit/Button/IconButton.d.ts +6 -0
- package/mobile/lib/ui-kit/Button/IconButton.js +7 -0
- package/mobile/lib/ui-kit/Button/IconButton.js.map +1 -0
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -4
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/Calendar.d.ts +0 -1
- package/mobile/lib/ui-kit/DatePicker/Calendar.js +3 -7
- package/mobile/lib/ui-kit/DatePicker/Calendar.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js +10 -6
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/DialogManager.js +1 -1
- package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +5 -2
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/RoundedIcon.d.ts +0 -1
- package/mobile/lib/ui-kit/Icon/RoundedIcon.js +5 -7
- package/mobile/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/mobile/lib/ui-kit/InfoCard/InfoCard.d.ts +0 -2
- package/mobile/lib/ui-kit/InfoCard/InfoCard.js +1 -2
- package/mobile/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js +2 -3
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +4 -3
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Link/Link.d.ts +12 -0
- package/mobile/lib/ui-kit/Link/Link.js +27 -0
- package/mobile/lib/ui-kit/Link/Link.js.map +1 -0
- package/mobile/lib/ui-kit/LinkButton/ArrowButton.d.ts +3 -5
- package/mobile/lib/ui-kit/LinkButton/ArrowButton.js +3 -9
- package/mobile/lib/ui-kit/LinkButton/ArrowButton.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/renderArrows.d.ts +1 -1
- package/mobile/lib/ui-kit/LinkButton/renderArrows.js +2 -8
- package/mobile/lib/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/useFormSubmit.d.ts +0 -1
- package/mobile/lib/ui-kit/LinkButton/useFormSubmit.js +1 -2
- package/mobile/lib/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
- package/mobile/lib/ui-kit/PopupManager/PopupManager.js +1 -1
- package/mobile/lib/ui-kit/PopupManager/PopupManager.js.map +1 -1
- package/mobile/lib/ui-kit/ReportDialog/ReportDialog.js +2 -8
- package/mobile/lib/ui-kit/ReportDialog/ReportDialog.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +2 -2
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +2 -2
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/lib/ui-kit/TimerCircle/Timer.d.ts +1 -3
- package/mobile/lib/ui-kit/TimerCircle/Timer.js +4 -19
- package/mobile/lib/ui-kit/TimerCircle/Timer.js.map +1 -1
- package/mobile/lib/ui-kit/TimerCircle/TimerCircle.d.ts +2 -3
- package/mobile/lib/ui-kit/TimerCircle/TimerCircle.js +7 -12
- package/mobile/lib/ui-kit/TimerCircle/TimerCircle.js.map +1 -1
- package/mobile/lib/ui-kit/TimerCircle/useCountDownTimer.d.ts +8 -0
- package/mobile/lib/ui-kit/TimerCircle/useCountDownTimer.js +25 -0
- package/mobile/lib/ui-kit/TimerCircle/useCountDownTimer.js.map +1 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +8 -4
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/utils/adjustHref.d.ts +0 -2
- package/mobile/lib/utils/adjustHref.js +6 -9
- package/mobile/lib/utils/adjustHref.js.map +1 -1
- package/mobile/lib/utils/url.d.ts +4 -4
- package/mobile/lib/utils/url.js +6 -11
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/components/ApplicationForm/Footnote.tsx +4 -9
- package/mobile/src/components/ApplicationLeadForm/Footnote.tsx +4 -9
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -1
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +1 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStatus.tsx +6 -21
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +5 -5
- package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +22 -24
- package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +1 -1
- package/mobile/src/components/CreditForm/CreditFormStatus.tsx +6 -26
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +6 -6
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +34 -36
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +2 -5
- package/mobile/src/components/GrantSupport/GrantSupport.tsx +6 -11
- package/mobile/src/components/OfficesAtmsMap/FiltrationForm.tsx +1 -0
- package/mobile/src/components/OfficesAtmsMap/FoldableCardContent.tsx +1 -1
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +1 -0
- package/mobile/src/components/RollupItem/RollupItem.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +4 -2
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +1 -1
- package/mobile/src/hooks/useInterval.ts +9 -5
- package/mobile/src/hooks/useLink.ts +15 -34
- package/mobile/src/ui-kit/BaseFiltration/GridBlocks.tsx +1 -1
- package/mobile/src/ui-kit/Button/Button.tsx +27 -17
- package/mobile/src/ui-kit/Button/ButtonTitle.tsx +1 -1
- package/mobile/src/ui-kit/Button/IconButton.tsx +15 -0
- package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +5 -7
- package/mobile/src/ui-kit/DatePicker/Calendar.tsx +3 -9
- package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +14 -7
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +6 -1
- package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +1 -1
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +13 -3
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +27 -26
- package/mobile/src/ui-kit/Icon/RoundedIcon.tsx +9 -10
- package/mobile/src/ui-kit/InfoCard/InfoCard.tsx +1 -5
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +6 -8
- package/mobile/src/ui-kit/Input/Input.tsx +19 -15
- package/mobile/src/ui-kit/Link/Link.tsx +82 -0
- package/mobile/src/ui-kit/LinkButton/ArrowButton.tsx +6 -37
- package/mobile/src/ui-kit/LinkButton/renderArrows.tsx +12 -28
- package/mobile/src/ui-kit/LinkButton/useFormSubmit.ts +23 -21
- package/mobile/src/ui-kit/PopupManager/PopupManager.tsx +1 -0
- package/mobile/src/ui-kit/ReportDialog/ReportDialog.tsx +24 -29
- package/mobile/src/ui-kit/Select/Select.tsx +3 -3
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +3 -3
- package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +3 -3
- package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +0 -1
- package/mobile/src/ui-kit/TimerCircle/Timer.tsx +7 -25
- package/mobile/src/ui-kit/TimerCircle/TimerCircle.tsx +23 -39
- package/mobile/src/ui-kit/TimerCircle/useCountDownTimer.ts +38 -0
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +13 -12
- package/mobile/src/utils/adjustHref.ts +9 -11
- package/mobile/src/utils/url.ts +14 -16
- package/package.json +1 -1
- package/src/components/ApplicationForm/Footnote.tsx +4 -9
- package/src/components/ApplicationLeadForm/Footnote.tsx +4 -9
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -1
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +1 -1
- package/src/components/CreditCardForm/CreditCardFormStatus.tsx +6 -21
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +5 -5
- package/src/components/CreditCardForm/PendingStatusContent.tsx +22 -24
- package/src/components/CreditCardForm/StepsNavigationButtons.tsx +1 -1
- package/src/components/CreditForm/CreditFormStatus.tsx +6 -26
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +6 -6
- package/src/components/CreditForm/PendingStatusContent.tsx +34 -36
- package/src/components/CreditForm/StepsNavigationButtons.tsx +1 -1
- package/src/components/Footer/Footer.tsx +2 -5
- package/src/components/GrantSupport/GrantSupport.tsx +6 -11
- package/src/components/OfficesAtmsMap/FiltrationForm.tsx +1 -0
- package/src/components/OfficesAtmsMap/FoldableCardContent.tsx +1 -1
- package/src/components/ProductBlock/renderBackwardButton.tsx +1 -0
- package/src/components/ProductGallery/ProductGallery.tsx +3 -3
- package/src/components/RollupItem/RollupItem.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +4 -2
- package/src/components/TariffsTable/TariffsTable.tsx +1 -1
- package/src/hooks/useInterval.ts +9 -5
- package/src/hooks/useLink.ts +15 -34
- package/src/ui-kit/BaseFiltration/GridBlocks.tsx +1 -1
- package/src/ui-kit/Button/Button.tsx +27 -17
- package/src/ui-kit/Button/ButtonTitle.tsx +1 -1
- package/src/ui-kit/Button/IconButton.tsx +15 -0
- package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +5 -7
- package/src/ui-kit/DatePicker/Calendar.tsx +3 -9
- package/src/ui-kit/DatePicker/DatePicker.tsx +14 -7
- package/src/ui-kit/DialogManager/Dialog.tsx +6 -1
- package/src/ui-kit/DialogManager/DialogManager.tsx +1 -1
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +13 -3
- package/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/src/ui-kit/Foldable/FoldableSection.tsx +27 -26
- package/src/ui-kit/Icon/RoundedIcon.tsx +9 -10
- package/src/ui-kit/InfoCard/InfoCard.tsx +1 -5
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +6 -8
- package/src/ui-kit/Input/Input.tsx +19 -15
- package/src/ui-kit/Link/Link.tsx +82 -0
- package/src/ui-kit/LinkButton/ArrowButton.tsx +6 -37
- package/src/ui-kit/LinkButton/renderArrows.tsx +12 -28
- package/src/ui-kit/LinkButton/useFormSubmit.ts +23 -21
- package/src/ui-kit/PopupManager/PopupManager.tsx +1 -0
- package/src/ui-kit/ReportDialog/ReportDialog.tsx +24 -29
- package/src/ui-kit/Select/Select.tsx +3 -3
- package/src/ui-kit/Sitemap/Sitemap.mobile.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +3 -3
- package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +3 -3
- package/src/ui-kit/TabsControl/TabItemInner.tsx +0 -1
- package/src/ui-kit/TimerCircle/Timer.tsx +7 -25
- package/src/ui-kit/TimerCircle/TimerCircle.fixture.tsx +1 -6
- package/src/ui-kit/TimerCircle/TimerCircle.tsx +23 -39
- package/src/ui-kit/TimerCircle/useCountDownTimer.ts +38 -0
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +13 -12
- package/src/utils/adjustHref.ts +9 -11
- package/src/utils/url.ts +14 -16
- package/bundle/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +0 -2
- package/bundle/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +0 -9
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +0 -2
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +0 -17
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +0 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +0 -9
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js +0 -2
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js.map +0 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +0 -2
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +0 -15
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +0 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +0 -9
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js +0 -2
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js.map +0 -1
- package/mobile/bundle/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +0 -2
- package/mobile/bundle/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +0 -9
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +0 -2
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +0 -17
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +0 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +0 -9
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js +0 -2
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js.map +0 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.d.ts +0 -2
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +0 -15
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +0 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +0 -9
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js +0 -2
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.js.map +0 -1
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +0 -21
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +0 -9
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +0 -21
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +0 -9
package/bundle/bundle.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),i=n("useEffect"),l=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:a,...i}=t||{},l=n?.slots?.default,r=a||l&&l();return e(Object.assign(i,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:i,block:l,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],i||a,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:i,align:l="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=k,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},i)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function _(){return _._impl()}_._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),_.setup=e=>{_._impl=e};const D=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),F=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:V,hasPrefix:F});const $="/api/",j=`${$}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),O(t),[E.CDN,$].some((e=>F(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${j}/${t}/attachment`;const a=t?.startsWith("/");return V(F(t,n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W={small:"16",medium:"24",large:"48",xl:"78"},H=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:i=a,iconVersion:l="color",size:r,width:s=r&&W[r],height:d=s})=>{const m=_(),h="normal"===l?`${n}.svg`:`sprites.svg#${n}`,p=U(m)(V(E.CDN,"/icons/",h));return"normal"===l?o("img",{className:e,style:Y(e,d),src:p,alt:a,title:i,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:u(q[l],{"w-full h-full":!s,invert:"white"===l},t),width:s,height:d,"aria-hidden":"true",children:[i?o("title",{children:i}):null,a?o("desc",{children:a}):null,o("use",{href:p,xlinkHref:p})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),K=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(K.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const a=_();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media: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(H,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):null)),ae={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ie="bg-main-divider text-main-disabled",le={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);function de(e,t){const n=s({});return r((()=>new Proxy({},{get:(a,i)=>(n.current||={},n.current[i]||=n=>e.fire(t,{...n??{},type:i}),n.current[i])})),[e,t])}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class me{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const ue=new me,he=()=>de(ue.emitter,"dialog");function pe(){const e=X(K.SITE_URL),t=_(),{closeAll:n}=he();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(a({...e,href:n}))}};function a({href:a,target:i,onClick:l}){return r=>{l?.(r),ge(a,i,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}const ge=(e,t,n)=>{if(!M(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},xe=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:i,version:l="primary"}=e,r=ye(e)&&"hidden lg:block";return c("div",{className:u(be(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,ye(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,i?o("div",{className:u(r,se[l]),children:i}):null]})})),be=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const i=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",ye(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},ye=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ve=({className:e,rounded:t,version:n})=>["inline-block",re,n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ne=d((({disabled:e,children:t,method:n="LINK",href:a,...i})=>{const r=(({method:e,href:t})=>l((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:i,searchParams:l}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,i].join(""));for(const[e,t]of l.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:a}),s=pe()({onClick:r,href:a,...i}),c=t??o(xe,{...s});return o(e?Ce:we,{...s,children:c})})),we=d((({className:e="",href:t,rel:n,target:a,ariaLabel:i,version:l,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:l,rounded:r}),href:t,rel:n,target:a,"aria-label":i||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...fe(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:a,children:i})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ve({className:e,rounded:a,version:n}),children:i})));function Se({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const i="primary"===e?"white":"black",l="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),l),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:i}})}),o(Ne,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=a(false);return i((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=_(),N=l((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Se({version:t,handleClick:N,text:w}),i?o("div",{className:"relative h-full",children:i}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Pe(P({...b,extraProps:{className:"@container-normal"}})),Te(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Be(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Be=e=>u(e?"row-span-2":"@xl:row-span-2"),Pe=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,_e=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:a=!0,children:i})=>e||i?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",a?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:i})}):null)),Ee=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ae=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ae,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ee(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?_e(n.icon,t):null,o("div",{children:Oe(n)})]}))),Ve=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Fe=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Oe)}):null)),Le=d((({isTabularBenefits:e,...t})=>o(e?Fe:Ve,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Ue(n))}):null,Ue=(e="")=>(t,n)=>{const{text:a,icon:i,iconRight:l,version:r,...s}=t||{},c=qe(i,r),d=qe(l,r);return a||i?.icon?o(Ne,{className:u("basis-full @lg:basis-auto",e),appendLeft:We({...i,iconVersion:c}),appendRight:We({...l,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},qe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ae,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ae,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:k,children:I,...T})=>{const R=y?.src?o(ne,{image:y}):null,B=o(S,{title:a,description:i,headlineVersion:l,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Re,{className:e,padding:t,defaultPadding:n,...g?{title:B}:{insetTitle:B},...Qe(R,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Le,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(De,{richVersion:p,__html:h,isDotted:m,itemSize:Je[l]}):null,I,f?.length?o(Ye,{priceList:f}):null,et(x)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?o(Ke,{tags:e}):null;class tt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof tt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const nt=()=>!0,at=(e,t)=>(...n)=>e(...n)&&t(...n),it=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const lt=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&"object"==typeof e&&!lt(e)),st=e=>e;function ot(e){return e instanceof tt?e._:e}class ct extends tt{from(e){return this.of(e.map(((e=st)=>([,t])=>e(t))(ot)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(lt(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,a)=>a===e?t:this._[a])):Array.from({length:Number(e)+1},((n,a)=>a===e?t:void 0)))}}class dt extends tt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class mt extends tt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ot(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ut extends tt{proto=it([e=>lt(this._)||"number"==typeof e,()=>ct.prototype],[e=>rt(this._)||"string"==typeof e,()=>mt.prototype],[nt,()=>dt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ht=e=>e instanceof tt?e:new ut(e),pt=e=>{const t=(t,...n)=>ot(e(ht(t),...n));return t.fn=e,t},gt=[],ft=e=>e instanceof Function?e:t=>e===t,xt=e=>(t,n,a=gt)=>ht(t).entries().reduce(((t,[n,i])=>xt(e)(i,t,a.concat(n))),e(n,[a,ht(t)])),bt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?bt(e.get(a),[i,n]):n)})),yt=pt(((e,t)=>t.reduce(bt.fn,e))),vt=e=>xt(((e,[t,n])=>Nt(n)?[...e,[t,ot(n)]]:e))(e,[]),Nt=e=>0===e.size();pt(((e,t=gt)=>t.reduce(((e,t)=>e.get(t)),e)));const wt=pt(((e,[t,...n])=>n.length?e.set(t,wt(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(St=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-St.length]))).reduceRight(at,nt);var St;const kt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(It,e),It=it([lt,(e,t)=>e[parseInt(t,10)]],[rt,(e,t)=>e[t]],[nt,st]),Tt=(e,t)=>((e,t={})=>n=>yt(t,vt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(a=e,a.slice(0,-1)),kt(t(n),n)]:[e,n];var a}))(e),Rt=e=>vt(e).filter(((e=st)=>([t])=>e(t))(Ct)),Bt=e=>{return t=Rt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Pt(e,t){try{return e?await _t(e,t):null}catch(e){console.error(e)}return null}const _t=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],Et={},At=["/portal-resources"],Mt=(e,t)=>Tt(e,(e=>t?.[e])),Ot=(e,t)=>{const n=Bt(e),[l,r]=a({});return i((()=>{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(Dt(e).filter((e=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,Et[e]||=await _t(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},i=Object.entries(n).flatMap((([,e])=>Bt(e)));return i.length?zt(i,a):a}return t};function Vt(e,t={}){const n=d((t=>{const n=Ot((({block:e,options:t,className:n,defaultPadding:a,padding:i,isTheme:l,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Ft=Vt((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Ft,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},Ut=e=>e?.replace(/[^+\d]/g,""),qt="/api/v1";const Wt=e=>e?{phone:Ut(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ut(e)}:{},Xt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:i}of e??[])t[a??""]?.(n,i)};function Jt(){return Jt._impl()}Jt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Jt.setup=e=>{Jt._impl=e};const Zt="rshb-query-params";function Qt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Zt)||"";return e&&globalThis.sessionStorage?.setItem(Zt,e),e}const en=e=>{const t=e.target?.closest("a"),n=Jt();if(A(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}function nn(e=!1){const[t,n]=a(e),i=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,setFalse:r,toggle:s}]}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const an=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],ln=e=>!e?.length,rn=e=>t=>n=>e(n)?[]:[t],sn={},on=[];const cn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function dn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,u]=function(e,t,n){const[r,s]=a(e),o=l((e=>s((a=>{const i=e instanceof Function?e(a):e,l=t?t(i):i,r=cn(i,l)?i:l;return!cn(a,r)&&n?.(r),r}))),[t,n]);return i((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=nn(!1),f=s({}),[x,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??sn),[t,e]),a=r((()=>an(n)(e)??on),[n,e]),i=ln(a);return[n,{isValid:i,errors:a}]}(m,n),v=l(((e,t={})=>{const{parse:n,format:a,onChange:i}=t,l=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(l):[];return{value:a?a(l):l,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;i?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=l((e=>{f.current=e,u(e)}),[u]),w=l((()=>{f.current={},g(),u(e)}),[e,u]),C=l((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:C}]}const mn=d((e=>{const{className:t,title:n,children:a,...i}=e;return o(g,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function un(e,t={}){const{open:n,close:a,...i}=he();return{open:l(((i,l={})=>n({dialog:o(e,{...t,...i,onClose:()=>{a(),i.onClose?.()}}),...l})),[e,n,a]),close:a,...i}}function hn(e,t,n,a){i((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function pn(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return hn(globalThis.document,"click",n),t}const gn=({label:e,errors:t})=>e&&t?`${e}*`:e,fn=()=>{},xn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",bn=e=>e?xn:"border-error",yn=e=>e?o(Ae,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,vn=d((({key:e,className:t="",id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),S=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);i((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=bn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[yn(d),N?o("textarea",{className:u("block resize-y min-h-24",Nn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Nn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Nn="w-full border rounded-md text-primary-text outline-none p-m",wn=e=>o("div",{className:"h-6",children:e?o(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Cn=e=>e?.value||"",Sn=e=>{const{url:t,query:n,queryPrefix:a,requestData:i={},responseItemHandler:l=Cn}=e,r=(s=l,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`${qt}/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...i,query:o})}).then((e=>e.json())).then(r)},kn={url:"suggest/address"},In={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},addressRegistration:kn,addressFact:kn,organizationAddress:kn,addressCourier:kn},Tn=()=>de(ue.emitter,"popup"),Rn=d((({options:e,container:t,onChange:n})=>{const[l,r]=a(-1),s=t=>{const a=e.length-1;"ArrowDown"===t.key?r(l<a?l+1:0):"ArrowUp"===t.key?r(l>0?l-1:a):"Enter"===t.key&&e[l]&&(t.preventDefault(),n(e[l]))};return i((()=>(t.addEventListener("keydown",s),()=>t.removeEventListener("keydown",s))),[l]),o("div",{className:"bg-white text-l overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,t)=>o("div",{className:u("flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",{"bg-main-divider":l===t}),role:"listitem",onMouseDown:()=>n(e),children:o("span",{className:"min-h-6",children:e.processedValue})},t.toString())))})}));function Bn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=Tn(),x=In[n],b=l((()=>{h.current=t,f.close()}),[t]),y=l((e=>{b(),h.current=e.processedValue,c?.(e.processedValue),d?.(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await Sn({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const a=(...i)=>{a.dispose(),n=setTimeout((()=>{e(...i)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return i((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:i,width:l,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Rn,{options:p,container:n,value:t,onChange:y}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,y]),v}const Pn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=fn,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:b=!1,maxLength:y,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=l((e=>{v&&!w&&S(),y?e.length<=y&&d(e):d(e)}),[v,w,d]);i((()=>{b&&n&&d(_n(n))}),[n]);const T=Bn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(vn,{disabled:N,type:g||"text","aria-label":t,label:gn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:Dn(a,s,t)})}),wn(r)]})})),_n=(e="")=>e.replace(/[^\d]+/g,""),Dn=(e,t,n)=>t&&!n?`${e}*`:e,En=e=>e?.text||e?.key||"",An=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:a,onChange:i,iconVersion:l})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:An(t,a).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),i&&i(e)},children:[o("span",{className:"min-h-6",children:En(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const On=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=nn(),[N,w]=a(""),C=Fn(x,n.length),S=b&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=Tn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=pn(u);return i((()=>{if(!e||!p.current)return;const i=p.current,{top:l,left:r,width:s,height:c}=i.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),top:l+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[yn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Vn(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:En(r)||h}),zn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(vn,{type:"text",autoFocus:!0,value:N,onChange:w,disabled:C})}):null]})]})})),zn=(e,t)=>o(H,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Vn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Fn=(e,t)=>e||0===t,Ln=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(On,{...i,valid:!n,label:gn({label:t,errors:a})}),wn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(Ln,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Un=(e="")=>Boolean("trade"===e||"all"===e),qn=e=>null!=e,Wn=new Map,Hn=(e,t=Wn)=>n=>{const a=Gn(n),i=t.get(a);if(a&&qn(i))return i;const l=e(...n);return a&&qn(l)&&t.set(a,Promise.resolve(l)),l},Yn=e=>Boolean(e?.every((e=>Array.isArray(e)?Yn(e):!e||"string"==typeof e))),Gn=e=>Yn(e)?e.toString():"",Kn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Xn(e,t,{fallback:n,cache:l}={}){const s=r((()=>Jn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(qn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Hn(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&Kn(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Jn(e){return Array.isArray(e)?e:e instanceof Function?Jn(e()):[e]}const Zn=`${qt}/branches`,Qn=[];const ea=async e=>await Pt(e,{method:"GET"})||Qn;function ta(e=!1){const{data:t}=Xn(`${qt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,_t);return Array.isArray(t)?t:[]}const na=(e="")=>"ULTRASERVICE"===e,aa=d((({field:e,input:t,params:n})=>{const a=na(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?ta(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Xn(e?`${Zn}?regionCode=${e}`:null,ea);return t||Qn}(r)?.filter((e=>e?.address));return i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Ln,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),ia=(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}},la=(e,t,n)=>Math.max(t,Math.min(e,n));function ra(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function sa({list:e=[],min:t,max:n,step:a,value: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=ra(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const oa=1,ca=100,da=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:oa),max:s=(i.length?i.length-1:ca),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=ia(e,{normalize:(e=0)=>i.length?ma(i)(e):la(e,r,s),format:He()}),f=l((e=>{p&&p(ra(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",xn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),sa({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ua(a)]})})),ma=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ua=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ha=["От 1 000 ₽","До 1 000 000 000 ₽"],pa=d((({field:e,input:t})=>o(da,{title:"Сумма, ₽",items:ha,min:1e3,max:1e9,...e(t?.name??"")}))),ga=d((({field:e,input:t})=>o(Pn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),fa=[{key:"client",text:"Клиент"},{key:"representative",text:"Представитель клиента"}],xa=d((({field:e,input:t})=>o(Ln,{label:"Тип обратившегося",...t,options:fa,...e("applierType")}))),ba=d((({field:e,input:t})=>o(Pn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),ya=({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=va(t,e),c=Na(t,l,r);u.push(o("td",{children:o("div",{className:wa(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},va=(e,t)=>t&&e.toDateString()===t.toDateString(),Na=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),wa=(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"),Ca=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Sa=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:s=fn,setValue:d=fn})=>{const m=l((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Ca.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:ya({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),ka=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ia(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Ta),l=a.map(((e,t)=>Ba(e)?a.slice(0,t).filter(Ba).length:-1)),r=a.map(((e,t)=>Ra(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const Ta=e=>"_"===e,Ra=e=>/\d/.test(e),Ba=e=>Ta(e)||Ra(e),Pa=1940,_a={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Da=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(l||"");return i((()=>{g(l||"")}),[l]),i((()=>{Aa({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Ia(t,"__.__.____"))},onBlur:()=>{Ea(p)?Aa({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},disabled:r}),r?null:o(H,{className:"mr-s",..._a})]})})),Ea=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Pa&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let i=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),i++;return Number(t)>0&&Number(t)<=i}return!1},Aa=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(Ea(e)){const{day:i,month:l,year:r}=(e=>{const[t,n,a]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(a)}})(e);t(l),n(r),a?.(new Date(r,l,i))}},Ma=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Da,{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")}),Oa=ka.map((e=>({key:e}))),za=Array.from({length:(new Date).getFullYear()-Pa+1},((e,t)=>Pa+t)).reverse().map((e=>({key:String(e)}))),Va=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Fa=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},La={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$a={className:"min-w-32",iconVersion:"black",isBorder:!1},ja=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=nn(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:i,selectedYear:r,onChange:s,value:o})=>{const c=pn(l((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:l((()=>e(!t)),[t]),handleNextMonth:l((()=>{n+1<=11?a(n+1):(a(0),i(r+1))}),[n]),handlePrevMonth:l((()=>{n-1>=0?a(n-1):(a(11),i(r-1))}),[n]),handleSelectMonth:l((({key:e})=>{a(ka.indexOf(e));const t=Va(r,ka.indexOf(e));Fa({maxDateOfMonth:t,selectedYear:r,selectedMonth:ka.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:Oa,yearsOptions:za,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),R=((e,t)=>{const[n,l]=a(!1);return i((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();l(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[yn(t),c("div",{className:"relative",children:[Ma({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":R}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(H,{...La,className:"-rotate-90 cursor-pointer"})}),o(On,{onChange:w,value:{key:ka[f]},options:S,...$a}),o(On,{onChange:C,value:{key:String(b)},options:k,...$a}),o("div",{className:"my-auto",onClick:N,children:o(H,{...La,className:"rotate-90 cursor-pointer"})})]}),o(Sa,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),Ua=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ja,{label:gn({label:t,errors:a}),valid:Boolean(!n),...i}),wn(n)]}))),qa=d((({field:e,input:t})=>o(Ua,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Wa=d((({field:e,input:t})=>o(Pn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),Ha=d((({field:e,input:t})=>o(Pn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Ya=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)}))}))),Ga="appearance-none w-5 h-5 border-solid flex-none",Ka=[{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"}],Xa=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(Ya,{paths:Ka,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",Za(a)),onClick:s,children:[o("div",{className:u(Ga,"m-0",i?"rounded-full border-2":ei(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Qa(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Ja(n)]})})})),Ja=e=>e?o("div",{className:"ml-s",children:o(Ae,{size:"text-l",font:"font-light",children:e})}):null,Za=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Qa=(e=!1)=>e?"radio":"checkbox",ei=(e=!1)=>u("rounded border",{"bg-primary-main":e}),ti=d((({field:e,input:t})=>o(Xa,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")}))),ni=d((({field:e,input:t})=>o(Ua,{label:"Желаемая дата встречи",...e(t?.name??"")}))),ai=d((({field:e,input:t})=>o(Pn,{label:"Электронная почта",...e(t?.name??""),...t}))),ii=[{key:"ULTRASERVICE",text:"Ультра"}],li=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ri=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],si=d((({field:e,input:t})=>o(Ln,{label:"Способ получения ответа",options:ri,...e(t?.name??"")}))),oi=d((({field:e,input:t})=>o(Pn,{label:"ФИО",...e(t?.name??""),...t})));function ci(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}function di(e,t){return ci(e,t),ci(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class mi{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new me){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class ui{bus;store=new Map;get size(){return this.store.size}constructor(e=new me){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const hi={};function pi(e,t=hi){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 gi=new ui;function fi(e){return pi(gi,e)}di(gi,new mi(globalThis?.localStorage));const xi=()=>fi(),bi=(e,t)=>{if(!t)return null;const n=wi(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")}},yi=(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},vi=(e,t)=>{const n=wi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},Ni=(e,t,n)=>{const a=wi(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},wi=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,Ci=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Si=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(ki(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(Pn,{disabled:t?.filledByEsia&&Ci(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),ki=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}),Ii=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Ti(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(ki(n.data?.address));const r={amountWorkers:yi(e?.amountWorkers,n.data?.employee_count),employerActivities:bi(e?.employerActivities??[],a),organization:Ni(e?.organization??[],i,l),employerOrganization:vi(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Ti=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Ri=d((({field:e,input:t})=>{const n=xi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Ii(n,e,t)}),[]);return o(Pn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),Bi=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Xa,{text:t,value:n,disabled:i,onChange:r},a),wn(l)]}))),Pi=d((({field:e,input:t})=>o(Bi,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),_i=`${qt}/outservice`,Di=[];async function Ei(){const e=await Pt(`${_i}/outserviceregions`);return e&&Array.isArray(e)?e:Di}const Ai=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=Xn("outServiceRegions",Ei),s=r((()=>l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[l,a]);return i((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(Ln,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),Mi=d((({field:e,input:t})=>o(Pn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Ci(e,t?.name??""),...e(t?.name??""),...t}))),Oi=d((({field:e,input:t})=>o(Pn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Ci(e,t.name??""),...e(t?.name??""),...t}))),zi=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Vi=d((({field:e,input:t})=>Un(e("acquiringType")?.value?.key)?o(zi,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),Fi=d((({field:e,input:t})=>o(Pn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),Li=e=>"_"===e,$i=e=>/\d/.test(e),ji=e=>Li(e)||$i(e),Ui=[..."+7 (___) ___-__-__"],qi=Ui.findIndex(Li),Wi=Ui.map(((e,t)=>ji(e)?Ui.slice(0,t).filter(ji).length:-1));function Hi(e){const t=e.replace(/\D/g,""),n=Ui.map(((e,n)=>$i(e)?e:t.charAt(Wi[n])||e)),a=Wi.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(qi,a)):n).join("")}const Yi=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(Hi(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(vn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),Gi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Yi,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Ki=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Gi,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&Ci(e,n),...t})})),Xi=d((({field:e})=>Un(e("acquiringType")?.value?.key)?o(zi,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ji=Vt((({field:e,input:t,source:n})=>o(Ln,{placeholder:"Выберите продукт",label:"Продукт",options:Zi(n?.productList),...e(t?.name??"")}))),Zi=e=>(e??[]).map((e=>({key:e,value:e}))),Qi=`${qt}/regions`,el=[];function tl(e=Qi){const{data:t}=Xn(e,_t);return Array.isArray(t)?t:el}const nl=`${qt}/outservice/outserviceregions`,al=d((({field:e,input:t,params:n})=>{var a;const i=tl((a=n?.typeForm,"OUTSERVICE"===a?nl:void 0));return o(Ln,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...e(t?.name??"")})})),il=d((({field:e,input:t})=>{const n=ta(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Ln,{label:"Регион",placeholder:"Выберите регион",options:a,...e(t?.name??"")})})),ll=d((({field:e,input:t})=>o(Pn,{label:"ФИО представителя",...t,...e("representativeName")}))),rl=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},sl=rn((e=>null!=e&&""!==e)),ol="Некорректно заполненное поле",cl="Укажите регион, город/населенный пункт, улицу, дом",dl=e=>sl(e??ol),ml=e=>rn((e=>e?.key&&""!==e?.key))(e??ol),ul=e=>rn((e=>"string"==typeof e&&/^[0-9]{1,2}$/g.test(e)))(e??ol),hl=e=>rn((e=>"string"==typeof e&&e.length>1&&Cl(e)))(e??ol),pl=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??ol),gl=e=>rn((e=>"string"==typeof e&&6===e.length))(e),fl=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),xl=e=>rn(fl)(e),bl=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),yl=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},vl=e=>Boolean(e.region&&(e.city||e.locality)&&e.house),Nl=()=>rn(vl)(cl),wl=/^[\u0400-\u04FF\d\s]+$/u,Cl=(e="")=>wl.test(e),Sl=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)},kl={processPersonalDataFlg:bl,consentProviderFlg:bl,consentInformFlg:bl,consentPfrFlg:bl,consentOthersFlg:bl},Il={addressCourier:Nl(),paymentSystem:dl("Укажите тип платежной системы"),currency:dl("Укажите валюту"),cardCategory:dl("Укажите категорию карты"),codeWord:(Tl="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&Cl(e)))(Tl??ol)),confirmationIncome:ml(),methodObtain:dl(),deliveryDate:dl("Укажите дату доставки")};var Tl;const Rl={organization:ml("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&(e.city||e.locality)&&e.house)))(cl),organizationPhone:xl("Укажите номер телефона"),organizationName:dl("Укажите наименование организации"),legalForm:dl("Укажите ОПФ"),generalSeniority:ul("Укажите количество лет стажа"),lastJobExperience:ul("Укажите стаж на последнем месте работы"),experience5Years:ul("Укажите общий стаж за последние 5 лет"),jobsNumber:ul("Укажите количество мест работы за последние 5 лет"),beginDate:dl("Укажите дату заключения трудового договора"),addressFact:Nl(),addressRegistration:Nl(),addressRetail:ml("Выберите адрес банка"),addressMatch:dl(),sex:dl("Укажите свой пол"),limitedBirthday:rn(Sl)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:dl("Укажите место рождения"),education:ml("Выберите ваше образование"),housing:ml("Выберите тип жилья"),amountWorkers:ml("Выберите информацию о количестве сотрудников"),employment:ml("Выберите информацию о трудоустройстве"),employerActivities:ml("Выберите вид деятельности организации"),employerOrganization:ml("Выберите вид организации"),positionOrganization:ml("Выберите вашу должность"),familyStatus:ml("Выберите семейное положение"),familyMembers:pl(2,"Укажите количество членов семьи"),children:pl(2,"Укажите количество детей"),dependents:pl(2,"Укажите количество иждивенцев"),totalIncome:pl(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:pl(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(yl)(e))("Некорректный номер СНИЛС"),conscription:dl(),armyIdFlg:bl,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:gl("Укажите номер паспорта"),dulIssueDate:dl("Укажите дату выдачи паспорта"),dulSubdivisionCode:gl("Укажите код подразделения"),dulIssuedBy:dl("Укажите организацию, выдавшую паспорт"),participantDateRegistration:dl("Укажите дату регистрации"),retirementIncome:dl(),otherIncome:dl(),wages:dl(),mandatoryPayments:dl(),disablePeopleFlg:dl(),bankruptcyFlg:dl(),shareholderFlg:dl(),legalEntityName:dl(),bankEmployeeCode:dl(),partInBusiness:dl(),regionRetail:ml("Выберите регион")},Bl={fullName:dl(),addressBranch:ml(),desiredMeetingDate:dl(),product:dl(),localities:dl(),partnerComments:dl(),collectionCount:dl(),acquiringType:ml(),serviceType:ml(),annualRevenue:dl(),feedbackMethod:ml(),serviceDirection:ml(),secondaryPhone:xl("Укажите номер телефона"),region:ml(),situationDescription:dl(),sufferedFrom:dl(),applierType:dl(),surname:hl("Укажите свою фамилию на кириллице"),name:hl("Укажите своё имя на кириллице"),middleName:hl("Укажите своё отчество на кириллице"),birthday:dl("Укажите дату рождения"),phone:xl("Укажите номер телефона"),email:(e=>rn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>rn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:dl(),typeForm:dl(),consentToReceiveMaterials:bl,consentDataProcessing:bl,...kl,...Rl,...Il},Pl=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(_l).map((({name:e})=>[e,Bl[e??""]])));return e=>n?Object.fromEntries(t.filter(_l).filter(Dl(e)).map((({name:e})=>[e,Bl[e??""]]))):a},_l=({name:e})=>Boolean(Bl[e??""]),Dl=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),El=d((({field:e})=>{const t=e("secondaryPhone");return o(Gi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?rl(t,Bl.secondaryPhone):t})})),Al=d((({field:e,input:t})=>o(Ln,{label:"Направление обслуживания",placeholder:"Выберите направление",options:li,...e(t?.name??"")}))),Ml=d((({field:e,input:t})=>o(Pn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Ol=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],zl=d((({field:e,input:t})=>o(Ln,{label:"Пострадал в",...t,options:Ol,...e("sufferedFrom")}))),Vl=d((({field:e,input:t})=>o(Pn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Ci(e,"surname"),...e(t?.name??""),...t}))),Fl=["От 1 мес","До 15 лет"],Ll=d((({field:e})=>o(da,{title:"Срок, месяцев",items:Fl,min:1,max:180,...e("term")}))),$l=d((({field:e,input:t})=>o(Ln,{label:"Тип обслуживания",options:ii,...e(t?.name??"")}))),jl={horizontal:"@lg:flex-row",vertical:""},Ul=d((({label:e,items:t,value:n,className:a,disabled:i=!1,orientation:l="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",jl[l],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Xa,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:i},String(e))))})]}))),ql=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Wl=d((({field:e,input:t})=>{const n=l((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Ul,{className:"whitespace-normal",orientation:"horizontal",items:ql,...e(t?.name??"",{onChange:n})})})}));const Hl={$ref:"/wcms-resources/outservice-productlist.json"},Yl={fullName:oi,addressBranch:aa,desiredMeetingDate:ni,product:e=>o(Ji,{...e,source:Hl}),localities:Ai,isClient:Pi,partnerComments:Fi,collectionCount:Wa,acquiringType:jn,onlineCheckout:Vi,posTerminal:Xi,serviceType:$l,term:Ll,amount:pa,annualRevenue:ga,vedTypes:Wl,feedbackMethod:si,serviceDirection:Al,bankEmpolee:ba,secondaryPhone:El,applicationDate:e=>o(Pn,{label:"Дата и время обращения в Банк",...e}),region:e=>na(e?.params?.typeForm)?o(il,{...e}):o(al,{...e}),consentToReceiveMaterials:ti,sufferedFrom:zl,situationDescription:Ml,representativeName:ll,applierType:xa,surname:Vl,name:Oi,middleName:Mi,birthday:qa,phone:Ki,email:ai,inn:Ri,comment:Ha},Gl=(e,t,n={})=>(a,i)=>{const l={...Yl,...n}[String(a.name)];return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})&&l?o("div",{children:o(l,{field:e,input:a,params:t})},i):null},Kl=e=>2===e?"@xl:grid-cols-2":"",Xl=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,Jl={primary:u("justify-center px-9 py-4","text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("justify-center px-9 py-4","text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Zl=u("group/btn-embedded","justify-between p-0","bg-transparent border border-transparent outline-none"),Ql=d((({className:e,type:t="button",version:n="primary",embedded:a,rounded:i=!0,disabled:s,role:c,data:d,dataTheme:m,children:h,onClick:p})=>{const g=l(ce((e=>{!s&&p?.(e)})),[s,p]),f=r((()=>fe(d)),[d]);return o("button",{className:u("font-sans flex items-center gap-xs relative",!s&&!a&&Jl[n],{[Zl]:a,"rounded-md":i,"bg-main-gray text-main-disabled cursor-not-allowed":s},e),type:t,role:c,"data-theme":m,...f,onClick:g,children:h})})),er=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(H,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),tr=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(er,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),nr=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(tr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Ql,{type:"button",onClick:n,children:"Хорошо"})]})})})),ar=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:u,...h}=e,p=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Un(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,g={...h,...rr(o),...lr(c),...d&&{inn:d},...p?{partnerComments:p}:{},...s?{typeForm:s}:{},...ir(m,u?.text)};return Object.fromEntries(Object.entries(g)?.map((([e,t])=>[e,t?.key||t])))},ir=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},lr=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},rr=e=>e?{vedTypes:Object.fromEntries(ql.map((({id:t})=>[t,t===e])))}:{},sr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:ii[0],feedbackMethod:ri[0],serviceDirection:li[0],vedTypes:ql[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},or=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"})}))),cr=d((({isLoading:e,disabled:t,children:n,...a})=>c(Ql,{type:"submit",disabled:e||t,...a,children:[e?o(or,{blur:!0,size:"small"}):null,n]}))),dr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ae,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ae,{children:t.text})}):null]}))),mr=(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(Xa,{...e}),o(dr,{link:t})]}),wn(rl(e,bl).error)]}):o(dr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(cr,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),ur={send:async function(e,t=!1){const{typeForm:n,region:a,phone:i="",email:l,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${qt}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Yt(a,g),...Gt(l,g),...Wt(i),...Ht(s,"desiredMeetingDate"),...g?Ht(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Kt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},hr=d((({className:e,title:t,typeForm:n="",sections:a=[],button:i,link:s,endpoint:d,additionalParams:m,isContacts:h,data:p,...g})=>{const f=r((()=>a?.flatMap((e=>e?.inputs))||[]),[a]),x=r((()=>((e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||sr[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),b=r((()=>Pl(f)),[f]),y=un(nr),v=tn(),w=l((async(e,t)=>{const a=ar({...e,...m}),i=Boolean(await ur.send(a,"lead"===d));y.open({ok:i,typeForm:n}),i&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),k=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return c(mn,{className:u("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[a.map(((e,t)=>c("div",{className:u(Kl(e.columns),"grid gap-x-m"),children:[Xl(e.title),(e?.inputs||[])?.map(Gl(C,{typeForm:n}))]},`section-${t}`))),mr(k?C("consentDataProcessing"):void 0,s,i)]}),h?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),pr=[{columns:2,inputs:[{name:"surname",required:!0,dadata:!0},{name:"name",required:!0,dadata:!0},{name:"middleName",dadata:!0},{name:"limitedBirthday",required:!0},{name:"phone",required:!0},{name:"email",required:!0,dadata:!0}]},{inputs:[{name:"processPersonalDataFlg",required:!0},{name:"consentProviderFlg",required:!0},{name:"consentOthersFlg",required:!0},{name:"consentInformFlg"},{name:"consentPfrFlg"}]}],gr=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(Pn,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),fr=d((({field:e,input:t})=>o(Bi,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),xr="/icons/MapMarkerClusterIcon.svg",br="/icons/MapMarkerClusterYellowIcon.svg";function yr({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=vr("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=vr("workplaces",e,i),r=Nr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Nr(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=Nr(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 vr=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?xr:br,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Nr=(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?xr:br,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),wr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Cr={...wr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Sr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Cr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),kr=e=>globalThis[e],Ir=(e,t)=>{const n=document.getElementById(t);if(n){const t=kr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(kr(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(kr(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))};const Tr=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return Ir(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=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Rr={...wr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Br=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(Rr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:n,width:"20",height:"16"})})})),Pr=[55.753995,37.614069],_r=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=Tr();if(i((()=>{r.current?yr({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Dr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),yr({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(or,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Br,{yandexMaps:r}),o(Br,{yandexMaps:r,direction:"out"})]}),Sr(r,m,u("right-2 top-80",h))]})})),Dr=e=>{const t=[Ar(Er(e,0)),Ar(Er(e,1))];return t.every((e=>e))?t:Pr},Er=(e,t)=>e.map((e=>e.coords?.[t])),Ar=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Mr=async(e,t,n)=>{try{return(await Or(e,t,n)).json()}catch(e){return console.error(e),null}};async function Or(e,t,n){const a=(()=>{const e=new Uint8Array(8);return globalThis.crypto.getRandomValues(e),e.reduce(((e,t)=>`${e}${t.toString(16).padStart(2,"0")}`),"")})();return globalThis?.fetch?.(`/light-api-cash/v1${e}`,{method:t,headers:{"Content-Type":"application/json","X-B3-Sampled":"1","X-B3-Spanid":a,"X-B3-Traceid":a,...zr()},credentials:"include",body:n?JSON.stringify(n):null})}const zr=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Vr=e=>Number(e.toString().replace(",",".")),Fr=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:Lr({textItems:l,subText:t,children:n,isPhone:a,...i})})),Lr=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:i,className:l,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",l),children:[e?o(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||$r(n,s),i?o(Ae,{color:a,size:"text-m",children:i}):null]}),$r=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${jr(e)}`,children:e.trim()}):e.trim()},String(n)))),jr=e=>e.replace(/\D/g,""),Ur=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}))),qr=d((({className:e,children:t})=>o("span",{className:u("inline-flex items-center text-start gap-s group-hover/btn-embedded:text-primary-main",e),children:t}))),Wr=d((({isUnfolded:e,...t})=>o(H,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Hr=d((({className:e,isUnfolded:t,label:n=(t?"Скрыть":"Развернуть"),embedded:a,...i})=>c(Ql,{className:u({"text-h4":!a},e),rounded:!1,embedded:a,...i,children:[o(qr,{children:n}),o(Wr,{isUnfolded:t,iconVersion:a?"color":""})]}))),Yr=d((({className:e,role:t="group",children:n})=>o("div",{className:u(e),role:t,children:n})));const Gr=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})})})),Kr=d((({children:e})=>{const[t,{toggle:n}]=nn(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Yr,{className:"block sm:hidden",children:[o(Gr,{isUnfolded:t,children:e}),o(Hr,{className:"w-full my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),Xr=e=>{const t=Zr(e);return o(Fr,{label:"Режим работы",value:t,className:"max-w-none"})},Jr=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Zr=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[Jr({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Jr({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Qr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],es=e=>Qr.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??"")}}))),ts=e=>{if(!e)return null;const t=ns(e);return c(Ur,{className:"border-none",children:[o(Fr,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(as)})}),o(Fr,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},ns=e=>{const t=Qr.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},as=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Ae,{size:"text-xs",children:e})},String(n)),is=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Fr,{label:"Валюта",value:e.currency}):null,t?o(Fr,{label:"Купить",value:String(t)}):null,n?o(Fr,{label:"Продать",value:String(n)}):null]},String(a)),ls={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"}},rs=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",ls[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ae,{size:"text-m",color:ls[n].text,children:t})]}))),ss=(new Date).getDay(),os=e=>{const[t]=e?.slice(ss-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(rs,{color:"green",children:i}):null,n&&l?o(rs,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(rs,{color:"red",children:"Выходной"})},cs=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ds=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(Fr,{label:e,value:t&&n?n:"",subText:cs({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),ms=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,us=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,hs=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,ps=(e,t)=>{if(!e.workSchedule)return null;const n=es(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ae,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e.address})]}):null]}),os(n)]}),o(Kr,{children:gs(e)})]},String(t))},gs=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=es(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Ur,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Fr,{label:"Факс",value:t,isPhone:!0}),o(Fr,{label:"Телефон филиала",value:e,isPhone:!0}),o(Fr,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Fr,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Fr,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Fr,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Ur,{children:o(Fr,{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(ds)})})}):c(Ur,{children:[o(Fr,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(as)})}),Xr(d)]}),r?.businessScheduleVisibleTag?ts(r?.businessScheduleDescription):null,s?.currencies?.length?o(Ur,{className:"flex-wrap",children:s?.currencies?.map(is)}):null]})},fs=({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=es(e),n=e?Zr(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ms(n):hs(n,a):us(n):""})(n)}`;return{header:a,body:l}},xs={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},bs={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ys={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)},vs=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ys[t](e)))))},Ns=()=>{},ws=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=Ns,getBalloonRemoteWorkplaces:i=Ns})=>{const[l,s,o,c]=r((()=>{const l=vs(e,n),r=vs(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}},Cs=e=>{const{data:t,error:n}=Xn(`/light-api-cash/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,Ss);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},Ss=async e=>await Pt(e,{method:"POST"})||[],ks=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Is=d((({children:e})=>ks?e:null)),Ts=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=Cs("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");i((()=>{(async()=>{const e=await(async e=>{const t=await Mr("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:Vr(e.latitude??Pr[0]),gpsLongitude:Vr(e.longitude??Pr[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=ws({data:n,filtrationState:{},getBalloon:fs});return c("div",{children:[o(Ln,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...d,isSearch:!0}),o("div",{className:"h-[600px]",children:o(Is,{children:o(_r,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),Rs=Vt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:i,...l})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Ln,{placeholder:a,options:r,...e(n),...l})})),Bs=d((({field:e,input:t})=>{const{data:n}=Cs("EMPLOYEES_NUMBER"),a=xi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(Rs,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),Ps=d((({field:e,input:t})=>o(Bi,{text:"Наличие военного билета",...e(t?.name??"")}))),_s=d((({field:e,input:t})=>o(Pn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),Ds=d((({field:e,input:t})=>o(Bi,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),Es=d((({field:e,input:t})=>o(Ua,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),As=d((({field:e,input:t})=>o(Pn,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&Ci(e,"birthPlace")}))),Ms=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const Os=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(H,{name:t,width:"24",height:"24",iconVersion:n})}),c("div",{className:"",children:[o(De,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),zs=d((({field:e,input:t})=>{const[n,s]=a([]),[d]=function(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?Ms(t):null);return[n,l((t=>{i((n=>{const a=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(a)),a}))}),[e])]}("programId"),{value:m,onChange:u}=e("cardCategory"),h=e("paymentSystem")?.value?.key;i((()=>{h&&d&&(async()=>{const e=await(async(e,t)=>{const n=await Mr("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(h,d);s(e),Vs(e,m)||u&&u(null)})()}),[h]);const p=r((()=>n?.find((e=>e.key===m?.key))?.description),[n,m]);return c("div",{children:[o(Rs,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t}),p?o(Os,{__html:p}):null]})})),Vs=(e,t)=>e.some((e=>e.key===t?.key)),Fs=d((({field:e,input:t})=>o(Pn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Ls=d((({field:e,input:t})=>o(Pn,{label:"Кодовое слово",...e(t?.name??""),...t}))),$s=d((({field:e,input:t})=>{const{data:n}=Cs("INCOME_CERT_UNITED");return o(Rs,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),js=d((({field:e,input:t})=>{const{data:n}=Cs("MILITARY_STATUS");return o(Rs,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Us={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},qs=d((({src:e,onClose:t,onDocumentRead:n})=>{const a=ke();return c(tr,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:t,children:[a?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Ql,{className:"mx-auto mt-m",type:"button",onClick:()=>{n?.(),t?.()},children:"Ознакомиться"})]})})),Ws=(e,t)=>{const{open:n}=un(qs),a=ke();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Or(`/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])},Hs=d((({className:e,error:t,docId:n,...a})=>{const i=Ws(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Xa,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ae,{children:"Ознакомиться"})}):null]}),wn(t)]})})),Ys=d((({field:e,input:t})=>t&&t.name?o(Hs,{text:Us[t.name]?.text,docId:Us[t.name]?.docId,...e(t.name)}):null)),Gs=Math.round(29.5),Ks=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]}))),Xs="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",Zs="flex flex-col gap-y-xl min-w-52",Qs=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ae,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),eo=d((({className:e,title:t,value:n,color:a="text-secondary-text",...i})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ae,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Qs,{value:n,...i}):o(Ae,{size:"text-h3",children:"-"})]}))),to=(e=[],t=!1)=>no([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),no=(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]},ao=(e,t=0)=>e?.sum?e.sum:t,io=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,lo=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,ro=({min:e=0,max:t=0,availableMonths:n,...a})=>o(da,{items:[`От ${so(e)}`,`До ${so(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),so=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,oo=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:i,onChange:l,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Ul,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),co=e=>oo({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),mo=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(da,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),uo=({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?.(la(t?.[i],n.minMonths,n.maxMonths))},ho=(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)},po=e=>e,go=(e=po)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),fo=go(),xo=(e=po)=>go((t=>-e(t))),bo=xo(),yo=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:vo([e,t],a),vo=([e,t],n=[])=>({[e]:n.length?bo(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?fo(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),No=(e,[t,n],a)=>e>=a[t]&&e<=a[n],wo={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Co=e=>So({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&So({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&So({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&So({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),So=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],ko=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[wo],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Co({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=yo(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=yo(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>Co({row:e,userInputParams:t,paramsViewSettings:n})&&No(a,["minSum","maxSum"],e)&&No(i,["minMonths","maxMonths"],e)))||wo)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=ho(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},Io=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),To={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Ro=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,no([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=dn({moneyValue:ao(s,2e5),monthsValue:io(s,Gs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=ko(g,n,r),b=co({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:y}=f("moneyValue"),{onChange:v}=f("monthsValue");return i((()=>{y&&y(la(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),i((()=>{v&&v(la(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),i((()=>{!Io(s)&&h&&uo({field:f,defParams:h,calcParams:x,map:To,monthsValue:"minMonths"})}),[n,s]),o(Ks,{className:e,title:t,...m,children:c("section",{className:u(Xs,e),children:[c("div",{className:Js,children:[mo({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),ro({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),Bo({...x,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(Zs,"@4xl:w-1/2"),children:[o(eo,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(eo,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(eo,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),je(a,{isVertical:!0}),lo(l)]})]})})})),Bo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Xa,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Xa,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Xa,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Xa,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Po="calculator",_o=d((({field:e,params:t})=>{const n=l((t=>{e(Po).onChange?.(t)}),[]);return o(Ro,{...t?.calcData,padding:"p-0",defaultParams:Eo(e(Po).value),onChange:n})})),Do={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},Eo=(e,t=!1)=>{const n=t?Ao(Do):Do;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},Ao=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),Mo=d((({field:e,input:t})=>{const{data:n}=Cs("CREDIT_IN_RSHB");return o(Rs,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),Oo=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ul,{label:gn({label:t,errors:a?.errors}),...a}),wn(n)]}))),zo=[{id:"810",text:"Рубли"}],Vo=d((({field:e,input:t})=>o(Oo,{label:"Валюта",orientation:"horizontal",items:zo,...e(t?.name??"")}))),Fo=d((({field:e,input:t})=>o(Ua,{label:"Дата доставки",...e(t?.name??"")}))),Lo=d((({field:e,input:t})=>o(Pn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),$o=d((({field:e,input:t})=>o(Bi,{text:"Являюсь инвалидом",...e(t?.name??"")}))),jo=d((({field:e,input:t})=>o(Ua,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&Ci(e,t?.name??"")}))),Uo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Pn,{disabled:t?.filledByEsia&&Ci(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:i,daDataQueryPrefix:n})})),qo=d((({field:e,input:t})=>o(Pn,{disabled:t?.filledByEsia&&Ci(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Wo=d((({field:e,input:t})=>o(Pn,{disabled:t?.filledByEsia&&Ci(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),Ho=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Pn,{disabled:t?.filledByEsia&&Ci(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),Yo=d((({field:e,input:t})=>{const{data:n}=Cs("EDUCATION_LEVEL");return o(Rs,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Go=d((({field:e,input:t})=>{const{data:n}=Cs("ORGANIZATION_ACTIVITY_TYPE"),a=xi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(Rs,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Ko=d((({field:e,input:t})=>{const{data:n}=Cs("ORGANIZATION_KIND"),a=xi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(Rs,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Xo=d((({field:e,input:t})=>{const{data:n}=Cs("EMPLOYMENT_INFO_UNITED");return o(Rs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Jo=d((({field:e,input:t})=>o(Pn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Zo=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(la(Number(n),0,5)))),[]);return o(Pn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...e(t?.name??""),...t,onChange:n})})),Qo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e(t?.name??""),l=e("familyStatus")?.value?.key,r="MARRIED"===l?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return i((()=>{a?.(d)}),[l,s,c]),o(Pn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:n,onChange:a})})),ec=d((({field:e,input:t})=>{const{data:n}=Cs("MARITAL_STATUS");return o(Rs,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),tc=d((({field:e,input:t})=>o(Pn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),nc=d((({field:e,input:t})=>{const{data:n}=Cs("HOUSE_TYPE");return o(Rs,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),ac=d((({input:e})=>o(Os,{__html:e?.label}))),ic=d((({field:e,input:t})=>o(Pn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),lc=d((({field:e,input:t})=>o(Pn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),rc=d((({field:e,input:t})=>o(Pn,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),sc=d((({field:e,input:t})=>o(Pn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),oc=d((({field:e,input:t})=>o(Ua,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&Ci(e,t.name??"")}))),cc=d((({field:e,input:t})=>o(Pn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),dc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],mc=d((({field:e,input:t})=>o(Oo,{orientation:"horizontal",items:dc,...e(t?.name??"")}))),uc=d((({field:e,input:t})=>{const{data:n}=Cs("ORGANIZATION_TYPE"),a=xi();return i((()=>{n&&(a.organization=n)}),[n]),o(Rs,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),hc=d((({field:e,input:t})=>{const n=xi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Ii(n,e,t)}),[]);return o(Pn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),pc=d((({field:e,input:t})=>o(Pn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),gc=d((({field:e,input:t})=>o(Ua,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),fc=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(la(Number(n),0,100)))),[]);return o(Pn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...e(t?.name??""),...t,onChange:n})})),xc=e=>e.map((e=>({key:e.type,text:e.name})));const bc=e=>e?.key,yc=d((({field:e,input:t})=>{const[n,l]=a([]),s=fi();var c;c=async()=>{const{programId:e}=s;if(e){const t=await(async e=>{const t=await Mr("/public-data/creditProgramConditions","POST",{creditProgramId:e});return xc(t?.paymentSystems||[])})(e);l(t??[])}},i((()=>{const e=c();return()=>{e.then((e=>{e instanceof Function&&e()}))}}),[]);const d=r((()=>n?.map((e=>({id:e.key,text:e.text})))??[]),[n]);return o(Oo,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:bc,parse:e=>n?.find((t=>t.key===e))})})})),vc=d((({field:e,input:t})=>{const{data:n}=Cs("POSITION");return o(Rs,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Nc=d((({field:e,input:t})=>{const{data:n}=Cs("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Ln,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...e(t?.name??"")})})),wc=d((({field:e,input:t})=>o(Pn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Cc=["male","female"],Sc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],kc=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 Sn({url:"/suggest/fio",requestData:{parts:["NAME"]},query:e}),n=t[0]?.data?.gender?.toLowerCase()||"";return Cc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(Oo,{label:"Пол",orientation:"horizontal",items:Sc,...e(t?.name??"")})})),Ic=d((({field:e,input:t})=>o(Bi,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),Tc=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Ia(e,"___-___-___ __")):t?.(Ia(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(vn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),Rc=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(Tc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),wn(a)]}))),Bc=d((({field:e,input:t})=>o(Rc,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),Pc=d((({field:e,input:t})=>o(Pn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),_c=d((({field:e,input:t})=>o(Pn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Dc={limitedBirthday:oc},Ec={processPersonalDataFlg:Ys,consentProviderFlg:Ys,consentOthersFlg:Ys,consentInformFlg:Ys,consentPfrFlg:Ys},Ac={organization:uc,organizationAddress:Si,organizationPhone:Ki,organizationName:hc,legalForm:sc,generalSeniority:tc,lastJobExperience:lc,experience5Years:Zo,jobsNumber:ic,beginDate:Es,addressFact:gr,addressRegistration:Si,addressRetail:Ts,addressMatch:fr,sex:kc,limitedBirthday:oc,birthPlace:As,education:Yo,housing:nc,amountWorkers:Bs,employment:Xo,employerActivities:Go,employerOrganization:Ko,positionOrganization:vc,familyStatus:ec,familyMembers:Qo,children:Fs,dependents:Lo,totalIncome:Pc,expenses:Jo,snils:Bc,conscription:js,armyIdFlg:Ps,dulSerie:Wo,dulNumber:qo,dulIssueDate:jo,dulSubdivisionCode:Ho,dulIssuedBy:Uo,participantDateRegistration:gc,retirementIncome:wc,otherIncome:pc,wages:_c,mandatoryPayments:cc,disablePeopleFlg:$o,bankruptcyFlg:Ds,shareholderFlg:Ic,legalEntityName:rc,creditInRshbCd:Mo,bankEmployeeCode:_s,partInBusiness:fc,regionRetail:Nc,infoCard:ac,calculator:_o,confirmationIncome:$s},Mc={addressCourier:Si,paymentSystem:yc,currency:Vo,cardCategory:zs,codeWord:Ls,methodObtain:mc,deliveryDate:Fo},Oc=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=l((n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}}),[e]),s=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(rl(t(e?.name),Bl[e?.name]).error)))),[e]),[d,{toggle:m}]=nn(!0);return o("div",{className:"w-fit",children:c(Yr,{children:[c("div",{className:"flex items-start",children:[c("div",{children:[o(Xa,{text:"Согласие на все документы",value:a,onChange:i},n),wn(s?"Отметьте все обязательные соглашения":"")]}),o(Ql,{embedded:!0,onClick:m,children:o(Wr,{className:"p-2xs",iconVersion:"color",isUnfolded:d})})]}),o(Gr,{className:"flex flex-col pl-2xl",isUnfolded:d,children:e.map(Gl(t,{},Ec))})]})})})),zc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Vc(t||[]);return n.length>2?c("div",{children:[a.map(Gl(e,{},{...Dc})),o(Oc,{inputs:n,field:e})]}):(t||[])?.map(Gl(e,{},{...Dc}))},Vc=(e=[])=>({consentInputs:e.filter((({name:e})=>Object.keys(Us).includes(String(e)))),restInputs:e.filter((({name:e})=>!Object.keys(Us).includes(String(e))))}),Fc=(e,t)=>o(cr,{className:"w-full @xl:w-auto",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Lc=e=>Or("/user-data/updateUserProfile","PUT",e),$c=e=>Or("/user-data/updateUserTask","PUT",e),jc={width:"118",height:"24"},Uc={"bg-white":"color",transparent:"white"},qc={"bg-white":"text-primary-main",transparent:"text-white"},Wc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Uc[e]},className:qc[e],width:n?.width,height:n?.height}),Hc={"bg-white":"text-primary-text",transparent:"text-white"},Yc=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:[Wc(l,n?.image,jc),r?a??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:Hc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),Gc=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),[p,{setTrue:g,setFalse:f}]=nn(!1),x=l((async()=>{g();var e;await(e={captchaText:d},Or("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),b=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Or(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(b,[]),o(tr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Yc,{}),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(Ql,{className:"w-8",embedded:!0,onClick:b,children:o(H,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(vn,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Ql,{version:"secondary",onClick:close,children:"Вернуться"}),o(cr,{version:"secondary",disabled:!d,onClick:x,children:"Отправить"})]}),p?o(or,{blur:!1}):null]})})})),Kc=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:Xc(e)})))),Xc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Jc=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:Zc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Zc=(e,t,n=!1)=>{const a=!t[e];return`w-16 sm:w-20 h-24 text-5xl text-center p-md m-2 border ${bn(!n||!a)} rounded-md caret-transparent outline-none`},Qc=d((({isDisabled:e,onClick:t,text:n})=>o(Ql,{type:"button",onClick:t,disabled:e,children:o(Ae,{font:"font-normal",children:n})}))),ed=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},td=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=nn(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=l((()=>r("")),[]),x=Boolean(0===d&&u),b=p>2||x||!e.every(Boolean),y=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Mr("/sms/checkCode","POST",e).then(ed))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),f(),await(t?.(e.join("")))}catch{r(p>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{c()}}),[e,p]);return i((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:b,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},nd=d((({phone:e,code:t=!0,withDescription:n=!0,codeLength:r=4,consents:s,onSuccess:d=fn,onClose:m=fn})=>{const[u,h]=a(Array(r).fill("")),{handleSubmit:p,hasError:g,errorText:f,isLoading:x,timeNextReq:b,isSubmitButtonDisabled:y,setTimeNextReq:v,setIsTimerStarted:N,setAttempts:w}=td({values:u,onSuccess:d}),C=un(Gc),k=Ut(e),I=l((async()=>{var e;await(e={phoneNumber:k,smsCodesSetName:{key:"AUTHENTICATION"}},Or("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(w(0),v(180),N(!0)):C.open({phoneNumber:k,sendCode:I})}),[k,m]);return i((()=>{I()}),[]),o(tr,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m",onClose:m,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(Jc,{values:u,setValues:h,errorText:f,hasError:g}):null,id(b,v,I),n?c(De,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:s?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}):null,ad(y,p),x?o(or,{blur:!1}):null]})})})),ad=(e,t)=>o(Qc,{text:"Далее",isDisabled:e,onClick:t}),id=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Kc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),ld={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},rd={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},sd=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],od=d((({onSubmit:e=fn,onClose:t=fn})=>{const[n,i]=a(""),[r,s]=a(!1),d=Ws(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?rd:ld;return o(tr,{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(Ul,{className:"whitespace-normal",orientation:"horizontal",items:sd,value:n,onChange:u}),o(Ql,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),cd=d((({title:e,icon:t,description:n,onClick:a=fn})=>c("button",{className:"flex gap-lg items-center border border-gray/30 rounded-xl cursor-pointer p-4 hover:border-green",type:"button",onClick:a,children:[o(ne,{image:{icon:t,iconVersion:"normal"},width:"78",height:"78"}),c("div",{className:"flex flex-col items-start gap-xs md:w-72 md:mr-lg",children:[o(Ae,{font:"font-medium",size:"text-s",children:e}),n?o(Ae,{color:"text-secondary-text",size:"text-xs",children:n}):null]})]}))),dd={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},md={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},ud={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},hd=e=>Object.entries(e).reduce(((e,[t,n])=>t in dd?[...e,{contactTypeCd:{key:dd[t]},value:n}]:e),[]),pd=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in md){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:md[t]},...a}]}return e}),[]),gd=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:fd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in ud?[...e,{incomeTypeCd:{key:ud[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},fd=(e,t)=>Number(e)+Number(t),xd={WORK:"Работаю",RETIREE:"Пенсионер"},bd={BANK_STATEMENT:"Получаю зарплату на счет/карту в РСХБ",BANK_STATEMENT_PENS:"Получаю пенсию на счет/карту в РСХБ",PFR_CERTIFICATE:"Получаю зарплату на счет/карту в другом банке",OTHER:"Другое"},yd={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"},vd={...yd,amur_card:"14",owner_card:"13",travel_card:"15"},Nd=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:fd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},wd=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}},Cd=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}},Sd=(e,t)=>e?.key?{key:e.key,text:t?t[e.key]:e.value}:void 0,kd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=xi(),i=Jt(),{participants:r,creditProgram:s,createdDate:d="",id:m}=e,u=vd[s.code],h=Boolean(yd[s.code]),p=h?"/credit-lead":"/credit-card-lead",{id:g,profile:f}=r[0],x=l((()=>{const t=(e=>{const t=e.participants[0],{classCard:n,codeWord:a,paymentSystemTypeCd:i,currencyCode:l}=e,{loanAmount:r,creditPeriod:s,paymentTypeCd:o}=e,{birthDate:c,midname:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,educationLevelCd:y,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:_,employeesNumberCd:D,opf:E,seniority:A,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:$,otherDependents:j,militaryStatusCd:U,participantIncomes:q,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:l?.key,paymentSystem:Sd(i),cardCategory:Sd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,education:Sd(y),participantDateRegistration:v,housing:Sd(N),beginDate:k,employment:Sd(I,xd),organizationName:T,inn:R,employerActivities:Sd(B),organization:Sd(P),employerOrganization:Sd(_),amountWorkers:Sd(D),legalForm:E,generalSeniority:A?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:Sd(V),familyStatus:Sd(F),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:Sd(U),confirmationIncome:Sd(Q,bd),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:Sd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...Nd(q),...wd(S),...Cd(C),...(ee=w,ee?.key?{sex:"MAN"===ee.key?"male":"female"}:null)};var ee})(e);a.participantId=g,a.taskId=m,a.profileId=f?.id,a.programId=u,a.leadForm=t,i.assign(p)}),[]),b=l((()=>{i.assign(h?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]);return o(tr,{className:"my-6xl max-w-4xl w-full min-h-fit mx-auto rounded-xl py-0",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center mt-xs md:mt-0 mx-6xl",children:[o(N,{className:"whitespace-pre-wrap text-center",title:"Нашли черновик вашей заявки",headingType:"h5"}),c("div",{className:"flex flex-col gap-m max-w-lg",children:[o(cd,{title:"Продолжить заполнение черновика",icon:"BankColorIcon",description:d?`Черновик от ${jt(new Date(d))}`:"",onClick:x}),o(cd,{title:t?"Продолжить заполнение текущей заявки":"Создать новую заявку",icon:"NewLoanIcon",description:"На получение кредита",onClick:t?n:b})]})]})})})),Id=d((function({onClose:e=fn}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(tr,{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(Ql,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Ql,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),Td=d((({onClose:e})=>{const t=Jt(),n=xi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Mr("/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(tr,{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(Ql,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Ql,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),Rd=()=>{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")}},Bd=()=>fi(),Pd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:i,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=Bd();return l((({participantId:t,taskId:n,profileId:a,programId:i,formData:l})=>{e.participantId=t,e.taskId=n,e.profileId=a,e.programId=i,e.leadForm=l}),[])})(),d=(e=>{const{open:t}=un(Td),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=un(od),n=un(nd),a=t=>async n=>{try{t&&await Lc({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},i=(t,i)=>async l=>{"SIGNED"===l&&t?n.open({phone:t,consents:["согласие на запрос информации в БКИ"],onSuccess:a(i)}):e()};return{open:(n,a)=>t({onSubmit:i(n,a),onClose:e})}})(d),u=un(nd),h=(()=>{const{open:e}=un(kd),{open:t}=un(Id);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{isSending:n,ok:s,handleSubmit:l((async t=>{try{i();const a=await(n={profile:{phone:Ut(t.phone)}},Mr("/public-data/createUserProfile","POST",n).then((e=>e?.profile?.id||null)));if(a&&t?.phone){const n=async()=>{await Dd({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},i=async()=>{try{const t=await(async e=>{const t=await Mr("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:a,programId:e});if(t){const e=await(async e=>await Mr("/user-data/getTaskById","POST",e)||void 0)({taskId:t});u.close(),h.open({task:e,isFromLead:!0,onClose:n})}else await n()}catch{o(!1)}},l=_d(t);u.open({phone:t?.phone,consents:l,onSuccess:i}),r()}}catch{o(!1)}var n}),[])}},_d=e=>Object.keys(Us).filter((t=>e[t])).map((e=>Us[e]?.text)),Dd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=Ed(n);await Lc(((e,t)=>{const{name:n="",surname:a="",middleName:i="",limitedBirthday:l="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:i,birthDate:l&&jt(l,!0),email:s,phone:Ut(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,i));const{taskId:l,participantId:r}=await(async e=>await Mr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await $c((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:i,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:hd({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:Rd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},Ed=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Ad={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Md=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Ad[e.name||""]])))}},Od=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:Hi(t?.phone),email:t?.email,dulIssueDate:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:zd(i),addressFact:zd(l),esiaAccountTypeCd:t?.esiaAccountType}},zd=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}},Vd=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=Bd(),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((()=>Md(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},Mr("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...Od(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=Ms(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}]},Fd=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>pr?.flatMap((e=>e?.inputs))||[]),[pr]),m=r((()=>Pl(d)),[d]),[h,{isLoading:p}]=Vd(d,a),{isSending:g,ok:f,handleSubmit:x}=Pd({programId:n,nextStepLink:a}),[,{field:b,onSubmit:y}]=dn(h,{formValidator:m,onSubmit:x}),v=un(nr);return i((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(mn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[p?o(or,{blur:!1}):null,pr.map(((e,t)=>c("div",{className:u(Kl(e.columns),"grid gap-x-m"),children:[Xl(e.title),zc({field:b,inputs:e?.inputs})]},`section-${t}`))),Fc(l,g)]})})})),Ld=d((({title:e,description:t})=>{const n=ke();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$d=e=>e%2!=0,jd="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ud=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]],[s,{toggle:d}]=nn(!1);return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(jd),children:[B(l,{...i.options,parent:n}),$d(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),c(Yr,{children:[c(Gr,{className:u(jd),isUnfolded:s,children:[B(r,{...i.options,parent:n}),$d(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(Hr,{className:u("w-full",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:i.options?.page?.colorPalette,onClick:d})]})]})})),qd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Wd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Hd=10;function Yd(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:Gd(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 Gd(e=0){const t=Math.round(e*Hd);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Kd=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:i,children:r,onIntersection:s})=>{const c=Yd(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})})),Xd=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Jd=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:i=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=l(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Qd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Zd(c,v):{},...N?Wd(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(Kd,{className:u(m,i?Xd[i-1]:"",{"h-full":N},t),style:w?Zd(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Zd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),em={"horizontal-list":"w-6","vertical-list":"h-6"},tm=({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?em[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),nm=({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))},am=e=>t=>e.scrollWidth/t,im=e=>(t,n)=>{e.scrollBy({left:n*am(e)(t),behavior:"smooth"})},lm=({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?[xo()(i),go()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?im(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?im(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}]},rm={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},sm=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=lm({itemCount:s.length}),g=om(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(Jd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(nm({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",rm[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(tm({activeIndex:t,onClick:f,listType:a}))}):null})),om=(e=!1)=>({behavior:e?"auto":"smooth"}),cm=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"})}))),dm=d((e=>o(cm,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),mm=d((e=>o(cm,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),um="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",hm=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?pm(t):null,l?o(dm,{className:u(gm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(mm,{className:u(gm(i),m?"right-1":"right-0"),onClick:d}):null]})})),pm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(um,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(um,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),gm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),fm=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:i=1,listType:l="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=lm({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(Jd,{containerRef:y,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(hm,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(sm,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:l,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),xm=({blocksToRender:e,...t})=>o(fm,{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",qd(!0)),children:T(e,t)},String(n))})}),bm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[ym(n,t),o(Ud,{...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[ym(n,t),xm({...a,blocksToRender:t})]});default:return null}})),ym=(e,t)=>e&&!t.length?o(Ld,{...e}):null,vm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),Nm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(zi,{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))))),wm=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,vm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Cm(a)).filter(Boolean))]}),n?o("div",{children:o(Ql,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),Cm=e=>([t,n])=>{const a=n?.type;return"array"===a?Sm(t,e)(n):null},Sm=(e,t)=>n=>{const a=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Ae,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Nm,{items:a,multiple:!n?.single,...t(e)})]},e)},km=e=>e;function Im(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Tm=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Tm(t[e])||Tm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Tm(t[e])||Tm(n[e])||Bm(t[e])<=Bm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Tm(t[e])||Tm(n[e])||Bm(t[e]?.min)>=Bm(n[e]?.min)&&Bm(t[e]?.min)<=Bm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>Tm(t[e])||Tm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Tm(t[e])||Tm(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Bm=e=>Number(e||0),Pm=(e,{block:t,page:n,normalize:a=km})=>{const i=t?.blocks||[],[l,s]=dn(e),o=r((()=>Im(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),c=l===e?i:((e,t)=>(n=km)=>e?.filter((([,e])=>Rm(t,n(e)||{}))).map((([e])=>e)))(o,l)(a);return[l,{blocksToRender:c,blocksWithProps:o},s]},_m={},Dm={},Em=Vt((({className:e,filtrationSchema:t=_m,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Pm(Dm,{block:i.block,page:i.options?.page}),d=o(On,{className:"w-64",label:n?.title,options:Am(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Am(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(wm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Ql,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(bm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Am=e=>Im(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Mm=(e=!1)=>e?"text-left":"text-center",Om={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},zm=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",Om[n],e),children:o(H,{...l,width:"54%",name:i})}):null})),Vm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Mm(i),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Fm)}):null]})})),Fm=({label:e,description:t,__html:n,icon:a,isDotted:i=!1,iconBgVersion:l},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(zm,{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(Ae,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Lm=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(Ae,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ae,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),$m=(e,t,n)=>o("div",{className:`grid gap-2xs ${jm(t)}`,children:e.map(Lm(n))}),jm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Um=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:i,title:l,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?$m(e,a,t):null]}))),qm={start:"justify-start",center:"justify-center",end:"justify-end"},Wm=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",qm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:je(e)})})),Hm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Ae,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:He(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),i&&l?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:i}):null]})]}))),Ym=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),Gm=({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(Hm,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(eo,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(Ym,{title:e,...r}),Km={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Xm={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=Km.prefMonthsNum,prefTravelBonusRate:l=Km.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||Xm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},Zm=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=dn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Jm(r,n);return o(Ks,{className:e,title:t,...l,children:c("section",{className:u(Xs,e),children:[c("div",{className:Js,children:[mo({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),mo({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Gm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Zs,children:[f>=0?o(eo,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),lo(i)]})]})})})),Qm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,eu=e=>oo({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),tu=" (c капитализацией)",nu=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:Zs,children:[o(eo,{title:`Доход в конце срока${l?tu:""}`,value:e,postfix:n,prefix:"+"}),o(eo,{title:`Сумма в конце срока${l?tu:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),i?.map(lo)]}),au={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const iu={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},lu=(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?au[e?.rateType]:"",{data:n}=Xn(t?`${qt}/depositrates/${t}`:null,_t);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&ru(s,e)&&No(a,["minSum","maxSum"],e)&&No(n,["minDays","maxDays"],e)))||iu,{rate:m}=d,u=su(m,e),h=a+u,p=c||[iu];return{...d,...vo(["minSum","maxSum"],p),...vo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},ru=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,su=(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)},ou=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=dn({moneyValue:ao(r,1e5),daysValue:io(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=lu(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o(Ks,{className:e,title:t,...d,children:c("section",{className:u(Xs,e),children:[c("div",{className:Js,children:[mo({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(da,{items:[`От ${Qm(y.min||0)}`,`До ${Qm(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[cu(p,h),eu({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Gm({rate:x,depositeName:b,isShowDepositeName:l}),nu({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var y})),cu=(e,t)=>c("div",{className:"space-y-s",children:[o(Ae,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Xa,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Xa,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),du=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},mu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},uu=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?gu(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=>[pu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),pu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),pu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),pu({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,No(a,["minSum","maxSum"],t),No(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||mu,{rate:u}=m,h=hu(u,e),p=a+h,g=t||[mu];return{...m,...vo(["minSum","maxSum"],g),...vo(["minMonths","maxMonths"],g),availableMonths:du(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}},hu=(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)},pu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],gu=(e,t)=>e+Math.round((t-e)/2),fu=(e="rub")=>"rub"===e,xu=(e,t)=>{const{minMonths:n,maxMonths:a}=vo(["minMonths","maxMonths"],Nu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:la(i,n,a)}},bu=(e,t)=>{const{minSum:n,maxSum:a}=vo(["minSum","maxSum"],Nu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:la(i,n,a)}},yu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),vu=e=>{const t=fu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Nu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},wu=(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?oo({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?oo({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Cu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?eu({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},oo({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Cu(e.isShowNewClient),e.isShowNewClient?o(Xa,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},Cu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Su={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ku={text:"₽",key:"rub"},Iu=Vt((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[ku],g=l((e=>t=>e?{...t,...vu(t),...bu(t,e),...xu(t,e),...yu(t,e)}:t)(h),[h]),[f,{field:x}]=dn({moneyValue:ao(d,2e4),monthsValue:io(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ku},{normalizer:g}),b=x?.("currency")?.value??ku,y=x?.("isNewClient")?.value,v=Nu(h,b),N=uu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{uo({field:x,defParams:to(v,y),calcParams:N,monthsValue:"minMonths",map:Su})}),[x,h]);i((()=>{!Io(d)&&v&&I()}),[d,h]);const T=w===to(v,y)?.rate;return o(Ks,{className:e,title:t,...m,children:c("section",{className:u(Xs,e),children:[c("div",{className:Js,children:[c("div",{className:"flex gap-m",children:[mo({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Tu(b?.key)}),h&&h?.length>1?o(Ln,{label:"Валюта",options:p,...x("currency")}):null]}),ro({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),wu({...N,...s},x)]}),Gm({rate:w,children:Bu(I,T)}),nu({income:C,finalSum:S,buttons:[...a,Ru(n?.buttons,k)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Tu=(e="")=>fu(e)?1e3:100,Ru=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},Bu=(e,t=!1)=>t?null:o(Ql,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Pu=e=>_u({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&_u({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),_u=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Du={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Eu=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Du],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Pu({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=yo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=yo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>Pu({row:e,userInputParams:t,paramsViewSettings:n})&&No(a+r,["minSum","maxSum"],e)&&No(l,["minSumOld","maxSumOld"],e)&&No(r,["minSumExtra","maxSumExtra"],e)&&No(i,["minMonths","maxMonths"],e)))||Du)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=ho(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}},Au=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=dn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Eu(s,n,l),h=co({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ks,{className:e,title:t,...r,children:c("section",{className:u(Xs,e),children:[c("div",{className:Js,children:[mo({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),mo({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ro({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Mu({...m,...l},d),m.isExtraMoney?mo({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(Zs,"@4xl:w-1/2"),children:[o(eo,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(eo,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(eo,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(eo,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(a,{isVertical:!0}),lo(i)]})]})})})),Mu=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Xa,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Xa,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Xa,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ou=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=ia(e,{normalize:(e=i)=>n&&a?String(la(Number(zu(e)),n,a)):zu(e),format:He(r)}),d=l((e=>t&&t(zu(e))),[t]);return o(vn,{onChange:d,...s,...c})})),zu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Vu=d((e=>o(Ou,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Fu=new ui;function Lu(){return pi(Fu)}di(Fu,new mi(globalThis?.sessionStorage));const $u={private:"p2p/registerP2P",business:"b2c/registerB2C"},ju=({onClose:e,errorCode:t,errorMessage:n})=>{const a=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(tr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:a,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Uu=e=>{const t=un(ju),n=Lu(),a=Jt(),i="private"===e?"p2p":"b2c";return l((async({amount:l})=>{const r=await(async(e,t)=>{const n=Jt(),a={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},i=`${qt}/payment/${$u[e]}`;try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(a)});return e.ok?await e.json():null}catch(e){return null}})(e,l);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:i,url:a.href},a.assign(`${i}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},qu={amount:1500},Wu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:a,formType:l="private",...r})=>{const[s,{setValue:d}]=nn(!1),m=Uu(l),[{amount:h},{field:p,onSubmit:f}]=dn(qu,{onSubmit:m});return i((()=>{d(h<=0)}),[h]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:f,children:[o(Vu,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:h}),a?.text?o(cr,{className:"w-full mt-lg",disabled:s,children:a.text}):null]})]})})),Hu=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Yu="relative h-full",Gu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Ku=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(Zu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,i)=>c("div",{className:Xu(n,{someCardsHighlighted:l}),children:[T(n,a,{className:Ju(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Zu(n)?Hu({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Xu=(e,{someCardsHighlighted:t})=>u(Yu,t&&(Zu(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ju=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Yu,"min-w-80",Gu[a],t&&(Zu(e)?"pt-3xl sm:pt-16":"pt-3xl"),qd(n),n&&"h-full"),Zu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Qu=Vt((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:i=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(fm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?eh(s?.block?.blocks):[],hasBlur:!0,children:Ku({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),eh=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],th="z-10 border border-solid w-full h-full",nh=u(th,"absolute hidden @xl:block border-transparent"),ah=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(nh,"top-9 right-12 bg-green-dark")}),o("div",{className:u(nh,"top-6 right-8 bg-green")}),o("div",{className:u(nh,"top-3 right-4 bg-green-light")}),c("div",{className:u(th,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ih={black:"bg-black",white:"bg-white"},lh=d((({className:e="",title:t,description:n,image:a,price:i,button:l,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Re,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:je([l],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(rh)]}):null,i?c(Ae,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),rh=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ih[e]}`},String(t)),sh=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})),oh=d((({className:e,additionalDescription:t,description:n,links:a,title:i,...l})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...l,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?ch(a):null]})}))),ch=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(sh,{...e},String(t))))}),dh=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),mh=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})})),uh=[{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"}}],hh=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=>uh.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},ph(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:gh(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ph=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",gh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),fh=d((({className:e,padding:t,description:n,additionalDescription:a,href:i,icon:l,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(mh,{href:i,target:m,className:"h-full",data:dh(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(hh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,xh(a,p)]})})}))),xh=(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,bh=new me,yh=(e,t)=>{const{title:n,description:a,buttons:i}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ae,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:je(i)}):null]},String(t))},vh=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:h=[],options:p,data:f,...x})=>{const b=r((()=>h.map(yh)),[h]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,C]=a(!1);i((()=>bh.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&C(e.isUnfolded)}))),[p?.parent]);const S=l((()=>{bh.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...x,children:[o(ne,{className:"self-center",image:s}),t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(Ne,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Yr,{children:[c("div",{children:[y,o(Gr,{isUnfolded:w,children:v})]}),h.length>=m?o(Hr,{className:"w-full mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:f,onClick:S}):null]}):o("div",{children:y})]})})),Nh=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?wh(n):null,t?.length?wh(t):null]}))),wh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Ch({column:e,i:t})))}),Ch=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},i)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(i))))},`col-${String(t)}`):null,Sh=()=>{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 Or("/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)},kh=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]})]}))),Ih=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(kh,{step:a,showPercentage:!1})]})})}));var Th;!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"}(Th||(Th={}));const Rh=e=>Mr("/user-data/getTaskStatus","POST",e),Bh=e=>Or("/user-data/sendSignalToProcess","POST",e),Ph=(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},_h=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:i})=>{const[l,r]=a(e),s=100-(e-l)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(Kc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(De,{__html:i}):null]})]})})),Dh=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(_h,{interval:d,intervalExpireAction:m}):null]}),o(Eh,{title:a,items:i}),o(Eh,{title:l,items:r,countColumns:!0}),n?.__html?o(Os,{__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]}))),Eh=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ae,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Kl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Ah(e)},t)))}):null]})]}):null},Ah=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),Mh=d((()=>o(Dh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Oh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=xi();return o(Dh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),zh=d((()=>{const{statusInfo:e}=xi(),t="courier"===e?.methodObtain;return o(Dh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:t?"":"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:t?"Адрес доставки":"В отделении Банка",sectionInfoAdditional:t?[{description:e?.deliveryAddress}]:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Vh=d((()=>{const{statusInfo:e}=xi();return o(Dh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Fh(e),buttonText:"Вернуться на главную"})})),Fh=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},Lh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],$h=d((()=>{const[e,t]=a(Th.process),{taskId:n}=xi();i((()=>{(async()=>{for(const e of Lh)await Bh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Rh({taskId:n});a&&a?.statusCd!==Th.process&&(e(),t(a.statusCd))}),[n]);Ph(r,3e4);return jh(e,(()=>t(Th.rework)))})),jh=(e,t)=>({IN_PROCESS:o(Oh,{handleExpireTimer:t}),CANCELLED:o(Mh,{}),FAILED:o(Mh,{}),DRAFT:o(Mh,{}),APPROVED:o(Vh,{}),PRE_DECISION:o(Vh,{}),REVISION:o(zh,{})}[e]||o(zh,{})),Uh=e=>(t,n)=>t.filter((e=>e)).map((t=>[qh(n,e),Wh(t,e),Kh(t,e),Hh(t,e),Yh(t,e),Gh(t,e)].some(Boolean)?{...t,required:!1}:t)),qh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,Wh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Hh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Yh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Gh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Kh=({name:e},t)=>"snils"===e&&Xh(t),Xh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Jh={...Ac,...Mc},Zh=({field:e,inputs:t,params:n})=>t.map(Gl(e,n,Jh)),Qh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Uh(ep(t))(e,n);return c("div",{className:u(Kl(i),"grid gap-x-m"),children:[Xl(l),Zh({field:t,inputs:s,params:a})]},`section-${r}`)})),ep=e=>t=>e(t)?.value,tp=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Ql,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(cr,{isLoading:t,children:a?"Отправить заявку":"Далее"})]})})),np=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},ap=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},ip=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:hd({organizationPhone:p&&Ut(p)}),participantAddresses:pd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},lp=e=>{const{name:t,surname:n,middleName:a,limitedBirthday:i="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDate:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:jt(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:hd({phone:Ut(l),email:r}),participantAddresses:pd({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},rp=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(i=n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{};var i},sp=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},op=(e,t)=>{switch(e){case 0:default:return{};case 1:return lp(t);case 2:return ip(t);case 3:return gd(t);case 4:return np(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:pd({addressCourier:t})}:{}})(t)}},cp=[{paymentSystem:{key:"",text:""},currency:"810",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDate: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}],dp=e=>{try{return e?new Date(e):void 0}catch(e){return}},mp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=xi(),d=r((()=>((e,t)=>({...cp[e],...t,limitedBirthday:dp(t?.limitedBirthday),dulIssueDate:dp(t?.dulIssueDate),participantDateRegistration:dp(t?.participantDateRegistration),beginDate:dp(t?.beginDate),deliveryDate:dp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate,methodObtain:t?.methodObtain},c.leadForm=d)}),[o,d]),u=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await $c((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...sp(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...op(i,a)}],...ap(a),...rp(a)}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}o?n?.():t()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},up=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,onFinish:i})=>{const s=r((()=>t?.flatMap((e=>e?.inputs||[]))),[t]),d=l((t=>Pl(Uh((e=>t[e]))(s,e))(t)),[s]),[m,u,h]=mp({step:e,onNextStep:a,onFinish:i}),[,{field:p,onSubmit:g}]=dn(m,{formValidator:d,onSubmit:u});return c("form",{onSubmit:g,className:"space-y-m",children:[Qh({sections:t,field:p,step:e}),o(tp,{isSending:h,step:e,onPrevStep:n})]})})),hp=[[{title:"Персональные данные",columns:2,inputs:[{name:"surname",required:!0,dadata:!0,filledByEsia:!0},{name:"name",required:!0,dadata:!0,filledByEsia:!0},{name:"middleName",dadata:!0,filledByEsia:!0},{name:"sex",required:!0},{name:"limitedBirthday",required:!0,filledByEsia:!0},{name:"birthPlace",required:!0,filledByEsia:!0},{name:"phone",required:!0,filledByEsia:!0},{name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{name:"dulSerie",required:!0,filledByEsia:!0},{name:"dulNumber",required:!0,filledByEsia:!0},{name:"dulIssueDate",required:!0,filledByEsia:!0},{name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{name:"addressMatch"}]},{columns:2,inputs:[{name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{name:"housing",required:!0}]},{inputs:[{name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{name:"infoCard",label:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{name:"employment",required:!0},{name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{name:"inn",required:!0,dadata:!0},{name:"legalForm",required:!0}]},{inputs:[{name:"organization",required:!0},{name:"amountWorkers",required:!0}]},{columns:2,inputs:[{name:"employerActivities",required:!0},{name:"employerOrganization",required:!0},{name:"generalSeniority",required:!0},{name:"lastJobExperience",required:!0},{name:"experience5Years",required:!0},{name:"jobsNumber",required:!0}]},{inputs:[{name:"organizationPhone",label:"Телефон работодателя",required:!0},{name:"beginDate",required:!0}]},{columns:2,inputs:[{name:"positionOrganization",required:!0},{name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{name:"familyStatus",required:!0}]},{columns:1,inputs:[{name:"dependents",required:!0}]},{columns:2,inputs:[{name:"familyMembers"},{name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{name:"infoCard",label:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{name:"wages",required:!0}]},{columns:1,inputs:[{name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{name:"snils",required:!0}]},{columns:1,inputs:[{name:"conscription",required:!0}]},{columns:2,inputs:[{name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{name:"disablePeopleFlg"}]},{inputs:[{name:"bankruptcyFlg"}]},{inputs:[{name:"shareholderFlg"}]},{inputs:[{name:"legalEntityName"}]},{inputs:[{name:"creditInRshbCd"}]}]],pp=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...hp,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],gp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],fp=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=l((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);i(Sh,[]);const u=l((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=l((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=pp[n],[f,{setTrue:x}]=nn(!1);return o(g,{className:e,...t,children:c("div",{ref:d,className:"container grid grid-cols-12",children:[f?null:o(Ih,{stepsTitles:gp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:f?o($h,{}):o(up,{step:n,sections:p,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),xp=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(kh,{step:a,showPercentage:!1})]})})})),bp=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(_h,{interval:d,intervalExpireAction:m}):null]}),o(yp,{title:a,items:i}),o(yp,{title:l,items:r,countColumns:!0}),n?.__html?o(Os,{__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]}))),yp=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ae,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Kl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:vp(e)},t)))}):null]})]}):null},vp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),Np=d((()=>o(bp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),wp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=xi();return o(bp,{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?"Аннуитетный":"Дифференцированный"}]})})),Cp=d((()=>{const{statusInfo:e}=xi();return o(bp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Sp=d((()=>{const{statusInfo:e}=xi();return o(bp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),kp=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Ip=d((()=>{const[e,t]=a(Th.process),{taskId:n}=xi();i((()=>{(async()=>{for(const e of kp)await Bh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Rh({taskId:n});a&&a?.statusCd!==Th.process&&(e(),t(a.statusCd))}),[n]);Ph(r,3e4);return Tp(e,(()=>t(Th.rework)))})),Tp=(e,t)=>({IN_PROCESS:o(wp,{handleExpireTimer:t}),CANCELLED:o(Np,{}),FAILED:o(Np,{}),DRAFT:o(Np,{}),APPROVED:o(Sp,{}),PRE_DECISION:o(Sp,{}),REVISION:o(Cp,{})}[e]||o(Cp,{})),Rp=({field:e,inputs:t,params:n})=>t.map(Gl(e,n,{...Ac})),Bp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Uh(Pp(t))(e,n);return c("div",{className:u(Kl(i),"grid gap-x-m"),children:[Xl(l),Rp({field:t,inputs:s,params:a})]},`section-${r}`)})),Pp=e=>t=>e(t)?.value,_p=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Ql,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(cr,{isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Dp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Ep=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Dp[a?"annuity":"differential"]}},Ap=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Mp=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return lp(t);case 2:return ip(t);case 3:return gd(t);case 4:return np(t);default:return{}}},Op=[{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,dulIssueDate: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}],zp=e=>{try{return e?new Date(e):void 0}catch(e){return}},Vp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=xi(),d=r((()=>((e,t)=>({...Op[e],...t,limitedBirthday:zp(t?.limitedBirthday),dulIssueDate:zp(t?.dulIssueDate),participantDateRegistration:zp(t?.participantDateRegistration),beginDate:zp(t?.beginDate),deliveryDate:zp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},c.leadForm=d)}),[o,d]),u=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await $c((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Mp(i,a)}],...Ep(a),...Ap(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Fp=d((({step:e,sections:t,programsSource:n,onPrevStep:a,onNextStep:i,onFinish:s})=>{const{programId:d}=xi(),m=n?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs??[]))),[t]),h=l((t=>Pl(Uh((e=>t[e]))(u,e))(t)),[u]),[p,g,f]=Vp({step:e,onNextStep:i,onFinish:s}),[,{field:x,onSubmit:b}]=dn(p,{formValidator:h,onSubmit:g});return c("form",{onSubmit:b,className:"space-y-m",children:[Bp({sections:t,field:x,step:e,params:{calcData:m}}),o(_p,{step:e,isSending:f,onPrevStep:a})]})})),Lp=[[{columns:1,inputs:[{name:"calculator"}]}],...hp,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{name:"regionRetail",required:!0}]},{inputs:[{name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{name:"bankEmployeeCode"}]}]],$p=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],jp=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(Sh,[]);const h=l((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Lp[r],x=0===r,[b,{setTrue:y}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||b?null:o(xp,{stepsTitles:$p,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:b?o(Ip,{}):o(Fp,{step:r,sections:f,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:y},String(r))})]})})})),Up=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,qp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Wp=1e9,Hp={sum:{min:1e4,max:Wp},period:3},Yp=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Pm(Hp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:Gp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Kp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(wm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Vu,{label:a?.title,min:500,max:Wp,...d("sum",{parse:e=>({min:Number(e),max:Wp}),format:({min:e})=>String(e)})}),o(da,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(bm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Gp=e=>Dt((e?.paramsSource?.rateRows||[]).filter(Up).flatMap((e=>qp(e.minMonths,e.maxMonths)))),Kp=e=>Dt(e.flatMap((e=>e||[])).filter(Up).flatMap((e=>qp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Xp=[{key:"10"},{key:"50"},{key:"100"}],Jp=({itemCount:e,onItemCountChange:t})=>{const n=l((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(On,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Xp,iconVersion:"black"})]})},Zp="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Qp=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:i}=e,l=t+1;return l===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:l},String(t)):1!==l&&l!==i&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(l,n,i)?o("div",{onClick:()=>a(l),className:Zp,"aria-label":`Страница ${l}`,children:l},String(t)):null},eg={width:"24",height:"24"},tg=({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(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ng(1===e),...eg})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Zp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Qp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Zp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ng(e===n),...eg})})]})},ng=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",ag=({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(tg,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Jp,{itemCount:a,onItemCountChange:i}):null]}),ig=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:i,placeholder:r="Поиск по сайту"})=>{const s=l((e=>{a&&a(e.target?.value||"")}),[a]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",xn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),lg=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(ig,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(ja,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(ja,{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(Ql,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),rg=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:i}=a({href:`${qt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(zm,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ae,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),sg=`${qt}/depository`,og={startDate:void 0,endDate:void 0,query:""},cg=Vt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(og),{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(sg);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}=Xn(sg+o,_t);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),b=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(lg,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(rg,{...e},String(e.publicId)))):o(Ld,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(ag,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),dg=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,mg=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:dg(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),i?.text?o(Ne,{version:i?.version,text:i?.text,...i}):null]}))),ug=`${qt}/region`;function hg(e="Москва"){return fi().location??{name:e}}function pg(e="Москва"){const t=fi(),n=l((async()=>{if(!t.location){const n=await Pt(ug);t.location=n??{name:e}}}),[t,e]);return Xn(ug,n),t}var gg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(gg||(gg={}));const fg=new Intl.NumberFormat("ru",{style:"currency",currency:gg.RUB}),xg=e=>e?fg.format(e):"",bg="text-m font-light text-secondary-text ",yg=`${bg} text-left`,vg=`${bg} pl-5xl text-center`,Ng=`${bg} pl-5xl text-right`,wg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Cg=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(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:vg,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:Ng,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Sg)})]}))),Sg=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:wg[t]},width:"24",height:"24"}):null,o(Ae,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ae,{size:"text-h6",children:xg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:xg(e?.buyExchangeRate)})})]},t)},kg={icon:"GpsIcon"},Ig=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(zm,{...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:"Курс указан для заданного офиса"})]})]}))),Tg=(e,t,n)=>{const a=Number(Rg(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)},Rg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Bg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Pg=e=>t=>{const[,n]=Bg(e.find((([e])=>e(t))));return n(t)},_g=e=>Pg(e.map((([e,t])=>[e,()=>t])));_g.if=e=>new Dg(void 0,e);class Dg{parent;predicate;unit;get entry(){return[Bg(this.predicate),Bg(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 Pg([...Eg(this),[()=>!0,e]])}}const Eg=e=>[...e?.parent?Eg(e.parent):[],e.entry],Ag=e=>_g([[e=>e.value!==gg.RUB&&e.oppositeValue!==gg.RUB,()=>e.handleConvert(e.value,gg.RUB)],[e=>e.value===gg.RUB&&e.oppositeValue===gg.RUB,()=>e.handleConvert(e.value,gg.USD)],[e=>e.value===gg.RUB&&e.oppositeValue===gg.RUB,()=>e.handleConvert(e.value,gg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Mg(e){const{placeholder:t,rates:n,selected:a,value:i,setValue:l,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(vn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(On,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Og=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||gg.RUB,selectBuy:n?.[0]?.currency?.currency||gg.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:[Mg({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:zg(r,d,n),value:r.inputSell,setValue:e=>Fg(d,n)(e,r.selectSell,r.selectBuy)}),Mg({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Vg(r,d,t),value:r.inputBuy,setValue:e=>Lg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),zg=(e,t,n)=>a=>{t({selectSell:a}),Ag({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Fg(t,n)(e.inputSell,a,i)}})},Vg=(e,t,n)=>a=>{t({selectBuy:a}),Ag({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Lg(t,n)(e.inputBuy,a,i)})},Fg=(e,t)=>(n,a,i)=>{e({inputSell:Rg(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(Tg(n,l,a===gg.RUB)||"")})},Lg=(e,t)=>(n,a,i)=>{e({inputBuy:Rg(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(Tg(n,l,a===gg.RUB)||"")})},$g=`${qt}/exchangerates`;const jg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=Xn($g+`?regionCode=${t}`,_t);return n||{}}(hg()),l=Ug(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:gg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:gg.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(Cg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(Ig,{address:i?.address})]}),o(Og,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Ug=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(Wg(n))})})),Wg=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},Hg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Yg=["all","footer"],Gg=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(Hg(Yg)).map(n).map(Kg)})})),Kg=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(Hg(Yg));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))},Xg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Jg)}):null)),Jg=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Zg)})]},String(t)),Zg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Qg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Qg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${ef(t)}`,children:o(Ae,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},ef=e=>e.replaceAll(/\D/g,""),tf=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}`})})),nf=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Ae,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(tf,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),af="w-full lg:w-52";function lf(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const rf=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 sf=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},of=(e=[])=>e.reduce(((e,t)=>e+t),0),cf=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),df=e=>t=>e.map((([e,n])=>[rf(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>uf(t,e))).reduce(sf(Math.max,0),new Map),mf=e=>t=>{return Im(t,t.map((({title:e})=>e)).map((e=>t=>{const n=cf(t||"");return n.length?of(e.map((e=>fo(n.map(rf(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},uf=(e,t)=>new Map(e.map((e=>[e,t]))),hf=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=Xn(e?.length?e:null,pf),[s,o]=a(null);return lf((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=cf(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(df(l)).reduce(sf(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return mf(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},pf=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),gf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[i,l]=hf({basePathList:a,initialQuery:e}),s=r((()=>ff(t)(i)),[t,i]);return o(tr,{head:o(ig,{autoFocus:!0,...l}),onClose:n,children:o(Gg,{navigationItems:s})})})),ff=e=>t=>e?.length&&t?.length?Im(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],xf=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=un(gf,n),m=l((e=>{r(e),bf(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(ig,{value:i,placeholder:t?.placeholder,onChange:m}),o(er,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),bf=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(Yc,{className:af,logo:l,data:i,showTitle:!1}),o(xf,{className:"grow",navigationItems:t,...e})]})},vf=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}`})})),Nf=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ae,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(vf,{index:t,...e},String(t))))}):null]}))),wf=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},i=n.options?.page?.common??{},{documents:l,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[yf(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Gg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(af,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Xg,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(hh,{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(nf,{title:m,links:r}),o(Nf,{links:l,license:p})]})})),Cf=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?Sf(a):null]}))),Sf=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:If(e)}),c("div",{className:"text-s",children:[o(Ae,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ae,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},kf=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),If=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)),Tf=Vt((({className:e,title:t,button:n,regionSource:i,data:l,...r})=>{const[s,d]=a({key:""}),m=i?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Ln,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(Ne,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:dh(l,s?.key),children:f})}):null]})})}));function Rf(e=[]){const t=_(),n=Array.from(e.entries()).filter((([,e])=>Bf(t)(e)));return n.find((([,e])=>Bf(t,!0)(e)))??n[n.length-1]??[]}const Bf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(Pf(e)(n));return t?a===z(n):a.startsWith(z(n))},Pf=e=>t=>{const n=X(K.SITE_URL);return A(t)?e.href:V(n,e.pathname)},_f=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=nn(!1),h=pn(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),i=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${i}px`:a.left>e.left&&(i>a.left?n.current.style.left="":n.current.style.left=`${i}px`)}}),[r]);return hn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),i((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Ef(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})})),Ef=(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"},Mf=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"})}))),Of="chatbot",zf="text-page__btn-chat",Vf={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Ff=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=Vf[e??""];return n=>{if(t)if("personal"!==e)Ir(Of,t);else{const e=n.target;e?.classList.contains(zf)||e?.classList.add(zf),document.getElementById("webchat-js-container:webchat_rshb")||Ir(Of,t)}}})(e);return o(Mf,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),Lf=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:$f(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]})})),$f=(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"),jf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=Yd(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(Lf,{...i,children:n})})})),Uf={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=ke()?n:t;return i?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",Uf["transparent"===e?"transparent":"default"]),...a,children:i}):null})),Wf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:i,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=Rf(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?Hf(t):Yf(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(jf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(_f,{items:p,activeItem:m,ariaLabel:i}):null,E.CHAT_BOT?o(Ff,{version:t,iconVersion:d,chat:E.CHAT_BOT,ariaLabel:l}):null,o(qf,{version:t,...n})]})})),Hf=e=>t=>Math.max(t,e+1),Yf=e=>t=>Math.min(t,e),Gf=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Kf,{...e},String(t))))})]}):null,Kf=d((({icon:e,...t})=>{const n=pe(),{text:a,target:i,href:l,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:l,target:i,onClick:r,children:o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),Xf=(e,t)=>n=>n.name?o(mh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:dh(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Jf=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(xn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Zf=d((({defaultLocation:e})=>{const t=hg(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(mh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Qf=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=pg(t?.default),[s,d]=a(""),m=tl(),u=r((()=>tx(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,ex)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(tr,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Zf,{defaultLocation:t?.default}),o(Jf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&rf(e.toLowerCase())(s.toLowerCase())>=.8)).map(Xf(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ae,{size:"text-h6",children:e})}),t.map(Xf(f,g))]},e)))}),Gf(e)]});var g,f})),ex=e=>e.name?.charAt(0)??"",tx=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),nx=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(ax(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(i),children:o("span",{suppressHydrationWarning:!0,className:ix(t,n),children:d||a})})})),ax=(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}),ix=(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"),lx=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=hg(n?.branches?.default),r=un(gf,n),s=un(Qf,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(nx,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:dh(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(nx,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Mf,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),rx=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=Yd(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(nx,{...i,children:n})})})),sx=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?ox(t):cx(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Yc,{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(rx,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(_f,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(lx,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),ox=e=>t=>Math.max(t,e+1),cx=e=>t=>Math.min(t,e),dx={"bg-white":"primary",transparent:"transparent"},mx=["all","header"],ux=Vt((({className:e,bgColor:t="bg-white",logo:n={},version:a=dx[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=px(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Rf(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(sx,{activeTopItem:p,navigationItems:m?.filter(Hg(mx)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",hx(a))}),p?.items?.length&&o(Wf,{subItems:p?.items?.filter(Hg(mx)),version:a,internetBankButton:f})]})})})),hx=e=>"transparent"===e?"opacity-30":"",px=e=>({navigation:e?.navigation??{},common:e?.common??{}}),gx=(e=!1)=>e?{}:{padding:"p-0"},fx={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},xx=Vt((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",fx[n],e),padding:t,version:i,isTheme:l,...s,children:P({...s,extraProps:{...gx(a),className:qd(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),bx=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",qm[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 vx({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(cm,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(cm,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Nx=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?wx({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,vx({...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 wx({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?Cx("страховая сумма",e.sum):null,e?.fee?Cx("страховой взнос",e.fee):null]}),Sx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function Cx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ae,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ae,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Sx(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:Ix({insuranceTabs:n,button:i})})]})})),Ix=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(Nx,{button:t,cards:e},String(n)))):null};const Tx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Rx={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Bx=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:[vm(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Px)),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(Ex)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Px=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${_x(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}`)},_x=(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 ${Rx[n]} ${Tx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ae,{align:"text-center",children:e.text})},`cell_${t}`):null},Ex=(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=["байт","Кб","Мб","Гб","Тб","Пб"],Mx=d((({icon:e,text:t,href:n,target:a,fileFormat:i,data:l,fileSize:r})=>{const s=r&&i?",":"",d=r??"",m=i?String(i):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:a,...fe(l),children:[e,t?c(Ae,{size:"text-l",font:"font-light",children:[t," ",Ox(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Ox=(e,t)=>e||t?o("span",{children:", "}):"",zx=(e,t)=>(n,a)=>{const i=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),l="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Ax[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Fx(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(Mx,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:Vx(t),data:n?.data}),o(De,{__html:n?.__html})]},String(a))},Vx=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Fx=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},Lx=d((({href:e,__html:t,target:n,onClose:a})=>{const i=_(),l=U(i)(e);return c(tr,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ne,{text:"Я согласен",version:"primary",target:n,href:l,onClick:a}),o(Ql,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),$x=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=un(Lx),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:[Vx(i),o(Ae,{font:"font-light",children:e})]}):null})),jx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ux=Vt((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=_();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),i?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",jx[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?Wx(t)(n,a):zx(e,t)(n,a)},Wx=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($x,{...a,icon:e,href:Hx(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},Hx=e=>"href"in e,Yx=Vt((({className:e,padding:t,align:n="text-left",buttons:a=[],description:i,image:l,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=l?.src?o(ne,{className:"hidden lg:block",image:l}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Re,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(a,{className:"flex-wrap"}),children:[i?o(Ae,{size:"text-xl","font-weight":"font-light",children:i}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(De,{__html:r,itemSize:"list-m"}):null,o(Ae,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,l?.src?o(ne,{className:"lg:hidden",image:l}):null]})]})})})),Gx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Kx=(e=[],t={})=>e.filter((({content:e={}})=>Rm(t,e))).length,Xx=(e,t)=>e===t;const Jx=(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)))}(Xx,((e=Xx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Zx=[],Qx={},eb={primary:"bg-white/30",secondary:"bg-main-divider"},tb={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},nb=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":eb[t],i=tb[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ae,{size:"text-xs",color:i,children:e})})})),ab=({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})]})]})},ib={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},lb={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},rb={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},sb={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},ob=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",ib[a],n?sb[a]:rb[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?lb[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[ab({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(nb,{count:m,version:Gx(n,a)})}):null]})})})),cb=d((e=>o(e?.item?.href?db:mb,{...e}))),db=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(ob,{...e,tag:"a",item:i,onClick:a})})),mb=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(ob,{item:e,onClick:a,...n})})),ub=(e,t,n)=>(a,i)=>o(cb,{isActive:a===e,onClick:t,type:n,item:a},String(i)),hb=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(ub(a,i,t))}))),pb={categories:[],extraOptions:[],propertyType:[],stage:[]},gb=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Pm(pb,{block:i.block,page:i.options?.page}),f=l(((e=pb)=>p(e)),[]),x=(({hotFilters:e=Zx,filtrationState:t=Qx,blocks:n=Zx,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Jx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Kx(n,t.filter),version:Gx(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(hb,{...x}),o(wm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(bm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),fb="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",xb=d((({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Xa,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]],[m,{toggle:u}]=nn(!1);return o("div",{children:e?.length?o("div",{children:c(Yr,{children:[c("div",{children:[o("div",{className:fb,children:s}),o(Gr,{className:fb,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[a?o(Hr,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,onClick:u}):null,c(Ql,{embedded:!0,onClick:n,children:[o(qr,{children:"Очистить фильтр"}),o(H,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),bb=(e,t,n)=>{const a=Gx("all"===t),i=Gx("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(Ql,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Ql,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},yb=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,vb=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ae,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Nb=()=>{},wb=e=>"all"===e?"block":"hidden",Cb=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Nb,renderRemoteWorkplaceCard:r=Nb,getBalloon:s=Nb,getBalloonRemoteWorkplaces:d=Nb,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(xs),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=ws({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all");return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[vb(h,N),m?yb(m):null,p&&bb(t,w,C),o("div",{className:u("pb-3xl",wb(w)),children:o(xb,{filters:Sb([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:bs})})]}),o("div",{className:"h-[600px]",children:o(Is,{children:o(_r,{points:y,isLoad:n,className:"h-full"})})})]}),c(Is,{children:[b.map(l),v.map(r)]})]})})),Sb=e=>Object.keys(xs).filter((t=>e.filter((e=>ys[t](e))).length)),kb=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Ib=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:kb(a)},{label:"Модуль приема наличных",value:i?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:l}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ae,{size:"text-h4",children:kb(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(rs,{color:"green",children:kb(s)})})]}),o(Kr,{children:o(Ur,{className:"flex-wrap",children:m?.map(((e,t)=>o(Fr,{...e},String(t))))})})]},String(d))},Tb=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${kb(t)} №${n}`,body:e.toUpperCase()}),Rb=[];const Bb=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Rb},Pb={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},_b={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)},Db=d((({descriptionData:e,className:t})=>{const n=hg(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=Xn(`${qt}/atms?regionCode=${e}`,Bb);return{data:t||Rb,isLoad:!t&&!n}}(a);return o(Cb,{className:t,filterItems:Eb,data:i,isLoad:l,initFilterState:Pb,renderCard:Ib,getBalloon:Tb,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Eb=(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=>_b[t](e))),n=!a.length||a.some((t=>_b[t](e)));return t&&n}))},Ab=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Ae,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e})]}):null]})}),o(Kr,{children:Mb(t)})]},String(n)):null,Mb=e=>c("div",{children:[c(Ur,{className:"flex",children:[o(Fr,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Fr,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(Fr,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(Fr,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Fr,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),Ob=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),zb={branches:[],remoteWorkplaces:[]};const Vb=async e=>await Pt(e,{method:"GET"})||zb,Fb=d((({className:e})=>{const t=hg(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=Xn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Vb);return{data:t||zb,isLoad:!t&&!n}}(n);return o(Cb,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:ps,renderRemoteWorkplaceCard:Ab,getBalloon:fs,getBalloonRemoteWorkplaces:Ob,title:`Офисы филиала ${t?.name}`})})),Lb=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(Fb,{}):o(Db,{descriptionData:e})})})),$b=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),jb="hidden sm:flex absolute z-40 top-10",Ub=Vt((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=lm({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(Jd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(qb({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(dm,{className:u("left-6",jb),onClick:d.scrollLeft}):null,d.canScrollRight?o(mm,{className:u("right-6",jb),onClick:d.scrollRight}):null]})]})})),qb=({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))},Wb=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?Hb({__html:l,richVersion:r}):null,Yb({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Yb({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Yb({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),Hb=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Yb=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:a,children:t})]})]}):null,Gb=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(De,{__html:t,richVersion:n})})})),Kb=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Xb=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:a="default",label:i,version:l,role:r,...s})=>{const d=ke(),[m,{toggle:h}]=nn(t),p=o(Gr,{className:u("gap-lg",Kb(d)),isUnfolded:m,children:P({...s,extraProps:{className:"w-full",padding:"p-0"}})}),f="accordion"===a,x=o(Hr,{className:u("w-full",{"text-h6 my-lg":f}),label:i,isUnfolded:m,embedded:f,onClick:h});return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Yr,{children:[n?x:p,n?p:x]})})}),{childrenTypes:{exclude:["RollupItem"]}}),Jb=d((({name:e,text:t,value:n,checked:a,onChange:i,className:l})=>o("div",{className:l,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(xn.split(" ").filter((e=>"rounded"!==e)),Ga,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:a,onChange:e=>i?.(e.target.value),role:"radio"}),t?o(Ae,{color:"text-primary-text",children:t}):null]})}))),Zb=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(Jb,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(Jb,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),Qb=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(On,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),ey=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(Qb,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Qb,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ty=["От 1 дня","До 365 дней"],ny=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(da,{min:1,max:365,value:e,items:ty,onChange:t})]}))),ay=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(Qb,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Qb,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),iy=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(ey,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:ly(m)}),o(ny,{days:i,setDays:e=>m({days:e})}),o(ay,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:ry(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Zb,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),ly=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},ry=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},sy=d((({days:e,tariffs:t=[]})=>{const n=cy(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:[oy("Аренда за",e),oy("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(H,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),oy=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),cy=(e,t)=>{const n=dy(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},dy=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},my=(e,t)=>e.find((e=>e.branchCode===t)),uy=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=my(a,n.selectedBranch),d=hy(s?.safeBoxCaseVolumes),m=py(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=gy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(iy,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(sy,{days:n.days,tariffs:u})]})})),hy=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],py=(e,t)=>e?.find((e=>e.volume===t)),gy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,fy=`${qt}/safeboxes`,xy=[];const by=async e=>await Pt(e,{method:"GET"})||xy,yy=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=tl(),p=vy(m.selectedRegion,h),f=function(e){const{data:t}=Xn(e?`${fy}?regionCode=${e}`:null,by);return t||xy}(p),x=l((e=>u((t=>({...t,...e})))),[u]),b=(y=my(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(uy,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(_r,{points:b,className:"h-[640px]"}):null]})})),vy=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Ny=e=>e<4?"w-72":"w-52",wy={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"},Cy=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=wy,p=(e=>e?"":"opacity-0")(a),f=ke();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Mm(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:vm(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Sy(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",Ny(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Ae,{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(De,{__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})),Sy=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${ky(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},ky=e=>e?"h-16 w-16":"h-24 w-24",Iy=d((()=>o("div",{className:"hidden",role:"none"}))),Ty="hidden sm:flex absolute z-40",Ry={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},By=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=lm({itemCount:t?.length||0});return i((()=>Py(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Jd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ry[l].item,gap:Ry[l].gap,children:t.map(ub(n,a,l))}),s.canScrollLeft?o(dm,{className:u("left-6",Ty,Ry[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(mm,{className:u("right-6",Ty,Ry[l].buttonTop),onClick:s.scrollRight}):null]})})),Py=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},_y={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Dy=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(_y[t].wrapper,e),children:o(By,{className:_y[t].component,tabsType:t,...n})}):null,Ey=Vt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Ay(n??{}),p=_(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=a(zy(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));i((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const C=Oy(x[y],y),S=l((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Dy({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:My(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Oy)?.filter(Boolean)||[]}),Ay=({__id:e,anchor:t})=>t??e??"tabs",My=(e,t)=>t?.length?t:e,Oy=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",zy=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Vy={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Fy=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Vy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ly=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}))),$y={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ae,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ae,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(Ly,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},jy=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:l,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);i((()=>{l===o&&s||m(!0)}),[s,o]);return Uy({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Uy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in $y))return null;return o($y[n],{...t,...a})},qy=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(jy,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Wy=(e,t)=>140*of(e.slice(0,t).map((e=>e?.cols?.length??1))),Hy=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Yy=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(Ae,{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(-${Wy(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(Ae,{size:"text-xl",children:e.data}):null,e?.cols?Hy(e.cols,i):null]},`row${t}`)))})})]},String(t))})),vx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),Gy=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ae,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Yy,{rows:t.rowsData})})})]},a)}))}))),Ky=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Xy=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>a(t),children:o(Ae,{size:"text-xl",font:"font-light",color:Ky(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Jy=Vt((({tableSource:e,pdfUrl:t,onClick:n})=>{const i=e?.tableData,[r,s]=a(0),d=l((e=>s(e)),[]),m=i?.[r]?.items??[],u=i?.map((e=>e.currency??""));return c("div",i?{className:"bg-white z-10",children:[o(Xy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Gy,{activeTabIndex:r,items:m}),o(Ly,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(Ly,{onClick:n,isOpen:!0})]})})),Zy=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(Jy,{...t,onClick:n})}):null]}))),Qy=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(Zy,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Fy,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(qy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),ev=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,vx({...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]})})),tv=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(Qy,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]],[y,{toggle:v}]=nn(!1);return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?c(Yr,{children:[c(ev,{controls:p,children:[x,o(Gr,{isUnfolded:y,children:b})]}),o(Hr,{className:"w-full",isUnfolded:y,onClick:v})]}):o(ev,{controls:p,children:f})})]})})),nv=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?av():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?iv(n):null,i?o(De,{richVersion:l,__html:i}):null]})]}))),av=()=>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"}),iv=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),lv=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ae,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Ae,{size:"text-h2",children:n})}):null]}))),rv=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(lv,{prefix:t,unit:n,suffix:a})})})),sv=Vt((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r=!1,image:s,...c})=>{const d=_();return o(g,{className:u("relative flex flex-col",fx[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",qd(r)),...gx(a)}})})}),{childrenTypes:[]}),ov=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",cv=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=_();return c(g,{className:e,defaultPadding:ov(e),...i,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(l)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(l)(n)})}):null]})})),dv={AdTile:Lt,ApplicationForm:hr,ApplicationLeadForm:Fd,BankAccountFiltration:Em,BenefitsBlock:Vm,BonusBenefitsBlock:Um,ButtonsBlock:Wm,CalculatorBonus:Zm,CalculatorBusinessDeposit:ou,CalculatorCredit:Ro,CalculatorDeposit:Iu,CalculatorRefinancing:Au,CardTransfer:Wu,Carousel:Qu,CarouselCard:ah,CarouselCatalogCard:lh,CarouselLinks:oh,CarouselRecommendationCard:fh,CarouselTariffsCard:vh,ContactsBlock:Nh,CreditCardForm:fp,CreditForm:jp,DepositFiltration:Yp,Depository:cg,ErrorBlock:mg,ExchangeRateTile:jg,Footer:wf,GracePeriod:Cf,GrantSupport:Tf,Header:ux,Headline:S,HorizontalLayout:xx,ImgBlock:bx,InsuranceAmountBlock:kx,InvestmentInfo:Bx,LinkDocs:Ux,MobileAppTile:Yx,MortgageFiltration:gb,OfficesAtmsMap:Lb,Placeholder:$b,ProductBlock:Ft,ProductGallery:Ub,RepresentativeOfficeInfo:Wb,RichTextBlock:Gb,RollupItem:Xb,SafeDepositRental:yy,StepsBlock:Cy,StickyBottomMenu:Iy,TabsLayout:Ey,TariffsTable:tv,TextBlock:nv,UnitBlock:rv,VerticalLayout:sv,Video:cv},mv=ce((()=>{i((()=>{Qt()}),[]);const e=tn();hn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Xt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),uv="cookie",hv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();lf((()=>{globalThis.localStorage?.getItem(uv)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem(uv,"true"),a()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(er,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function pv(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}function gv(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 fv=()=>{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 gv(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},xv=d((()=>{const[e,{close:t}]=fv(),n=Boolean(e.length);return pv(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})),bv=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return gv(ue.observable,"popup",{open:t,close:n}),pv(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})),yv="header",vv="footer",Nv="sticky-footer",wv={},Cv=d((({className:e,data:t=wv,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);mv(),pg();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?.[yv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(i?.[yv],{...m,slotName:yv})}):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?.[vv],{...m,slotName:vv})]})]}),i?.[Nv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(i?.[Nv],{...m,slotName:Nv})}):null,o(xv,{}),o(bv,{}),o(hv,{__html:d?.cookieContent?.__html})]})}));Object.assign(Cv,{childrenTypes:[],slots:()=>[yv,vv,Nv]});e.Blocks=dv,e.ContentPage=Cv,e.handlerDecorator=ce,e.joinList=vm,e.locationNavigator=Jt,e.packageVersion="0.14.761",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=_,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),i=n("useEffect"),l=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:a,...i}=t||{},l=n?.slots?.default,r=a||l&&l();return e(Object.assign(i,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:i,block:l,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],i||a,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:i,align:l="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=k,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},i)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function 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"],E=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}}),A=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),F=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:V,hasPrefix:F});const $="/api/",j=`${$}v1/storage`,U=[E.CDN,$],q=e=>(t,n)=>{if(W(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${j}/${t}/attachment`;const a=t?.startsWith("/");return V(F(t)(n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},W=e=>!e||A(e)||O(e)||U.some(F(e)),H={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},Y={small:"16",medium:"24",large:"48",xl:"78"},G=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:i=a,iconVersion:l="color",size:r,width:s=r&&Y[r],height:d=s})=>{const m=D(),h="normal"===l?`${n}.svg`:`sprites.svg#${n}`,p=q(m)(V(E.CDN,"/icons/",h));return"normal"===l?o("img",{className:e,style:K(e,d),src:p,alt:a,title:i,"aria-hidden":"true",width:s,height:d}):o(X,{className:e,children:c("svg",{className:u(H[l],{"w-full h-full":!s,invert:"white"===l},t),width:s,height:d,"aria-hidden":"true",children:[i?o("title",{children:i}):null,a?o("desc",{children:a}):null,o("use",{href:p,xlinkHref:p})]})})})),K=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},X=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),J=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function Z(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":Z(J.SITE_URL);return t&&!A(t)?q(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=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(ee).map((({src:e,format:n,media:i},l)=>o("source",{srcSet:Q(a)(e),type:ae(n),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${l}_${e}`))):null,t?.src?ne({...t,src:Q(a)(t.src)},n):null]})})),ne=(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}),ae=e=>e?`image/${String(e)}`:void 0,ie=d((({className:e="",image:t,imageClassName:n="",...a})=>t?.src||t?.icon?t.icon?o(G,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(te,{className:e,imageClassName:n,image:t}):null)),le={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","":""},re="bg-main-divider text-main-disabled",se={primary:re,secondary:re,white:re,link:"",transparent:"",gray:re,"":""},oe="text-center font-sans select-none",ce={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","":""},de=({className:e,rounded:t,version:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function ue(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])}me._impl=e=>e,me.setup=e=>{me._impl=e};class he{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 pe=new he,ge=()=>ue(pe.emitter,"dialog");function fe(){const e=D(),{closeAll:t}=ge();return n=>{const a=q(e)(n.href);return{...n,href:a,"aria-label":n.text,onClick:me((i=>{n.onClick?.(i);const l=Z(J.SITE_URL);xe(a,n.target,l)&&(t(),i?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(a,l)))}))}}}const xe=(e,t,n)=>M(e,t)&&!J.SUB_PORTALS?.split(",")?.some(F(e))&&F(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:i,version:l="primary"}=e,r=Ne(e)&&"hidden lg:block";return c("div",{className:u(ve(e),"flex gap-xs"),children:[a?o("div",{className:u(r,ce[l]),children:a}):null,Ne(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,ce[l]),children:i}):null]})})),ve=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",Ne(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ce=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()}),[e,t]))({method:n,href:a}),s=fe()({onClick:r,href:a,...i}),c=t??o(ye,{...s});return o(e?ke:Se,{...s,children:c})})),Se=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:de({className:e,version:l,rounded:r}),href:t,rel:n,target:a,"aria-label":i||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),ke=d((({className:e,ariaLabel:t,version:n,rounded:a,children:i})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:a,version:n}),children:i})));function Ie({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(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),l),onClick:t,children:o(ie,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:i}})}),o(Ce,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{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},Re={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Be=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Re[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=Te(),v=D(),N=l((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Ie({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:[Be(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]}),_e(P({...b,extraProps:{className:"@container-normal"}})),Be(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[De(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),De=e=>u(e?"row-span-2":"@xl:row-span-2"),_e=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Ee=(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(ie,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ae=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:a=!0,children:i})=>e||i?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",a?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:i})}):null)),Me=(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,Oe=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),ze=(e,t)=>e?o(Oe,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ve=(e,t)=>["label"in e?ze(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Ae,{...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?Ee(n.icon,t):null,o("div",{children:Ve(n)})]}))),Le=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)),$e=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(Ve)}):null)),je=d((({isTabularBenefits:e,...t})=>o(e?$e:Le,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),qe=(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(We(n))}):null,We=(e="")=>(t,n)=>{const{text:a,icon:i,iconRight:l,version:r,...s}=t||{},c=He(i,r),d=He(l,r);return a||i?.icon?o(Ce,{className:u("basis-full @lg:basis-auto",e),appendLeft:Ye({...i,iconVersion:c}),appendRight:Ye({...l,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},He=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ye=e=>Ue(e)&&o(ie,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ge=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ke=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(Xe)}):null)),Xe=({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(Oe,{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:[Ge(2)(t)," ",n||"₽"]}):null]},String(a)),Je=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ze)}):null)),Ze=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Oe,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:k,children:I,...T})=>{const R=y?.src?o(ie,{image:y}):null,B=o(S,{title:a,description:i,headlineVersion:l,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:B}:{insetTitle:B},...tt(R,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:qe(b),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(je,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(Ae,{richVersion:p,__html:h,isDotted:m,itemSize:Qe[l]}):null,I,f?.length?o(Ke,{priceList:f}):null,nt(x)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Je,{tags:e}):null;class at{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof at?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 it=()=>!0,lt=(e,t)=>(...n)=>e(...n)&&t(...n),rt=(...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 st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof at?e._:e}class mt extends at{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}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(st(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 ut extends at{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 ht extends at{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(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 pt extends at{proto=rt([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ht.prototype],[it,()=>ut.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 gt=e=>e instanceof at?e:new pt(e),ft=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},xt=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,a=xt)=>gt(t).entries().reduce(((t,[n,i])=>yt(e)(i,t,a.concat(n))),e(n,[a,gt(t)])),vt=ft(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?vt(e.get(a),[i,n]):n)})),Nt=ft(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>Ct(n)?[...e,[t,dt(n)]]:e))(e,[]),Ct=e=>0===e.size();ft(((e,t=xt)=>t.reduce(((e,t)=>e.get(t)),e)));const St=ft(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),kt=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(lt,it);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Rt,e),Rt=rt([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[it,ct]),Bt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return kt(e)?[(a=e,a.slice(0,-1)),Tt(t(n),n)]:[e,n];var a}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(kt)),Dt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function _t(e,t){try{return e?await Et(e,t):null}catch(e){console.error(e)}return null}const Et=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),At=e=>[...new Set(e)],Mt={},Ot=["/portal-resources"],zt=(e,t)=>Bt(e,(e=>t?.[e])),Vt=(e,t)=>{const n=Dt(e),[l,r]=a({});return i((()=>{Ft(n).then(r)}),[n.join()]),n.length?zt(e,{...t,...l}):e},Ft=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(At(e).filter((e=>!Ot.some((t=>e.startsWith(t))))).map((async e=>[e,Mt[e]||=await Et(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},i=Object.entries(n).flatMap((([,e])=>Dt(e)));return i.length?Ft(i,a):a}return t};function Lt(e,t={}){const n=d((t=>{const n=Vt((({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 $t=Lt((({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(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),jt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>Ut(0,t?.length)),[t]),a=t?.[n];return a?o($t,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),qt=(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}`}},Wt=e=>e?.replace(/[^+\d]/g,""),Ht="/api/v1";const Yt=e=>e?{phone:Wt(e)}:{},Gt=(e,t="birthday")=>e?{[t]:qt(e)}:{},Kt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Xt=(e,t=!0)=>({[t?"email":"mail"]:e}),Jt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Wt(e)}:{},Zt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:i}of e??[])t[a??""]?.(n,i)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(A(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=tn();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function an(){return an._impl()}function ln(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}]}an._impl=()=>({forwardQuery:nn}),an.setup=e=>{an._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function un(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,u]=function(e,t,n){const[r,s]=a(e),o=l((e=>s((a=>{const i=e instanceof Function?e(a):e,l=t?t(i):i,r=mn(i,l)?i:l;return!mn(a,r)&&n?.(r),r}))),[t,n]);return i((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=ln(!1),f=s({}),[x,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??cn),[t,e]),a=r((()=>rn(n)(e)??dn),[n,e]),i=sn(a);return[n,{isValid:i,errors:a}]}(m,n),v=l(((e,t={})=>{const{parse:n,format:a,onChange:i}=t,l=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(l):[];return{value:a?a(l):l,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;i?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=l((e=>{f.current=e,u(e)}),[u]),w=l((()=>{f.current={},g(),u(e)}),[e,u]),C=l((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:C}]}const hn=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 pn(e,t={}){const{open:n,close:a,...i}=ge();return{open:l(((i,l={})=>n({dialog:o(e,{...t,...i,onClose:()=>{a(),i.onClose?.()}}),...l})),[e,n,a]),close:a,...i}}function gn(e,t,n,a){i((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function fn(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const xn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?yn:"border-error",Nn=e=>e?o(Oe,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,wn=d((({key:e,className:t,id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,pattern:g,autoFocus:f=!1,isTextarea:x=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const C=s(null),S=l((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);i((()=>{f&&C.current?.focus()}),[f,C]);const k=y?"pr-3xl":"",I=vn(p),T=d??a??n;return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Nn(d),x?o("textarea",{className:u("block resize-y min-h-24",Cn,I),id:u("textarea",n),value:h,name:a||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:C,className:u("h-14",Cn,k,I),id:n,type:r,value:h,name:a||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),Cn="w-full border rounded-md text-primary-text outline-none p-m",Sn=e=>o("div",{className:"h-6",children:e?o(Oe,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),kn=e=>e?.value||"",In=e=>{const{url:t,query:n,queryPrefix:a,requestData:i={},responseItemHandler:l=kn}=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(`${Ht}/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)},Tn={url:"suggest/address"},Rn={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:Tn,addressFact:Tn,organizationAddress:Tn,addressCourier:Tn},Bn=()=>ue(pe.emitter,"popup"),Pn=d((({options:e,container:t,onChange:n})=>{const[l,r]=a(-1),s=t=>{const a=e.length-1;"ArrowDown"===t.key?r(l<a?l+1:0):"ArrowUp"===t.key?r(l>0?l-1:a):"Enter"===t.key&&e[l]&&(t.preventDefault(),n(e[l]))};return i((()=>(t.addEventListener("keydown",s),()=>t.removeEventListener("keydown",s))),[l]),o("div",{className:"bg-white text-l overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,t)=>o("div",{className:u("flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",{"bg-main-divider":l===t}),role:"listitem",onMouseDown:()=>n(e),children:o("span",{className:"min-h-6",children:e.processedValue})},t.toString())))})}));function Dn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=Bn(),x=Rn[n],b=l((()=>{h.current=t,f.close()}),[t]),y=l((e=>{b(),h.current=e.processedValue,c?.(e.processedValue),d?.(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await In({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const a=(...i)=>{a.dispose(),n=setTimeout((()=>{e(...i)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return i((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:i,width:l,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Pn,{options:p,container:n,value:t,onChange:y}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,y]),v}const _n=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=bn,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:b=!1,maxLength:y,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=ln(),k=fn(C),I=l((e=>{v&&!w&&S(),y?e.length<=y&&d(e):d(e)}),[v,w,d]);i((()=>{b&&n&&d(En(n))}),[n]);const T=Dn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(wn,{disabled:N,type:g||"text","aria-label":t,label:xn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:An(a,s,t)})}),Sn(r)]})})),En=(e="")=>e.replace(/[^\d]+/g,""),An=(e,t,n)=>t&&!n?`${e}*`:e,Mn=e=>e?.text||e?.key||"",On=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,zn=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:On(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:Mn(e)}),o(G,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Vn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,disabled:g=!1,iconVersion:f="black",onChange:x})=>{const[b,{setFalse:y,setTrue:v}]=ln(),[N,w]=a(""),C=$n(g,n.length),S=b&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=Bn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=fn(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(zn,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),top:l+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:x,onClose:I,iconVersion:f});return c("div",{className:u("space-y-xs",e),children:[Nn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Ln(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Mn(r)||h}),Fn(S,f)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(wn,{type:"text",value:N,autoFocus:!0,disabled:C,onChange:w})}):null]})]})})),Fn=(e,t)=>o(G,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Ln=(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"),$n=(e,t)=>e||0===t,jn=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(Vn,{...i,valid:!n,label:xn({label:t,errors:a})}),Sn(n)]}))),Un=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],qn=d((({field:e,input:t})=>o(jn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Un,...e(t?.name??"")}))),Wn=(e="")=>Boolean("trade"===e||"all"===e),Hn=e=>null!=e,Yn=new Map,Gn=(e,t=Yn)=>n=>{const a=Xn(n),i=t.get(a);if(a&&Hn(i))return i;const l=e(...n);return a&&Hn(l)&&t.set(a,Promise.resolve(l)),l},Kn=e=>Boolean(e?.every((e=>Array.isArray(e)?Kn(e):!e||"string"==typeof e))),Xn=e=>Kn(e)?e.toString():"",Jn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Zn(e,t,{fallback:n,cache:l}={}){const s=r((()=>Qn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(Hn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Gn(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&Jn(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Qn(e){return Array.isArray(e)?e:e instanceof Function?Qn(e()):[e]}const ea=`${Ht}/branches`,ta=[];const na=async e=>await _t(e,{method:"GET"})||ta;function aa(e=!1){const{data:t}=Zn(`${Ht}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Et);return Array.isArray(t)?t:[]}const ia=(e="")=>"ULTRASERVICE"===e,la=d((({field:e,input:t,params:n})=>{const a=ia(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?aa(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Zn(e?`${ea}?regionCode=${e}`:null,na);return t||ta}(r)?.filter((e=>e?.address));return i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(jn,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),ra=(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}},sa=(e,t,n)=>Math.max(t,Math.min(e,n));function oa(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ca({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=oa(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const da=1,ma=100,ua=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:da),max:s=(i.length?i.length-1:ma),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=ra(e,{normalize:(e=0)=>i.length?ha(i)(e):sa(e,r,s),format:Ge()}),f=l((e=>{p&&p(oa(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Oe,{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",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),ca({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),pa(a)]})})),ha=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),pa=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Oe,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ga=["От 1 000 ₽","До 1 000 000 000 ₽"],fa=d((({field:e,input:t})=>o(ua,{title:"Сумма, ₽",items:ga,min:1e3,max:1e9,...e(t?.name??"")}))),xa=d((({field:e,input:t})=>o(_n,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ba=[{key:"client",text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ya=d((({field:e,input:t})=>o(jn,{label:"Тип обратившегося",...t,options:ba,...e("applierType")}))),va=d((({field:e,input:t})=>o(_n,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),Na=({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=wa(t,e),c=Ca(t,l,r);u.push(o("td",{children:o("div",{className:Sa(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},wa=(e,t)=>t&&e.toDateString()===t.toDateString(),Ca=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Sa=(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"),ka=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Ia=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:l=bn})=>{const{firstDayOfWeek:s,totalDays:d}=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:ka.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Na({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:l})})]})})),Ta=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ra(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Ba),l=a.map(((e,t)=>Da(e)?a.slice(0,t).filter(Da).length:-1)),r=a.map(((e,t)=>Pa(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const Ba=e=>"_"===e,Pa=e=>/\d/.test(e),Da=e=>Ba(e)||Pa(e),_a=1940,Ea={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Aa=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(l||"");return i((()=>{g(l||"")}),[l]),i((()=>{Oa({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Ra(t,"__.__.____"))},onBlur:()=>{Ma(p)?Oa({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},disabled:r}),r?null:o(G,{className:"mr-s",...Ea})]})})),Ma=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=_a&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let i=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),i++;return Number(t)>0&&Number(t)<=i}return!1},Oa=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(Ma(e)){const{day:i,month:l,year:r}=(e=>{const[t,n,a]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(a)}})(e);t(l),n(r),a?.(new Date(r,l,i))}},za=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Aa,{onChange:a,disabled:r,onClick:e,value:t&&qt(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")}),Va=Ta.map((e=>({key:e}))),Fa=Array.from({length:(new Date).getFullYear()-_a+1},((e,t)=>_a+t)).reverse().map((e=>({key:String(e)}))),La=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},$a=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},ja={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ua={className:"min-w-32",iconVersion:"black",isBorder:!1},qa=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g,setFalse:f}]=ln(!1),[x,b]=a(n?.getMonth()||(new Date).getMonth()),[y,v]=a(n?.getFullYear()??(new Date).getFullYear()),N=l((e=>{h?.(e),f()}),[h]),{handlePrevMonth:w,handleNextMonth:C,handleSelectMonth:S,handleSelectYear:k,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:R,ref:B}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:i,selectedYear:r,onChange:s,value:o})=>{const c=fn(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(Ta.indexOf(e));const t=La(r,Ta.indexOf(e));$a({maxDateOfMonth:t,selectedYear:r,selectedMonth:Ta.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:Va,yearsOptions:Fa,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:x,showCalendar:p,onChange:h,value:n}),P=((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})(B,370);return c("div",{className:u("space-y-xs",e),ref:B,children:[Nn(t),c("div",{className:"relative",children:[za({handleChangeVisibleCalendar:R,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(G,{...ja,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Ta[x]},options:I,...Ua}),o(Vn,{onChange:k,value:{key:String(y)},options:T,...Ua}),o("div",{className:"my-auto",onClick:C,children:o(G,{...ja,className:"rotate-90 cursor-pointer"})})]}),o(Ia,{today:n,currentMonth:x,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Wa=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(qa,{label:xn({label:t,errors:a}),valid:Boolean(!n),...i}),Sn(n)]}))),Ha=d((({field:e,input:t})=>o(Wa,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ya=d((({field:e,input:t})=>o(_n,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(_n,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Ka=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)}))}))),Xa="appearance-none w-5 h-5 border-solid flex-none",Ja=[{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"}],Za=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(Ka,{paths:Ja,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",ei(a)),onClick:s,children:[o("div",{className:u(Xa,"m-0",i?"rounded-full border-2":ni(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ti(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Qa(n)]})})})),Qa=e=>e?o("div",{className:"ml-s",children:o(Oe,{size:"text-l",font:"font-light",children:e})}):null,ei=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",ti=(e=!1)=>e?"radio":"checkbox",ni=(e=!1)=>u("rounded border",{"bg-primary-main":e}),ai=d((({field:e,input:t})=>o(Za,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")}))),ii=d((({field:e,input:t})=>o(Wa,{label:"Желаемая дата встречи",...e(t?.name??"")}))),li=d((({field:e,input:t})=>o(_n,{label:"Электронная почта",...e(t?.name??""),...t}))),ri=[{key:"ULTRASERVICE",text:"Ультра"}],si=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],oi=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],ci=d((({field:e,input:t})=>o(jn,{label:"Способ получения ответа",options:oi,...e(t?.name??"")}))),di=d((({field:e,input:t})=>o(_n,{label:"ФИО",...e(t?.name??""),...t})));function mi(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}function ui(e,t){return mi(e,t),mi(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class hi{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new he){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class pi{bus;store=new Map;get size(){return this.store.size}constructor(e=new he){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const gi={};function fi(e,t=gi){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 xi=new pi;function bi(e){return fi(xi,e)}ui(xi,new hi(globalThis?.localStorage));const yi=()=>bi(),vi=(e,t)=>{if(!t)return null;const n=Si(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")}},Ni=(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},wi=(e,t)=>{const n=Si(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},Ci=(e,t,n)=>{const a=Si(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},Si=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,ki=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Ii=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(Ti(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(_n,{disabled:t?.filledByEsia&&ki(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),Ti=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}),Ri=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Bi(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Ti(n.data?.address));const r={amountWorkers:Ni(e?.amountWorkers,n.data?.employee_count),employerActivities:vi(e?.employerActivities??[],a),organization:Ci(e?.organization??[],i,l),employerOrganization:wi(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Bi=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Pi=d((({field:e,input:t})=>{const n=yi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Ri(n,e,t)}),[]);return o(_n,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),Di=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Za,{text:t,value:n,disabled:i,onChange:r},a),Sn(l)]}))),_i=d((({field:e,input:t})=>o(Di,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ei=`${Ht}/outservice`,Ai=[];async function Mi(){const e=await _t(`${Ei}/outserviceregions`);return e&&Array.isArray(e)?e:Ai}const Oi=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=Zn("outServiceRegions",Mi),s=r((()=>l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[l,a]);return i((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(jn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),zi=d((({field:e,input:t})=>o(_n,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&ki(e,t?.name??""),...e(t?.name??""),...t}))),Vi=d((({field:e,input:t})=>o(_n,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&ki(e,t.name??""),...e(t?.name??""),...t}))),Fi=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(Oe,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Li=d((({field:e,input:t})=>Wn(e("acquiringType")?.value?.key)?o(Fi,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),$i=d((({field:e,input:t})=>o(_n,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ji=e=>"_"===e,Ui=e=>/\d/.test(e),qi=e=>ji(e)||Ui(e),Wi=[..."+7 (___) ___-__-__"],Hi=Wi.findIndex(ji),Yi=Wi.map(((e,t)=>qi(e)?Wi.slice(0,t).filter(qi).length:-1));function Gi(e){const t=e.replace(/\D/g,""),n=Wi.map(((e,n)=>Ui(e)?e:t.charAt(Yi[n])||e)),a=Yi.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(Hi,a)):n).join("")}const Ki=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(Gi(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(wn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),Xi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ki,{"aria-label":t,label:xn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),Sn(n)]}))),Ji=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Xi,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&ki(e,n),...t})})),Zi=d((({field:e})=>Wn(e("acquiringType")?.value?.key)?o(Fi,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Qi=Lt((({field:e,input:t,source:n})=>o(jn,{placeholder:"Выберите продукт",label:"Продукт",options:el(n?.productList),...e(t?.name??"")}))),el=e=>(e??[]).map((e=>({key:e,value:e}))),tl=`${Ht}/regions`,nl=[];function al(e=tl){const{data:t}=Zn(e,Et);return Array.isArray(t)?t:nl}const il=`${Ht}/outservice/outserviceregions`,ll=d((({field:e,input:t,params:n})=>{var a;const i=al((a=n?.typeForm,"OUTSERVICE"===a?il:void 0));return o(jn,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...e(t?.name??"")})})),rl=d((({field:e,input:t})=>{const n=aa(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(jn,{label:"Регион",placeholder:"Выберите регион",options:a,...e(t?.name??"")})})),sl=d((({field:e,input:t})=>o(_n,{label:"ФИО представителя",...t,...e("representativeName")}))),ol=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},cl=on((e=>null!=e&&""!==e)),dl="Некорректно заполненное поле",ml="Укажите регион, город/населенный пункт, улицу, дом",ul=e=>cl(e??dl),hl=e=>on((e=>e?.key&&""!==e?.key))(e??dl),pl=e=>on((e=>"string"==typeof e&&/^[0-9]{1,2}$/g.test(e)))(e??dl),gl=e=>on((e=>"string"==typeof e&&e.length>1&&kl(e)))(e??dl),fl=(e,t)=>on((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??dl),xl=e=>on((e=>"string"==typeof e&&6===e.length))(e),bl=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),yl=e=>on(bl)(e),vl=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Nl=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},wl=e=>Boolean(e.region&&(e.city||e.locality)&&e.house),Cl=()=>on(wl)(ml),Sl=/^[\u0400-\u04FF\d\s]+$/u,kl=(e="")=>Sl.test(e),Il=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)},Tl={processPersonalDataFlg:vl,consentProviderFlg:vl,consentInformFlg:vl,consentPfrFlg:vl,consentOthersFlg:vl},Rl={addressCourier:Cl(),paymentSystem:ul("Укажите тип платежной системы"),currency:ul("Укажите валюту"),cardCategory:ul("Укажите категорию карты"),codeWord:(Bl="Необходимо ввести кодовое слово",on((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&kl(e)))(Bl??dl)),confirmationIncome:hl(),methodObtain:ul(),deliveryDate:ul("Укажите дату доставки")};var Bl;const Pl={organization:hl("Выберите тип организации"),organizationAddress:on((e=>Boolean(e.fiasCode&&(e.city||e.locality)&&e.house)))(ml),organizationPhone:yl("Укажите номер телефона"),organizationName:ul("Укажите наименование организации"),legalForm:ul("Укажите ОПФ"),generalSeniority:pl("Укажите количество лет стажа"),lastJobExperience:pl("Укажите стаж на последнем месте работы"),experience5Years:pl("Укажите общий стаж за последние 5 лет"),jobsNumber:pl("Укажите количество мест работы за последние 5 лет"),beginDate:ul("Укажите дату заключения трудового договора"),addressFact:Cl(),addressRegistration:Cl(),addressRetail:hl("Выберите адрес банка"),addressMatch:ul(),sex:ul("Укажите свой пол"),limitedBirthday:on(Il)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:ul("Укажите место рождения"),education:hl("Выберите ваше образование"),housing:hl("Выберите тип жилья"),amountWorkers:hl("Выберите информацию о количестве сотрудников"),employment:hl("Выберите информацию о трудоустройстве"),employerActivities:hl("Выберите вид деятельности организации"),employerOrganization:hl("Выберите вид организации"),positionOrganization:hl("Выберите вашу должность"),familyStatus:hl("Выберите семейное положение"),familyMembers:fl(2,"Укажите количество членов семьи"),children:fl(2,"Укажите количество детей"),dependents:fl(2,"Укажите количество иждивенцев"),totalIncome:fl(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:fl(10,"Укажите сумму обязательных выплат"),snils:(e=>on(Nl)(e))("Некорректный номер СНИЛС"),conscription:ul(),armyIdFlg:vl,dulSerie:(e=>on((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:xl("Укажите номер паспорта"),dulIssueDate:ul("Укажите дату выдачи паспорта"),dulSubdivisionCode:xl("Укажите код подразделения"),dulIssuedBy:ul("Укажите организацию, выдавшую паспорт"),participantDateRegistration:ul("Укажите дату регистрации"),retirementIncome:ul(),otherIncome:ul(),wages:ul(),mandatoryPayments:ul(),disablePeopleFlg:ul(),bankruptcyFlg:ul(),shareholderFlg:ul(),legalEntityName:ul(),bankEmployeeCode:ul(),partInBusiness:ul(),regionRetail:hl("Выберите регион")},Dl={fullName:ul(),addressBranch:hl(),desiredMeetingDate:ul(),product:ul(),localities:ul(),partnerComments:ul(),collectionCount:ul(),acquiringType:hl(),serviceType:hl(),annualRevenue:ul(),feedbackMethod:hl(),serviceDirection:hl(),secondaryPhone:yl("Укажите номер телефона"),region:hl(),situationDescription:ul(),sufferedFrom:ul(),applierType:ul(),surname:gl("Укажите свою фамилию на кириллице"),name:gl("Укажите своё имя на кириллице"),middleName:gl("Укажите своё отчество на кириллице"),birthday:ul("Укажите дату рождения"),phone:yl("Укажите номер телефона"),email:(e=>on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:ul(),typeForm:ul(),consentToReceiveMaterials:vl,consentDataProcessing:vl,...Tl,...Pl,...Rl},_l=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(El).map((({name:e})=>[e,Dl[e??""]])));return e=>n?Object.fromEntries(t.filter(El).filter(Al(e)).map((({name:e})=>[e,Dl[e??""]]))):a},El=({name:e})=>Boolean(Dl[e??""]),Al=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Ml=d((({field:e})=>{const t=e("secondaryPhone");return o(Xi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?ol(t,Dl.secondaryPhone):t})})),Ol=d((({field:e,input:t})=>o(jn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:si,...e(t?.name??"")}))),zl=d((({field:e,input:t})=>o(_n,{label:"Описание ситуации",...t,...e("situationDescription")}))),Vl=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Fl=d((({field:e,input:t})=>o(jn,{label:"Пострадал в",...t,options:Vl,...e("sufferedFrom")}))),Ll=d((({field:e,input:t})=>o(_n,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&ki(e,"surname"),...e(t?.name??""),...t}))),$l=["От 1 мес","До 15 лет"],jl=d((({field:e})=>o(ua,{title:"Срок, месяцев",items:$l,min:1,max:180,...e("term")}))),Ul=d((({field:e,input:t})=>o(jn,{label:"Тип обслуживания",options:ri,...e(t?.name??"")}))),ql={horizontal:"@lg:flex-row",vertical:""},Wl=d((({label:e,items:t,value:n,className:a,disabled:i=!1,orientation:l="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Oe,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",ql[l],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Za,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:i},String(e))))})]}))),Hl=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Yl=d((({field:e,input:t})=>{const n=l((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Wl,{className:"whitespace-normal",orientation:"horizontal",items:Hl,...e(t?.name??"",{onChange:n})})})}));const Gl={$ref:"/wcms-resources/outservice-productlist.json"},Kl={fullName:di,addressBranch:la,desiredMeetingDate:ii,product:e=>o(Qi,{...e,source:Gl}),localities:Oi,isClient:_i,partnerComments:$i,collectionCount:Ya,acquiringType:qn,onlineCheckout:Li,posTerminal:Zi,serviceType:Ul,term:jl,amount:fa,annualRevenue:xa,vedTypes:Yl,feedbackMethod:ci,serviceDirection:Ol,bankEmpolee:va,secondaryPhone:Ml,applicationDate:e=>o(_n,{label:"Дата и время обращения в Банк",...e}),region:e=>ia(e?.params?.typeForm)?o(rl,{...e}):o(ll,{...e}),consentToReceiveMaterials:ai,sufferedFrom:Fl,situationDescription:zl,representativeName:sl,applierType:ya,surname:Ll,name:Vi,middleName:zi,birthday:Ha,phone:Ji,email:li,inn:Pi,comment:Ga},Xl=(e,t,n={})=>(a,i)=>{const l={...Kl,...n}[String(a.name)];return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})&&l?o("div",{children:o(l,{field:e,input:a,params:t})},i):null},Jl=e=>2===e?"@xl:grid-cols-2":"",Zl=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Oe,{size:"text-h6",children:e})}):null,Ql={primary:u("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},er=u("group/btn-embedded","bg-transparent border border-transparent outline-none"),tr=u("bg-main-gray text-main-disabled cursor-not-allowed"),nr=d((({className:e,type:t="button",version:n="primary",shape:a="default",embedded:i,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:h,children:p,onClick:g=bn})=>{const f=l("tab"!==c?me(g):g,[c,g]),x=r((()=>be(m)),[m]),b="round"===a;return o("button",{className:u("font-sans flex items-center gap-xs",{[Ql[n]]:!s&&!i,[er]:i,[tr]:s},i?"justify-between":"justify-center",i||b?"p-0":"px-9 py-4",{"rounded-md":"default"===a,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":h,...x,onClick:f,children:p})})),ar=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(G,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),ir=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",title:"Диалог",onClick:i,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(ar,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),lr=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(ir,{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(ie,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(nr,{type:"button",onClick:n,children:"Хорошо"})]})})})),rr=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:u,...h}=e,p=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Wn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,g={...h,...cr(o),...or(c),...d&&{inn:d},...p?{partnerComments:p}:{},...s?{typeForm:s}:{},...sr(m,u?.text)};return Object.fromEntries(Object.entries(g)?.map((([e,t])=>[e,t?.key||t])))},sr=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},or=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},cr=e=>e?{vedTypes:Object.fromEntries(Hl.map((({id:t})=>[t,t===e])))}:{},dr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Un[0],serviceType:ri[0],feedbackMethod:oi[0],serviceDirection:si[0],vedTypes:Hl[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},mr=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"})}))),ur=d((({isLoading:e,disabled:t,children:n,...a})=>c(nr,{type:"submit",disabled:e||t,...a,children:[e?o(mr,{blur:!0,size:"small"}):null,n]}))),hr={primary:Ql.primary,secondary:Ql.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:Ql.secondary,transparent:"","":""},pr=d((e=>{const t=fe(),{className:n,href:a,target:i,text:l,aboveText:r,version:s="link",rel:c,ariaLabel:d,data:m,children:h,onClick:p}=t(e),g="link"!==s;return o("a",{className:u("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[hr[s]]:Boolean(s),[r?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:a,target:i,rel:c,"aria-label":d??`Ссылка на ${l}`,role:a?"link":"button",onClick:p,...be(m),children:h??gr(l,r)})})),gr=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:u("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,fr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Oe,{children:e}):null,t?o(pr,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),xr=(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(Za,{...e}),o(fr,{link:t})]}),Sn(ol(e,vl).error)]}):o(fr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(ur,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),br={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=`${Ht}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Kt(a,g),...Xt(l,g),...Yt(i),...Gt(s,"desiredMeetingDate"),...g?Gt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Jt(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}}},yr=d((({className:e,title:t,typeForm:n="",sections:a=[],button:i,link:s,endpoint:d,additionalParams:m,isContacts:h,data:p,...g})=>{const f=r((()=>a?.flatMap((e=>e?.inputs))||[]),[a]),x=r((()=>((e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||dr[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),b=r((()=>_l(f)),[f]),y=pn(lr),v=an(),w=l((async(e,t)=>{const a=rr({...e,...m}),i=Boolean(await br.send(a,"lead"===d));y.open({ok:i,typeForm:n}),i&&Zt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=un(x,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),k=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return c(hn,{className:u("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[a.map(((e,t)=>c("div",{className:u(Jl(e.columns),"grid gap-x-m"),children:[Zl(e.title),(e?.inputs||[])?.map(Xl(C,{typeForm:n}))]},`section-${t}`))),xr(k?C("consentDataProcessing"):void 0,s,i)]}),h?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ie,{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(ie,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),vr=[{columns:2,inputs:[{name:"surname",required:!0,dadata:!0},{name:"name",required:!0,dadata:!0},{name:"middleName",dadata:!0},{name:"limitedBirthday",required:!0},{name:"phone",required:!0},{name:"email",required:!0,dadata:!0}]},{inputs:[{name:"processPersonalDataFlg",required:!0},{name:"consentProviderFlg",required:!0},{name:"consentOthersFlg",required:!0},{name:"consentInformFlg"},{name:"consentPfrFlg"}]}],Nr=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(_n,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),wr=d((({field:e,input:t})=>o(Di,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),Cr="/icons/MapMarkerClusterIcon.svg",Sr="/icons/MapMarkerClusterYellowIcon.svg";function kr({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=Ir("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=Ir("workplaces",e,i),r=Tr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Tr(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=Tr(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 Ir=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Cr:Sr,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Tr=(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:Sr,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Rr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Br={...Rr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Pr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Br).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(G,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Dr=e=>globalThis[e],_r=(e,t)=>{const n=document.getElementById(t);if(n){const t=Dr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Dr(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(Dr(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))};const Er=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return _r(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=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Ar={...Rr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Mr=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(Ar).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(G,{name:n,width:"20",height:"16"})})})),Or=[55.753995,37.614069],zr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=Er();if(i((()=>{r.current?kr({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Vr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),kr({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(mr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Mr,{yandexMaps:r}),o(Mr,{yandexMaps:r,direction:"out"})]}),Pr(r,m,u("right-2 top-80",h))]})})),Vr=e=>{const t=[Lr(Fr(e,0)),Lr(Fr(e,1))];return t.every((e=>e))?t:Or},Fr=(e,t)=>e.map((e=>e.coords?.[t])),Lr=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,$r=async(e,t,n)=>{try{return(await jr(e,t,n)).json()}catch(e){return console.error(e),null}};async function jr(e,t,n){const a=(()=>{const e=new Uint8Array(8);return globalThis.crypto.getRandomValues(e),e.reduce(((e,t)=>`${e}${t.toString(16).padStart(2,"0")}`),"")})();return globalThis?.fetch?.(`/light-api-cash/v1${e}`,{method:t,headers:{"Content-Type":"application/json","X-B3-Sampled":"1","X-B3-Spanid":a,"X-B3-Traceid":a,...Ur()},credentials:"include",body:n?JSON.stringify(n):null})}const Ur=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},qr=e=>Number(e.toString().replace(",",".")),Wr=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:Hr({textItems:l,subText:t,children:n,isPhone:a,...i})})),Hr=({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(Oe,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Yr(n,s),i?o(Oe,{color:a,size:"text-m",children:i}):null]}),Yr=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Oe,{size:"text-l",children:t?o("a",{href:`tel:${Gr(e)}`,children:e.trim()}):e.trim()},String(n)))),Gr=e=>e.replace(/\D/g,""),Kr=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}))),Xr=d((({className:e,children:t})=>o("span",{className:u("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Jr=d((({isUnfolded:e,...t})=>o(G,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Zr=d((({className:e,isUnfolded:t,short:n,label:a=(t?"Скрыть":"Развернуть"),embedded:i,...l})=>c(nr,{className:u({"w-full":!n},e),embedded:i,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...l,children:[o(Xr,{children:a}),o(Jr,{isUnfolded:t,iconVersion:i?"color":""})]}))),Qr=d((({className:e,role:t="tablist",children:n})=>o("div",{className:u(e),role:t,children:n})));const es=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:u("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(a.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:l,children:n})})})),ts=d((({children:e})=>{const[t,{toggle:n}]=ln(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Qr,{className:"block sm:hidden",children:[o(es,{isUnfolded:t,children:e}),o(Zr,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),ns=e=>{const t=is(e);return o(Wr,{label:"Режим работы",value:t,className:"max-w-none"})},as=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",is=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[as({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),as({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},ls=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],rs=e=>ls.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??"")}}))),ss=e=>{if(!e)return null;const t=os(e);return c(Kr,{className:"border-none",children:[o(Wr,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(cs)})}),o(Wr,{label:"Режим работы",className:"max-w-none",children:o(Oe,{children:e})})]})},os=e=>{const t=ls.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},cs=({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(Oe,{size:"text-xs",children:e})},String(n)),ds=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Wr,{label:"Валюта",value:e.currency}):null,t?o(Wr,{label:"Купить",value:String(t)}):null,n?o(Wr,{label:"Продать",value:String(n)}):null]},String(a)),ms={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"}},us=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",ms[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ie,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Oe,{size:"text-m",color:ms[n].text,children:t})]}))),hs=(new Date).getDay(),ps=e=>{const[t]=e?.slice(hs-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(us,{color:"green",children:i}):null,n&&l?o(us,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(us,{color:"red",children:"Выходной"})},gs=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",fs=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(Wr,{label:e,value:t&&n?n:"",subText:gs({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),xs=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,bs=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,ys=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,vs=(e,t)=>{if(!e.workSchedule)return null;const n=rs(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Oe,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Oe,{size:"text-l",children:e.address})]}):null]}),ps(n)]}),o(ts,{children:Ns(e)})]},String(t))},Ns=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=rs(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Kr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Wr,{label:"Факс",value:t,isPhone:!0}),o(Wr,{label:"Телефон филиала",value:e,isPhone:!0}),o(Wr,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Wr,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Wr,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Wr,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Kr,{children:o(Wr,{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(fs)})})}):c(Kr,{children:[o(Wr,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(cs)})}),ns(d)]}),r?.businessScheduleVisibleTag?ss(r?.businessScheduleDescription):null,s?.currencies?.length?o(Kr,{className:"flex-wrap",children:s?.currencies?.map(ds)}):null]})},ws=({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=rs(e),n=e?is(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?xs(n):ys(n,a):bs(n):""})(n)}`;return{header:a,body:l}},Cs={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Ss={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ks={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)},Is=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ks[t](e)))))},Ts=()=>{},Rs=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=Ts,getBalloonRemoteWorkplaces:i=Ts})=>{const[l,s,o,c]=r((()=>{const l=Is(e,n),r=Is(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}},Bs=e=>{const{data:t,error:n}=Zn(`/light-api-cash/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,Ps);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},Ps=async e=>await _t(e,{method:"POST"})||[],Ds=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),_s=d((({children:e})=>Ds?e:null)),Es=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=Bs("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");i((()=>{(async()=>{const e=await(async e=>{const t=await $r("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:qr(e.latitude??Or[0]),gpsLongitude:qr(e.longitude??Or[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=Rs({data:n,filtrationState:{},getBalloon:ws});return c("div",{children:[o(jn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...d,isSearch:!0}),o("div",{className:"h-[600px]",children:o(_s,{children:o(zr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),As=Lt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:i,...l})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(jn,{placeholder:a,options:r,...e(n),...l})})),Ms=d((({field:e,input:t})=>{const{data:n}=Bs("EMPLOYEES_NUMBER"),a=yi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(As,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),Os=d((({field:e,input:t})=>o(Di,{text:"Наличие военного билета",...e(t?.name??"")}))),zs=d((({field:e,input:t})=>o(_n,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),Vs=d((({field:e,input:t})=>o(Di,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),Fs=d((({field:e,input:t})=>o(Wa,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),Ls=d((({field:e,input:t})=>o(_n,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&ki(e,"birthPlace")}))),$s=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const js=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black"})=>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(G,{name:t,width:"24",height:"24",iconVersion:n})}),o("div",{className:"",children:o(Ae,{__html:e})})]}))),Us=d((({field:e,input:t})=>{const[n,s]=a([]),[d]=function(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?$s(t):null);return[n,l((t=>{i((n=>{const a=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(a)),a}))}),[e])]}("programId"),{value:m,onChange:u}=e("cardCategory"),h=e("paymentSystem")?.value?.key;i((()=>{h&&d&&(async()=>{const e=await(async(e,t)=>{const n=await $r("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(h,d);s(e),qs(e,m)||u&&u(null)})()}),[h]);const p=r((()=>n?.find((e=>e.key===m?.key))?.description),[n,m]);return c("div",{children:[o(As,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t}),p?o(js,{__html:p}):null]})})),qs=(e,t)=>e.some((e=>e.key===t?.key)),Ws=d((({field:e,input:t})=>o(_n,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Hs=d((({field:e,input:t})=>o(_n,{label:"Кодовое слово",...e(t?.name??""),...t}))),Ys=d((({field:e,input:t})=>{const{data:n}=Bs("INCOME_CERT_UNITED");return o(As,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Gs=d((({field:e,input:t})=>{const{data:n}=Bs("MILITARY_STATUS");return o(As,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Ks={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},Xs=d((({src:e,onClose:t,onDocumentRead:n})=>{const a=Te();return c(ir,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:t,children:[a?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(nr,{className:"mx-auto mt-m",type:"button",onClick:()=>{n?.(),t?.()},children:"Ознакомиться"})]})})),Js=(e,t)=>{const{open:n}=pn(Xs),a=Te();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await jr(`/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=Js(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Za,{...a}),n?o(nr,{embedded:!0,onClick:i,children:o(Xr,{children:"Ознакомиться"})}):null]}),Sn(t)]})})),Qs=d((({field:e,input:t})=>t&&t.name?o(Zs,{text:Ks[t.name]?.text,docId:Ks[t.name]?.docId,...e(t.name)}):null)),eo=Math.round(29.5),to=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]}))),no="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",ao="flex flex-col lg:w-1/2 gap-2xl",io="flex flex-col gap-y-xl min-w-52",lo=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Oe,{size:"text-h3",children:"number"==typeof e?[a,Ge(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),ro=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(Oe,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(lo,{value:n,...i}):o(Oe,{size:"text-h3",children:"-"})]}))),so=(e=[],t=!1)=>oo([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),oo=(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]},co=(e,t=0)=>e?.sum?e.sum:t,mo=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,uo=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,ho=({min:e=0,max:t=0,availableMonths:n,...a})=>o(ua,{items:[`От ${po(e)}`,`До ${po(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),po=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,go=({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(Oe,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Oe,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Wl,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),fo=e=>go({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),xo=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(ua,{items:e?[`От ${Ge(1)(a.min||0)} ${n}`,`До ${Ge(1)(a.max||0)} ${n}`]:[],step:t,...a}),bo=({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?.(sa(t?.[i],n.minMonths,n.maxMonths))},yo=(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)},vo=e=>e,No=(e=vo)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),wo=No(),Co=(e=vo)=>No((t=>-e(t))),So=Co(),ko=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Io([e,t],a),Io=([e,t],n=[])=>({[e]:n.length?So(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?wo(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),To=(e,[t,n],a)=>e>=a[t]&&e<=a[n],Ro={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Bo=e=>Po({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Po({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Po({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Po({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Po=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Do=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[Ro],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Bo({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=ko(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=ko(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>Bo({row:e,userInputParams:t,paramsViewSettings:n})&&To(a,["minSum","maxSum"],e)&&To(i,["minMonths","maxMonths"],e)))||Ro)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=yo(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},_o=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Eo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Ao=Lt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,oo([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=un({moneyValue:co(s,2e5),monthsValue:mo(s,eo),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=Do(g,n,r),b=fo({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:y}=f("moneyValue"),{onChange:v}=f("monthsValue");return i((()=>{y&&y(sa(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),i((()=>{v&&v(sa(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),i((()=>{!_o(s)&&h&&bo({field:f,defParams:h,calcParams:x,map:Eo,monthsValue:"minMonths"})}),[n,s]),o(to,{className:e,title:t,...m,children:c("section",{className:u(no,e),children:[c("div",{className:ao,children:[xo({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),ho({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),Mo({...x,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(io,"@4xl:w-1/2"),children:[o(ro,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ro,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(ro,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),qe(a,{isVertical:!0}),uo(l)]})]})})})),Mo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Za,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Za,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Za,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Za,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Oo="calculator",zo=d((({field:e,params:t})=>{const n=l((t=>{e(Oo).onChange?.(t)}),[]);return o(Ao,{...t?.calcData,padding:"p-0",defaultParams:Fo(e(Oo).value),onChange:n})})),Vo={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},Fo=(e,t=!1)=>{const n=t?Lo(Vo):Vo;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},Lo=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),$o=d((({field:e,input:t})=>{const{data:n}=Bs("CREDIT_IN_RSHB");return o(As,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),jo=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Wl,{label:xn({label:t,errors:a?.errors}),...a}),Sn(n)]}))),Uo=[{id:"810",text:"Рубли"}],qo=d((({field:e,input:t})=>o(jo,{label:"Валюта",orientation:"horizontal",items:Uo,...e(t?.name??"")}))),Wo=d((({field:e,input:t})=>o(Wa,{label:"Дата доставки",...e(t?.name??"")}))),Ho=d((({field:e,input:t})=>o(_n,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Yo=d((({field:e,input:t})=>o(Di,{text:"Являюсь инвалидом",...e(t?.name??"")}))),Go=d((({field:e,input:t})=>o(Wa,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&ki(e,t?.name??"")}))),Ko=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(_n,{disabled:t?.filledByEsia&&ki(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:i,daDataQueryPrefix:n})})),Xo=d((({field:e,input:t})=>o(_n,{disabled:t?.filledByEsia&&ki(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Jo=d((({field:e,input:t})=>o(_n,{disabled:t?.filledByEsia&&ki(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),Zo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(_n,{disabled:t?.filledByEsia&&ki(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),Qo=d((({field:e,input:t})=>{const{data:n}=Bs("EDUCATION_LEVEL");return o(As,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ec=d((({field:e,input:t})=>{const{data:n}=Bs("ORGANIZATION_ACTIVITY_TYPE"),a=yi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(As,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),tc=d((({field:e,input:t})=>{const{data:n}=Bs("ORGANIZATION_KIND"),a=yi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(As,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),nc=d((({field:e,input:t})=>{const{data:n}=Bs("EMPLOYMENT_INFO_UNITED");return o(As,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ac=d((({field:e,input:t})=>o(_n,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),ic=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(sa(Number(n),0,5)))),[]);return o(_n,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...e(t?.name??""),...t,onChange:n})})),lc=d((({field:e,input:t})=>{const{value:n,onChange:a}=e(t?.name??""),l=e("familyStatus")?.value?.key,r="MARRIED"===l?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return i((()=>{a?.(d)}),[l,s,c]),o(_n,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:n,onChange:a})})),rc=d((({field:e,input:t})=>{const{data:n}=Bs("MARITAL_STATUS");return o(As,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),sc=d((({field:e,input:t})=>o(_n,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),oc=d((({field:e,input:t})=>{const{data:n}=Bs("HOUSE_TYPE");return o(As,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),cc=d((({input:e})=>o(js,{__html:e?.label}))),dc=d((({field:e,input:t})=>o(_n,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),mc=d((({field:e,input:t})=>o(_n,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),uc=d((({field:e,input:t})=>o(_n,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),hc=d((({field:e,input:t})=>o(_n,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),pc=d((({field:e,input:t})=>o(Wa,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&ki(e,t.name??"")}))),gc=d((({field:e,input:t})=>o(_n,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),fc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],xc=d((({field:e,input:t})=>o(jo,{orientation:"horizontal",items:fc,...e(t?.name??"")}))),bc=d((({field:e,input:t})=>{const{data:n}=Bs("ORGANIZATION_TYPE"),a=yi();return i((()=>{n&&(a.organization=n)}),[n]),o(As,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),yc=d((({field:e,input:t})=>{const n=yi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Ri(n,e,t)}),[]);return o(_n,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),vc=d((({field:e,input:t})=>o(_n,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Nc=d((({field:e,input:t})=>o(Wa,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),wc=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(sa(Number(n),0,100)))),[]);return o(_n,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...e(t?.name??""),...t,onChange:n})})),Cc=e=>e.map((e=>({key:e.type,text:e.name})));const Sc=e=>e?.key,kc=d((({field:e,input:t})=>{const[n,l]=a([]),s=bi();var c;c=async()=>{const{programId:e}=s;if(e){const t=await(async e=>{const t=await $r("/public-data/creditProgramConditions","POST",{creditProgramId:e});return Cc(t?.paymentSystems||[])})(e);l(t??[])}},i((()=>{const e=c();return()=>{e.then((e=>{e instanceof Function&&e()}))}}),[]);const d=r((()=>n?.map((e=>({id:e.key,text:e.text})))??[]),[n]);return o(jo,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:Sc,parse:e=>n?.find((t=>t.key===e))})})})),Ic=d((({field:e,input:t})=>{const{data:n}=Bs("POSITION");return o(As,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Tc=d((({field:e,input:t})=>{const{data:n}=Bs("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(jn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...e(t?.name??"")})})),Rc=d((({field:e,input:t})=>o(_n,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Bc=["male","female"],Pc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],Dc=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 In({url:"/suggest/fio",requestData:{parts:["NAME"]},query:e}),n=t[0]?.data?.gender?.toLowerCase()||"";return Bc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(jo,{label:"Пол",orientation:"horizontal",items:Pc,...e(t?.name??"")})})),_c=d((({field:e,input:t})=>o(Di,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),Ec=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Ra(e,"___-___-___ __")):t?.(Ra(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(wn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),Ac=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(Ec,{"aria-label":t,label:xn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),Sn(a)]}))),Mc=d((({field:e,input:t})=>o(Ac,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),Oc=d((({field:e,input:t})=>o(_n,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),zc=d((({field:e,input:t})=>o(_n,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Vc={limitedBirthday:pc},Fc={processPersonalDataFlg:Qs,consentProviderFlg:Qs,consentOthersFlg:Qs,consentInformFlg:Qs,consentPfrFlg:Qs},Lc={organization:bc,organizationAddress:Ii,organizationPhone:Ji,organizationName:yc,legalForm:hc,generalSeniority:sc,lastJobExperience:mc,experience5Years:ic,jobsNumber:dc,beginDate:Fs,addressFact:Nr,addressRegistration:Ii,addressRetail:Es,addressMatch:wr,sex:Dc,limitedBirthday:pc,birthPlace:Ls,education:Qo,housing:oc,amountWorkers:Ms,employment:nc,employerActivities:ec,employerOrganization:tc,positionOrganization:Ic,familyStatus:rc,familyMembers:lc,children:Ws,dependents:Ho,totalIncome:Oc,expenses:ac,snils:Mc,conscription:Gs,armyIdFlg:Os,dulSerie:Jo,dulNumber:Xo,dulIssueDate:Go,dulSubdivisionCode:Zo,dulIssuedBy:Ko,participantDateRegistration:Nc,retirementIncome:Rc,otherIncome:vc,wages:zc,mandatoryPayments:gc,disablePeopleFlg:Yo,bankruptcyFlg:Vs,shareholderFlg:_c,legalEntityName:uc,creditInRshbCd:$o,bankEmployeeCode:zs,partInBusiness:wc,regionRetail:Tc,infoCard:cc,calculator:zo,confirmationIncome:Ys},$c={addressCourier:Ii,paymentSystem:kc,currency:qo,cardCategory:Us,codeWord:Hs,methodObtain:xc,deliveryDate:Wo},jc="Согласие на все документы",Uc=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=l((n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}}),[e]),s=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(ol(t(e?.name),Dl[e?.name]).error)))),[e]),[d,{toggle:m}]=ln(!0);return o("div",{className:"w-fit",children:c(Qr,{children:[c("div",{className:"flex items-start",children:[c("div",{children:[o(Za,{text:jc,value:a,onChange:i},n),Sn(s?"Отметьте все обязательные соглашения":"")]}),o(nr,{embedded:!0,ariaLabel:jc,onClick:m,children:o(Jr,{className:"p-2xs",iconVersion:"color",isUnfolded:d})})]}),o(es,{className:"flex flex-col pl-2xl",isUnfolded:d,children:e.map(Xl(t,{},Fc))})]})})})),qc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Wc(t||[]);return n.length>2?c("div",{children:[a.map(Xl(e,{},{...Vc})),o(Uc,{inputs:n,field:e})]}):(t||[])?.map(Xl(e,{},{...Vc}))},Wc=(e=[])=>({consentInputs:e.filter((({name:e})=>Object.keys(Ks).includes(String(e)))),restInputs:e.filter((({name:e})=>!Object.keys(Ks).includes(String(e))))}),Hc=(e,t)=>o(ur,{className:"w-full @xl:w-auto",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Yc=e=>jr("/user-data/updateUserProfile","PUT",e),Gc=e=>jr("/user-data/updateUserTask","PUT",e),Kc={width:"118",height:"24"},Xc={"bg-white":"color",transparent:"white"},Jc={"bg-white":"text-primary-main",transparent:"text-white"},Zc=(e,t,n)=>o(ie,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Xc[e]},className:Jc[e],width:n?.width,height:n?.height}),Qc={"bg-white":"text-primary-text",transparent:"text-white"},ed=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??"Россельхозбанк",...be(s),children:[Zc(l,n?.image,Kc),r?a??o("div",{className:"ml-s",children:o(Oe,{font:"font-medium",color:Qc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),td=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),[p,{setTrue:g,setFalse:f}]=ln(!1),x=l((async()=>{g();var e;await(e={captchaText:d},jr("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),b=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>jr(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(b,[]),o(ir,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(ed,{}),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(nr,{className:"w-8",embedded:!0,onClick:b,children:o(G,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(wn,{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(nr,{version:"secondary",onClick:close,children:"Вернуться"}),o(ur,{version:"secondary",disabled:!d,onClick:x,children:"Отправить"})]}),p?o(mr,{blur:!1}):null]})})})),nd=d((({className:e,seconds:t})=>o("span",{className:e,children:ad(t)}))),ad=e=>[Math.floor(e/60),e%60].map((e=>String(e).padStart(2,"0"))).join(":"),id=(e,t)=>{const n=s(null),a=l((()=>clearInterval(n.current)),[]),r=l((()=>{a(),n.current=setInterval((()=>e(a)),t)}),[e,t,a]);return i((()=>(r(),a)),[r,a]),{start:r,stop:a}};function ld({seconds:e,period:t=1e3,onTick:n,onEnd:a}){const i=s(e),r=l((e=>{i.current||=0,i.current=Math.max(0,i.current-1);try{n?.(i.current)}finally{i.current<=0&&(e(),a?.())}}),[n,a]),{start:o}=id(r,t);return l((e=>{i.current=e,o()}),[])}const rd=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:sd(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),sd=(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 ${vn(!n||!a)} rounded-md caret-transparent outline-none`},od=d((({isDisabled:e,onClick:t,text:n})=>o(nr,{type:"button",onClick:t,disabled:e,children:o(Oe,{font:"font-normal",children:n})}))),cd=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},dd=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=ln(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=l((()=>r("")),[]),x=Boolean(0===d&&u),b=p>2||x||!e.every(Boolean),y=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>$r("/sms/checkCode","POST",e).then(cd))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),f(),await(t?.(e.join("")))}catch{r(p>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{c()}}),[e,p]);return i((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:b,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},md=d((({phone:e,code:t=!0,withDescription:n=!0,codeLength:r=4,consents:s,onSuccess:d=bn,onClose:m=bn})=>{const[u,h]=a(Array(r).fill("")),{handleSubmit:p,hasError:g,errorText:f,isLoading:x,timeNextReq:b,isSubmitButtonDisabled:y,setTimeNextReq:v,setIsTimerStarted:N,setAttempts:w}=dd({values:u,onSuccess:d}),C=pn(td),k=Wt(e),I=ld({seconds:b,onTick:v}),T=l((async()=>{var e;await(e={phoneNumber:k,smsCodesSetName:{key:"AUTHENTICATION"}},jr("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(w(0),v(180),I(180),N(!0)):C.open({phoneNumber:k,sendCode:T})}),[k,I,m]);return i((()=>{T()}),[]),o(ir,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m",onClose:m,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(rd,{values:u,setValues:h,errorText:f,hasError:g}):null,hd(b,T),n?c(Ae,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:s?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}):null,ud(y,p),x?o(mr,{blur:!1}):null]})})})),ud=(e,t)=>o(od,{text:"Далее",isDisabled:e,onClick:t}),hd=(e,t)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(nd,{className:"ml-1",seconds:e})]}):o(nr,{embedded:!0,onClick:t,children:o(Xr,{children:"Получить новый код"})}),pd={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},gd={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},fd=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],xd=d((({onSubmit:e=bn,onClose:t=bn})=>{const[n,i]=a(""),[r,s]=a(!1),d=Js(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?gd:pd;return o(ir,{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(Wl,{className:"whitespace-normal",orientation:"horizontal",items:fd,value:n,onChange:u}),o(nr,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),bd=d((({title:e,icon:t,description:n,onClick:a=bn})=>c("button",{className:"flex gap-lg items-center border border-gray/30 rounded-xl cursor-pointer p-4 hover:border-green",type:"button",onClick:a,children:[o(ie,{image:{icon:t,iconVersion:"normal"},width:"78",height:"78"}),c("div",{className:"flex flex-col items-start gap-xs md:w-72 md:mr-lg",children:[o(Oe,{font:"font-medium",size:"text-s",children:e}),n?o(Oe,{color:"text-secondary-text",size:"text-xs",children:n}):null]})]}))),yd={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},vd={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"},wd=e=>Object.entries(e).reduce(((e,[t,n])=>t in yd?[...e,{contactTypeCd:{key:yd[t]},value:n}]:e),[]),Cd=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in vd){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:vd[t]},...a}]}return e}),[]),Sd=e=>{const{familyStatus:t,familyMembers:n,dependents:a,children:i,confirmationIncome:l,wages:r,mandatoryPayments:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,totalDependents:n,incomeCertificateCd:l,otherDependents:a,childrenDependents:i,militaryStatusCd:g,participantIncomes:(f={wages:r,mandatoryPayments:s,incomeAverage:kd(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?.replace(/[-\s]/g,""),armyIdFlg:p};var f},kd=(e,t)=>Number(e)+Number(t),Id={WORK:"Работаю",RETIREE:"Пенсионер"},Td={BANK_STATEMENT:"Получаю зарплату на счет/карту в РСХБ",BANK_STATEMENT_PENS:"Получаю пенсию на счет/карту в РСХБ",PFR_CERTIFICATE:"Получаю зарплату на счет/карту в другом банке",OTHER:"Другое"},Rd={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"},Bd={...Rd,amur_card:"14",owner_card:"13",travel_card:"15"},Pd=e=>{const t=e?.find((e=>"WAGES"===e.incomeTypeCd.key))?.value,n=e?.find((e=>"MANDATORY_PAYMENTS"===e.incomeTypeCd.key))?.value,a=e?.find((e=>"ADDITIONAL_INCOME"===e.incomeTypeCd.key))?.value,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:kd(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}},_d=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}},Ed=(e,t)=>e?.key?{key:e.key,text:t?t[e.key]:e.value}:void 0,Ad=d((function({task:e,isFromLead:t=!1,onClose:n=bn}){const a=yi(),i=Qt(),{participants:r,creditProgram:s,createdDate:d="",id:m}=e,u=Bd[s.code],h=Boolean(Rd[s.code]),p=h?"/credit-lead":"/credit-card-lead",{id:g,profile:f}=r[0],x=l((()=>{const t=(e=>{const t=e.participants[0],{classCard:n,codeWord:a,paymentSystemTypeCd:i,currencyCode:l}=e,{loanAmount:r,creditPeriod:s,paymentTypeCd:o}=e,{birthDate:c,midname:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,educationLevelCd:y,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:D,employeesNumberCd:_,opf:E,seniority:A,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:$,otherDependents:j,militaryStatusCd:U,participantIncomes:q,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:l?.key,paymentSystem:Ed(i),cardCategory:Ed(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,education:Ed(y),participantDateRegistration:v,housing:Ed(N),beginDate:k,employment:Ed(I,Id),organizationName:T,inn:R,employerActivities:Ed(B),organization:Ed(P),employerOrganization:Ed(D),amountWorkers:Ed(_),legalForm:E,generalSeniority:A?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:Ed(V),familyStatus:Ed(F),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:Ed(U),confirmationIncome:Ed(Q,Td),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:Ed(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...Pd(q),...Dd(S),..._d(C),...(ee=w,ee?.key?{sex:"MAN"===ee.key?"male":"female"}:null)};var ee})(e);a.participantId=g,a.taskId=m,a.profileId=f?.id,a.programId=u,a.leadForm=t,i.assign(p)}),[]),b=l((()=>{i.assign(h?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]);return o(ir,{className:"my-6xl max-w-4xl w-full min-h-fit mx-auto rounded-xl py-0",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center mt-xs md:mt-0 mx-6xl",children:[o(N,{className:"whitespace-pre-wrap text-center",title:"Нашли черновик вашей заявки",headingType:"h5"}),c("div",{className:"flex flex-col gap-m max-w-lg",children:[o(bd,{title:"Продолжить заполнение черновика",icon:"BankColorIcon",description:d?`Черновик от ${qt(new Date(d))}`:"",onClick:x}),o(bd,{title:t?"Продолжить заполнение текущей заявки":"Создать новую заявку",icon:"NewLoanIcon",description:"На получение кредита",onClick:t?n:b})]})]})})})),Md=d((function({onClose:e=bn}){const t=Qt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(ir,{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(nr,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(nr,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),Od=d((({onClose:e})=>{const t=Qt(),n=yi(),a=l((async()=>{const e=await(n={redirectUri:t.href},$r("/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(ir,{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(ie,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex flex-wrap gap-lg w-full",children:[o(nr,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(nr,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),zd=()=>{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")}},Vd=()=>bi(),Fd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:i,setFalse:r}]=ln(!1),[s,o]=a(),c=(()=>{const e=Vd();return l((({participantId:t,taskId:n,profileId:a,programId:i,formData:l})=>{e.participantId=t,e.taskId=n,e.profileId=a,e.programId=i,e.leadForm=l}),[])})(),d=(e=>{const{open:t}=pn(Od),n=Qt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=pn(xd),n=pn(md),a=t=>async n=>{try{t&&await Yc({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},i=(t,i)=>async l=>{"SIGNED"===l&&t?n.open({phone:t,consents:["согласие на запрос информации в БКИ"],onSuccess:a(i)}):e()};return{open:(n,a)=>t({onSubmit:i(n,a),onClose:e})}})(d),u=pn(md),h=(()=>{const{open:e}=pn(Ad),{open:t}=pn(Md);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{isSending:n,ok:s,handleSubmit:l((async t=>{try{i();const a=await(n={profile:{phone:Wt(t.phone)}},$r("/public-data/createUserProfile","POST",n).then((e=>e?.profile?.id||null)));if(a&&t?.phone){const n=async()=>{await $d({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},i=async()=>{try{const t=await(async e=>{const t=await $r("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:a,programId:e});if(t){const e=await(async e=>await $r("/user-data/getTaskById","POST",e)||void 0)({taskId:t});u.close(),h.open({task:e,isFromLead:!0,onClose:n})}else await n()}catch{o(!1)}},l=Ld(t);u.open({phone:t?.phone,consents:l,onSuccess:i}),r()}}catch{o(!1)}var n}),[])}},Ld=e=>Object.keys(Ks).filter((t=>e[t])).map((e=>Ks[e]?.text)),$d=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=jd(n);await Yc(((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&&qt(l,!0),email:s,phone:Wt(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 $r("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Gc((({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:Qt().origin,id:t,participants:[{birthDate:s&&qt(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:wd({phone:o&&Wt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:zd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},jd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Ud={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},qd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Ud[e.name||""]])))}},Wd=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:Gi(t?.phone),email:t?.email,dulIssueDate:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Hd(i),addressFact:Hd(l),esiaAccountTypeCd:t?.esiaAccountType}},Hd=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}},Yd=(e,t)=>{const n=Qt(),[a,{setTrue:s,setFalse:o}]=ln(!1),c=Vd(),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((()=>qd(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},$r("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...Wd(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=$s(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}]},Gd=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>vr?.flatMap((e=>e?.inputs))||[]),[vr]),m=r((()=>_l(d)),[d]),[h,{isLoading:p}]=Yd(d,a),{isSending:g,ok:f,handleSubmit:x}=Fd({programId:n,nextStepLink:a}),[,{field:b,onSubmit:y}]=un(h,{formValidator:m,onSubmit:x}),v=pn(lr);return i((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(hn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[p?o(mr,{blur:!1}):null,vr.map(((e,t)=>c("div",{className:u(Jl(e.columns),"grid gap-x-m"),children:[Zl(e.title),qc({field:b,inputs:e?.inputs})]},`section-${t}`))),Hc(l,g)]})})})),Kd=d((({title:e,description:t})=>{const n=Te();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ie,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Xd=e=>e%2!=0,Jd="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Zd=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]],[s,{toggle:d}]=ln(!1);return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Jd),children:[B(l,{...i.options,parent:n}),Xd(l.length)?o(jt,{className:"col-span-6",...i}):null]}),c(Qr,{children:[c(es,{className:u(Jd),isUnfolded:s,children:[B(r,{...i.options,parent:n}),Xd(r.length)?o(jt,{className:"col-span-6",...i}):null]}),o(Zr,{className:u("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:i.options?.page?.colorPalette,onClick:d})]})]})})),Qd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",em=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),tm=10;function nm(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:am(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 am(e=0){const t=Math.round(e*tm);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const im=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:i,children:r,onIntersection:s})=>{const c=nm(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})})),lm=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],rm=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:i=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=l(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(om(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?sm(c,v):{},...N?em(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(im,{className:u(m,i?lm[i-1]:"",{"h-full":N},t),style:w?sm(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),sm=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),om=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),cm={"horizontal-list":"w-6","vertical-list":"h-6"},dm=({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?cm[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),mm=({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))},um=e=>t=>e.scrollWidth/t,hm=e=>(t,n)=>{e.scrollBy({left:n*um(e)(t),behavior:"smooth"})},pm=({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?[Co()(i),No()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?hm(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?hm(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}]},gm={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},fm=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[h,p]=pm({itemCount:s.length}),g=xm(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(rm,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(mm({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",gm[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(dm({activeIndex:t,onClick:f,listType:a}))}):null})),xm=(e=!1)=>({behavior:e?"auto":"smooth"}),bm=d((({className:e,name:t,...n})=>o(nr,{className:u("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(G,{name:t,iconVersion:"",size:"small"})}))),ym=d((e=>o(bm,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),vm=d((e=>o(bm,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),Nm="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",wm=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:i})=>{const{canScrollLeft:l,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!i;return c("div",{className:e,children:[n?Cm(t):null,l?o(ym,{className:u(Sm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(vm,{className:u(Sm(i),m?"right-1":"right-0"),onClick:d}):null]})})),Cm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(Nm,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(Nm,"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)]"),km=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:i=1,listType:l="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=pm({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(rm,{containerRef:y,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(wm,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(fm,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:l,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),Im=({blocksToRender:e,...t})=>o(km,{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",Qd(!0)),children:T(e,t)},String(n))})}),Tm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[Rm(n,t),o(Zd,{...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Rm(n,t),Im({...a,blocksToRender:t})]});default:return null}})),Rm=(e,t)=>e&&!t.length?o(Kd,{...e}):null,Bm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),Pm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Fi,{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))))),Dm=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(_m(a)).filter(Boolean))]}),n?o("div",{children:o(nr,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),_m=e=>([t,n])=>{const a=n?.type;return"array"===a?Em(t,e)(n):null},Em=(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(Oe,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Pm,{items:a,multiple:!n?.single,...t(e)})]},e)},Am=e=>e;function Mm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Om=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,zm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Om(t[e])||Om(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Om(t[e])||Om(n[e])||Vm(t[e])<=Vm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Om(t[e])||Om(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=>Om(t[e])||Om(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Om(t[e])||Om(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Vm=e=>Number(e||0),Fm=(e,{block:t,page:n,normalize:a=Am})=>{const i=t?.blocks||[],[l,s]=un(e),o=r((()=>Mm(i,i.map((e=>zt(e.content,n?.fallback))))),[i,n?.fallback]),c=l===e?i:((e,t)=>(n=Am)=>e?.filter((([,e])=>zm(t,n(e)||{}))).map((([e])=>e)))(o,l)(a);return[l,{blocksToRender:c,blocksWithProps:o},s]},Lm={},$m={},jm=Lt((({className:e,filtrationSchema:t=Lm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Fm($m,{block:i.block,page:i.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Um(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Um(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Dm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(nr,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(Tm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Um=e=>Mm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),qm=(e=!1)=>e?"text-left":"text-center",Wm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Hm=d((({className:e,iconBgVersion:t="primary",size:n,icon:a,...i})=>{const l=`${n?.width??44}px`;return a?o("div",{className:u("rounded-icon object-fit flex justify-center items-center",Wm[t],e),style:{width:l,height:l},role:"figure",children:o(G,{name:a,width:"54%",...i})}):null})),Ym=d((({className:e="",title:t,benefitList:n,...a})=>{const i=Te();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:qm(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(Gm)}):null]})})),Gm=({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(Hm,{className:"shrink-0",iconBgVersion:l,...a}):null,a?.src?o(ie,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Oe,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Ae,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Km=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(Oe,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ie,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Oe,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),Xm=(e,t,n)=>o("div",{className:`grid gap-2xs ${Jm(t)}`,children:e.map(Km(n))}),Jm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Zm=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:i,title:l,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?Xm(e,a,t):null]}))),Qm={start:"justify-start",center:"justify-center",end:"justify-end"},eu=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Qm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:qe(e)})})),tu=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Oe,{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:Ge(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]})]}))),nu=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Oe,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(G,{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:"Процентная ставка не найдена, выберите другие параметры"})})]}))),au=({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(tu,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(ro,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(nu,{title:e,...r}),iu={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},lu={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ru=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=iu.prefMonthsNum,prefTravelBonusRate:l=iu.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||lu,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},su=Lt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=un({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=ru(r,n);return o(to,{className:e,title:t,...l,children:c("section",{className:u(no,e),children:[c("div",{className:ao,children:[xo({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),xo({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?au({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:io,children:[f>=0?o(ro,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,qe(a,{isVertical:!0}),uo(i)]})]})})})),ou=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,cu=e=>go({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),du=" (c капитализацией)",mu=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:io,children:[o(ro,{title:`Доход в конце срока${l?du:""}`,value:e,postfix:n,prefix:"+"}),o(ro,{title:`Сумма в конце срока${l?du:""}`,value:t,postfix:n}),qe(a,{isVertical:!0}),i?.map(uo)]}),uu={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const hu={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},pu=(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?uu[e?.rateType]:"",{data:n}=Zn(t?`${Ht}/depositrates/${t}`:null,Et);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&gu(s,e)&&To(a,["minSum","maxSum"],e)&&To(n,["minDays","maxDays"],e)))||hu,{rate:m}=d,u=fu(m,e),h=a+u,p=c||[hu];return{...d,...Io(["minSum","maxSum"],p),...Io(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},gu=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,fu=(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)},xu=Lt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=un({moneyValue:co(r,1e5),daysValue:mo(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=pu(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o(to,{className:e,title:t,...d,children:c("section",{className:u(no,e),children:[c("div",{className:ao,children:[xo({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ua,{items:[`От ${ou(y.min||0)}`,`До ${ou(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[bu(p,h),cu({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),au({rate:x,depositeName:b,isShowDepositeName:l}),mu({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var y})),bu=(e,t)=>c("div",{className:"space-y-s",children:[o(Oe,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Za,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Za,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),yu=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},vu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Nu=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?Su(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Cu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Cu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Cu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Cu({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,To(a,["minSum","maxSum"],t),To(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||vu,{rate:u}=m,h=wu(u,e),p=a+h,g=t||[vu];return{...m,...Io(["minSum","maxSum"],g),...Io(["minMonths","maxMonths"],g),availableMonths:yu(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}},wu=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i)-a):Math.round(a*e*30*i/365/100)},Cu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],Su=(e,t)=>e+Math.round((t-e)/2),ku=(e="rub")=>"rub"===e,Iu=(e,t)=>{const{minMonths:n,maxMonths:a}=Io(["minMonths","maxMonths"],Pu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:sa(i,n,a)}},Tu=(e,t)=>{const{minSum:n,maxSum:a}=Io(["minSum","maxSum"],Pu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:sa(i,n,a)}},Ru=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Bu=e=>{const t=ku(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Pu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Du=(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?go({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?go({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),_u(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?cu({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},go({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),_u(e.isShowNewClient),e.isShowNewClient?o(Za,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},_u=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Eu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Au={text:"₽",key:"rub"},Mu=Lt((({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))??[Au],g=l((e=>t=>e?{...t,...Bu(t),...Tu(t,e),...Iu(t,e),...Ru(t,e)}:t)(h),[h]),[f,{field:x}]=un({moneyValue:co(d,2e4),monthsValue:mo(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Au},{normalizer:g}),b=x?.("currency")?.value??Au,y=x?.("isNewClient")?.value,v=Pu(h,b),N=Nu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{bo({field:x,defParams:so(v,y),calcParams:N,monthsValue:"minMonths",map:Eu})}),[x,h]);i((()=>{!_o(d)&&v&&I()}),[d,h]);const T=w===so(v,y)?.rate;return o(to,{className:e,title:t,...m,children:c("section",{className:u(no,e),children:[c("div",{className:ao,children:[c("div",{className:"flex gap-m",children:[xo({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Ou(b?.key)}),h&&h?.length>1?o(jn,{label:"Валюта",options:p,...x("currency")}):null]}),ho({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Du({...N,...s},x)]}),au({rate:w,children:Vu(I,T)}),mu({income:C,finalSum:S,buttons:[...a,zu(n?.buttons,k)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Ou=(e="")=>ku(e)?1e3:100,zu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},Vu=(e,t=!1)=>t?null:o(nr,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Fu=e=>Lu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Lu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Lu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],$u={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ju=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[$u],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Fu({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=ko(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=ko(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>Fu({row:e,userInputParams:t,paramsViewSettings:n})&&To(a+r,["minSum","maxSum"],e)&&To(l,["minSumOld","maxSumOld"],e)&&To(r,["minSumExtra","maxSumExtra"],e)&&To(i,["minMonths","maxMonths"],e)))||$u)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=yo(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}},Uu=Lt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=un({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=ju(s,n,l),h=fo({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(to,{className:e,title:t,...r,children:c("section",{className:u(no,e),children:[c("div",{className:ao,children:[xo({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),xo({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ho({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),qu({...m,...l},d),m.isExtraMoney?xo({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(io,"@4xl:w-1/2"),children:[o(ro,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ro,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(ro,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(ro,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),qe(a,{isVertical:!0}),uo(i)]})]})})})),qu=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Za,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Za,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Za,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Wu=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=ra(e,{normalize:(e=i)=>n&&a?String(sa(Number(Hu(e)),n,a)):Hu(e),format:Ge(r)}),d=l((e=>t&&t(Hu(e))),[t]);return o(wn,{onChange:d,...s,...c})})),Hu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Yu=d((e=>o(Wu,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Oe,{size:"text-xl",font:"font-light",children:"₽"})})}))),Gu=new pi;function Ku(){return fi(Gu)}ui(Gu,new hi(globalThis?.sessionStorage));const Xu={private:"p2p/registerP2P",business:"b2c/registerB2C"},Ju=({onClose:e,errorCode:t,errorMessage:n})=>{const a=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(ir,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ie,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:a,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ie,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Zu=e=>{const t=pn(Ju),n=Ku(),a=Qt(),i="private"===e?"p2p":"b2c";return l((async({amount:l})=>{const r=await(async(e,t)=>{const n=Qt(),a={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},i=`${Ht}/payment/${Xu[e]}`;try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(a)});return e.ok?await e.json():null}catch(e){return null}})(e,l);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:i,url:a.href},a.assign(`${i}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Qu={amount:1500},eh=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:a,formType:l="private",...r})=>{const[s,{setValue:d}]=ln(!1),m=Zu(l),[{amount:h},{field:p,onSubmit:f}]=un(Qu,{onSubmit:m});return i((()=>{d(h<=0)}),[h]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:f,children:[o(Yu,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:h}),a?.text?o(ur,{className:"w-full mt-lg",disabled:s,children:a.text}):null]})]})})),th=({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(G,{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})]}),nh="relative h-full",ah={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},ih=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(sh),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,i)=>c("div",{className:lh(n,{someCardsHighlighted:l}),children:[T(n,a,{className:rh(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),sh(n)?th({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},lh=(e,{someCardsHighlighted:t})=>u(nh,t&&(sh(e)?"pt-3xl":"pt-3xl sm:pt-16")),rh=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(nh,"min-w-80",ah[a],t&&(sh(e)?"pt-3xl sm:pt-16":"pt-3xl"),Qd(n),n&&"h-full"),sh=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,oh=Lt((({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(km,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?ch(s?.block?.blocks):[],hasBlur:!0,children:ih({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),ch=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],dh="z-10 border border-solid w-full h-full",mh=u(dh,"absolute hidden @xl:block border-transparent"),uh=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(mh,"top-9 right-12 bg-green-dark")}),o("div",{className:u(mh,"top-6 right-8 bg-green")}),o("div",{className:u(mh,"top-3 right-4 bg-green-light")}),c("div",{className:u(dh,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),qe([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),hh={black:"bg-black",white:"bg-white"},ph=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(Pe,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ie,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:qe([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(Oe,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(gh)]}):null,i?c(Oe,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),gh=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${hh[e]}`},String(t)),fh=d((({icon:e,...t})=>{const n=fe(),{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(ie,{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})),xh=d((({className:e,additionalDescription:t,description:n,links:a,title:i,...l})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...l,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?bh(a):null]})}))),bh=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(fh,{...e},String(t))))}),yh=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),vh=d((({className:e="",href:t,target:n,onClick:a,data:i,children:l})=>{const r=fe()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...be(i),children:l})})),Nh=[{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"}}],wh=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=>Nh.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(a)?a:r,c=n?{text:i}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&i&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??l}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Ch(i));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:qe(m,{className:Sh(s??!1,i??!1,n),buttonClassName:h})}),r?o(Oe,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Ch=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Sh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),kh=d((({className:e,padding:t,description:n,additionalDescription:a,href:i,icon:l,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(vh,{href:i,target:m,className:"h-full",data:yh(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(l)?o(ie,{image:l}):null,x),buttons:d.length?o(wh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(je,{benefits:f}),s?o(Ae,{__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,Th=new he,Rh=(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(Oe,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Oe,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:qe(i)}):null]},String(t))},Bh=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:h=[],options:p,data:f,...x})=>{const b=r((()=>h.map(Rh)),[h]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,C]=a(!1);i((()=>Th.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&C(e.isUnfolded)}))),[p?.parent]);const S=l((()=>{Th.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...x,children:[o(ie,{className:"self-center",image:s}),t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(Ce,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Qr,{children:[c("div",{children:[y,o(es,{isUnfolded:w,children:v})]}),h.length>=m?o(Zr,{className:"mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:f,onClick:S}):null]}):o("div",{children:y})]})})),Ph=d((({className:e,contacts:t,info:n,version:a="secondary",...i})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...i,children:[n?.length?Dh(n):null,t?.length?Dh(t):null]}))),Dh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>_h({column:e,i:t})))}),_h=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},i)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:qe([a])})]},String(i))))},`col-${String(t)}`):null,Eh=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),a=Qt();if(!t||!e||!n)return a.assign("/"),()=>{};const i=async()=>{const n=await jr("/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)},Ah=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]})]}))),Mh=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(Ah,{step:a,showPercentage:!1})]})})}));var Oh;!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"}(Oh||(Oh={}));const zh=e=>$r("/user-data/getTaskStatus","POST",e),Vh=e=>jr("/user-data/sendSignalToProcess","POST",e),Fh=d((({title:e,interval:t=0,onEnd:n=bn})=>{const[i,l]=a(t);ld({seconds:t,onTick:l,onEnd:n});const r=100-(t-i)/t*100;return c("div",{children:[e?o(S,{title:e,headlineVersion:"S"}):null,c("div",{className:"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) ${r}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center w-20 h-20 rounded-full bg-white text-primary-text text-m",children:o(nd,{seconds:i})})]})]})})),Lh=d((({title:e,description:t,sectionInfoTitle:n,sectionInfo:a,sectionAdditionalTitle:i,sectionInfoAdditional:l,buttonText:r,interval:s,onExpire:d=bn,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),s?o(Fh,{interval:s,onEnd:d}):null]}),o($h,{title:n,items:a}),o($h,{title:i,items:l,countColumns:!0}),r?o(pr,{href:"/natural",text:r,version:"primary",className:"w-full mt-lg"}):null]}))),$h=({title:e,items:t,countColumns:n=!1})=>{const a=Te();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(Oe,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Jl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:jh(e)},t)))}):null]})]}):null},jh=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Oe,{color:"text-secondary-text",size:"text-l",children:e}),o(Oe,{color:"text-primary-text",size:"text-xl",children:t})]}),Uh=d((()=>o(Lh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),qh=d((({onExpire:e})=>{const{statusInfo:t}=yi();return o(Lh,{interval:300,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}],onExpire:e})})),Wh=d((()=>{const{statusInfo:e}=yi(),t="courier"===e?.methodObtain;return o(Lh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:t?"":"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:t?"Адрес доставки":"В отделении Банка",sectionInfoAdditional:t?[{description:e?.deliveryAddress}]:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Hh=d((()=>{const{statusInfo:e}=yi();return o(Lh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Yh(e),buttonText:"Вернуться на главную"})})),Yh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:qt(e?.deliveryDate)}]):t},Gh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Kh=d((()=>{const[e,t]=a(Oh.process),{taskId:n}=yi();i((()=>{(async()=>{for(const e of Gh)await Vh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await zh({taskId:n});a&&a?.statusCd!==Oh.process&&(e(),t(a.statusCd))}),[n]);id(r,3e4);const s=l((()=>t(Oh.rework)),[]);return Xh(e,s)})),Xh=(e,t)=>({IN_PROCESS:o(qh,{onExpire:t}),CANCELLED:o(Uh,{}),FAILED:o(Uh,{}),DRAFT:o(Uh,{}),APPROVED:o(Hh,{}),PRE_DECISION:o(Hh,{}),REVISION:o(Wh,{})}[e]||o(Wh,{})),Jh=e=>(t,n)=>t.filter((e=>e)).map((t=>[Zh(n,e),Qh(t,e),ap(t,e),ep(t,e),tp(t,e),np(t,e)].some(Boolean)?{...t,required:!1}:t)),Zh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,Qh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,ep=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,tp=({name:e},t)=>"addressFact"===e&&t("addressMatch"),np=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),ap=({name:e},t)=>"snils"===e&&ip(t),ip=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,lp={...Lc,...$c},rp=({field:e,inputs:t,params:n})=>t.map(Xl(e,n,lp)),sp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Jh(op(t))(e,n);return c("div",{className:u(Jl(i),"grid gap-x-m"),children:[Zl(l),rp({field:t,inputs:s,params:a})]},`section-${r}`)})),op=e=>t=>e(t)?.value,cp=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(nr,{version:"secondary",disabled:0===e,onClick:n,children:"Назад"}),o(ur,{isLoading:t,children:a?"Отправить заявку":"Далее"})]})})),dp=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},mp=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},up=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:qt(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:wd({organizationPhone:p&&Wt(p)}),participantAddresses:Cd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},hp=e=>{const{name:t,surname:n,middleName:a,limitedBirthday:i="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDate:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:qt(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:qt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:qt(g,!0),houseTypeCd:f,participantContacts:wd({phone:Wt(l),email:r}),participantAddresses:Cd({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},pp=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(i=n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{};var i},gp=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},fp=(e,t)=>{switch(e){case 0:default:return{};case 1:return hp(t);case 2:return up(t);case 3:return Sd(t);case 4:return dp(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:Cd({addressCourier:t})}:{}})(t)}},xp=[{paymentSystem:{key:"",text:""},currency:"810",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDate: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}],bp=e=>{try{return e?new Date(e):void 0}catch(e){return}},yp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=ln(!1),o=5===e,c=yi(),d=r((()=>((e,t)=>({...xp[e],...t,limitedBirthday:bp(t?.limitedBirthday),dulIssueDate:bp(t?.dulIssueDate),participantDateRegistration:bp(t?.participantDateRegistration),beginDate:bp(t?.beginDate),deliveryDate:bp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate,methodObtain:t?.methodObtain},c.leadForm=d)}),[o,d]),u=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await Gc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Qt().origin,id:t,...gp(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...fp(i,a)}],...mp(a),...pp(a)}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}o?n?.():t()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},vp=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,onFinish:i})=>{const s=r((()=>t?.flatMap((e=>e?.inputs||[]))),[t]),d=l((t=>_l(Jh((e=>t[e]))(s,e))(t)),[s]),[m,u,h]=yp({step:e,onNextStep:a,onFinish:i}),[,{field:p,onSubmit:g}]=un(m,{formValidator:d,onSubmit:u});return c("form",{onSubmit:g,className:"space-y-m",children:[sp({sections:t,field:p,step:e}),o(cp,{isSending:h,step:e,onPrevStep:n})]})})),Np=[[{title:"Персональные данные",columns:2,inputs:[{name:"surname",required:!0,dadata:!0,filledByEsia:!0},{name:"name",required:!0,dadata:!0,filledByEsia:!0},{name:"middleName",dadata:!0,filledByEsia:!0},{name:"sex",required:!0},{name:"limitedBirthday",required:!0,filledByEsia:!0},{name:"birthPlace",required:!0,filledByEsia:!0},{name:"phone",required:!0,filledByEsia:!0},{name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{name:"dulSerie",required:!0,filledByEsia:!0},{name:"dulNumber",required:!0,filledByEsia:!0},{name:"dulIssueDate",required:!0,filledByEsia:!0},{name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{name:"addressMatch"}]},{columns:2,inputs:[{name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{name:"housing",required:!0}]},{inputs:[{name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{name:"infoCard",label:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{name:"employment",required:!0},{name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{name:"inn",required:!0,dadata:!0},{name:"legalForm",required:!0}]},{inputs:[{name:"organization",required:!0},{name:"amountWorkers",required:!0}]},{columns:2,inputs:[{name:"employerActivities",required:!0},{name:"employerOrganization",required:!0},{name:"generalSeniority",required:!0},{name:"lastJobExperience",required:!0},{name:"experience5Years",required:!0},{name:"jobsNumber",required:!0}]},{inputs:[{name:"organizationPhone",label:"Телефон работодателя",required:!0},{name:"beginDate",required:!0}]},{columns:2,inputs:[{name:"positionOrganization",required:!0},{name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{name:"familyStatus",required:!0}]},{columns:1,inputs:[{name:"dependents",required:!0}]},{columns:2,inputs:[{name:"familyMembers"},{name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{name:"infoCard",label:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{name:"wages",required:!0}]},{columns:1,inputs:[{name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{name:"snils",required:!0}]},{columns:1,inputs:[{name:"conscription",required:!0}]},{columns:2,inputs:[{name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{name:"disablePeopleFlg"}]},{inputs:[{name:"bankruptcyFlg"}]},{inputs:[{name:"shareholderFlg"}]},{inputs:[{name:"legalEntityName"}]},{inputs:[{name:"creditInRshbCd"}]}]],wp=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...Np,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],Cp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],Sp=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=l((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);i(Eh,[]);const u=l((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=l((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=wp[n],[f,{setTrue:x}]=ln(!1);return o(g,{className:e,...t,children:c("div",{ref:d,className:"container grid grid-cols-12",children:[f?null:o(Mh,{stepsTitles:Cp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:f?o(Kh,{}):o(vp,{step:n,sections:p,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),kp=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(Ah,{step:a,showPercentage:!1})]})})})),Ip=d((({title:e,description:t,sectionInfoTitle:n,sectionInfo:a,sectionAdditionalTitle:i,sectionInfoAdditional:l,buttonText:r,interval:s,onExpire:d=bn,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),s?o(Fh,{interval:s,onEnd:d}):null]}),o(Tp,{title:n,items:a}),o(Tp,{title:i,items:l,countColumns:!0}),r?o(pr,{href:"/natural",text:r,version:"primary",className:"w-full mt-lg"}):null]}))),Tp=({title:e,items:t,countColumns:n=!1})=>{const a=Te();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(Oe,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Jl(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Rp(e)},t)))}):null]})]}):null},Rp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Oe,{color:"text-secondary-text",size:"text-l",children:e}),o(Oe,{color:"text-primary-text",size:"text-xl",children:t})]}),Bp=d((()=>o(Ip,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Pp=d((({onExpire:e})=>{const{statusInfo:t}=yi();return o(Ip,{interval:300,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?"Аннуитетный":"Дифференцированный"}],onExpire:e})})),Dp=d((()=>{const{statusInfo:e}=yi();return o(Ip,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),_p=d((()=>{const{statusInfo:e}=yi();return o(Ip,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Ep=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Ap=d((()=>{const[e,t]=a(Oh.process),{taskId:n}=yi();i((()=>{(async()=>{for(const e of Ep)await Vh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await zh({taskId:n});a&&a?.statusCd!==Oh.process&&(e(),t(a.statusCd))}),[n]);id(r,3e4);const s=l((()=>t(Oh.rework)),[]);return Mp(e,s)})),Mp=(e,t)=>({IN_PROCESS:o(Pp,{onExpire:t}),CANCELLED:o(Bp,{}),FAILED:o(Bp,{}),DRAFT:o(Bp,{}),APPROVED:o(_p,{}),PRE_DECISION:o(_p,{}),REVISION:o(Dp,{})}[e]||o(Dp,{})),Op=({field:e,inputs:t,params:n})=>t.map(Xl(e,n,{...Lc})),zp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Jh(Vp(t))(e,n);return c("div",{className:u(Jl(i),"grid gap-x-m"),children:[Zl(l),Op({field:t,inputs:s,params:a})]},`section-${r}`)})),Vp=e=>t=>e(t)?.value,Fp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(nr,{version:"secondary",disabled:0===e,onClick:t,children:"Назад"}),o(ur,{isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Lp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},$p=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Lp[a?"annuity":"differential"]}},jp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Up=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return hp(t);case 2:return up(t);case 3:return Sd(t);case 4:return dp(t);default:return{}}},qp=[{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,dulIssueDate: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}],Wp=e=>{try{return e?new Date(e):void 0}catch(e){return}},Hp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=ln(!1),o=5===e,c=yi(),d=r((()=>((e,t)=>({...qp[e],...t,limitedBirthday:Wp(t?.limitedBirthday),dulIssueDate:Wp(t?.dulIssueDate),participantDateRegistration:Wp(t?.participantDateRegistration),beginDate:Wp(t?.beginDate),deliveryDate:Wp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},c.leadForm=d)}),[o,d]),u=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await Gc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Qt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Up(i,a)}],...$p(a),...jp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Yp=d((({step:e,sections:t,programsSource:n,onPrevStep:a,onNextStep:i,onFinish:s})=>{const{programId:d}=yi(),m=n?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs??[]))),[t]),h=l((t=>_l(Jh((e=>t[e]))(u,e))(t)),[u]),[p,g,f]=Hp({step:e,onNextStep:i,onFinish:s}),[,{field:x,onSubmit:b}]=un(p,{formValidator:h,onSubmit:g});return c("form",{onSubmit:b,className:"space-y-m",children:[zp({sections:t,field:x,step:e,params:{calcData:m}}),o(Fp,{step:e,isSending:f,onPrevStep:a})]})})),Gp=[[{columns:1,inputs:[{name:"calculator"}]}],...Np,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{name:"regionRetail",required:!0}]},{inputs:[{name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{name:"bankEmployeeCode"}]}]],Kp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Xp=Lt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(Eh,[]);const h=l((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Gp[r],x=0===r,[b,{setTrue:y}]=ln(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||b?null:o(kp,{stepsTitles:Kp,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:b?o(Ap,{}):o(Yp,{step:r,sections:f,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:y},String(r))})]})})})),Jp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Zp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Qp=1e9,eg={sum:{min:1e4,max:Qp},period:3},tg=Lt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Fm(eg,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:ng(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=ag(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Dm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Yu,{label:a?.title,min:500,max:Qp,...d("sum",{parse:e=>({min:Number(e),max:Qp}),format:({min:e})=>String(e)})}),o(ua,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Tm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ng=e=>At((e?.paramsSource?.rateRows||[]).filter(Jp).flatMap((e=>Zp(e.minMonths,e.maxMonths)))),ag=e=>At(e.flatMap((e=>e||[])).filter(Jp).flatMap((e=>Zp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],ig=[{key:"10"},{key:"50"},{key:"100"}],lg=({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(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:ig,iconVersion:"black"})]})},rg="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",sg=(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:rg,"aria-label":`Страница ${l}`,children:l},String(t)):null},og={width:"24",height:"24"},cg=({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(G,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:dg(1===e),...og})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:rg,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(sg),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:rg,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(G,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:dg(e===n),...og})})]})},dg=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",mg=({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(cg,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(lg,{itemCount:a,onItemCountChange:i}):null]}),ug=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(ie,{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",yn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),hg=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(ug,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(qa,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(qa,{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(nr,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),pg=d((({title:e,timestamp:t,publicId:n})=>{const a=fe(),{href:i}=a({href:`${Ht}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Hm,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Oe,{size:"text-m","font-weight":"font-light",children:qt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),gg=`${Ht}/depository`,fg={startDate:void 0,endDate:void 0,query:""},xg=Lt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=un(fg),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?qt(a,!0):"",r=i?qt(i,!0):"",s=new URLSearchParams(gg);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}=Zn(gg+o,Et);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),b=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(hg,{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(Oe,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Oe,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(pg,{...e},String(e.publicId)))):o(Kd,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(mg,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),bg=e=>"Image"===e?.contentType&&e?.image?o(ie,{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,yg=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:bg(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),i?.text?o(Ce,{version:i?.version,text:i?.text,...i}):null]}))),vg=`${Ht}/region`;function Ng(e="Москва"){return bi().location??{name:e}}function wg(e="Москва"){const t=bi(),n=l((async()=>{if(!t.location){const n=await _t(vg);t.location=n??{name:e}}}),[t,e]);return Zn(vg,n),t}var Cg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Cg||(Cg={}));const Sg=new Intl.NumberFormat("ru",{style:"currency",currency:Cg.RUB}),kg=e=>e?Sg.format(e):"",Ig="text-m font-light text-secondary-text ",Tg=`${Ig} text-left`,Rg=`${Ig} pl-5xl text-center`,Bg=`${Ig} pl-5xl text-right`,Pg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Dg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Tg,children:o(Oe,{size:"text-m",children:"Валюта"})}),o("th",{className:Rg,children:o(Oe,{size:"text-m",children:"Купить"})}),o("th",{className:Bg,children:o(Oe,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(_g)})]}))),_g=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(ie,{image:{icon:Pg[t]},width:"24",height:"24"}):null,o(Oe,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Oe,{size:"text-h6",children:kg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Oe,{size:"text-h6",children:kg(e?.buyExchangeRate)})})]},t)},Eg={icon:"GpsIcon"},Ag=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Hm,{...Eg,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:"Курс указан для заданного офиса"})]})]}))),Mg=(e,t,n)=>{const a=Number(Og(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)},Og=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function zg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Vg=e=>t=>{const[,n]=zg(e.find((([e])=>e(t))));return n(t)},Fg=e=>Vg(e.map((([e,t])=>[e,()=>t])));Fg.if=e=>new Lg(void 0,e);class Lg{parent;predicate;unit;get entry(){return[zg(this.predicate),zg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Lg(this,e)}then(e){return new Lg(this.parent,this.predicate,e)}else(e){return Vg([...$g(this),[()=>!0,e]])}}const $g=e=>[...e?.parent?$g(e.parent):[],e.entry],jg=e=>Fg([[e=>e.value!==Cg.RUB&&e.oppositeValue!==Cg.RUB,()=>e.handleConvert(e.value,Cg.RUB)],[e=>e.value===Cg.RUB&&e.oppositeValue===Cg.RUB,()=>e.handleConvert(e.value,Cg.USD)],[e=>e.value===Cg.RUB&&e.oppositeValue===Cg.RUB,()=>e.handleConvert(e.value,Cg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Ug(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(wn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const qg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Cg.RUB,selectBuy:n?.[0]?.currency?.currency||Cg.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:[Ug({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Wg(r,d,n),value:r.inputSell,setValue:e=>Yg(d,n)(e,r.selectSell,r.selectBuy)}),Ug({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Hg(r,d,t),value:r.inputBuy,setValue:e=>Gg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ce,{text:i.text,version:i?.version,...i}):null]})})),Wg=(e,t,n)=>a=>{t({selectSell:a}),jg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Yg(t,n)(e.inputSell,a,i)}})},Hg=(e,t,n)=>a=>{t({selectBuy:a}),jg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Gg(t,n)(e.inputBuy,a,i)})},Yg=(e,t)=>(n,a,i)=>{e({inputSell:Og(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(Mg(n,l,a===Cg.RUB)||"")})},Gg=(e,t)=>(n,a,i)=>{e({inputBuy:Og(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(Mg(n,l,a===Cg.RUB)||"")})},Kg=`${Ht}/exchangerates`;const Xg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=Zn(Kg+`?regionCode=${t}`,Et);return n||{}}(Ng()),l=Jg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:Cg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Cg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Pe,{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(Dg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(Ag,{address:i?.address})]}),o(qg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Jg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Zg=d((({className:e="",items:t})=>{const n=fe();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,...be(t),children:i||null})},String(a)):null},ef=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),tf=["all","footer"],nf=d((({className:e,navigationItems:t})=>{const n=fe();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(ef(tf)).map(n).map(af)})})),af=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(ef(tf));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,...be(s),children:n}),d?o(Zg,{items:d}):null]},String(t))},lf=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(rf)}):null)),rf=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Oe,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(sf)})]},String(t)),sf=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:of(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),of=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${cf(t)}`,children:o(Oe,{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})}},cf=e=>e.replaceAll(/\D/g,""),df=d((({className:e="",index:t,text:n,...a})=>{const i=fe(),{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}`})})),mf=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(Oe,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(df,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),uf="w-full lg:w-52";function hf(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const pf=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 gf=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},ff=(e=[])=>e.reduce(((e,t)=>e+t),0),xf=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),bf=e=>t=>e.map((([e,n])=>[pf(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>vf(t,e))).reduce(gf(Math.max,0),new Map),yf=e=>t=>{return Mm(t,t.map((({title:e})=>e)).map((e=>t=>{const n=xf(t||"");return n.length?ff(e.map((e=>wo(n.map(pf(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},vf=(e,t)=>new Map(e.map((e=>[e,t]))),Nf=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=Zn(e?.length?e:null,wf),[s,o]=a(null);return hf((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=xf(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(bf(l)).reduce(gf(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return yf(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},wf=async(...e)=>(await Promise.allSettled(e.map((e=>_t(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Cf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[i,l]=Nf({basePathList:a,initialQuery:e}),s=r((()=>Sf(t)(i)),[t,i]);return o(ir,{head:o(ug,{autoFocus:!0,...l}),onClose:n,children:o(nf,{navigationItems:s})})})),Sf=e=>t=>e?.length&&t?.length?Mm(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],kf=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=pn(Cf,n),m=l((e=>{r(e),If(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(ug,{value:i,placeholder:t?.placeholder,onChange:m}),o(ar,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),If=e=>e&&e.length>=3,Tf=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:i,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(ed,{className:uf,logo:l,data:i,showTitle:!1}),o(kf,{className:"grow",navigationItems:t,...e})]})},Rf=d((({className:e="",index:t,...n})=>{const a=fe(),{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(Oe,{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(Rf,{index:t,...e},String(t))))}):null]}))),Pf=Lt((({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:[Tf(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(nf,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(uf,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(lf,{items:s}),h?o(Ce,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(wh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(pr,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(mf,{title:m,links:r}),o(Bf,{links:l,license:p})]})})),Df=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?_f(a):null]}))),_f=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=>Ef(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:Af(e)}),c("div",{className:"text-s",children:[o(Oe,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Oe,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Ef=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Af=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(ie,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Mf=Lt((({className:e,title:t,button:n,regionSource:i,data:l,...r})=>{const[s,d]=a({key:""}),m=i?.regions??[],h=m?.find((e=>e.name===s.key))?.href;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(jn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,h?o("div",{className:"text-center",children:o(pr,{className:u("w-full @xl:w-auto"),href:h,target:"_blank",version:n?.version??"primary",data:yh(l,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})}));function Of(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>zf(t)(e)));return n.find((([,e])=>zf(t,!0)(e)))??n[n.length-1]??[]}const zf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(Vf(e)(n));return t?a===z(n):a.startsWith(z(n))},Vf=e=>t=>{const n=Z(J.SITE_URL);return A(t)?e.href:V(n,e.pathname)},Ff=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=ln(!1),h=fn(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 gn(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)})]})})),Lf=d((({isActive:e,...t})=>{const n=fe(),{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",...be(t?.data),children:a})})),$f=(e,t)=>e?.map(((e,n)=>o(Lf,{isActive:e===t,...e},e?.text??String(n)))),jf={default:"w-6 h-6",large:"w-12 h-12"},Uf=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":`${jf[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:i,"aria-label":l,onClick:c,...be(s),children:o(ie,{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"})}))),qf="chatbot",Wf="text-page__btn-chat",Hf={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Yf=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=Hf[e??""];return n=>{if(t)if("personal"!==e)_r(qf,t);else{const e=n.target;e?.classList.contains(Wf)||e?.classList.add(Wf),document.getElementById("webchat-js-container:webchat_rshb")||_r(qf,t)}}})(e);return o(Uf,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),Gf=d((({className:e="",active:t,dataItemName:n,children:a,data:i,...l})=>{const r=fe(),{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,...be(i),children:[o("span",{className:Kf(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]})})),Kf=(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"),Xf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=nm(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(Gf,{...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"},Zf=d((({version:e,text:t,mobileText:n,...a})=>{const i=Te()?n:t;return i?o(Ce,{className:u("py-s px-lg font-light whitespace-nowrap",Jf["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]=Of(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?ex(t):tx(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(Xf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Ff,{items:p,activeItem:m,ariaLabel:i}):null,E.CHAT_BOT?o(Yf,{version:t,iconVersion:d,chat:E.CHAT_BOT,ariaLabel:l}):null,o(Zf,{version:t,...n})]})})),ex=e=>t=>Math.max(t,e+1),tx=e=>t=>Math.min(t,e),nx=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(Oe,{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(ax,{...e},String(t))))})]}):null,ax=d((({icon:e,...t})=>{const n=fe(),{text:a,target:i,href:l,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ie,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:l,target:i,onClick:r,children:o(Oe,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),ix=(e,t)=>n=>n.name?o(vh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:yh(e,n.name),children:o(Oe,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,lx=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(yn,"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"})]}))),rx=d((({defaultLocation:e})=>{const t=Ng(e),n=fe(),{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(vh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),sx=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=wg(t?.default),[s,d]=a(""),m=al(),u=r((()=>cx(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,ox)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(ir,{className:"pb-20",head:c("div",{children:[o(Oe,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(rx,{defaultLocation:t?.default}),o(lx,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&pf(e.toLowerCase())(s.toLowerCase())>=.8)).map(ix(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(Oe,{size:"text-h6",children:e})}),t.map(ix(f,g))]},e)))}),nx(e)]});var g,f})),ox=e=>e.name?.charAt(0)??"",cx=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),dx=d((({className:e="",active:t,flat:n,children:a,data:i,...l})=>{const r=fe(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(mx(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...be(i),children:o("span",{suppressHydrationWarning:!0,className:ux(t,n),children:d||a})})})),mx=(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}),ux=(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"),hx=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=Ng(n?.branches?.default),r=pn(Cf,n),s=pn(sx,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(dx,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:yh(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(dx,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Uf,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),px=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=nm(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(dx,{...i,children:n})})})),gx=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?fx(t):xx(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(ed,{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(px,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Ff,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(hx,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),fx=e=>t=>Math.max(t,e+1),xx=e=>t=>Math.min(t,e),bx={"bg-white":"primary",transparent:"transparent"},yx=["all","header"],vx=Lt((({className:e,bgColor:t="bg-white",logo:n={},version:a=bx[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=wx(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=Of(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(gx,{activeTopItem:p,navigationItems:m?.filter(ef(yx)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Nx(a))}),p?.items?.length&&o(Qf,{subItems:p?.items?.filter(ef(yx)),version:a,internetBankButton:f})]})})})),Nx=e=>"transparent"===e?"opacity-30":"",wx=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Cx=(e=!1)=>e?{}:{padding:"p-0"},Sx={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},kx=Lt((({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",Sx[n],e),padding:t,version:i,isTheme:l,...s,children:P({...s,extraProps:{...Cx(a),className:Qd(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Ix=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Qm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ie,{image:a})})})),Tx=(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}]},Rx=({className:e,btnClass:t,canDec:n,canInc:a,dec:i,inc:l})=>n||a?c("div",{children:[n?o(ym,{className:u("absolute z-40",t[0],e),onClick:i}):null,a?o(vm,{className:u("absolute z-40",t[1],e),onClick:l}):null]}):null,Bx=d((({className:e="",cards:t=[],button:n})=>{const[i,r]=a(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=Tx({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?Px({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,Rx({...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(Ce,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function Px({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(ie,{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?Dx("страховая сумма",e.sum):null,e?.fee?Dx("страховой взнос",e.fee):null]}),_x(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function Dx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Oe,{size:"text-h6",children:[Ge(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Oe,{size:"text-l",color:"text-secondary-text",children:e})})]})}function _x(e){return e?o(ie,{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 Ex=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:Ax({insuranceTabs:n,button:i})})]})})),Ax=({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 Mx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Ox={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},zx=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(Vx)),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(Ae,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Vx=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Fx(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(Lx)}):null},`column_${t}`)},Fx=(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(" "),Lx=(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 ${Ox[n]} ${Mx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Oe,{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,jx=["байт","Кб","Мб","Гб","Тб","Пб"],Ux=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,...be(l),children:[e,t?c(Oe,{size:"text-l",font:"font-light",children:[t," ",qx(d,m),o(Oe,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),qx=(e,t)=>e||t?o("span",{children:", "}):"",Wx=(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))} ${jx[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Yx(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ux,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:Hx(t),data:n?.data}),o(Ae,{__html:n?.__html})]},String(a))},Hx=e=>e?o(ie,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Yx=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},Gx=d((({href:e,__html:t,target:n,onClose:a})=>c(ir,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(Ae,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(pr,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:a,children:"Я согласен"}),o(nr,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),Kx=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=pn(Gx),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:[Hx(i),o(Oe,{font:"font-light",children:e})]}):null})),Xx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Jx=Lt((({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(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),i?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Xx[r]),role:"list",children:i.map(Zx(d,l))}):null]})})),Zx=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?Qx(t)(n,a):Wx(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(Kx,{...a,icon:e,href:eb(t)?t?.href:t?.attachment?.src}),o(Ae,{__html:t?.__html})]},String(n)):null},eb=e=>"href"in e,tb=Lt((({className:e,padding:t,align:n="text-left",buttons:a=[],description:i,image:l,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=l?.src?o(ie,{className:"hidden lg:block",image:l}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:qe(a,{className:"flex-wrap"}),children:[i?o(Oe,{size:"text-xl","font-weight":"font-light",children:i}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Ae,{__html:r,itemSize:"list-m"}):null,o(Oe,{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(ie,{className:"w-fit",image:d})}):null,l?.src?o(ie,{className:"lg:hidden",image:l}):null]})]})})})),nb=(e,t)=>e&&"underlined"!==t?"primary":"secondary",ab=(e=[],t={})=>e.filter((({content:e={}})=>zm(t,e))).length,ib=(e,t)=>e===t;const lb=(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)))}(ib,((e=ib)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),rb=[],sb={},ob={primary:"bg-white/30",secondary:"bg-main-divider"},cb={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},db=d((({count:e,version:t="secondary"})=>{const n=Te(),a=n?"bg-main-divider":ob[t],i=cb[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(Oe,{size:"text-xs",color:i,children:e})})})),mb=({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(ie,{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})]})]})},ub={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},hb={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},pb={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},gb={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},fb=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",ub[a],n?gb[a]:pb[a]),"aria-label":"Список табов",onClick:i,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?hb[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[mb({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(db,{count:m,version:nb(n,a)})}):null]})})})),xb=d((e=>o(e?.item?.href?bb:yb,{...e}))),bb=d((e=>{const t=fe(),n=l((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...i}=t({...e.item,onClick:n});return o(fb,{...e,tag:"a",item:i,onClick:a})})),yb=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(fb,{item:e,onClick:a,...n})})),vb=(e,t,n)=>(a,i)=>o(xb,{isActive:a===e,onClick:t,type:n,item:a},String(i)),Nb=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(vb(a,i,t))}))),wb={categories:[],extraOptions:[],propertyType:[],stage:[]},Cb=Lt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Fm(wb,{block:i.block,page:i.options?.page}),f=l(((e=wb)=>p(e)),[]),x=(({hotFilters:e=rb,filtrationState:t=sb,blocks:n=rb,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>lb(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:ab(n,t.filter),version:nb(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(Nb,{...x}),o(Dm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(Tm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Sb="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",kb=d((({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Za,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]],[m,{toggle:u}]=ln(!1);return o("div",{children:e?.length?o("div",{children:c(Qr,{children:[c("div",{children:[o("div",{className:Sb,children:s}),o(es,{className:Sb,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[a?o(Zr,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:u}):null,c(nr,{embedded:!0,onClick:n,children:[o(Xr,{children:"Очистить фильтр"}),o(G,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),Ib=(e,t,n)=>{const a=nb("all"===t),i=nb("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(nr,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(nr,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},Tb=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Ae,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ie,{image:e.image}):null,e?.text?o(Oe,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Rb=(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(Oe,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Bb=()=>{},Pb=e=>"all"===e?"block":"hidden",Db=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Bb,renderRemoteWorkplaceCard:r=Bb,getBalloon:s=Bb,getBalloonRemoteWorkplaces:d=Bb,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=un(Cs),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=Rs({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all");return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Rb(h,N),m?Tb(m):null,p&&Ib(t,w,C),o("div",{className:u("pb-3xl",Pb(w)),children:o(kb,{filters:_b([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:Ss})})]}),o("div",{className:"h-[600px]",children:o(_s,{children:o(zr,{points:y,isLoad:n,className:"h-full"})})})]}),c(_s,{children:[b.map(l),v.map(r)]})]})})),_b=e=>Object.keys(Cs).filter((t=>e.filter((e=>ks[t](e))).length)),Eb=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Ab=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Eb(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(Oe,{size:"text-h4",children:Eb(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Oe,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(us,{color:"green",children:Eb(s)})})]}),o(ts,{children:o(Kr,{className:"flex-wrap",children:m?.map(((e,t)=>o(Wr,{...e},String(t))))})})]},String(d))},Mb=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Eb(t)} №${n}`,body:e.toUpperCase()}),Ob=[];const zb=async e=>{const t=await _t(e,{method:"GET"});return Array.isArray(t)?t:Ob},Vb={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Fb={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)},Lb=d((({descriptionData:e,className:t})=>{const n=Ng(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=Zn(`${Ht}/atms?regionCode=${e}`,zb);return{data:t||Ob,isLoad:!t&&!n}}(a);return o(Db,{className:t,filterItems:$b,data:i,isLoad:l,initFilterState:Vb,renderCard:Ab,getBalloon:Mb,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),$b=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),i=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=i.every((t=>Fb[t](e))),n=!a.length||a.some((t=>Fb[t](e)));return t&&n}))},jb=({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(Oe,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Oe,{size:"text-l",children:e})]}):null]})}),o(ts,{children:Ub(t)})]},String(n)):null,Ub=e=>c("div",{children:[c(Kr,{className:"flex",children:[o(Wr,{label:"Операции для физических лиц",children:o(Oe,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Wr,{label:"Операции для физических лиц",children:o(Oe,{children:"Оформление и обслуживание банковских карт"})}),o(Wr,{label:"Операции для физических лиц",children:o(Oe,{children:"Инвестиционное и накопительное страхование"})}),o(Wr,{label:"Операции для физических лиц",children:o(Oe,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Wr,{label:"Режим работы",className:"max-w-none",children:o(Oe,{children:e})})]}),qb=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Wb={branches:[],remoteWorkplaces:[]};const Hb=async e=>await _t(e,{method:"GET"})||Wb,Yb=d((({className:e})=>{const t=Ng(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=Zn(`${Ht}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Hb);return{data:t||Wb,isLoad:!t&&!n}}(n);return o(Db,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:vs,renderRemoteWorkplaceCard:jb,getBalloon:ws,getBalloonRemoteWorkplaces:qb,title:`Офисы филиала ${t?.name}`})})),Gb=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(Yb,{}):o(Lb,{descriptionData:e})})})),Kb=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Xb="hidden sm:flex absolute z-40 top-10",Jb=Lt((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=pm({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(et,{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(rm,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Zb({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(ym,{className:u("left-6",Xb),onClick:d.scrollLeft}):null,d.canScrollRight?o(vm,{className:u("right-6",Xb),onClick:d.scrollRight}):null]})]})})),Zb=({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))},Qb=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:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ie,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?ey({__html:l,richVersion:r}):null,ty({label:"Адрес",data:e,iconName:"GeolocationIcon"}),ty({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),ty({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?qe([a]):null]})]}))),ey=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Ae,{...e,itemSize:"list-s"})}),ty=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(G,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Oe,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Oe,{size:"text-xl",color:a,children:t})]})]}):null,ny=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Ae,{__html:t,richVersion:n})})})),ay=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",iy=Lt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:a="default",label:i,version:l,role:r,...s})=>{const d=Te(),[m,{toggle:h}]=ln(t),p=o(es,{className:u("gap-lg",ay(d)),isUnfolded:m,children:P({...s,extraProps:{className:"w-full",padding:"p-0"}})}),f="accordion"===a,x=o(Zr,{className:u(f?"text-h6 my-lg":"text-h4"),label:i,isUnfolded:m,embedded:f,onClick:h});return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Qr,{children:[n?x:p,n?p:x]})})}),{childrenTypes:{exclude:["RollupItem"]}}),ly=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(yn.split(" ").filter((e=>"rounded"!==e)),Xa,"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(Oe,{color:"text-primary-text",children:t}):null]})}))),ry=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(ly,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(ly,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),sy=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(Vn,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),oy=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(sy,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(sy,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),cy=["От 1 дня","До 365 дней"],dy=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Oe,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ua,{min:1,max:365,value:e,items:cy,onChange:t})]}))),my=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(sy,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(sy,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),uy=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(oy,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:hy(m)}),o(dy,{days:i,setDays:e=>m({days:e})}),o(my,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:py(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Oe,{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(ry,{}),o(nr,{className:"order-6",version:"primary",onClick:u,children:"Офисы на карте"})]})]}))),hy=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},py=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},gy=d((({days:e,tariffs:t=[]})=>{const n=xy(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:[fy("Аренда за",e),fy("Цена",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(G,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),fy=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Oe,{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})]}),xy=(e,t)=>{const n=by(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},by=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},yy=(e,t)=>e.find((e=>e.branchCode===t)),vy=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=yy(a,n.selectedBranch),d=Ny(s?.safeBoxCaseVolumes),m=wy(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Cy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(uy,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(gy,{days:n.days,tariffs:u})]})})),Ny=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],wy=(e,t)=>e?.find((e=>e.volume===t)),Cy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Sy=`${Ht}/safeboxes`,ky=[];const Iy=async e=>await _t(e,{method:"GET"})||ky,Ty=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=al(),p=Ry(m.selectedRegion,h),f=function(e){const{data:t}=Zn(e?`${Sy}?regionCode=${e}`:null,Iy);return t||ky}(p),x=l((e=>u((t=>({...t,...e})))),[u]),b=(y=yy(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(vy,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(zr,{points:b,className:"h-[640px]"}):null]})})),Ry=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,By=e=>e<4?"w-72":"w-52",Py={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"},Dy=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=Py,p=(e=>e?"":"opacity-0")(a),f=Te();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:qm(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(_y(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",By(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Oe,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(Ae,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ce,{className:"box-border py-s w-full mt-auto",version:i,...s,children:s?.text}):null]},String(t))}))})]}):null,qe(e)]});var x})),_y=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Ey(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Ue(a)?o(ie,{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},Ey=e=>e?"h-16 w-16":"h-24 w-24",Ay=d((()=>o("div",{className:"hidden",role:"none"}))),My="hidden sm:flex absolute z-40",Oy={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},zy=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=pm({itemCount:t?.length||0});return i((()=>Vy(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(rm,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Oy[l].item,gap:Oy[l].gap,children:t.map(vb(n,a,l))}),s.canScrollLeft?o(ym,{className:u("left-6",My,Oy[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(vm,{className:u("right-6",My,Oy[l].buttonTop),onClick:s.scrollRight}):null]})})),Vy=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Fy={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Ly=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Fy[t].wrapper,e),children:o(zy,{className:Fy[t].component,tabsType:t,...n})}):null,$y=Lt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=jy(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:b}=p,[y,v]=a(Wy(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));i((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const C=qy(x[y],y),S=l((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Ly({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Uy(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(qy)?.filter(Boolean)||[]}),jy=({__id:e,anchor:t})=>t??e??"tabs",Uy=(e,t)=>t?.length?t:e,qy=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Wy=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Hy={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Yy=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Hy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Gy=d((({className:e="",isOpen:t,onClick:n})=>o(Zr,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),Ky={Buttons:({buttons:e})=>qe(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ie,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Ae,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Oe,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Oe,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(Gy,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Xy=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 Jy({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Jy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Ky))return null;return o(Ky[n],{...t,...a})},Zy=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Xy,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Qy=(e,t)=>140*ff(e.slice(0,t).map((e=>e?.cols?.length??1))),ev=(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(Oe,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,tv=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=Tx({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(Oe,{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(-${Qy(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(Oe,{size:"text-xl",children:e.data}):null,e?.cols?ev(e.cols,i):null]},`row${t}`)))})})]},String(t))})),Rx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),nv=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(Oe,{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(tv,{rows:t.rowsData})})})]},a)}))}))),av=(e=!1)=>""+(e?"text-white":"text-secondary-text"),iv=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(Oe,{size:"text-xl",font:"font-light",color:av(t===n),children:e||t+1})},e)))}):null,t?o(Ce,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(G,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),lv=Lt((({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(iv,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(nv,{activeTabIndex:r,items:m}),o(Gy,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Oe,{size:"text-h6",children:"Данных нет"}),o(Gy,{onClick:n,isOpen:!0})]})})),rv=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(lv,{...t,onClick:n})}):null]}))),sv=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(rv,{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(ie,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Oe,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Yy,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Zy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),ov=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,Rx({...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]})})),cv=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]=Tx({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(sv,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]],[y,{toggle:v}]=ln(!1);return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?c(Qr,{children:[c(ov,{controls:p,children:[x,o(es,{isUnfolded:y,children:b})]}),o(Zr,{className:"text-h4",isUnfolded:y,onClick:v})]}):o(ov,{controls:p,children:f})})]})})),dv=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?mv():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Oe,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?uv(n):null,i?o(Ae,{richVersion:l,__html:i}):null]})]}))),mv=()=>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"}),uv=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),hv=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(Oe,{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(Oe,{size:"text-h2",children:n})}):null]}))),pv=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(hv,{prefix:t,unit:n,suffix:a})})})),gv=Lt((({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",Sx[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:i,isTheme:l,...c,children:P({...c,extraProps:{className:u("w-full",Qd(r)),...Cx(a)}})})}),{childrenTypes:[]}),fv=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",xv=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=D();return c(g,{className:e,defaultPadding:fv(e),...i,children:[o(S,{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]})})),bv={AdTile:jt,ApplicationForm:yr,ApplicationLeadForm:Gd,BankAccountFiltration:jm,BenefitsBlock:Ym,BonusBenefitsBlock:Zm,ButtonsBlock:eu,CalculatorBonus:su,CalculatorBusinessDeposit:xu,CalculatorCredit:Ao,CalculatorDeposit:Mu,CalculatorRefinancing:Uu,CardTransfer:eh,Carousel:oh,CarouselCard:uh,CarouselCatalogCard:ph,CarouselLinks:xh,CarouselRecommendationCard:kh,CarouselTariffsCard:Bh,ContactsBlock:Ph,CreditCardForm:Sp,CreditForm:Xp,DepositFiltration:tg,Depository:xg,ErrorBlock:yg,ExchangeRateTile:Xg,Footer:Pf,GracePeriod:Df,GrantSupport:Mf,Header:vx,Headline:S,HorizontalLayout:kx,ImgBlock:Ix,InsuranceAmountBlock:Ex,InvestmentInfo:zx,LinkDocs:Jx,MobileAppTile:tb,MortgageFiltration:Cb,OfficesAtmsMap:Gb,Placeholder:Kb,ProductBlock:$t,ProductGallery:Jb,RepresentativeOfficeInfo:Qb,RichTextBlock:ny,RollupItem:iy,SafeDepositRental:Ty,StepsBlock:Dy,StickyBottomMenu:Ay,TabsLayout:$y,TariffsTable:cv,TextBlock:dv,UnitBlock:pv,VerticalLayout:gv,Video:xv},yv=me((()=>{i((()=>{tn()}),[]);const e=an();gn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Zt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),vv="cookie",Nv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=ln();hf((()=>{globalThis.localStorage?.getItem(vv)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem(vv,"true"),a()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Ae,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(ar,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function wv(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}function Cv(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 Sv=()=>{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 Cv(pe.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},kv=d((()=>{const[e,{close:t}]=Sv(),n=Boolean(e.length);return wv(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",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})),Iv=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return Cv(pe.observable,"popup",{open:t,close:n}),wv(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",title:"Всплывающее окно",children:e.popup}):null})),Tv="header",Rv="footer",Bv="sticky-footer",Pv={},Dv=d((({className:e,data:t=Pv,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Vt(s,r);yv(),wg();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?.[Tv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(i?.[Tv],{...m,slotName:Tv})}):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?.[Rv],{...m,slotName:Rv})]})]}),i?.[Bv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(i?.[Bv],{...m,slotName:Bv})}):null,o(kv,{}),o(Iv,{}),o(Nv,{__html:d?.cookieContent?.__html})]})}));Object.assign(Dv,{childrenTypes:[],slots:()=>[Tv,Rv,Bv]});e.Blocks=bv,e.ContentPage=Dv,e.handlerDecorator=me,e.joinList=Bm,e.locationNavigator=Qt,e.packageVersion="0.14.762",e.projectSettings=E,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})}));
|