@redneckz/wildless-cms-uni-blocks 0.14.548 → 0.14.549
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +147 -94
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/bundle/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/bundle/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/bundle/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/bundle/components/ApplicationForm/ProductField.d.ts +2 -0
- package/bundle/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/bundle/components/ApplicationForm/{contants.d.ts → constants.d.ts} +2 -0
- package/bundle/components/ApplicationForm/getField.d.ts +0 -4
- package/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/bundle/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/bundle/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/bundle/components/CalculatorDeposit/utils.d.ts +17 -0
- package/bundle/hooks/useForm.d.ts +2 -1
- package/bundle/hooks/useRegions.d.ts +2 -1
- package/bundle/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/dist/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/dist/components/ApplicationForm/FeedbackMethodField.js +2 -2
- package/dist/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/dist/components/ApplicationForm/FeedbackTypeField.js +3 -3
- package/dist/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/dist/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/dist/components/ApplicationForm/LocalitiesField.js +24 -0
- package/dist/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/dist/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/dist/components/ApplicationForm/PartnerCommentsField.js +6 -8
- package/dist/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/dist/components/ApplicationForm/ProductField.d.ts +2 -0
- package/dist/components/ApplicationForm/ProductField.js +10 -0
- package/dist/components/ApplicationForm/ProductField.js.map +1 -0
- package/dist/components/ApplicationForm/RegionField.js +2 -2
- package/dist/components/ApplicationForm/RegionField.js.map +1 -1
- package/dist/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/dist/components/ApplicationForm/SecondaryPhoneField.js +14 -0
- package/dist/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/dist/components/ApplicationForm/ServiceDirectionField.js +2 -2
- package/dist/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/dist/components/ApplicationForm/UltraPremiumField.js +2 -2
- package/dist/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/{lib/components/ApplicationForm/contants.d.ts → dist/components/ApplicationForm/constants.d.ts} +2 -0
- package/dist/components/ApplicationForm/constants.js +34 -0
- package/dist/components/ApplicationForm/constants.js.map +1 -0
- package/dist/components/ApplicationForm/getField.d.ts +0 -4
- package/dist/components/ApplicationForm/getField.js +13 -11
- package/dist/components/ApplicationForm/getField.js.map +1 -1
- package/dist/components/ApplicationForm/getInitialFormState.js +6 -6
- package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationForm/getObjectValidator.js +3 -0
- package/dist/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/dist/components/ApplicationForm/getRegionUrl.js +6 -0
- package/dist/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/dist/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/dist/components/ApplicationForm/isRenderField.js +9 -0
- package/dist/components/ApplicationForm/isRenderField.js.map +1 -0
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/dist/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/dist/components/CalculatorDeposit/isRubles.js +5 -0
- package/dist/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/dist/components/CalculatorDeposit/utils.d.ts +17 -0
- package/dist/components/CalculatorDeposit/utils.js +32 -0
- package/dist/components/CalculatorDeposit/utils.js.map +1 -0
- package/dist/hooks/useForm.d.ts +2 -1
- package/dist/hooks/useForm.js +22 -12
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/hooks/useRegions.d.ts +2 -1
- package/dist/hooks/useRegions.js +2 -2
- package/dist/hooks/useRegions.js.map +1 -1
- package/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/dist/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/dist/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/lib/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/lib/components/ApplicationForm/FeedbackMethodField.js +1 -1
- package/lib/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/lib/components/ApplicationForm/FeedbackTypeField.js +1 -1
- package/lib/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/lib/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/lib/components/ApplicationForm/LocalitiesField.js +22 -0
- package/lib/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/lib/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/lib/components/ApplicationForm/PartnerCommentsField.js +5 -7
- package/lib/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/lib/components/ApplicationForm/ProductField.d.ts +2 -0
- package/lib/components/ApplicationForm/ProductField.js +8 -0
- package/lib/components/ApplicationForm/ProductField.js.map +1 -0
- package/lib/components/ApplicationForm/RegionField.js +2 -2
- package/lib/components/ApplicationForm/RegionField.js.map +1 -1
- package/lib/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/lib/components/ApplicationForm/SecondaryPhoneField.js +12 -0
- package/lib/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/lib/components/ApplicationForm/ServiceDirectionField.js +1 -1
- package/lib/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/lib/components/ApplicationForm/UltraPremiumField.js +1 -1
- package/lib/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/{dist/components/ApplicationForm/contants.d.ts → lib/components/ApplicationForm/constants.d.ts} +2 -0
- package/lib/components/ApplicationForm/{contants.js → constants.js} +10 -1
- package/lib/components/ApplicationForm/constants.js.map +1 -0
- package/lib/components/ApplicationForm/getField.d.ts +0 -4
- package/lib/components/ApplicationForm/getField.js +11 -8
- package/lib/components/ApplicationForm/getField.js.map +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.js +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationForm/getObjectValidator.js +3 -0
- package/lib/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/lib/components/ApplicationForm/getRegionUrl.js +3 -0
- package/lib/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/lib/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/lib/components/ApplicationForm/isRenderField.js +6 -0
- package/lib/components/ApplicationForm/isRenderField.js.map +1 -0
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/lib/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/lib/components/CalculatorDeposit/isRubles.js +2 -0
- package/lib/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/lib/components/CalculatorDeposit/utils.d.ts +17 -0
- package/lib/components/CalculatorDeposit/utils.js +25 -0
- package/lib/components/CalculatorDeposit/utils.js.map +1 -0
- package/lib/hooks/useForm.d.ts +2 -1
- package/lib/hooks/useForm.js +23 -13
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useRegions.d.ts +2 -1
- package/lib/hooks/useRegions.js +2 -2
- package/lib/hooks/useRegions.js.map +1 -1
- package/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/lib/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/lib/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +147 -94
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/mobile/bundle/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/ProductField.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/{contants.d.ts → constants.d.ts} +2 -0
- package/mobile/bundle/components/ApplicationForm/getField.d.ts +0 -4
- package/mobile/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/mobile/bundle/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/mobile/bundle/components/CalculatorDeposit/utils.d.ts +17 -0
- package/mobile/bundle/hooks/useForm.d.ts +2 -1
- package/mobile/bundle/hooks/useRegions.d.ts +2 -1
- package/mobile/bundle/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/mobile/dist/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/FeedbackMethodField.js +2 -2
- package/mobile/dist/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/FeedbackTypeField.js +3 -3
- package/mobile/dist/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/LocalitiesField.js +24 -0
- package/mobile/dist/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/PartnerCommentsField.js +6 -8
- package/mobile/dist/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ProductField.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/ProductField.js +10 -0
- package/mobile/dist/components/ApplicationForm/ProductField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/RegionField.js +2 -2
- package/mobile/dist/components/ApplicationForm/RegionField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.js +14 -0
- package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ServiceDirectionField.js +2 -2
- package/mobile/dist/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/UltraPremiumField.js +2 -2
- package/mobile/dist/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/dist/components/ApplicationForm/constants.js +34 -0
- package/mobile/dist/components/ApplicationForm/constants.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/getField.d.ts +0 -4
- package/mobile/dist/components/ApplicationForm/getField.js +13 -11
- package/mobile/dist/components/ApplicationForm/getField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js +6 -6
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getObjectValidator.js +3 -0
- package/mobile/dist/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/getRegionUrl.js +6 -0
- package/mobile/dist/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/mobile/dist/components/ApplicationForm/isRenderField.js +9 -0
- package/mobile/dist/components/ApplicationForm/isRenderField.js.map +1 -0
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/mobile/dist/components/CalculatorDeposit/isRubles.js +5 -0
- package/mobile/dist/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/utils.d.ts +17 -0
- package/mobile/dist/components/CalculatorDeposit/utils.js +32 -0
- package/mobile/dist/components/CalculatorDeposit/utils.js.map +1 -0
- package/mobile/dist/hooks/useForm.d.ts +2 -1
- package/mobile/dist/hooks/useForm.js +22 -12
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/hooks/useRegions.d.ts +2 -1
- package/mobile/dist/hooks/useRegions.js +2 -2
- package/mobile/dist/hooks/useRegions.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/mobile/lib/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/FeedbackMethodField.js +1 -1
- package/mobile/lib/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/FeedbackTypeField.js +1 -1
- package/mobile/lib/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/LocalitiesField.js +22 -0
- package/mobile/lib/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/PartnerCommentsField.js +5 -7
- package/mobile/lib/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ProductField.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/ProductField.js +8 -0
- package/mobile/lib/components/ApplicationForm/ProductField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/RegionField.js +2 -2
- package/mobile/lib/components/ApplicationForm/RegionField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.js +12 -0
- package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ServiceDirectionField.js +1 -1
- package/mobile/lib/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/UltraPremiumField.js +1 -1
- package/mobile/lib/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/lib/components/ApplicationForm/{contants.js → constants.js} +10 -1
- package/mobile/lib/components/ApplicationForm/constants.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/getField.d.ts +0 -4
- package/mobile/lib/components/ApplicationForm/getField.js +11 -8
- package/mobile/lib/components/ApplicationForm/getField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getObjectValidator.js +3 -0
- package/mobile/lib/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/getRegionUrl.js +3 -0
- package/mobile/lib/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/mobile/lib/components/ApplicationForm/isRenderField.js +6 -0
- package/mobile/lib/components/ApplicationForm/isRenderField.js.map +1 -0
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/mobile/lib/components/CalculatorDeposit/isRubles.js +2 -0
- package/mobile/lib/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/utils.d.ts +17 -0
- package/mobile/lib/components/CalculatorDeposit/utils.js +25 -0
- package/mobile/lib/components/CalculatorDeposit/utils.js.map +1 -0
- package/mobile/lib/hooks/useForm.d.ts +2 -1
- package/mobile/lib/hooks/useForm.js +23 -13
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/hooks/useRegions.d.ts +2 -1
- package/mobile/lib/hooks/useRegions.js +2 -2
- package/mobile/lib/hooks/useRegions.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +79 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +6 -2
- package/mobile/src/components/ApplicationForm/CustomFieldProps.ts +1 -0
- package/mobile/src/components/ApplicationForm/FeedbackMethodField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/FeedbackTypeField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/LocalitiesField.tsx +34 -0
- package/mobile/src/components/ApplicationForm/PartnerCommentsField.tsx +10 -9
- package/mobile/src/components/ApplicationForm/ProductField.tsx +15 -0
- package/mobile/src/components/ApplicationForm/RegionField.tsx +2 -2
- package/mobile/src/components/ApplicationForm/SecondaryPhoneField.tsx +18 -0
- package/mobile/src/components/ApplicationForm/ServiceDirectionField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/UltraPremiumField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/{contants.tsx → constants.tsx} +11 -0
- package/mobile/src/components/ApplicationForm/getField.tsx +16 -23
- package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
- package/mobile/src/components/ApplicationForm/getObjectValidator.tsx +3 -0
- package/mobile/src/components/ApplicationForm/getRegionUrl.tsx +4 -0
- package/mobile/src/components/ApplicationForm/isRenderField.tsx +15 -0
- package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +47 -71
- package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -1
- package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +14 -9
- package/mobile/src/components/CalculatorDeposit/isRubles.tsx +1 -0
- package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +5 -2
- package/mobile/src/components/CalculatorDeposit/utils.tsx +37 -0
- package/mobile/src/hooks/useForm.ts +33 -16
- package/mobile/src/hooks/useRegions.ts +3 -2
- package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
- package/mobile/src/ui-kit/Calculator/getDefaultParams.tsx +3 -3
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +79 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +34 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +6 -2
- package/src/components/ApplicationForm/CustomFieldProps.ts +1 -0
- package/src/components/ApplicationForm/FeedbackMethodField.tsx +1 -1
- package/src/components/ApplicationForm/FeedbackTypeField.tsx +1 -1
- package/src/components/ApplicationForm/LocalitiesField.tsx +34 -0
- package/src/components/ApplicationForm/PartnerCommentsField.tsx +10 -9
- package/src/components/ApplicationForm/ProductField.tsx +15 -0
- package/src/components/ApplicationForm/RegionField.tsx +2 -2
- package/src/components/ApplicationForm/SecondaryPhoneField.tsx +18 -0
- package/src/components/ApplicationForm/ServiceDirectionField.tsx +1 -1
- package/src/components/ApplicationForm/UltraPremiumField.tsx +1 -1
- package/src/components/ApplicationForm/{contants.tsx → constants.tsx} +11 -0
- package/src/components/ApplicationForm/getField.tsx +16 -23
- package/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
- package/src/components/ApplicationForm/getObjectValidator.tsx +3 -0
- package/src/components/ApplicationForm/getRegionUrl.tsx +4 -0
- package/src/components/ApplicationForm/isRenderField.tsx +15 -0
- package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +2 -0
- package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +47 -71
- package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -1
- package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +14 -9
- package/src/components/CalculatorDeposit/isRubles.tsx +1 -0
- package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +5 -2
- package/src/components/CalculatorDeposit/utils.tsx +37 -0
- package/src/hooks/useForm.ts +33 -16
- package/src/hooks/useRegions.ts +3 -2
- package/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
- package/src/ui-kit/Calculator/getDefaultParams.tsx +3 -3
- package/bundle/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/dist/components/ApplicationForm/contants.js +0 -25
- package/dist/components/ApplicationForm/contants.js.map +0 -1
- package/dist/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/dist/components/CalculatorDeposit/isNotRubles.js +0 -5
- package/dist/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/lib/components/ApplicationForm/contants.js.map +0 -1
- package/lib/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/lib/components/CalculatorDeposit/isNotRubles.js +0 -2
- package/lib/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/mobile/bundle/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/contants.d.ts +0 -5
- package/mobile/dist/components/ApplicationForm/contants.js +0 -25
- package/mobile/dist/components/ApplicationForm/contants.js.map +0 -1
- package/mobile/dist/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/mobile/dist/components/CalculatorDeposit/isNotRubles.js +0 -5
- package/mobile/dist/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/contants.d.ts +0 -5
- package/mobile/lib/components/ApplicationForm/contants.js.map +0 -1
- package/mobile/lib/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/mobile/lib/components/CalculatorDeposit/isNotRubles.js +0 -2
- package/mobile/lib/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/mobile/src/components/CalculatorDeposit/isNotRubles.tsx +0 -1
- package/src/components/CalculatorDeposit/isNotRubles.tsx +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=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:l=!0,defaultPadding:n="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&l;return o(r,{className:h("@container font-sans",{group:m},p[t],a||n,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(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={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=v[l]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:n||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[l],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:n}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),I=[];function B(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const P=[],M=(e,{key:t,ancestors:l=P,slotName:n=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||P,[r.parent,n]]:l},a)))};function V({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?M(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(l):l}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),$=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),L=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var E=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:j,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:$,hasPrefix:L});const O="/api/",F=`${O}v1/storage`,U=e=>(t,l)=>{if([!t,A(t),j(t),[z.CDN,O].some((e=>L(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`${F}/${t}/attachment`;const n=t?.startsWith("/");return $(L(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},H=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=R(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,u=U(d)($(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:K(e,s)}):o(Y,{className:e,children:c("svg",{className:h(q(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:u,xlinkHref:u})]})})})),K=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},q=e=>e?"":"w-full h-full",Y=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const l=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,l):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:l=""})=>{const n=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:l,media:a},i)=>o("source",{srcSet:J(n)(e),type:te(l),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(n)(t.src)},l):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("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,le=d((({className:e="",image:t,imageClassName:l="",...n})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...n}):o(Q,{className:e,imageClassName:l,image:t}):null)),ne={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","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},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:l})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ne[l]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=R(),{closeAll:l}=de();return e=>{const l=U(t)(e.href);return{...e,href:l,"aria-label":e.text,onClick:me(n({...e,href:l}))}};function n({href:n,target:a,onClick:i}){return r=>{i&&i(r);const s=!L(n,e||"/");n&&!s&&_(n,a)&&(l(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(n,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[n?o("div",{className:h(r,se[i]),children:n}):null,xe(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":n})},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),fe=({className:e,rounded:t,version:l})=>["inline-block",re,l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=he()({onClick:r,href:n,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:n,version:l}),children:a})));function Ne({version:e,handleClick:t,text:l="Вернуться назад",alwaysVisible:n=!1}){if(!l)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(n?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(le,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:l,ariaLabel:l,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=n(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),l=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",l),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",l)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:l})=>e?o("div",{className:h("shrink-1/2 justify-self-center",l&&ke[l],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=we(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",n||l,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("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:[u,f]}),Ie(V({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("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(le,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:l="",itemSize:n="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(l,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ve=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Re=(e,t)=>e?o(Ve,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Re(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?Be(l.icon,t):null,o("div",{children:De(l)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:l.map(((e,l)=>o(ze,{benefitsVersion:t,...e},String(l))))}):null)),_e=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),je=d((({isTabularBenefits:e,...t})=>o(e?_e:Ae,{...t}))),$e=e=>Boolean(e?.src||e?.icon),Le=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",n?"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(Ee(l))}):null,Ee=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Oe(a,r),d=Oe(i,r);return n||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:c}),appendRight:Fe({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Oe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion||l},Fe=e=>$e(e)&&o(le,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),We=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(He)}):null)),He=({label:e,amount:t,unit:l},n)=>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(Ve,{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:[Ue(2)(t)," ",l||"₽"]}):null]},String(n)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(qe)}):null)),qe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ve,{size:"text-m",font:"font-light",children:e})},String(t)),Ye={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(le,{image:y}):null,P=o(C,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:l,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Le(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(je,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ye[i]}):null,T,x?.length?o(We,{priceList:x}):null,Je(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(Ke,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return l=e,Boolean(Qe(l)&&"string"==typeof l.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var l},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(lt,e),lt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,nt=(e,t)=>et(e,{ref:({$ref:e,...l})=>nt(e?tt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:nt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>nt(e,t)))}),at=(e,t,l=[])=>{et(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)at(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)at(e[n],t,[...l,n])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>nt(e,(e=>t?.[e])),mt=(e,t)=>{const l=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?dt(e,{...t,...i}):e};function ht(e,t={}){const l=d((t=>{const l=mt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const ut=ht((({className:e,padding:t,defaultPadding:l,...n})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...n,children:o(Xe,{defaultPadding:l||"p-6xl",padding:t,className:"grow h-full",...n})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>gt(0,t?.length)),[t]),n=t?.[l];return n?o(ut,{suppressHydrationWarning:!0,...n,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:ft(e)}:{},yt=e=>e?{birthday:xt(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,l]=Tt(e.find((([e])=>e(t))));return l(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Mt(this),[()=>!0,e]])}}const Mt=e=>[...e?.parent?Mt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=Ct();if(!A(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Rt(t?.target)?.(l)}}},Rt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Dt(){return Dt._impl()}Dt._impl=()=>({forwardQuery:Vt}),Dt.setup=e=>{Dt._impl=e};const zt=e=>e,At=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=zt,format:n=zt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},_t=d((e=>{const{className:t,title:l,children:n,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(w,{headingType:"h3",title:l,className:"@xl:text-center"}):null,n]})})}));function jt({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const $t={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"},Lt={primary:h("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:h("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")},Et=d((({children:e,...t})=>{const l=e=>({...e,onClick:me(jt(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h($t[a],Lt[a]),n),type:s,role:d,onClick:m,children:e})})),Ot=d((({className:e,onClose:t})=>o("button",{className:h("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"})}))),Ft=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Ot,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),Ut=d((function({responseType:e,typeForm:t}){const l="OK"===e,n=l?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ft,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(le,{image:{icon:n,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:l?"Ваша заявка отправлена":"Не удалось отправить заявку",description:l?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Et,{type:"button",onClick:r,children:"Хорошо"})]})})})),Wt=e=>t=>l=>e(l)?[]:[t],Ht=e=>o("div",{className:"h-6",children:e?o(Ve,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Kt=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),qt="appearance-none w-5 h-5 border-solid flex-none",Yt=[{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"}],Xt=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Kt,{paths:Yt,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:h("flex items-center relative group/box",Jt(n)),onClick:s,children:[o("div",{className:h(qt,"m-0",a?"rounded-full border-2":Qt(t),!n&&t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Zt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n),"aria-label":l}),t?d:null,Gt(l)]})})})),Gt=e=>e?o("div",{className:"ml-s",children:o(Ve,{size:"text-l",font:"font-light",children:e})}):null,Jt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Zt=(e=!1)=>e?"radio":"checkbox",Qt=(e=!1)=>h("rounded border",{"bg-primary-main":e}),el=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Xt,{text:t,value:l,disabled:a,onChange:r},n),Ht(i)]})));function tl(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const ll=e=>e?o(Ve,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,nl="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",al=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=il(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[ll(d),N?o("textarea",{className:h("block resize-y min-h-24",S,T),id:h("textarea",l),name:n||l,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),il=e=>e?nl:"border-error",rl=e=>e?.text||e?.key||"";function sl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function ol(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return sl(globalThis.document,"click",l),t}const cl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,dl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:cl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:rl(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==l?.key})})]},e.key)))}):null));function ml({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})},h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=ol(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(dl,{popupRef:g,options:t,value:l,query:n,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,u]),p}const hl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:u="black",onChange:p,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=tl(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=ml({isOpen:x,options:l,value:a,query:y,onChange:p,onClose:k,iconVersion:u});return c("div",{className:h("space-y-xs",e),children:[ll(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",pl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:rl(a)||d}),ul(w,u)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(al,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),ul=(e,t)=>o(H,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),pl=(e,t,l)=>h(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),gl=()=>{},xl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=fl(t,e),c=bl(t,i,r);h.push(o("td",{children:o("div",{className:yl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},fl=(e,t)=>t&&e.toDateString()===t.toDateString(),bl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),yl=(e,t)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),vl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Nl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=gl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:vl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:xl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),wl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],kl=wl.map((e=>({key:e}))),Sl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Cl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Tl={className:"min-w-32",iconVersion:"black",isBorder:!1},Il=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=tl(!1),[p,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=ol(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(wl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:kl,yearsOptions:Sl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:C,children:[ll(t),c("div",{className:"relative",children:[Bl(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Cl,className:"-rotate-90 cursor-pointer"})}),o(hl,{onChange:v,value:{key:wl[p]},options:w,...Tl}),o(hl,{onChange:N,value:{key:String(x)},options:k,...Tl}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Cl,className:"rotate-90 cursor-pointer"})})]}),o(Nl,{today:l,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Bl=(e,t,l)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(H,{...Cl,name:"CalendarIcon"})]}),Pl=d((({className:e,label:t,error:l,...n})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Il,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),Ht(l)]}))),Ml=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:h("shrink-0 w-full",e),children:[o(al,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),Ht(a)]}))),Vl=e=>"_"===e,Rl=e=>/\d/.test(e),Dl=e=>Vl(e)||Rl(e),zl=[..."+7 (___) ___-__-__"],Al=zl.findIndex(Vl),_l=zl.map(((e,t)=>Dl(e)?zl.slice(0,t).filter(Dl).length:-1));const jl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=zl.map(((e,l)=>Rl(e)?e:t.charAt(_l[l])||e)),n=_l.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Al,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(al,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),$l=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ht(n)]}))),Ll=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(hl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Ht(l)]}))),El="Некорректно заполненное поле",Ol=Wt((e=>null!=e&&""!==e))(El),Fl=Wt((e=>e?.key&&""!==e?.key))(El),Ul=Wt((e=>"string"==typeof e&&e.length>1))(El),Wl=Wt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(El),Hl=(Kl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Wt((e=>"string"==typeof e&&Kl.test(e))))(El);var Kl;const ql=Wt((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Yl={typeForm:Ol,surname:Ul,name:Ul,region:Fl,addressBranch:Fl,phone:Hl,secondaryPhone:Hl,birthday:Ol,email:Ol,fullName:Ul,inn:Wl,partnerComments:Ol,collectionCount:Ol,comment:Ol,acquiringType:Fl,feedbackType:Fl,feedbackMethod:Fl,serviceType:Fl,serviceDirection:Fl,consentDataProcessing:ql,annualRevenue:Ol},Xl=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Yl?.[e]])))},Gl=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Jl=(e,t,l=!1)=>l?Gl(e,t):e,Zl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Ql=d((({field:e,input:t})=>o(Ll,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Zl,...Jl(e("acquiringType"),Yl.acquiringType,t?.required)}))),en=(e="")=>Boolean("trade"===e||"all"===e),tn=e=>null!=e,ln=new Map,nn=e=>Boolean(e?.every((e=>Array.isArray(e)?nn(e):!e||"string"==typeof e))),an=e=>nn(e)?e.toString():"";function rn(e,t,{fallback:l,cache:i}={}){const s=r((()=>sn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(tn))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=ln)=>l=>{const n=an(l),a=t.get(n);if(n&&tn(a))return a;const i=e(...l);return n&&tn(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function sn(e){return Array.isArray(e)?e:e instanceof Function?sn(e()):[e]}const on=[];const cn=async e=>await it(e,{method:"GET"})||on;function dn(){const{data:e}=rn("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const mn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?dn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=rn(e?`/api/v1/branches?regionCode=${e}`:null,cn);return t||on}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Ll,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Jl(e("addressBranch"),Yl.addressBranch,t?.required),isSearch:!0})})),hn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},un=(e,t,l)=>Math.max(t,Math.min(e,l));function pn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function gn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onChange:t=>{const l=pn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const xn=1,fn=100,bn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:xn),max:s=(a.length?a.length-1:fn),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=hn(e,{normalize:(e=0)=>a.length?yn(a)(e):un(e,r,s),format:Ue()}),x=i((e=>{p&&p(pn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",nl,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),gn({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),vn(n)]})})),yn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),vn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Nn=["От 1 000 ₽","До 1 000 000 000 ₽"],wn=d((({field:e})=>o(bn,{title:"Сумма, ₽",items:Nn,min:1e3,max:1e9,...e("amount")}))),kn=d((({field:e,input:t})=>o(Ml,{className:"col-span-2",...Jl(e("comment"),Yl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Sn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Cn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Tn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],In=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Bn=d((({field:e})=>o(Ll,{label:"Способ получения ответа",options:In,...Gl(e("feedbackMethod"),Yl.feedbackMethod)}))),Pn=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(Cn[0])}),[t?.value]),o(Ll,{label:"Тема",placeholder:"Выберите тему",options:Tn,...Gl(t,Yl.feedbackType)})})),Mn=d((({field:e})=>o(el,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Vn=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:h("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:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Rn=d((({field:e})=>en(e("acquiringType")?.value?.key)?o(Vn,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Dn=d((({field:e})=>{const t=e("secondaryPhone");return o($l,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Gl(t,Yl.secondaryPhone):t})})),zn=d((({field:e})=>en(e("acquiringType")?.value?.key)?o(Vn,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function An(){const{data:e}=rn("/api/v1/regions",rt);return Array.isArray(e)?e:[]}const _n=d((({field:e,input:t})=>{const l=An();return o(Ll,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Jl(e("region"),Yl.region,t?.required)})})),jn=d((({field:e,input:t})=>{const l=dn(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Ll,{label:"Регион",placeholder:"Выберите регион",options:n,...Jl(e("region"),Yl.region,t?.required)})})),$n=d((({field:e})=>o(Ll,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Cn,...Gl(e("serviceDirection"),Yl.serviceDirection)}))),Ln=["От 1 мес","До 15 лет"],En=d((({field:e})=>o(bn,{title:"Срок, месяцев",items:Ln,min:1,max:180,...e("term")}))),On=d((({field:e})=>o(Ll,{label:"Тип обслуживания",options:Sn,...Gl(e("serviceType"),Yl.serviceType)}))),Fn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(nl,qt,"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:l,name:e,checked:n,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Ve,{color:"text-primary-text",children:t}):null]})}))),Un=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Wn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Fn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Fn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Fn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Fn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Hn=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Ml,{label:"Фамилия",...Jl(e("surname"),Yl.surname,a)}),name:o(Ml,{label:"Имя",...Jl(e("name"),Yl.name,a),...i}),middleName:o(Ml,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o($l,{label:"Телефон",...Jl(e("phone"),Yl.phone,a)}),email:o(Ml,{label:"Электронная почта",...Jl(e("email"),Yl.email,a),...i}),fullName:o(Ml,{label:"ФИО",...Jl(e("fullName"),Yl.fullName,a),...i}),inn:o(Ml,{label:"ИНН",type:"number",...Jl(e("inn"),Yl.inn,a)}),comment:o(kn,{field:e,input:l}),region:r?o(jn,{field:e}):o(_n,{field:e,input:l}),addressBranch:o(mn,{field:e,input:l,isPremium:r}),birthday:o(Pl,{label:"Дата рождения",...Jl(e("birthday"),Yl.birthday,a)}),isClient:o(Mn,{field:e}),consentToReceiveMaterials:o(el,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Ml,{...Jl(e("partnerComments"),Yl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(Ml,{label:"Количество объектов инкассации",type:"number",...Jl(e("collectionCount"),Yl.collectionCount,a)}),acquiringType:o(Ql,{field:e,input:l}),onlineCheckout:o(Rn,{field:e}),posTerminal:o(zn,{field:e}),serviceType:o(On,{field:e}),term:o(En,{field:e}),amount:o(wn,{field:e}),annualRevenue:o(Ml,{label:"Годовая выручка, ₽",...Jl(e("annualRevenue"),Yl.annualRevenue,a)}),vedTypes:o(Wn,{field:e}),feedbackType:o(Pn,{field:e}),feedbackMethod:o(Bn,{field:e}),serviceDirection:o($n,{field:e}),bankEmpolee:o(Ml,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Ml,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Dn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const Kn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${en(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...Yn(c),...qn(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},qn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Yn=e=>e?{vedTypes:Object.fromEntries(Un.map((t=>[t,t===e])))}:{},Xn={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Zl[0],serviceType:Sn[0],feedbackType:Tn[0],feedbackMethod:In[0],serviceDirection:Cn[0],vedTypes:Un[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Gn=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Xn[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Sn[1]),{...l,typeForm:{key:t,text:""}}},Jn=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ve,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ve,{children:t.text})}):null]}))),Zn=(e,t)=>o(Et,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Qn=(e,t,l)=>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(Xt,{...e}),o(Jn,{link:t})]}),Ht(Gl(e,ql).error)]}):o(Jn,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Zn(l)]}),ea={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...vt(n,g),...Nt(i,g),...bt(a),...g?yt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...wt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},ta=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=Gn(f,l),[y,v]=n(""),N=i((async(e,t)=>{const n=ia(f,e),a=(i=Xl(n),e=>e&&Object.entries(i).flatMap((([t,l])=>l(e[t])))||[]);var i;if(a(e)?.length)return"Fail";const r=Kn({...e,...u}),s=await ea.send(r,"lead"===m)?"OK":"Fail";if(v(s),s){(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(Ut,{...e}),l),close:l}})({responseType:s,typeForm:l}).open()}if("OK"===s&&g){const e=Dt();kt({aspectsAttributes:g,aspects:e,ev:t})}return s}),[]),[,{field:k,onSubmit:S,reset:C}]=At(b,{onSubmit:N}),T=aa(f)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(_t,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:h(na(e.columns),"grid gap-x-m"),children:[la(e.title),(e?.inputs||[])?.map(Hn(k,l))]},`section-${t}`))),Qn(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(le,{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(le,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),la=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ve,{size:"text-h6",children:e})}):null,na=e=>2===e?"@xl:grid-cols-2":"",aa=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ia=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),ra=d((({title:e,description:t})=>{const l=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(le,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:l?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),sa=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",oa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function ca(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const da=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:ca(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:u,role:"listitem",children:d})})),ma=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],ha=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(pa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?ua(c,v):{},...N?oa(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(da,{className:h(m,a?ma[a-1]:"",{"h-full":N},t),style:w?ua(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),ua=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),pa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ga={"horizontal-list":"w-6","vertical-list":"h-6"},xa=({activeIndex:e,onClick:t,listType:l="horizontal-list"})=>(n,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?ga[l]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),fa=({activeIndex:e,onClick:t})=>(l,n)=>{const a=n===e,i=a?"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=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:l?.title}),o("div",{className:h("text-secondary-text font-light",s),children:l?.description})]},String(n))},ba=e=>e,ya=(e=ba)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),va=ya(),Na=(e=ba)=>ya((t=>-e(t))),wa=Na(),ka=e=>t=>e.scrollWidth/t,Sa=e=>(t,l)=>{e.scrollBy({left:l*ka(e)(t),behavior:"smooth"})},Ca=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[t]),[c,d]=a.length?[Na()(a),ya()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Sa(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Sa(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ta={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ia=d((({className:e="",activeIndex:t=0,dotCount:l=0,listType:n="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[u,p]=Ca({itemCount:s.length}),g=Ba(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(ha,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(fa({activeIndex:t,onClick:x}))}):l?o("div",{className:h("flex gap-xs",Ta[n],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:l}).fill(null).map(xa({activeIndex:t,onClick:x,listType:n}))}):null})),Ba=(e=!1)=>({behavior:e?"auto":"smooth"}),Pa=d((({className:e,disabled:t,...l})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...l,children:o(le,{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"})}))),Ma=d((e=>o(Pa,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Va=d((e=>o(Pa,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ra="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Da=d((({className:e,scroll:t,hasBlur:l,arrowsPadded:n,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=n&&!a;return c("div",{className:e,children:[l?za(t):null,i?o(Ma,{className:h(Aa(a),m?"left-1":"left-0"),onClick:s}):null,r?o(Va,{className:h(Aa(a),m?"right-1":"right-0"),onClick:d}):null]})})),za=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(Ra,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(Ra,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Aa=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),_a=d((({className:e,version:t,gap:l=14,padding:n=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Ca({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(ha,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:l,padding:n,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(Da,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(Ia,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),ja=({blocksToRender:e,...t})=>o(_a,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:h("relative min-w-80",sa(!0)),children:B(e,t)},String(l))})}),$a=e=>e%2!=0,La=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ea=d((({className:e="",label:t,icon:l,dataTheme:n="pc",disabled:a=!1,onClick:i})=>o(La,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ve,{size:"text-h4",children:t}),iconNode:l?o(le,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Oa=({isUnfolded:e,onToggle:t})=>o(Ea,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Fa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ua=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Wa=["ArrowDownIcon","ArrowUpIcon"],Ha="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ka=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:h("space-y-2xs",{hidden:!n.length}),children:[c("div",{className:h(Ha),children:[M(i,{...a.options,parent:l}),$a(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(Fa,{renderFoldableSection:({isUnfolded:e})=>c(Ua,{className:h(Ha),isUnfolded:e,children:[M(r,{...a.options,parent:l}),$a(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ea,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:Wa[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},qa=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[Ya(l,t),Ka({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Ya(l,t),ja({...n,blocksToRender:t})]});default:return null}})),Ya=(e,t)=>e&&!t.length?o(ra,{...e}):null,Xa=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),Ga=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Vn,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),Ja=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Xa(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Za(n)).filter(Boolean))]}),l?o("div",{children:o(Et,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),Za=e=>([t,l])=>{const n=l?.type;return"array"===n?Qa(t,e)(l):null},Qa=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ve,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(Ga,{items:n,multiple:!l?.single,...t(e)})]},e)};function ei(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ti=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,li=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ti(t[e])||ti(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ti(t[e])||ti(l[e])||ni(t[e])<=ni(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ti(t[e])||ti(l[e])||ni(t[e]?.min)>=ni(l[e]?.min)&&ni(t[e]?.min)<=ni(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ti(t[e])||ti(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ti(t[e])||ti(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),ni=e=>Number(e||0),ai=(e,{block:t,page:l,normalize:n=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=At(e),d=r((()=>ei(a,a.map((e=>dt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=zt)=>e?.filter((([,e])=>li(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ii={},ri={},si=ht((({className:e,filtrationSchema:t=ii,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=ai(ri,{block:a.block,page:a.options?.page}),d=o(hl,{className:"w-64",label:l?.title,options:oi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>oi(l).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ja,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Et,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(qa,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),oi=e=>ei(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),ci=(e=!1)=>e?"text-left":"text-center",di={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},mi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",di[l],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),hi=d((({className:e="",title:t,benefitList:l,...n})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(w,{headingType:"h3",as:"h2",className:ci(a),title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(ui)}):null]})})),ui=({label:e,description:t,__html:l,icon:n,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(mi,{className:"shrink-0",iconBgVersion:i,...n}):null,n?.src?o(le,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Ve,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),l?o(Pe,{__html:l,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),pi=(e,t,l)=>{return o(_a,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!l&&!t}),children:[t?o(Ve,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(le,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ve,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},gi=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?pi(e,0,t):null]}))),xi={start:"justify-start",center:"justify-center",end:"justify-end"},fi=d((({buttons:e,className:t="",align:l,...n})=>{const a=l&&h("flex",xi[l]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Le(e)})})),bi=d((({className:e,title:t,children:l,...n})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(w,{className:"text-center",title:t}):null,l]}))),yi="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",vi="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Ni="flex flex-col gap-y-xl min-w-60",wi=d((({value:e,fractionDigits:t,fixed:l,prefix:n,postfix:a})=>o(Ve,{size:"text-h3",children:"number"==typeof e?[n,Ue(t,{fixed:l})(e),a].filter(Boolean).join(" "):e}))),ki=d((({className:e,title:t,value:l,color:n="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Ve,{size:"text-l",font:"font-light",color:n,children:t}):null,l?o(wi,{value:l,...a}):o(Ve,{size:"text-h3",children:"-"})]}))),Si=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Ci=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Ve,{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:Ue(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl mt-5",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ti=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Ii=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Ti,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Ci,{title:e,rate:t,unit:l,fractionDigits:n,color:i,...s})}),o(ki,{className:"@xl:hidden",title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,color:i,...s}),r]}),Bi=({isShowItems:e=!0,step:t=1e3,postfix:l="₽",...n})=>o(bn,{items:e?[`От ${Ue(1)(n.min||0)} ${l}`,`До ${Ue(1)(n.max||0)} ${l}`]:[],step:t,...n}),Pi={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Mi={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Vi=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Pi.prefMonthsNum,prefTravelBonusRate:i=Pi.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Mi,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ri=ht((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=At({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=Vi(r,l);return o(bi,{className:e,title:t,...i,children:c("section",{className:h(yi,e),children:[c("div",{className:vi,children:[Bi({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Bi({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Ii({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Ni,children:[x>=0?o(ki,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Le(n,{isVertical:!0}),Si(a)]})]})})})),Di=Math.round(29.5),zi=(e,t=0)=>e?.sum?e.sum:t,Ai=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,_i=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ji={horizontal:"gap-5xl",vertical:"flex-col gap-s"},$i=d((({items:e,checkedItem:t,className:l,onChange:n,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${ji[i]}`,l),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:l})=>o(Xt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e),disabled:a},String(e))))}))),Li=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ve,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":l,children:o(Ve,{color:"text-secondary-text",font:"font-light",children:l})}):null,o($i,{orientation:n,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Ei=e=>Li({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Oi=" (c капитализацией)",Fi=({income:e,finalSum:t,postfix:l="₽",buttons:n=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Ni,children:[o(ki,{title:`Доход в конце срока${i?Oi:""}`,value:e,postfix:l,prefix:"+"}),o(ki,{title:`Сумма в конце срока${i?Oi:""}`,value:t,postfix:l}),Le(n,{isVertical:!0}),a?.map(Si)]}),Ui=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Wi([e,t],n),Wi=([e,t],l=[])=>({[e]:l.length?wa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?va(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Hi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ki={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const qi={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Yi=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?Ki[e?.rateType]:"",{data:l}=rn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...qi,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&Xi(s,e)&&Hi(n,["minSum","maxSum"],e)&&Hi(l,["minDays","maxDays"],e)))||qi,{rate:m}=d,h=Gi(m,e),u=n+h,p=c||[qi];return{...d,...Wi(["minSum","maxSum"],p),...Wi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Xi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Gi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Ji=ht((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=At({moneyValue:zi(r,1e5),daysValue:Ai(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Yi(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(bi,{className:e,title:t,...d,children:c("section",{className:h(yi,e),children:[c("div",{className:vi,children:[Bi({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(bn,{items:[`От ${_i(v.min||0)}`,`До ${_i(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Zi(p,u),Ei({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Ii({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Fi({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),Zi=(e,t)=>c("div",{className:"space-y-s",children:[o(Ve,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Xt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Xt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Qi=e=>er([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e),er=(e,t)=>{if(!t?.length)return;const l=t?.reduce(((t,l)=>e[0](l.rate,t[0].rate)?[l]:l.rate===t[0].rate?[...t,l]:t),[t[0]]);return l.length>1?l.reduce(((t,l)=>e[1](l,t)?l:t),l[0]):l[0]},tr=({min:e=0,max:t=0,availableMonths:l,...n})=>o(bn,{items:[`От ${lr(e)}`,`До ${lr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),lr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,nr=e=>Li({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ar=({field:e,defParams:t,calcParams:l,map:n,monthsValue:a="maxMonths"})=>{Object.entries(n).forEach((([l,n])=>{e?.(l)?.onChange?.(t?.[n])})),e?.("monthsValue")?.onChange?.(un(t?.[a],l.minMonths,l.maxMonths))},ir=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},rr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},sr=e=>or({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&or({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&or({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&or({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),or=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],cr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[rr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>sr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Ui(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Ui(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>sr({row:e,userInputParams:t,paramsViewSettings:l})&&Hi(n,["minSum","maxSum"],e)&&Hi(a,["minMonths","maxMonths"],e)))||rr)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=ir(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},dr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),mr={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},hr=ht((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=l?.rateRows,er([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=At({moneyValue:zi(s,2e5),monthsValue:Ai(s,Di),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=cr(p,l,r),f=nr({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(un(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(un(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!dr(s)&&m&&ar({field:g,defParams:m,calcParams:x,map:mr,monthsValue:"minMonths"})}),[l,s]),o(bi,{className:e,title:t,...d,children:c("section",{className:h(yi,e),children:[c("div",{className:vi,children:[Bi({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),tr({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),ur({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Ni,"@4xl:w-1/2"),children:[o(ki,{title:"Полная стоимость кредита",value:l?.totalLoanCost}),o(ki,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(ki,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Le(n,{isVertical:!0}),Si(i)]})]})})})),ur=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Xt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Xt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),pr=(e="rub")=>"rub"!==e,gr=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},xr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},fr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.[0]?vr(t[0].minMonths,t[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=!l?.isShowReplenish,c=!l?.isShowWithdrawn,d=t?.find((t=>yr({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o})&&yr({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c})&&yr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&yr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&Hi(n,["minSum","maxSum"],t)&&Hi(a||i,["minMonths","maxMonths"],t)))||xr,{rate:m}=d,h=br(m,e),u=n+h,p=t||[xr];return{...d,...Wi(["minSum","maxSum"],p),...Wi(["minMonths","maxMonths"],p),availableMonths:gr(p.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:h,finalSum:u}},br=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},yr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],vr=(e,t)=>e+Math.round((t-e)/2),Nr=(e,t)=>{const l="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Li({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:l}):null,e.isShowWithdrawn?Li({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:l}):null]}),wr(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Ei({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(n={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Li({...n,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]})]});var n},wr=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,kr={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Sr={text:"₽",key:"rub"},Cr=ht((({className:e,title:t,calcSource:l,buttons:i=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=l??{},p=u?.map((e=>e.currency))??[Sr],[g,{field:x}]=At({moneyValue:zi(d,2e4),monthsValue:Ai(d),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),currency:Sr}),f=x?.("currency")?.value,{onChange:b}=x("monthsValue"),{onChange:y}=x("moneyValue"),v=Pr(u,f),[N,w]=n(Qi(u?.[0]?.rates)),k=fr(g,Pr(u,f),s);a((()=>{p?.[0]&&x?.("currency")?.onChange?.(p?.[0])}),[l]);const S=()=>{ar({field:x,defParams:N,calcParams:k,monthsValue:"minMonths",map:kr})},{defaultMonth:C,rate:T,income:I,finalSum:B,type:P=""}=k;a((()=>{w(Qi(v))}),[f,u]),a((()=>{!g.monthsValue&&b&&b(C)}),[C]),a((()=>{y&&y(un(g.moneyValue,k.minSum,k.maxSum))}),[k.minSum,k.maxSum,v]),a((()=>{!dr(d)&&N&&S()}),[N,d]),a((()=>{y?.(un(g.moneyValue,k.minSum,k.maxSum)),pr(f?.key)&&(x?.("isReplenish")?.onChange?.(!1),x?.("isWithdrawn")?.onChange?.(!1))}),[f]),a((()=>{!dr(d)&&N&&S()}),[d,v,N]);const M=T===N?.rate;return o(bi,{className:e,title:t,...m,children:c("section",{className:h(yi,e),children:[c("div",{className:vi,children:[c("div",{className:"flex gap-m",children:[Bi({className:"w-full",title:`Сумма, ${f?.text}`,min:k.minSum,max:k.maxSum,...x("moneyValue"),value:k.moneyValue,postfix:f?.text,step:Tr(f?.key)}),u&&u?.length>1?o(Ll,{label:"Валюта",options:p,...x("currency")}):null]}),tr({title:"Срок, месяцев",min:k.minMonths,max:k.maxMonths,availableMonths:k.availableMonths,...x("monthsValue"),value:k.monthsValue}),Nr({...k,...s},x)]}),Ii({rate:T,children:Br(S,M)}),Fi({income:I,finalSum:B,buttons:[...i,Ir(l?.buttons,P)],footnotes:[r],postfix:f?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Tr=(e="")=>pr(e)?100:1e3,Ir=(e=[],t="")=>{const{type:l,...n}=e.find((e=>e.type===t))??{};return n},Br=(e,t=!1)=>t?null:o(Et,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Pr=(e,t)=>{const{rates:l}=e?.find((e=>e?.currency.key===t?.key))??{};return l??e?.[0]?.rates},Mr=e=>Vr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Vr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Vr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Rr={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Dr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Rr],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Mr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Ui(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ui(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Mr({row:e,userInputParams:t,paramsViewSettings:l})&&Hi(n+r,["minSum","maxSum"],e)&&Hi(i,["minSumOld","maxSumOld"],e)&&Hi(r,["minSumExtra","maxSumExtra"],e)&&Hi(a,["minMonths","maxMonths"],e)))||Rr)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=ir(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},zr=ht((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=At({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Dr(s,l,i),u=nr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(bi,{className:e,title:t,...r,children:c("section",{className:h(yi,e),children:[c("div",{className:vi,children:[Bi({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Bi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),tr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Ar({...m,...i},d),m.isExtraMoney?Bi({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:u})]}),c("div",{className:h(Ni,"@4xl:w-1/2"),children:[o(ki,{title:"Полная стоимость кредита",value:l?.totalLoanCost}),o(ki,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(ki,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(ki,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Le(n,{isVertical:!0}),Si(a)]})]})})})),Ar=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Xt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),_r=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=hn(e,{normalize:(e=a)=>l&&n?String(un(Number(jr(e)),l,n)):jr(e),format:Ue(r)}),d=i((e=>t&&t(jr(e))),[t]);return o(al,{onChange:d,...s,...c})})),jr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),$r=d((e=>o(_r,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ve,{size:"text-xl",font:"font-light",children:"₽"})})}))),Lr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Er={amount:1500},Or=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=At(Er),[u,p]=n(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Lr[r],children:[o($r,{valid:!u,label:l,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Et,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),Fr=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("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(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ur="relative h-full",Wr={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Hr=({noCardBorder:e,cardSize:t="normal",isNavButtons:l=!1,...n})=>{const{blocks:a}=n.block||{},i=a?.some(Yr),r=l?{defaultPadding:"p-6xl pb-m"}:{};return V({...n,renderProps:(l,n,a)=>c("div",{className:Kr(l,{someCardsHighlighted:i}),children:[B(l,n,{className:qr(l,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Yr(l)?Fr({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Kr=(e,{someCardsHighlighted:t})=>h(Ur,t&&(Yr(e)?"pt-3xl":"pt-3xl sm:pt-16")),qr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>h(Ur,"min-w-80",Wr[n],t&&(Yr(e)?"pt-3xl sm:pt-16":"pt-3xl"),sa(l),l&&"h-full"),Yr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Xr=ht((({className:e,visibleItemCount:t=0,noCardBorder:l,arrowsPadded:n=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(_a,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:n,navButtons:r?Gr(s?.block?.blocks):[],hasBlur:!0,children:Hr({noCardBorder:l,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Gr=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Jr="z-10 border border-solid w-full h-full",Zr=h(Jr,"absolute hidden @xl:block border-transparent"),Qr=d((({className:e,title:t,description:l,button:n,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Zr,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Zr,"top-6 right-8 bg-green")}),o("div",{className:h(Zr,"top-3 right-4 bg-green-light")}),c("div",{className:h(Jr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Le([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),es={black:"bg-black",white:"bg-white"},ts=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(le,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Le([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ve,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ls)]}):null,a?c(Ve,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),ls=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${es[e]}`},String(t)),ns=d((({icon:e,...t})=>{const l=he(),{text:n,href:a,target:i,onClick:r}=l(t);return n?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(le,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:n}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:n})]})})}):null})),as=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?is(n):null]})}))),is=e=>o("div",{className:h("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(ns,{...e},String(t))))}),rs=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),ss=d((({className:e="",href:t,target:l,onClick:n,data:a,children:i})=>{const r=he()({href:t,target:l,onClick:n});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),os=[{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"}}],cs=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>os.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(n)?n:r,c=l?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!l&&!s},ds(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Le(m,{className:ms(s??!1,a??!1,l),buttonClassName:u})}),r?o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ds=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ms=(e,t,l=!1)=>h(e||t?"basis-full":"",!t||l&&e?"":"flex-nowrap"),hs=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(ss,{href:a,target:m,className:"h-full",data:rs(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:l,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge($e(i)?o(le,{image:i}):null,f),buttons:d.length?o(cs,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(je,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,us(n,p)]})})}))),us=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ps=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Ve,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ve,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Le(a)}):null]},String(t))},gs=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(ps),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=n(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[$e(i)?o("div",{className:"self-center",children:o(le,{image:i})}):null,t?o(w,{className:h("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Fa,{renderFoldableSection:()=>c("div",{children:[f,o(Ua,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?xs(y,m?.parent,u):null}):o("div",{children:f})]})})),xs=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&ce.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),fs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,bs=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),ys=1e9,vs={sum:{min:1e4,max:ys},period:3},Ns=ht((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=ai(vs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:ws(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=ks(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ja,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o($r,{label:n?.title,min:500,max:ys,...d("sum",{parse:e=>({min:Number(e),max:ys}),format:({min:e})=>String(e)})}),o(bn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(qa,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ws=e=>st((e?.paramsSource?.rateRows||[]).filter(fs).flatMap((e=>bs(e.minMonths,e.maxMonths)))),ks=e=>st(e.flatMap((e=>e||[])).filter(fs).flatMap((e=>bs(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Ss=[{key:"10"},{key:"50"},{key:"100"}],Cs=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(hl,{className:"min-w-20",onChange:l,value:{key:String(e)},options:Ss,iconVersion:"black"})]})},Ts="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",Is=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,l)=>t<=2&&e<=t+2||t>=l-1&&e>=l-3)(e,t,l))(i,l,a)?o("div",{onClick:()=>n(i),className:Ts,"aria-label":`Страница ${i}`,children:i},String(t)):null},Bs={width:"24",height:"24"},Ps=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>Array.from({length:l}).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l&&t(e+1)}),[e,l]),d=i((()=>t(1)),[]),m=i((()=>t(l)),[l]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ms(1===e),...Bs})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Ts,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,n.map(Is),e<l-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<l?o("div",{onClick:m,className:Ts,"aria-label":`Страница ${l}`,children:l}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ms(e===l),...Bs})})]})},Ms=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Vs=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Ps,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?o(Cs,{itemCount:n,onItemCountChange:a}):null]}),Rs=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(le,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",nl),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),Ds=d((({field:e,onClearFilter:t,filtrationState:l})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Rs,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Il,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:l.endDate,...e("startDate")}),o(Il,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:l.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Et,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),zs=(e,t)=>o(mi,{...e,iconBgVersion:t,className:"shrink-0"}),As=({title:e,timestamp:t,publicId:l})=>{const n=he(),{href:a}=n({href:`/api/v1/depository/${l}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[zs({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ve,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},l)},_s="/api/v1/depository",js={startDate:void 0,endDate:void 0,query:""},$s=ht((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[d,{field:m,reset:u}]=At(js),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?xt(n,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(_s);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=rn(_s+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Ds,{filtrationState:d,field:m,onClearFilter:u}),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(Ve,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ve,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(As,{...e},String(e.publicId)))):o(ra,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Vs,{currentPage:l+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Ls=e=>"Image"===e?.contentType&&e?.image?o(le,{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,Es=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Ls(n)}),o(C,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Os="location";function Fs(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(ce,"location",Ws()??{name:e}),r=i((e=>{Hs(e),l(e)}),[]),{data:s}=rn(Us()?null:"/api/v1/region",rt);return a((()=>{s&&!Us()&&l(s)}),[s]),[t??{name:e},r]}const Us=()=>Boolean(globalThis.localStorage?.getItem(Os)),Ws=()=>{try{const e=globalThis.localStorage?.getItem(Os);return e&&JSON.parse(e)}catch(e){return null}},Hs=e=>{try{globalThis.localStorage?.setItem(Os,JSON.stringify(e))}catch(e){}};var Ks;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ks||(Ks={}));const qs=new Intl.NumberFormat("ru",{style:"currency",currency:Ks.RUB}),Ys=e=>e?qs.format(e):"",Xs="text-m font-light text-secondary-text ",Gs=`${Xs} text-left`,Js=`${Xs} pl-5xl text-center`,Zs=`${Xs} pl-5xl text-right`,Qs={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},eo=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Gs,children:o(Ve,{size:"text-m",children:"Валюта"})}),o("th",{className:Js,children:o(Ve,{size:"text-m",children:"Купить"})}),o("th",{className:Zs,children:o(Ve,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(to)})]}))),to=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(le,{image:{icon:Qs[t]},width:"24",height:"24"}):null,o(Ve,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ve,{size:"text-h6",children:Ys(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ve,{size:"text-h6",children:Ys(e?.buyExchangeRate)})})]},t)},lo={icon:"GpsIcon"},no=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(mi,{...lo,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),ao=(e,t,l)=>{const n=Number(io(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},io=e=>e.replace(/[^\d.,]/g,"").replace(",","."),ro=e=>Bt([[e=>e.value!==Ks.RUB&&e.oppositeValue!==Ks.RUB,()=>e.handleConvert(e.value,Ks.RUB)],[e=>e.value===Ks.RUB&&e.oppositeValue===Ks.RUB,()=>e.handleConvert(e.value,Ks.USD)],[e=>e.value===Ks.RUB&&e.oppositeValue===Ks.RUB,()=>e.handleConvert(e.value,Ks.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function so(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(al,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(hl,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const oo=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ks.RUB,selectBuy:l?.[0]?.currency?.currency||Ks.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&l?c("div",{className:"grid gap-m",children:[so({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:co(r,d,l),value:r.inputSell,setValue:e=>ho(d,l)(e,r.selectSell,r.selectBuy)}),so({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:mo(r,d,t),value:r.inputBuy,setValue:e=>uo(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),co=(e,t,l)=>n=>{t({selectSell:n}),ro({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{ho(t,l)(e.inputSell,n,a)}})},mo=(e,t,l)=>n=>{t({selectBuy:n}),ro({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>uo(t,l)(e.inputBuy,n,a)})},ho=(e,t)=>(l,n,a)=>{e({inputSell:io(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(ao(l,i,n===Ks.RUB)||"")})},uo=(e,t)=>(l,n,a)=>{e({inputBuy:io(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(ao(l,i,n===Ks.RUB)||"")})};const po=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Fs(),i=function(e){const t=e?.code||"000",{data:l}=rn(`/api/v1/exchangerates?regionCode=${t}`,rt);return l||{}}(a),r=go(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ks.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Ks.RUB}}),o(g,{className:h("box-border min-h-80",e),...n,children:o(Ce,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(eo,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(no,{address:i?.address})]}),o(oo,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l})]})})})})),go=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],xo=d((({className:e="",items:t})=>{const l=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(fo(l))})})),fo=e=>({dataFooter:t,...l},n)=>{const{text:a,href:i,target:r,onClick:s}=e(l);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(n)):null},bo=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(La,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[zs(a,t),e?o(Ve,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(H,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),yo=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",vo=(e=!1)=>e?"MinusIcon":"PlusIcon",No=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",wo=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Fa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ua,{className:h("gap-lg",yo(m)),isUnfolded:e,children:V({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ko({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),ko=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?No(e):vo(e))(a,r);return"accordion"===e?o(bo,{label:s,labelIcon:l,labelIconBgVersion:n,icon:c,onToggle:i}):o(Ea,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},So=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Co(e)}))),Co=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(wo,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(xo,{items:e.items}):null},String(t)))),To=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(Io)}):null)),Io=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ve,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Bo)})]},String(t)),Bo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Po(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Po=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Mo(t)}`,children:o(Ve,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Mo=e=>e.replaceAll(/\D/g,""),Vo=d((({className:e="",index:t,text:l,...n})=>{const a=he(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Ro=d((({className:e="",title:t,links:l})=>o("div",{className:e,children:l?.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(Ve,{size:"text-l",font:"font-normal",children:t})}),l.map(((e,t)=>o(Vo,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Do=d((({className:e="",index:t,...l})=>{const n=he(),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),zo=d((({className:e="",links:t,license:l})=>c("div",{className:h("@container space-y-lg",e),children:[l?o("div",{children:o(Ve,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Do,{index:t,...e},String(t))))}):null]}))),Ao=ht((({className:e,footer:t,...l})=>{const{navigationItems:n}=l.options?.page?.navigation??{};l.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...l,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(So,{navigationItems:n}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(To,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(cs,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Ro,{title:d,links:i}),o(zo,{links:a,license:u})]})})),_o=ht((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:l?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=l?.text?l.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Ll,{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(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:rs(i,s?.key),children:x})}):null]})})})),jo={width:"34",height:"34"},$o={"bg-white":"color",transparent:"white"},Lo={"bg-white":"text-primary-main",transparent:"text-white"},Eo=(e,t,l)=>o(le,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:$o[e]},className:Lo[e],width:l?.width,height:l?.height}),Oo={"bg-white":"text-primary-text",transparent:"text-white"},Fo=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:l?.href??t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...ue(s),children:[Eo(i,l?.image,jo),r?n??o("div",{className:"ml-s",children:o(Ve,{font:"font-medium",color:Oo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Uo={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"},Wo=d((({version:e,text:t,mobileText:l,...n})=>{const a=we()?l:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",Uo["transparent"===e?"transparent":"default"]),...n,children:a}):null})),Ho=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankButton:n,version:a,backwardButton:r})=>{const s=R(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[l||d?o("div",{children:o(Fo,{className:"my-2xs",bgColor:e,logo:u,data:h})}):Ko(p,r),o(Wo,{version:a,...n})]})})),Ko=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(H,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,qo={"bg-white":"primary",transparent:"transparent"},Yo=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=qo[e],portal:n,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=n||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:l,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Ho,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:l,backwardButton:r,...i})})})})),Xo=(e=!1)=>e?{}:{padding:"p-0"},Go={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Jo=ht((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",Go[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:h("w-full",sa(r)),...Xo(n)}})})}),{childrenTypes:[]}),Zo=ht((e=>o(Jo,{...e})),{childrenTypes:[]}),Qo=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?h("flex",xi[l]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(le,{image:n})})})),ec=["байт","Кб","Мб","Гб","Тб","Пб"],tc=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...ue(i),children:[e,t?c(Ve,{size:"text-l",font:"font-light",children:[t," ",lc(d,m),o(Ve,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),lc=(e,t)=>e||t?o("span",{children:", "}):"",nc=(e,t)=>(l,n)=>{const a=U(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${ec[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?ic(a):l?.fileFormat;return c("div",{role:"listitem",children:[o(tc,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:ac(t),data:l?.data}),o(Pe,{__html:l?.__html})]},String(n))},ac=e=>e?o(le,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,ic=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},rc=d((({href:e,__html:t,target:l})=>{const{close:n}=de(),a=R(),r=U(a)(e),s=i((()=>{n()}),[]);return c(Ft,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:l,href:r,onClick:s}),o(Et,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),sc=d((({text:e,href:t,target:l,__html:n})=>{if(!e&&!n)return null;const a=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(rc,{...e}),l),close:l}})({__html:n,href:t,target:l}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),oc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},cc=ht((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",oc[r]),role:"list",children:a.map(dc(d,i))}):null]})})),dc=(e,t)=>(l,n)=>{const a=l?.docType;return""===a?null:"reportSource"in l&&l?.reportSource?.__html?mc(l,n):nc(e,t)(l,n)},mc=(e,t)=>{const l={text:e.text,target:e.target,__html:e.reportSource?.__html};return e.reportSource?.__html&&e.text?c("div",{role:"listitem",children:[o(sc,{...l,href:hc(e)?e?.href:e?.attachment?.src}),o(Pe,{__html:e?.__html})]},String(t)):null},hc=e=>"href"in e,uc=ht((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(le,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",l)}),rightImage:b,buttons:Le(n,{className:"flex-wrap"}),children:[a?o(Ve,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Ve,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(le,{className:"w-fit",image:d})}):null,i?.src?o(le,{className:"lg:hidden",image:i}):null]})]})})})),pc=(e,t)=>e&&"underlined"!==t?"primary":"secondary",gc=(e=[],t={})=>e.filter((({content:e={}})=>li(t,e))).length,xc=(e,t)=>e===t;const fc=(bc=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(xc,((e=xc)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>bc(l,t[e])))));var bc;const yc=[],vc={},Nc={primary:"bg-white/30",secondary:"bg-main-divider"},wc={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},kc=d((({count:e,version:t="secondary"})=>{const l=we(),n=l?"bg-main-divider":Nc[t],a=wc[t][l?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",n),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ve,{size:"text-xs",color:a,children:e})})})),Sc=({text:e,description:t,icon:l,isActive:n,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(n);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[l?o(le,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Cc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Tc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Ic={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Bc={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Pc=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",Cc[n],l?Bc[n]:Ic[n]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Tc[n]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Sc({text:r,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(kc,{count:m,version:pc(l,n)})}):null]})})})),Mc=d((e=>o(e?.item?.href?Vc:Rc,{...e}))),Vc=d((e=>{const t=he(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(Pc,{...e,tag:"a",item:a,onClick:n})})),Rc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(Pc,{item:e,onClick:n,...l})})),Dc=(e,t,l)=>(n,a)=>o(Mc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),zc=d((({className:e,tabsType:t="default",items:l=[],activeItem:n,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:l.map(Dc(n,a,t))}))),Ac={categories:[],extraOptions:[],propertyType:[],stage:[]},_c=ht((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=ai(Ac,{block:a.block,page:a.options?.page}),x=i(((e=Ac)=>p(e)),[]),f=(({hotFilters:e=yc,filtrationState:t=vc,blocks:l=yc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>fc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:gc(l,t.filter),version:pc(t===e[a])})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(zc,{...f}),o(Ja,{filtrationSchema:l,resetButton:n,field:m,reset:u}),o(qa,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),jc=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),$c=d((({children:e})=>jc?e:null)),Lc=d((({color:e="text-primary-main",position:t="absolute"})=>o("div",{className:h("flex justify-center items-center h-full w-full backdrop-blur-sm z-50",t),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),Ec="/icons/MapMarkerClusterIcon.svg",Oc="/icons/MapMarkerClusterYellowIcon.svg";function Fc({yandexMaps:e,map:t,points:l,isLoad:n}){if(n||!l?.length)return;t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Uc("offices",e,a);if(l.length&&l.every((e=>"type"in e))){const n=Uc("workplaces",e,a),r=Wc(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Wc(l.filter((e=>"offices"===e.type)),"offices",e);i.add(s),n.add(r),t.geoObjects.add(n),t.geoObjects.add(i)}else{const n=Wc(l,"offices",e);i.add(n),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Uc=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Ec:Oc,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Wc=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Ec:Oc,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Hc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Kc={...Hc,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},qc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Kc).join(" ")} ${l}`,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"})}),Yc=e=>globalThis[e];function Xc(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=Yc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(Yc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(Yc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const Gc={...Hc,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Jc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Gc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:l,width:"20",height:"16"})})})),Zc=[55.753995,37.614069],Qc=d((({points:e,className:t="",zoom:l=5,isLoad:n})=>{const i=s(null),r=Xc("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?(Fc({yandexMaps:r,map:i.current,points:e,isLoad:n}),i.current.setCenter(ed(e))):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:ed(e),zoom:l,controls:[],suppressMapOpenBlock:!0})),Fc({yandexMaps:r,map:i.current,points:e,isLoad:n})}))}),[r,e,l,n]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[n?o(Lc,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Jc,{yandexMaps:i}),o(Jc,{yandexMaps:i,direction:"out"})]}),qc(i,r,h("right-2 top-80",d))]})})),ed=e=>{const t=[ld(td(e,0)),ld(td(e,1))];return t.every((e=>e))?t:Zc},td=(e,t)=>e.map((e=>e.coords?.[t])),ld=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,nd=({__html:e,list:t,richVersion:l})=>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(Pe,{__html:e,richVersion:l})}):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(le,{image:e.image}):null,e?.text?o(Ve,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,ad={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},id="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",rd=(e,{field:t,reset:l},n)=>{const a=n?5:6,i=(e||[]).map((e=>o(Xt,{text:ad[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(Fa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:id,children:r}),o(Ua,{className:id,isUnfolded:e,children:s})]}),renderFoldButton:sd(l,n)})}):null})},sd=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(H,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:od()})]}),od=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(H,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),cd=()=>{},dd=()=>[],md=e=>"all"===e?"block":"hidden",hd=d((({className:e,data:t=[],isLoad:l,remoteWorkplaces:a=[],renderCard:i=cd,renderRemoteWorkplaceCard:s=cd,filterItems:d=dd,getBalloon:m=cd,getBalloonRemoteWorkplaces:u=cd,initFilterState:p={},descriptionData:g,title:x})=>{const f=x?.includes("Офис"),[b,{field:y,reset:v}]=At(p),[N,w,k,S]=r((()=>{const e=d(t,b),l=d(a,b),n=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m(e)}))),...l.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:u({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,n,l,e.length+l?.length]}),[t,a,b]),[C,T]=n("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[ud(x,S),g?nd(g):null,f&&pd(t,C,T),o("div",{className:h("pb-3xl",md(C)),children:rd(Object.keys(p),{field:y,reset:v},f)})]}),o("div",{className:"h-[600px]",children:o($c,{children:o(Qc,{points:w,isLoad:l,className:"h-full"})})})]}),c($c,{children:[N.map(i),k.map(s)]})]})})),ud=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ve,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),pd=(e,t,l)=>{const n=pc("all"===t),a=pc("business"===t),i=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Et,{"data-id":"all",onClick:t=>i(t,"all",e),version:n,children:"Для физических лиц"}),o(Et,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},gd={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"}},xd=d((({className:e,children:t,color:l="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",gd[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(le,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ve,{size:"text-m",color:gd[l].text,children:t})]}))),fd=d((({value:e,subText:t,children:l,isPhone:n,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,l,t].every((e=>!e))?null:bd({textItems:i,subText:t,children:l,isPhone:n,...a})})),bd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ve,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||yd(l,s),a?o(Ve,{color:n,size:"text-m",children:a}):null]}),yd=(e,t)=>e.filter(Boolean).map(((e,l)=>o(Ve,{size:"text-l",children:t?o("a",{href:`tel:${vd(e)}`,children:e.trim()}):e.trim()},String(l)))),vd=e=>e.replace(/\D/g,""),Nd=d((({className:e,children:t})=>o("div",{className:h("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}))),wd=["ArrowDownIcon","ArrowUpIcon"],kd=["Подробнее","Скрыть"],Sd=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:kd[Number(e)]}),o(H,{className:"text-primary-text",name:wd[Number(e)],width:"16",height:"16"})]}),Cd=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Bd(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ve,{size:"text-h4",children:Bd(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ve,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(xd,{color:"green",children:Bd(s)})})]}),o("div",{className:"hidden sm:block",children:o(Nd,{className:"flex-wrap",children:m?.map(Id)})}),o(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ua,{isUnfolded:e,children:o(Nd,{className:"flex-wrap",children:m?.map(Id)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Sd({isUnfolded:e,onToggle:t})})]},String(d))},Td=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Bd(t)} №${l}`,body:e.toUpperCase()}),Id=(e,t)=>o(fd,{...e},String(t)),Bd=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Pd=[];const Md=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:Pd},Vd={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Rd={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)},Dd=d((({descriptionData:e,className:t})=>{const[l]=Fs(),n=l?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:l}=rn(`/api/v1/atms?regionCode=${e}`,Md);return{data:t||Pd,isLoad:!t&&!l}}(n);return o(hd,{className:t,filterItems:zd,data:a,isLoad:i,initFilterState:Vd,renderCard:Cd,getBalloon:Td,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),zd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Rd[t](e))),l=!n.length||n.some((t=>Rd[t](e)));return t&&l}))},Ad=e=>{const t=jd(e);return o(fd,{label:"Режим работы",value:t,className:"max-w-none"})},_d=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",jd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[_d({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),_d({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},$d=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ld=e=>$d.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Ed=e=>{if(!e)return null;const t=Od(e);return c(Nd,{className:"border-none",children:[o(fd,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Fd)})}),o(fd,{label:"Режим работы",className:"max-w-none",children:o(Ve,{children:e})})]})},Od=e=>{const t=$d.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Fd=({short:e,status:t},l)=>o("div",{className:h("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(Ve,{size:"text-xs",children:e})},String(l)),Ud=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(fd,{label:"Валюта",value:e.currency}):null,t?o(fd,{label:"Купить",value:String(t)}):null,l?o(fd,{label:"Продать",value:String(l)}):null]},String(n)),Wd=(new Date).getDay(),Hd=e=>{const[t]=e?.slice(Wd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(xd,{color:"green",children:a}):null,l&&i?o(xd,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(xd,{color:"red",children:"Выходной"})},Kd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",qd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(fd,{label:e,value:t&&l?l:"",subText:Kd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Yd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Xd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Gd=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Jd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Ld(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ve,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ve,{size:"text-l",children:t})]}):null]}),Hd(u)]}),o("div",{className:"hidden sm:block",children:Zd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ua,{isUnfolded:e,children:Zd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Sd({isUnfolded:e,onToggle:t})})]},String(h))},Zd=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ld(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Nd,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(fd,{label:"Факс",value:t,isPhone:!0}),o(fd,{label:"Телефон филиала",value:e,isPhone:!0}),o(fd,{label:"Для обращений юридических лиц",value:l,isPhone:!0}),o(fd,{label:"Обслуживание физических лиц",value:n,isPhone:!0}),o(fd,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(fd,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Nd,{children:o(fd,{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(qd)})})}):c(Nd,{children:[o(fd,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Fd)})}),Ad(d)]}),r?.businessScheduleVisibleTag?Ed(r?.businessScheduleDescription):null,s?.currencies?.length?o(Nd,{className:"flex-wrap",children:s?.currencies?.map(Ud)}):null]})},Qd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Ld(e),l=e?jd(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Yd(l):Gd(l,n):Xd(l):null})(l)}`;return{header:n,body:i}},em=({address:e,workScheduleDescription:t},l)=>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(Ve,{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(Ve,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:tm({workScheduleDescription:t})}),o(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ua,{isUnfolded:e,children:tm({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Sd({isUnfolded:e,onToggle:t})})]},String(l)):null,tm=({workScheduleDescription:e})=>c("div",{children:[c(Nd,{className:"flex",children:[o(fd,{label:"Операции для физических лиц",children:o(Ve,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(fd,{label:"Операции для физических лиц",children:o(Ve,{children:"Оформление и обслуживание банковских карт"})}),o(fd,{label:"Операции для физических лиц",children:o(Ve,{children:"Инвестиционное и накопительное страхование"})}),o(fd,{label:"Операции для физических лиц",children:o(Ve,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(fd,{label:"Режим работы",className:"max-w-none",children:o(Ve,{children:e})})]}),lm=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),nm={branches:[],remoteWorkplaces:[]};const am=async e=>await it(e,{method:"GET"})||nm,im={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},rm={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)},sm=d((({className:e})=>{const[t]=Fs(),l=t?.code??"000",{data:n,isLoad:a}=function(e){const{data:t,error:l}=rn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,am);return{data:t||nm,isLoad:!t&&!l}}(l);return o(hd,{className:e,filterItems:om,data:n?.branches,isLoad:a,remoteWorkplaces:n?.remoteWorkplaces,initFilterState:im,renderCard:Jd,renderRemoteWorkplaceCard:em,getBalloon:Qd,getBalloonRemoteWorkplaces:lm,title:`Офисы филиала ${t?.name}`})})),om=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>rm[t](e)))))},cm=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...l,children:"offices"===n?o(sm,{}):o(Dd,{descriptionData:e})})})),dm=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(g,{className:h("box-border",e),...n,children:[o(C,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),mm=d((({className:e,padding:t,slides:l=[],...n})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...n,children:o(_a,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),hm=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,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(le,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?um({__html:i,richVersion:r}):null,pm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),pm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),pm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Le([n]):null]})]}))),um=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),pm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ve,{size:"text-xl",color:n,children:t})]})]}):null,gm=d((e=>{const{__html:t,richVersion:l="",...n}=e;return o(g,{defaultPadding:"p-0",...n,children:o(Pe,{__html:t,richVersion:l})})})),xm=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Fn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Fn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),fm=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(hl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),bm=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(fm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(fm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ym=["От 1 дня","До 365 дней"],vm=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ve,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(bn,{min:1,max:365,value:e,items:ym,onChange:t})]}))),Nm=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(fm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(fm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),wm=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(bm,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:km(m)}),o(vm,{days:a,setDays:e=>m({days:e})}),o(Nm,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Sm(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ve,{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(xm,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),km=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Sm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Cm=d((({days:e,tariffs:t=[]})=>{const l=Im(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Tm("Аренда за",e),Tm("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(le,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Tm=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ve,{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})]}),Im=(e,t)=>{const l=Bm(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Bm=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},Pm=(e,t)=>e.find((e=>e.branchCode===t)),Mm=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Pm(n,l.selectedBranch),d=Vm(s?.safeBoxCaseVolumes),m=Rm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Dm(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(wm,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Cm,{days:l.days,tariffs:h})]})})),Vm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Rm=(e,t)=>e?.find((e=>e.volume===t)),Dm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,zm=[];const Am=async e=>await it(e,{method:"GET"})||zm,_m=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=An(),p=jm(m.selectedRegion,u),x=function(e){const{data:t}=rn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Am);return t||zm}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Pm(x,m.selectedBranch)||x,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:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Mm,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Qc,{points:b,className:"h-[640px]"}):null]})})),jm=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,$m={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"},Lm=(e,t,l)=>(n,a)=>{const{button:i}=n;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Em(e,l)(n,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Om(n),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Em=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Fm(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Um({step:l,iconVersion:a,i:n,stepVersion:t})})})},Om=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",$m.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),Fm=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Um=({step:e,iconVersion:t,i:l,stepVersion:n})=>{return $e(e?.icon)?o(le,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===n?$m.iconText:(a=n,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:l+1});var a},Wm=d((({className:e="",title:t,description:l,steps:n=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=n.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:n.map(Lm(d,r,i))}):null,Le(a,{isVertical:!0})]})})),Hm=d((({isActive:e,item:t,onClick:l})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Km=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:h("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Ot,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),qm=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(Km,{onClick:e=>e.stopPropagation(),onClose:l,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function Ym(e){throw new Error(e)}const Xm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Ym(e)}}))),[c,d]),l},Gm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Jm=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(Ve,{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(Zm,{...e},String(t))))})]}):null,Zm=d((({icon:e,...t})=>{const l=he(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(le,{image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Qm=(e,t)=>l=>l.name?o(ss,{href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(l),data:rs(e,l.name),children:o(Ve,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,eh=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(nl,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),th=d((({foreignOffices:e,branches:t})=>{const[l,a]=Fs(t?.default),r=he(),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=nh(An()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,lh),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Ft,{className:"pb-20",head:c("div",{children:[o(Ve,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ss,{href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(eh,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&Gm(e.toLowerCase())(d.toLowerCase())>=.8)).map(Qm(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ve,{size:"text-h6",children:e})}),t.map(Qm(f,x))]},e)))}),Jm(e)]});var x,f})),lh=e=>e.name?.charAt(0)||"",nh=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),ah=d((({menuRef:e,menuItem:t,locationDialogProps:l,closeAll:n})=>{const i=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(th,{...e}),l),close:l}})(l||{}),[{name:r}]=Fs(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&n(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(Km,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),ih="burgerMenuDialog",rh=({menuRef:e,centralMenuItem:t,closeAll:l,openDialog:n,locationDialogProps:a})=>{const i=Xm(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(ih,i);return[r,{toggle:()=>{r?l():n(o(ah,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:l}),{id:ih})}}]},sh=[],oh=ht((({sticky:e,...t})=>{const{menuItems:l=sh}=e??{},a=l.find((e=>"Меню"===e.title)),r=l.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=n(-1),[x,f]=n(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),N=ol(v),w=s(null),[k,{toggle:S}]=rh({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=qm({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(ch(I,"left",{activeIndex:u,currentItemPosition:x})),o(Hm,{item:a,isActive:k,onClick:e=>T(e)}),h.map(ch(I,"right",{activeIndex:u,currentItemPosition:x}))]})})})),ch=(e,t,l)=>(n,a,i)=>o(Hm,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),dh="hidden sm:flex absolute z-40",mh={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},hh=d((({className:e,items:t=[],activeItem:l,onChange:n,tabsType:i="default"})=>{const[r,s]=Ca({itemCount:t?.length||0});return a((()=>uh(r.current,t,l)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(ha,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:mh[i].item,gap:mh[i].gap,children:t.map(Dc(l,n,i))}),s.canScrollLeft?o(Ma,{className:h("left-6",dh,mh[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Va,{className:h("right-6",dh,mh[i].buttonTop),onClick:s.scrollRight}):null]})})),uh=(e,t,l)=>{const n=t.findIndex((e=>e===l));e&&n>0&&e.scrollTo({left:e?.children[n]?.offsetLeft,behavior:"smooth"})},ph={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},gh=({className:e="",tabsType:t="animated",...l})=>t?o("div",{className:h(ph[t].wrapper,e),children:o(hh,{className:ph[t].component,tabsType:t,...l})}):null,xh=ht((({className:e="",tabs:t=[],block:l,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=fh(l??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?l?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=n(vh(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=yh(f[y],y),S=i((e=>{const t=f.indexOf(e),l=f[t];v(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(p.query);e.text?l.set(u,e?.tabName??String(t)):l.delete(u),p.replace(`${p.pathname}?${l}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:l,...m,children:[gh({className:h({"pb-1":l?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:bh(t,f),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(l?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:l,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(yh)?.filter(Boolean)||[]}),fh=({__id:e,anchor:t})=>t??e??"tabs",bh=(e,t)=>t?.length?t:e,yh=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",vh=(e,t)=>t?Number(t):e.reduce(((e,t,l)=>t.selected?l:e),0),Nh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},wh=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Nh[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),kh=d((({className:e="",isOpen:t,onClick:l})=>o(be,{className:e,appendRight:o(le,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Sh={Buttons:({buttons:e})=>Le(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(le,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ve,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ve,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:l,pdfUrl:n,isOpen:a})=>e?o(kh,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:l,pdfUrl:n})}}):null},Ch=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Th({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Th=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Sh))return null;return o(Sh[l],{...t,...n})},Ih=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Ch,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Bh=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Ph=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ve,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Mh=d((({rows:e})=>{return o(ha,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=h("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ve,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Bh(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ve,{size:"text-xl",children:e.data}):null,e?.cols?Ph(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Vh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ve,{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(Mh,{rows:t.rowsData})})})]},n)}))}))),Rh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Dh=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===l}),onClick:()=>n(t),children:o(Ve,{size:"text-xl",font:"font-light",color:Rh(t===l),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),zh=ht((({tableSource:e,pdfUrl:t,onClick:l})=>{const a=e?.tableData,[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Dh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Vh,{activeTabIndex:r,items:m}),o(kh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ve,{size:"text-h6",children:"Данных нет"}),o(kh,{onClick:l,isOpen:!0})]})})),Ah=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@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(zh,{...t,onClick:l})}):null]}))),_h=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[u,p]=n(void 0),g=i((e=>p(e)),[]);return c(Ah,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(le,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(wh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Ih,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function jh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Pa,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Pa,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const $h=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=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,jh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Lh=d((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(_h,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(Fa,{renderFoldableSection:({isUnfolded:e})=>c($h,{controls:f,children:[y,o(Ua,{isUnfolded:e,children:v})]}),renderFoldButton:Oa}):o($h,{controls:f,children:b})})]})})),Eh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===n?Oh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ve,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Fh(l):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),Oh=()=>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"}),Fh=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Uh=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ve,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(Ve,{size:"text-h2",children:l})}):null]}))),Wh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Uh,{prefix:t,unit:l,suffix:n})})})),Hh={AdTile:pt,ApplicationForm:ta,BankAccountFiltration:si,BenefitsBlock:hi,BonusBenefitsBlock:gi,ButtonsBlock:fi,CalculatorBonus:Ri,CalculatorBusinessDeposit:Ji,CalculatorCredit:hr,CalculatorDeposit:Cr,CalculatorRefinancing:zr,CardTransfer:Or,Carousel:Xr,CarouselCard:Qr,CarouselCatalogCard:ts,CarouselLinks:as,CarouselRecommendationCard:hs,CarouselTariffsCard:gs,DepositFiltration:Ns,Depository:$s,ErrorBlock:Es,ExchangeRateTile:po,Footer:Ao,GrantSupport:_o,Header:Yo,Headline:C,HorizontalLayout:Zo,ImgBlock:Qo,LinkDocs:cc,MobileAppTile:uc,MortgageFiltration:_c,OfficesAtmsMap:cm,Placeholder:dm,ProductBlock:ut,ProductGallery:mm,RepresentativeOfficeInfo:hm,RichTextBlock:gm,RollupItem:wo,SafeDepositRental:_m,StepsBlock:Wm,StickyBottomMenu:oh,TabsLayout:xh,TariffsTable:Lh,TextBlock:Eh,UnitBlock:Wh,VerticalLayout:Jo},Kh=me((()=>{a((()=>{Ct()}),[]);const e=Dt();sl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");kt({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const qh="cookie",Yh=d((({__html:e})=>{const[t,{setTrue:l,setFalse:n}]=tl();!function(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(qh)||l()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(qh,"true"),n()}),[]);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(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Ot,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),Xh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Xm({onCloseAll:e,onClose:t}),{close:n}=de(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return sl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:n!==l.length-1}),children:e},String(t||n))))}):null})),Gh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Ym(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return sl(globalThis.document,"keydown",r),e?o("div",{className:h("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})),Jh="header",Zh="footer",Qh="sticky-footer",eu={},tu=d((({className:e,data:t=eu,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);Kh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:Jh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:Zh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:Qh})}):null,o(Xh,{}),o(Gh,{}),o(Yh,{__html:d?.cookieContent?.__html})]})}));Object.assign(tu,{childrenTypes:[],slots:()=>[Jh,Zh,Qh]});e.Blocks=Hh,e.ContentPage=tu,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=me,e.joinList=Xa,e.packageVersion="0.14.547",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=E,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=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:l=!0,defaultPadding:n="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&l;return o(r,{className:h("@container font-sans",{group:m},p[t],a||n,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(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={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},w={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:l="h3",title:n,children:a})=>{const i=v[l]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",w[t],e),children:n||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[l],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(N,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:n}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),I=[];function B(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const P=[],M=(e,{key:t,ancestors:l=P,slotName:n=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||P,[r.parent,n]]:l},a)))};function R({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?M(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(l):l}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),$=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:j,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:$,hasPrefix:E});const O="/api/",F=`${O}v1/storage`,U=e=>(t,l)=>{if([!t,A(t),j(t),[z.CDN,O].some((e=>E(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`${F}/${t}/attachment`;const n=t?.startsWith("/");return $(E(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},H=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,u=U(d)($(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(Y,{className:e,children:c("svg",{className:h(K(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:u,xlinkHref:u})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},K=e=>e?"":"w-full h-full",Y=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const l=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,l):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:l=""})=>{const n=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:l,media:a},i)=>o("source",{srcSet:J(n)(e),type:te(l),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(n)(t.src)},l):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("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,le=d((({className:e="",image:t,imageClassName:l="",...n})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...n}):o(Q,{className:e,imageClassName:l,image:t}):null)),ne={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","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},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:l})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ne[l]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=V(),{closeAll:l}=de();return e=>{const l=U(t)(e.href);return{...e,href:l,"aria-label":e.text,onClick:me(n({...e,href:l}))}};function n({href:n,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(n,e||"/");n&&!s&&_(n,a)&&(l(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(n,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[n?o("div",{className:h(r,se[i]),children:n}):null,xe(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":n})},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),fe=({className:e,rounded:t,version:l})=>["inline-block",re,l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=he()({onClick:r,href:n,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:n,version:l}),children:a})));function we({version:e,handleClick:t,text:l="Вернуться назад",alwaysVisible:n=!1}){if(!l)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(n?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(le,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:l,ariaLabel:l,onClick:t,type:"button"})]})}const Ne=()=>{const[e,t]=n(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),l=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",l),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",l)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:l})=>e?o("div",{className:h("shrink-1/2 justify-self-center",l&&ke[l],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Ne(),v=V(),w=i((()=>v.back()),[]),N=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",n||l,e),children:[k&&we({version:t,handleClick:w,text:N}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("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:[u,f]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("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(le,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:l="",itemSize:n="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(l,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?Be(l.icon,t):null,o("div",{children:De(l)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:l.map(((e,l)=>o(ze,{benefitsVersion:t,...e},String(l))))}):null)),_e=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),je=d((({isTabularBenefits:e,...t})=>o(e?_e:Ae,{...t}))),$e=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",n?"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(Le(l))}):null,Le=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Oe(a,r),d=Oe(i,r);return n||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:c}),appendRight:Fe({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Oe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion||l},Fe=e=>$e(e)&&o(le,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),We=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(He)}):null)),He=({label:e,amount:t,unit:l},n)=>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(Re,{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:[Ue(2)(t)," ",l||"₽"]}):null]},String(n)),qe=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ye={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:w=!0,isImageAlwaysOnRight:N,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(le,{image:y}):null,P=o(C,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:l,...g?{title:P}:{insetTitle:P},...Ge(B,w),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:N,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(je,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ye[i]}):null,T,x?.length?o(We,{priceList:x}):null,Je(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(qe,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return l=e,Boolean(Qe(l)&&"string"==typeof l.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var l},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(lt,e),lt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,nt=(e,t)=>et(e,{ref:({$ref:e,...l})=>nt(e?tt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:nt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>nt(e,t)))}),at=(e,t,l=[])=>{et(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)at(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)at(e[n],t,[...l,n])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>nt(e,(e=>t?.[e])),mt=(e,t)=>{const l=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?dt(e,{...t,...i}):e};function ht(e,t={}){const l=d((t=>{const l=mt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const ut=ht((({className:e,padding:t,defaultPadding:l,...n})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...n,children:o(Xe,{defaultPadding:l||"p-6xl",padding:t,className:"grow h-full",...n})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>gt(0,t?.length)),[t]),n=t?.[l];return n?o(ut,{suppressHydrationWarning:!0,...n,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:ft(e)}:{},yt=e=>e?{birthday:xt(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),Nt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,l]=Tt(e.find((([e])=>e(t))));return l(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Mt(this),[()=>!0,e]])}}const Mt=e=>[...e?.parent?Mt(e.parent):[],e.entry],Rt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=Ct();if(!A(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Vt(t?.target)?.(l)}}},Vt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Dt(){return Dt._impl()}Dt._impl=()=>({forwardQuery:Rt}),Dt.setup=e=>{Dt._impl=e};const zt=e=>e,At=(e,{resetOnSubmit:t,onSubmit:l,normalize:r}={})=>{const[s,o]=n(e),c=i(r?e=>o(e instanceof Function?t=>{const l=r(e(t));return _t(t,l)?t:l}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=n(!1),[h,u]=n({}),p=i(((e,t)=>{const{parse:l=zt,format:n=zt}=t||{};return{value:n(s[e]),isDirty:d||h[e],onChange:t=>{c((n=>({...n,[e]:l(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),x=i((()=>{c(e),m(!1),u({})}),[e]),f=i((e=>{e.preventDefault(),t?x():m(!0),l&&l(s,e)}),[l,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:x,onSubmit:f}]},_t=(e,t)=>Object.keys({...e,...t}).every((l=>e[l]===t[l])),jt=d((e=>{const{className:t,title:l,children:n,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(N,{headingType:"h3",title:l,className:"@xl:text-center"}):null,n]})})}));function $t({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Et={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"},Lt={primary:h("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:h("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")},Ot=d((({children:e,...t})=>{const l=e=>({...e,onClick:me($t(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(Et[a],Lt[a]),n),type:s,role:d,onClick:m,children:e})})),Ft=d((({className:e,onClose:t})=>o("button",{className:h("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"})}))),Ut=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Ft,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),Wt=d((function({responseType:e,typeForm:t}){const l="OK"===e,n=l?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ut,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(le,{image:{icon:n,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:l?"Ваша заявка отправлена":"Не удалось отправить заявку",description:l?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Ot,{type:"button",onClick:r,children:"Хорошо"})]})})})),Ht=e=>t=>l=>e(l)?[]:[t],qt=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Kt=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Yt="appearance-none w-5 h-5 border-solid flex-none",Xt=[{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"}],Gt=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Kt,{paths:Xt,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:h("flex items-center relative group/box",Zt(n)),onClick:s,children:[o("div",{className:h(Yt,"m-0",a?"rounded-full border-2":el(t),!n&&t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Qt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n),"aria-label":l}),t?d:null,Jt(l)]})})})),Jt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Zt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Qt=(e=!1)=>e?"radio":"checkbox",el=(e=!1)=>h("rounded border",{"bg-primary-main":e}),tl=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Gt,{text:t,value:l,disabled:a,onChange:r},n),qt(i)]})));function ll(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const nl=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,al="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",il=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:w=!1})=>{const N=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&N.current?.focus()}),[v,N]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=rl(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[nl(d),w?o("textarea",{className:h("block resize-y min-h-24",S,T),id:h("textarea",l),name:n||l,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",S,C,T),ref:N,id:l,name:n||l,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),rl=e=>e?al:"border-error",sl=e=>e?.text||e?.key||"";function ol(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function cl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return ol(globalThis.document,"click",l),t}const dl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,ml=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:dl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:sl(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==l?.key})})]},e.key)))}):null));function hl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})},h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=cl(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(ml,{popupRef:g,options:t,value:l,query:n,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,u]),p}const ul=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:u="black",onChange:p,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ll(),[y,v]=n(""),w=g||0===l.length,N=x&&!w,k=i((()=>{v(""),f()}),[]),S=hl({isOpen:x,options:l,value:a,query:y,onChange:p,onClose:k,iconVersion:u});return c("div",{className:h("space-y-xs",e),children:[nl(t),c("div",{className:h("relative",N?"z-20":"z-10"),ref:S,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",gl(s,r,w)),onClick:N?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:sl(a)||d}),pl(N,u)]}),m&&N?o("div",{className:h("absolute top-0 w-full z-20"),children:o(il,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),pl=(e,t)=>o(H,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),gl=(e,t,l)=>h(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),xl=()=>{},fl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=bl(t,e),c=yl(t,i,r);h.push(o("td",{children:o("div",{className:vl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},bl=(e,t)=>t&&e.toDateString()===t.toDateString(),yl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),vl=(e,t)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),wl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Nl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=xl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:wl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:fl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),kl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Sl=kl.map((e=>({key:e}))),Cl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Tl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Il={className:"min-w-32",iconVersion:"black",isBorder:!1},Bl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=ll(!1),[p,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:w,monthsOptions:N,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=cl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(kl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Sl,yearsOptions:Cl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:C,children:[nl(t),c("div",{className:"relative",children:[Pl(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Tl,className:"-rotate-90 cursor-pointer"})}),o(ul,{onChange:v,value:{key:kl[p]},options:N,...Il}),o(ul,{onChange:w,value:{key:String(x)},options:k,...Il}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Tl,className:"rotate-90 cursor-pointer"})})]}),o(Nl,{today:l,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Pl=(e,t,l)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(H,{...Tl,name:"CalendarIcon"})]}),Ml=d((({className:e,label:t,error:l,...n})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Bl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),qt(l)]}))),Rl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:h("shrink-0 w-full",e),children:[o(il,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),qt(a)]}))),Vl=e=>"_"===e,Dl=e=>/\d/.test(e),zl=e=>Vl(e)||Dl(e),Al=[..."+7 (___) ___-__-__"],_l=Al.findIndex(Vl),jl=Al.map(((e,t)=>zl(e)?Al.slice(0,t).filter(zl).length:-1));const $l=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Al.map(((e,l)=>Dl(e)?e:t.charAt(jl[l])||e)),n=jl.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(_l,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(il,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),El=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o($l,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),qt(n)]}))),Ll=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(ul,{...n,valid:!l,label:n?.errors?`${t}*`:t}),qt(l)]}))),Ol="Некорректно заполненное поле",Fl=Ht((e=>null!=e&&""!==e))(Ol),Ul=Ht((e=>e?.key&&""!==e?.key))(Ol),Wl=Ht((e=>"string"==typeof e&&e.length>1))(Ol),Hl=Ht((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ol),ql=(Kl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Ht((e=>"string"==typeof e&&Kl.test(e))))(Ol);var Kl;const Yl=Ht((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Xl={typeForm:Fl,surname:Wl,name:Wl,region:Ul,addressBranch:Ul,phone:ql,secondaryPhone:ql,birthday:Fl,email:Fl,fullName:Wl,inn:Hl,partnerComments:Fl,collectionCount:Fl,comment:Fl,acquiringType:Ul,feedbackType:Ul,feedbackMethod:Ul,serviceType:Ul,serviceDirection:Ul,meetingDay:Fl,product:Fl,localities:Fl,consentDataProcessing:Yl,annualRevenue:Fl},Gl=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Xl?.[e]])))},Jl=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Zl=(e,t,l=!1)=>l?Jl(e,t):e,Ql=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],en=d((({field:e,input:t})=>o(Ll,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ql,...Zl(e("acquiringType"),Xl.acquiringType,t?.required)}))),tn=(e="")=>Boolean("trade"===e||"all"===e),ln=e=>null!=e,nn=new Map,an=e=>Boolean(e?.every((e=>Array.isArray(e)?an(e):!e||"string"==typeof e))),rn=e=>an(e)?e.toString():"";function sn(e,t,{fallback:l,cache:i}={}){const s=r((()=>on(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(ln))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=nn)=>l=>{const n=rn(l),a=t.get(n);if(n&&ln(a))return a;const i=e(...l);return n&&ln(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function on(e){return Array.isArray(e)?e:e instanceof Function?on(e()):[e]}const cn=[];const dn=async e=>await it(e,{method:"GET"})||cn;function mn(){const{data:e}=sn("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const hn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?mn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=sn(e?`/api/v1/branches?regionCode=${e}`:null,dn);return t||cn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Ll,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Zl(e("addressBranch"),Xl.addressBranch,t?.required),isSearch:!0})})),un=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},pn=(e,t,l)=>Math.max(t,Math.min(e,l));function gn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function xn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onChange:t=>{const l=gn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const fn=1,bn=100,yn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:fn),max:s=(a.length?a.length-1:bn),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=un(e,{normalize:(e=0)=>a.length?vn(a)(e):pn(e,r,s),format:Ue()}),x=i((e=>{p&&p(gn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",al,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),xn({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),wn(n)]})})),vn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),wn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Nn=["От 1 000 ₽","До 1 000 000 000 ₽"],kn=d((({field:e})=>o(yn,{title:"Сумма, ₽",items:Nn,min:1e3,max:1e9,...e("amount")}))),Sn=d((({field:e,input:t})=>o(Rl,{className:"col-span-2",...Zl(e("comment"),Xl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Cn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Tn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],In=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Bn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Pn=[{key:"Карта дебетовая",text:"Карта дебетовая"},{key:"Карта кредитная",text:"Карта кредитная"},{key:"Потребительский кредит",text:"Потребительский кредит"},{key:"Ипотечный кредит",text:"Ипотечный кредит"},{key:"Вклад",text:"Вклад"},{key:"Накопительный счет",text:"Накопительный счет"}],Mn="/api/v1/outservice/outserviceregions",Rn=d((({field:e})=>o(Ll,{label:"Способ получения ответа",options:Bn,...Jl(e("feedbackMethod"),Xl.feedbackMethod)}))),Vn=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(Tn[0])}),[t?.value]),o(Ll,{label:"Тема",placeholder:"Выберите тему",options:In,...Jl(t,Xl.feedbackType)})})),Dn=e=>"OUTSERVICE"===e?Mn:void 0,zn=d((({field:e})=>o(tl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'})));function An(e="/api/v1/regions"){const{data:t}=sn(e,rt);return Array.isArray(t)?t:[]}const _n=d((({field:e,input:t})=>{const l=e("region")?.value?.key,n=An(Mn)?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==l&&e?.("localities")?.onChange?.("")}),[l]),o(Ll,{label:"Населенный пункт",placeholder:"Выберите отделение",options:n,...Zl(e("localities"),Xl.localities,t?.required),isSearch:!0})})),jn=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:h("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:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),$n=d((({field:e})=>tn(e("acquiringType")?.value?.key)?o(jn,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),En=d((({field:e,input:t})=>{const{required:l,...n}=t;return o(Rl,{...Zl(e("partnerComments"),Xl.partnerComments,l),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...n})})),Ln=d((({field:e})=>tn(e("acquiringType")?.value?.key)?o(jn,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),On=d((({field:e})=>o(Ll,{placeholder:"Выберите продукт",label:"Продукт",options:Pn,...Jl(e("product"),Xl.product)}))),Fn=d((({field:e,input:t,url:l})=>{const n=An(l);return o(Ll,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>n?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[n]),...Zl(e("region"),Xl.region,t?.required)})})),Un=d((({field:e,input:t})=>{const l=mn(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Ll,{label:"Регион",placeholder:"Выберите регион",options:n,...Zl(e("region"),Xl.region,t?.required)})})),Wn=d((({field:e})=>{const t=e("secondaryPhone");return o(El,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Jl(t,Xl.secondaryPhone):t})})),Hn=d((({field:e})=>o(Ll,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Tn,...Jl(e("serviceDirection"),Xl.serviceDirection)}))),qn=["От 1 мес","До 15 лет"],Kn=d((({field:e})=>o(yn,{title:"Срок, месяцев",items:qn,min:1,max:180,...e("term")}))),Yn=d((({field:e})=>o(Ll,{label:"Тип обслуживания",options:Cn,...Jl(e("serviceType"),Xl.serviceType)}))),Xn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(al,Yt,"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:l,name:e,checked:n,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),Gn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Jn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Xn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Xn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Xn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Xn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Zn=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Rl,{label:"Фамилия",...Zl(e("surname"),Xl.surname,a)}),name:o(Rl,{label:"Имя",...Zl(e("name"),Xl.name,a),...i}),middleName:o(Rl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(El,{label:"Телефон",...Zl(e("phone"),Xl.phone,a)}),email:o(Rl,{label:"Электронная почта",...Zl(e("email"),Xl.email,a),...i}),fullName:o(Rl,{label:"ФИО",...Zl(e("fullName"),Xl.fullName,a),...i}),inn:o(Rl,{label:"ИНН",type:"number",...Zl(e("inn"),Xl.inn,a)}),comment:o(Sn,{field:e,input:l}),region:r?o(Un,{field:e}):o(Fn,{field:e,input:l,url:Dn(t)}),addressBranch:o(hn,{field:e,input:l,isPremium:r}),birthday:o(Ml,{label:"Дата рождения",...Zl(e("birthday"),Xl.birthday,a)}),desiredMeetingDate:o(Ml,{label:"Желаемая дата встречи",...Zl(e("desiredMeetingDate"),Xl.meetingDay,a)}),product:o(On,{field:e}),localities:o(_n,{field:e,input:l}),isClient:o(zn,{field:e}),consentToReceiveMaterials:o(tl,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(En,{field:e,input:l}),collectionCount:o(Rl,{label:"Количество объектов инкассации",type:"number",...Zl(e("collectionCount"),Xl.collectionCount,a)}),acquiringType:o(en,{field:e,input:l}),onlineCheckout:o($n,{field:e}),posTerminal:o(Ln,{field:e}),serviceType:o(Yn,{field:e}),term:o(Kn,{field:e}),amount:o(kn,{field:e}),annualRevenue:o(Rl,{label:"Годовая выручка, ₽",...Zl(e("annualRevenue"),Xl.annualRevenue,a)}),vedTypes:o(Jn,{field:e}),feedbackType:o(Vn,{field:e}),feedbackMethod:o(Rn,{field:e}),serviceDirection:o(Hn,{field:e}),bankEmpolee:o(Rl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Rl,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Wn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null},Qn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${tn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...ta(c),...ea(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},ea=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ta=e=>e?{vedTypes:Object.fromEntries(Gn.map((t=>[t,t===e])))}:{},la={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Ql[0],serviceType:Cn[0],feedbackType:In[0],feedbackMethod:Bn[0],serviceDirection:Tn[0],vedTypes:Gn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},na=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||la[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Cn[1]),{...l,typeForm:{key:t,text:""}}},aa=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),ia=(e,t)=>o(Ot,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ra=(e,t,l)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Gt,{...e}),o(aa,{link:t})]}),qt(Jl(e,Yl).error)]}):o(aa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ia(l)]}),sa={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...vt(n,g),...wt(i,g),...bt(a),...g?yt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Nt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},oa=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=na(f,l),[y,v]=n(""),w=i((async(e,t)=>{const n=ha(f,e),a=(i=Gl(n),e=>e&&Object.entries(i).flatMap((([t,l])=>l(e[t])))||[]);var i;if(a(e)?.length)return"Fail";const r=Qn({...e,...u}),s=await sa.send(r,"lead"===m)?"OK":"Fail";if(v(s),s){(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(Wt,{...e}),l),close:l}})({responseType:s,typeForm:l}).open()}if("OK"===s&&g){const e=Dt();kt({aspectsAttributes:g,aspects:e,ev:t})}return s}),[]),[,{field:k,onSubmit:S,reset:C}]=At(b,{onSubmit:w}),T=ma(f)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(jt,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:h(da(e.columns),"grid gap-x-m"),children:[ca(e.title),(e?.inputs||[])?.map(Zn(k,l))]},`section-${t}`))),ra(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(le,{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(le,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ca=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null,da=e=>2===e?"@xl:grid-cols-2":"",ma=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ha=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),ua=d((({title:e,description:t})=>{const l=Ne();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(le,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:l?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),pa=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",ga=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function xa(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const fa=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:xa(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:u,role:"listitem",children:d})})),ba=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],ya=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(wa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,w="vertical-list"===d,N="horizontal-list"===d,k={...N?va(c,v):{},...w?ga(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(fa,{className:h(m,a?ba[a-1]:"",{"h-full":w},t),style:N?va(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),va=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),wa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Na={"horizontal-list":"w-6","vertical-list":"h-6"},ka=({activeIndex:e,onClick:t,listType:l="horizontal-list"})=>(n,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Na[l]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Sa=({activeIndex:e,onClick:t})=>(l,n)=>{const a=n===e,i=a?"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=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:l?.title}),o("div",{className:h("text-secondary-text font-light",s),children:l?.description})]},String(n))},Ca=e=>e,Ta=(e=Ca)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ia=Ta(),Ba=(e=Ca)=>Ta((t=>-e(t))),Pa=Ba(),Ma=e=>t=>e.scrollWidth/t,Ra=e=>(t,l)=>{e.scrollBy({left:l*Ma(e)(t),behavior:"smooth"})},Va=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[t]),[c,d]=a.length?[Ba()(a),Ta()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ra(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ra(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Da={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},za=d((({className:e="",activeIndex:t=0,dotCount:l=0,listType:n="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Ne(),[u,p]=Va({itemCount:s.length}),g=Aa(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(ya,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Sa({activeIndex:t,onClick:x}))}):l?o("div",{className:h("flex gap-xs",Da[n],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:l}).fill(null).map(ka({activeIndex:t,onClick:x,listType:n}))}):null})),Aa=(e=!1)=>({behavior:e?"auto":"smooth"}),_a=d((({className:e,disabled:t,...l})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...l,children:o(le,{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"})}))),ja=d((e=>o(_a,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),$a=d((e=>o(_a,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ea="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",La=d((({className:e,scroll:t,hasBlur:l,arrowsPadded:n,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=n&&!a;return c("div",{className:e,children:[l?Oa(t):null,i?o(ja,{className:h(Fa(a),m?"left-1":"left-0"),onClick:s}):null,r?o($a,{className:h(Fa(a),m?"right-1":"right-0"),onClick:d}):null]})})),Oa=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(Ea,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(Ea,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Fa=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ua=d((({className:e,version:t,gap:l=14,padding:n=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Va({itemCount:b,onVisibleIndicesChange:x}),[w]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(ya,{containerRef:y,activeIndex:w,visibleItemCount:a,gap:l,padding:n,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(La,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(za,{className:h(!p&&"lg:hidden"),activeIndex:w,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Wa=({blocksToRender:e,...t})=>o(Ua,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:h("relative min-w-80",pa(!0)),children:B(e,t)},String(l))})}),Ha=e=>e%2!=0,qa=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ka=d((({className:e="",label:t,icon:l,dataTheme:n="pc",disabled:a=!1,onClick:i})=>o(qa,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:l?o(le,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ya=({isUnfolded:e,onToggle:t})=>o(Ka,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Xa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ga=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Ja=["ArrowDownIcon","ArrowUpIcon"],Za="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Qa=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:h("space-y-2xs",{hidden:!n.length}),children:[c("div",{className:h(Za),children:[M(i,{...a.options,parent:l}),Ha(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Ga,{className:h(Za),isUnfolded:e,children:[M(r,{...a.options,parent:l}),Ha(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ka,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:Ja[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ei=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[ti(l,t),Qa({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[ti(l,t),Wa({...n,blocksToRender:t})]});default:return null}})),ti=(e,t)=>e&&!t.length?o(ua,{...e}):null,li=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ni=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(jn,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ai=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,li(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(ii(n)).filter(Boolean))]}),l?o("div",{children:o(Ot,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),ii=e=>([t,l])=>{const n=l?.type;return"array"===n?ri(t,e)(l):null},ri=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ni,{items:n,multiple:!l?.single,...t(e)})]},e)};function si(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const oi=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ci=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>oi(t[e])||oi(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>oi(t[e])||oi(l[e])||di(t[e])<=di(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>oi(t[e])||oi(l[e])||di(t[e]?.min)>=di(l[e]?.min)&&di(t[e]?.min)<=di(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>oi(t[e])||oi(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>oi(t[e])||oi(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),di=e=>Number(e||0),mi=(e,{block:t,page:l,normalize:n=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=At(e),d=r((()=>si(a,a.map((e=>dt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=zt)=>e?.filter((([,e])=>ci(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},hi={},ui={},pi=ht((({className:e,filtrationSchema:t=hi,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=mi(ui,{block:a.block,page:a.options?.page}),d=o(ul,{className:"w-64",label:l?.title,options:gi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>gi(l).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ai,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Ot,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ei,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),gi=e=>si(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),xi=(e=!1)=>e?"text-left":"text-center",fi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},bi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",fi[l],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),yi=d((({className:e="",title:t,benefitList:l,...n})=>{const a=Ne();return c(g,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(N,{headingType:"h3",as:"h2",className:xi(a),title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(vi)}):null]})})),vi=({label:e,description:t,__html:l,icon:n,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(bi,{className:"shrink-0",iconBgVersion:i,...n}):null,n?.src?o(le,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),l?o(Pe,{__html:l,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),wi=(e,t,l)=>{return o(Ua,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!l&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(le,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Re,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Ni=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?wi(e,0,t):null]}))),ki={start:"justify-start",center:"justify-center",end:"justify-end"},Si=d((({buttons:e,className:t="",align:l,...n})=>{const a=l&&h("flex",ki[l]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ee(e)})})),Ci=d((({className:e,title:t,children:l,...n})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(N,{className:"text-center",title:t}):null,l]}))),Ti="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Ii="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Bi="flex flex-col gap-y-xl min-w-52",Pi=d((({value:e,fractionDigits:t,fixed:l,prefix:n,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[n,Ue(t,{fixed:l})(e),a].filter(Boolean).join(" "):e}))),Mi=d((({className:e,title:t,value:l,color:n="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:n,children:t}):null,l?o(Pi,{value:l,...a}):o(Re,{size:"text-h3",children:"-"})]}))),Ri=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Vi=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{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:Ue(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl mt-5",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Di=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),zi=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Di,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Vi,{title:e,rate:t,unit:l,fractionDigits:n,color:i,...s})}),o(Mi,{className:"@xl:hidden",title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,color:i,...s}),r]}),Ai=({isShowItems:e=!0,step:t=1e3,postfix:l="₽",...n})=>o(yn,{items:e?[`От ${Ue(1)(n.min||0)} ${l}`,`До ${Ue(1)(n.max||0)} ${l}`]:[],step:t,...n}),_i={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ji={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},$i=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=_i.prefMonthsNum,prefTravelBonusRate:i=_i.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||ji,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ei=ht((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=At({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=$i(r,l);return o(Ci,{className:e,title:t,...i,children:c("section",{className:h(Ti,e),children:[c("div",{className:Ii,children:[Ai({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Ai({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?zi({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Bi,children:[x>=0?o(Mi,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Ee(n,{isVertical:!0}),Ri(a)]})]})})})),Li=Math.round(29.5),Oi=(e,t=0)=>e?.sum?e.sum:t,Fi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ui=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Wi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Hi=d((({items:e,checkedItem:t,className:l,onChange:n,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${Wi[i]}`,l),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:l})=>o(Gt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e),disabled:a},String(e))))}))),qi=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":l,children:o(Re,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Hi,{orientation:n,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Ki=e=>qi({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Yi=" (c капитализацией)",Xi=({income:e,finalSum:t,postfix:l="₽",buttons:n=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Bi,children:[o(Mi,{title:`Доход в конце срока${i?Yi:""}`,value:e,postfix:l,prefix:"+"}),o(Mi,{title:`Сумма в конце срока${i?Yi:""}`,value:t,postfix:l}),Ee(n,{isVertical:!0}),a?.map(Ri)]}),Gi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ji([e,t],n),Ji=([e,t],l=[])=>({[e]:l.length?Pa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ia(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Zi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Qi={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const er={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},tr=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?Qi[e?.rateType]:"",{data:l}=sn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...er,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&lr(s,e)&&Zi(n,["minSum","maxSum"],e)&&Zi(l,["minDays","maxDays"],e)))||er,{rate:m}=d,h=nr(m,e),u=n+h,p=c||[er];return{...d,...Ji(["minSum","maxSum"],p),...Ji(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},lr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,nr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},ar=ht((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=At({moneyValue:Oi(r,1e5),daysValue:Fi(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=tr(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(Ci,{className:e,title:t,...d,children:c("section",{className:h(Ti,e),children:[c("div",{className:Ii,children:[Ai({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(yn,{items:[`От ${Ui(v.min||0)}`,`До ${Ui(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[ir(p,u),Ki({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),zi({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Xi({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),ir=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Gt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Gt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),rr=(e=[],t=!1)=>sr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),sr=(e,t)=>{if(!t?.length)return;const l=t?.reduce(((t,l)=>e[0](l.rate,t[0].rate)?[l]:l.rate===t[0].rate?[...t,l]:t),[t[0]]);return l.length>1?l.reduce(((t,l)=>e[1](l,t)?l:t),l[0]):l[0]},or=({min:e=0,max:t=0,availableMonths:l,...n})=>o(yn,{items:[`От ${cr(e)}`,`До ${cr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),cr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,dr=e=>qi({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),mr=({field:e,defParams:t,calcParams:l,map:n,monthsValue:a="maxMonths"})=>{Object.entries(n).forEach((([l,n])=>{e?.(l)?.onChange?.(t?.[n])})),e?.("monthsValue")?.onChange?.(pn(t?.[a],l.minMonths,l.maxMonths))},hr=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},ur={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},pr=e=>gr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&gr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&gr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&gr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),gr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],xr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[ur],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>pr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Gi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Gi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>pr({row:e,userInputParams:t,paramsViewSettings:l})&&Zi(n,["minSum","maxSum"],e)&&Zi(a,["minMonths","maxMonths"],e)))||ur)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=hr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},fr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),br={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},yr=ht((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=l?.rateRows,sr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=At({moneyValue:Oi(s,2e5),monthsValue:Fi(s,Li),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=xr(p,l,r),f=dr({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(pn(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(pn(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!fr(s)&&m&&mr({field:g,defParams:m,calcParams:x,map:br,monthsValue:"minMonths"})}),[l,s]),o(Ci,{className:e,title:t,...d,children:c("section",{className:h(Ti,e),children:[c("div",{className:Ii,children:[Ai({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),or({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),vr({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Bi,"@4xl:w-1/2"),children:[o(Mi,{title:"Полная стоимость кредита",value:l?.totalLoanCost}),o(Mi,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Mi,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Ee(n,{isVertical:!0}),Ri(i)]})]})})})),vr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Gt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Gt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Gt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Gt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),wr=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Nr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},kr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.[0]?Tr(t[0].minMonths,t[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=!l?.isShowReplenish,c=!l?.isShowWithdrawn,d=!l?.isShowNewClient,m=t?.find((t=>[Cr({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Cr({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Cr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Cr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Zi(n,["minSum","maxSum"],t),Zi(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Nr,{rate:h}=m,u=Sr(h,e),p=n+u,g=t||[Nr];return{...m,...Ji(["minSum","maxSum"],g),...Ji(["minMonths","maxMonths"],g),availableMonths:wr(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Sr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Cr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Tr=(e,t)=>e+Math.round((t-e)/2),Ir=(e="rub")=>"rub"===e,Br=(e,t)=>{const l="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?qi({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:l}):null,e.isShowWithdrawn?qi({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:l}):null]}),Pr(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Ki({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(n={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},qi({...n,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Pr(e.isShowNewClient),e.isShowNewClient?o(Gt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var n},Pr=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Mr=(e,t)=>{const{minMonths:l,maxMonths:n}=Ji(["minMonths","maxMonths"],zr(t,e?.currency)),a=e.monthsValue||Math.round((l+n)/2);return{monthsValue:pn(a,l,n)}},Rr=(e,t)=>{const{minSum:l,maxSum:n}=Ji(["minSum","maxSum"],zr(t,e?.currency)),a=e.moneyValue||l;return{moneyValue:pn(a,l,n)}},Vr=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Dr=e=>{const t=Ir(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},zr=(e,t)=>{const{rates:l}=e?.find((e=>e?.currency.key===t?.key))??{};return l??e?.[0]?.rates},Ar={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},_r={text:"₽",key:"rub"},jr=ht((({className:e,title:t,calcSource:l,buttons:n=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=l??{},p=u?.map((e=>e.currency))??[_r],g=i((e=>u?{...e,...Dr(e),...Rr(e,u),...Mr(e,u),...Vr(e,u)}:e),[u]),[x,{field:f}]=At({moneyValue:Oi(d,2e4),monthsValue:Fi(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:_r},{normalize:g}),b=f?.("currency")?.value??_r,y=f?.("isNewClient")?.value,v=zr(u,b),w=kr(x,v,s),{rate:N,income:k,finalSum:S,type:C=""}=w,T=()=>{mr({field:f,defParams:rr(v,y),calcParams:w,monthsValue:"minMonths",map:Ar})};a((()=>{!fr(d)&&v&&T()}),[d,u]);const I=N===rr(v,y)?.rate;return o(Ci,{className:e,title:t,...m,children:c("section",{className:h(Ti,e),children:[c("div",{className:Ii,children:[c("div",{className:"flex gap-m",children:[Ai({className:"w-full",title:`Сумма, ${b?.text}`,min:w.minSum,max:w.maxSum,...f("moneyValue"),value:w.moneyValue,postfix:b?.text,step:$r(b?.key)}),u&&u?.length>1?o(Ll,{label:"Валюта",options:p,...f("currency")}):null]}),or({title:"Срок, месяцев",min:w.minMonths,max:w.maxMonths,availableMonths:w.availableMonths,...f("monthsValue"),value:w.monthsValue}),Br({...w,...s},f)]}),zi({rate:N,children:Lr(T,I)}),Xi({income:k,finalSum:S,buttons:[...n,Er(l?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),$r=(e="")=>Ir(e)?1e3:100,Er=(e=[],t="")=>{const{type:l,...n}=e.find((e=>e.type===t))??{};return n},Lr=(e,t=!1)=>t?null:o(Ot,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Or=e=>Fr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Fr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Fr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ur={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Wr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Ur],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Or({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Gi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Gi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Or({row:e,userInputParams:t,paramsViewSettings:l})&&Zi(n+r,["minSum","maxSum"],e)&&Zi(i,["minSumOld","maxSumOld"],e)&&Zi(r,["minSumExtra","maxSumExtra"],e)&&Zi(a,["minMonths","maxMonths"],e)))||Ur)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=hr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Hr=ht((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=At({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Wr(s,l,i),u=dr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ci,{className:e,title:t,...r,children:c("section",{className:h(Ti,e),children:[c("div",{className:Ii,children:[Ai({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Ai({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),or({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),qr({...m,...i},d),m.isExtraMoney?Ai({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:u})]}),c("div",{className:h(Bi,"@4xl:w-1/2"),children:[o(Mi,{title:"Полная стоимость кредита",value:l?.totalLoanCost}),o(Mi,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Mi,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Mi,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Ee(n,{isVertical:!0}),Ri(a)]})]})})})),qr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Gt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Gt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Gt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Kr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=un(e,{normalize:(e=a)=>l&&n?String(pn(Number(Yr(e)),l,n)):Yr(e),format:Ue(r)}),d=i((e=>t&&t(Yr(e))),[t]);return o(il,{onChange:d,...s,...c})})),Yr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Xr=d((e=>o(Kr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),Gr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Jr={amount:1500},Zr=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=At(Jr),[u,p]=n(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Gr[r],children:[o(Xr,{valid:!u,label:l,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Ot,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),Qr=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("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(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),es="relative h-full",ts={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},ls=({noCardBorder:e,cardSize:t="normal",isNavButtons:l=!1,...n})=>{const{blocks:a}=n.block||{},i=a?.some(is),r=l?{defaultPadding:"p-6xl pb-m"}:{};return R({...n,renderProps:(l,n,a)=>c("div",{className:ns(l,{someCardsHighlighted:i}),children:[B(l,n,{className:as(l,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),is(l)?Qr({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},ns=(e,{someCardsHighlighted:t})=>h(es,t&&(is(e)?"pt-3xl":"pt-3xl sm:pt-16")),as=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>h(es,"min-w-80",ts[n],t&&(is(e)?"pt-3xl sm:pt-16":"pt-3xl"),pa(l),l&&"h-full"),is=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,rs=ht((({className:e,visibleItemCount:t=0,noCardBorder:l,arrowsPadded:n=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ua,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:n,navButtons:r?ss(s?.block?.blocks):[],hasBlur:!0,children:ls({noCardBorder:l,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),ss=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],os="z-10 border border-solid w-full h-full",cs=h(os,"absolute hidden @xl:block border-transparent"),ds=d((({className:e,title:t,description:l,button:n,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(cs,"top-9 right-12 bg-green-dark")}),o("div",{className:h(cs,"top-6 right-8 bg-green")}),o("div",{className:h(cs,"top-3 right-4 bg-green-light")}),c("div",{className:h(os,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ms={black:"bg-black",white:"bg-white"},hs=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(le,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(us)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),us=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ms[e]}`},String(t)),ps=d((({icon:e,...t})=>{const l=he(),{text:n,href:a,target:i,onClick:r}=l(t);return n?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(le,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:n}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:n})]})})}):null})),gs=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?xs(n):null]})}))),xs=e=>o("div",{className:h("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(ps,{...e},String(t))))}),fs=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),bs=d((({className:e="",href:t,target:l,onClick:n,data:a,children:i})=>{const r=he()({href:t,target:l,onClick:n});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),ys=[{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"}}],vs=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>ys.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(n)?n:r,c=l?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!l&&!s},ws(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:Ns(s??!1,a??!1,l),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ws=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Ns=(e,t,l=!1)=>h(e||t?"basis-full":"",!t||l&&e?"":"flex-nowrap"),ks=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...w})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...w,children:o(bs,{href:a,target:m,className:"h-full",data:fs(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:l,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge($e(i)?o(le,{image:i}):null,f),buttons:d.length?o(vs,{media:d,stretched:!0,showButtonText:!0,version:w?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(je,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Ss(n,p)]})})}))),Ss=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Cs=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Ts=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(Cs),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=n(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[$e(i)?o("div",{className:"self-center",children:o(le,{image:i})}):null,t?o(N,{className:h("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Xa,{renderFoldableSection:()=>c("div",{children:[f,o(Ga,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Is(y,m?.parent,u):null}):o("div",{children:f})]})})),Is=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&ce.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Bs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Ps=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Ms=1e9,Rs={sum:{min:1e4,max:Ms},period:3},Vs=ht((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=mi(Rs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Ds(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=zs(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(ai,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Xr,{label:n?.title,min:500,max:Ms,...d("sum",{parse:e=>({min:Number(e),max:Ms}),format:({min:e})=>String(e)})}),o(yn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ei,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Ds=e=>st((e?.paramsSource?.rateRows||[]).filter(Bs).flatMap((e=>Ps(e.minMonths,e.maxMonths)))),zs=e=>st(e.flatMap((e=>e||[])).filter(Bs).flatMap((e=>Ps(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],As=[{key:"10"},{key:"50"},{key:"100"}],_s=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(ul,{className:"min-w-20",onChange:l,value:{key:String(e)},options:As,iconVersion:"black"})]})},js="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",$s=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,l)=>t<=2&&e<=t+2||t>=l-1&&e>=l-3)(e,t,l))(i,l,a)?o("div",{onClick:()=>n(i),className:js,"aria-label":`Страница ${i}`,children:i},String(t)):null},Es={width:"24",height:"24"},Ls=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>Array.from({length:l}).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l&&t(e+1)}),[e,l]),d=i((()=>t(1)),[]),m=i((()=>t(l)),[l]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Os(1===e),...Es})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:js,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,n.map($s),e<l-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<l?o("div",{onClick:m,className:js,"aria-label":`Страница ${l}`,children:l}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Os(e===l),...Es})})]})},Os=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Fs=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Ls,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?o(_s,{itemCount:n,onItemCountChange:a}):null]}),Us=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(le,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",al),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),Ws=d((({field:e,onClearFilter:t,filtrationState:l})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Us,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Bl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:l.endDate,...e("startDate")}),o(Bl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:l.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Ot,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Hs=(e,t)=>o(bi,{...e,iconBgVersion:t,className:"shrink-0"}),qs=({title:e,timestamp:t,publicId:l})=>{const n=he(),{href:a}=n({href:`/api/v1/depository/${l}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[Hs({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},l)},Ks="/api/v1/depository",Ys={startDate:void 0,endDate:void 0,query:""},Xs=ht((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[d,{field:m,reset:u}]=At(Ys),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?xt(n,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(Ks);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=sn(Ks+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Ws,{filtrationState:d,field:m,onClearFilter:u}),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(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(qs,{...e},String(e.publicId)))):o(ua,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Fs,{currentPage:l+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Gs=e=>"Image"===e?.contentType&&e?.image?o(le,{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,Js=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Gs(n)}),o(C,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Zs="location";function Qs(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(ce,"location",to()??{name:e}),r=i((e=>{lo(e),l(e)}),[]),{data:s}=sn(eo()?null:"/api/v1/region",rt);return a((()=>{s&&!eo()&&l(s)}),[s]),[t??{name:e},r]}const eo=()=>Boolean(globalThis.localStorage?.getItem(Zs)),to=()=>{try{const e=globalThis.localStorage?.getItem(Zs);return e&&JSON.parse(e)}catch(e){return null}},lo=e=>{try{globalThis.localStorage?.setItem(Zs,JSON.stringify(e))}catch(e){}};var no;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(no||(no={}));const ao=new Intl.NumberFormat("ru",{style:"currency",currency:no.RUB}),io=e=>e?ao.format(e):"",ro="text-m font-light text-secondary-text ",so=`${ro} text-left`,oo=`${ro} pl-5xl text-center`,co=`${ro} pl-5xl text-right`,mo={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},ho=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:so,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:oo,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:co,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(uo)})]}))),uo=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(le,{image:{icon:mo[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:io(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:io(e?.buyExchangeRate)})})]},t)},po={icon:"GpsIcon"},go=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(bi,{...po,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),xo=(e,t,l)=>{const n=Number(fo(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},fo=e=>e.replace(/[^\d.,]/g,"").replace(",","."),bo=e=>Bt([[e=>e.value!==no.RUB&&e.oppositeValue!==no.RUB,()=>e.handleConvert(e.value,no.RUB)],[e=>e.value===no.RUB&&e.oppositeValue===no.RUB,()=>e.handleConvert(e.value,no.USD)],[e=>e.value===no.RUB&&e.oppositeValue===no.RUB,()=>e.handleConvert(e.value,no.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function yo(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(il,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(ul,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const vo=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||no.RUB,selectBuy:l?.[0]?.currency?.currency||no.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&l?c("div",{className:"grid gap-m",children:[yo({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:wo(r,d,l),value:r.inputSell,setValue:e=>ko(d,l)(e,r.selectSell,r.selectBuy)}),yo({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:No(r,d,t),value:r.inputBuy,setValue:e=>So(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),wo=(e,t,l)=>n=>{t({selectSell:n}),bo({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{ko(t,l)(e.inputSell,n,a)}})},No=(e,t,l)=>n=>{t({selectBuy:n}),bo({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>So(t,l)(e.inputBuy,n,a)})},ko=(e,t)=>(l,n,a)=>{e({inputSell:fo(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(xo(l,i,n===no.RUB)||"")})},So=(e,t)=>(l,n,a)=>{e({inputBuy:fo(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(xo(l,i,n===no.RUB)||"")})};const Co=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Qs(),i=function(e){const t=e?.code||"000",{data:l}=sn(`/api/v1/exchangerates?regionCode=${t}`,rt);return l||{}}(a),r=To(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:no.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:no.RUB}}),o(g,{className:h("box-border min-h-80",e),...n,children:o(Ce,{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:[r?o(ho,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(go,{address:i?.address})]}),o(vo,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l})]})})})})),To=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Io=d((({className:e="",items:t})=>{const l=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(Bo(l))})})),Bo=e=>({dataFooter:t,...l},n)=>{const{text:a,href:i,target:r,onClick:s}=e(l);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(n)):null},Po=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(qa,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Hs(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(H,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),Mo=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Ro=(e=!1)=>e?"MinusIcon":"PlusIcon",Vo=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Do=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Ne();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Xa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ga,{className:h("gap-lg",Mo(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>zo({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),zo=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Vo(e):Ro(e))(a,r);return"accordion"===e?o(Po,{label:s,labelIcon:l,labelIconBgVersion:n,icon:c,onToggle:i}):o(Ka,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Ao=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:_o(e)}))),_o=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Do,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Io,{items:e.items}):null},String(t)))),jo=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map($o)}):null)),$o=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Eo)})]},String(t)),Eo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Lo(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Lo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Oo(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Oo=e=>e.replaceAll(/\D/g,""),Fo=d((({className:e="",index:t,text:l,...n})=>{const a=he(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Uo=d((({className:e="",title:t,links:l})=>o("div",{className:e,children:l?.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(Re,{size:"text-l",font:"font-normal",children:t})}),l.map(((e,t)=>o(Fo,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Wo=d((({className:e="",index:t,...l})=>{const n=he(),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Ho=d((({className:e="",links:t,license:l})=>c("div",{className:h("@container space-y-lg",e),children:[l?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Wo,{index:t,...e},String(t))))}):null]}))),qo=ht((({className:e,footer:t,...l})=>{const{navigationItems:n}=l.options?.page?.navigation??{};l.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...l,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Ao,{navigationItems:n}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(jo,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(vs,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Uo,{title:d,links:i}),o(Ho,{links:a,license:u})]})})),Ko=ht((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:l?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=l?.text?l.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Ll,{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(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:fs(i,s?.key),children:x})}):null]})})})),Yo={width:"34",height:"34"},Xo={"bg-white":"color",transparent:"white"},Go={"bg-white":"text-primary-main",transparent:"text-white"},Jo=(e,t,l)=>o(le,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Xo[e]},className:Go[e],width:l?.width,height:l?.height}),Zo={"bg-white":"text-primary-text",transparent:"text-white"},Qo=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:l?.href??t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...ue(s),children:[Jo(i,l?.image,Yo),r?n??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:Zo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),ec={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"},tc=d((({version:e,text:t,mobileText:l,...n})=>{const a=Ne()?l:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",ec["transparent"===e?"transparent":"default"]),...n,children:a}):null})),lc=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankButton:n,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[l||d?o("div",{children:o(Qo,{className:"my-2xs",bgColor:e,logo:u,data:h})}):nc(p,r),o(tc,{version:a,...n})]})})),nc=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(H,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,ac={"bg-white":"primary",transparent:"transparent"},ic=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=ac[e],portal:n,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=n||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:l,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(lc,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:l,backwardButton:r,...i})})})})),rc=(e=!1)=>e?{}:{padding:"p-0"},sc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},oc=ht((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",sc[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:h("w-full",pa(r)),...rc(n)}})})}),{childrenTypes:[]}),cc=ht((e=>o(oc,{...e})),{childrenTypes:[]}),dc=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?h("flex",ki[l]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(le,{image:n})})})),mc=["байт","Кб","Мб","Гб","Тб","Пб"],hc=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",uc(d,m),o(Re,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),uc=(e,t)=>e||t?o("span",{children:", "}):"",pc=(e,t)=>(l,n)=>{const a=U(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${mc[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?xc(a):l?.fileFormat;return c("div",{role:"listitem",children:[o(hc,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:gc(t),data:l?.data}),o(Pe,{__html:l?.__html})]},String(n))},gc=e=>e?o(le,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,xc=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},fc=d((({href:e,__html:t,target:l})=>{const{close:n}=de(),a=V(),r=U(a)(e),s=i((()=>{n()}),[]);return c(Ut,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:l,href:r,onClick:s}),o(Ot,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),bc=d((({text:e,href:t,target:l,__html:n})=>{if(!e&&!n)return null;const a=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(fc,{...e}),l),close:l}})({__html:n,href:t,target:l}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),yc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},vc=ht((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",yc[r]),role:"list",children:a.map(wc(d,i))}):null]})})),wc=(e,t)=>(l,n)=>{const a=l?.docType;return""===a?null:"reportSource"in l&&l?.reportSource?.__html?Nc(l,n):pc(e,t)(l,n)},Nc=(e,t)=>{const l={text:e.text,target:e.target,__html:e.reportSource?.__html};return e.reportSource?.__html&&e.text?c("div",{role:"listitem",children:[o(bc,{...l,href:kc(e)?e?.href:e?.attachment?.src}),o(Pe,{__html:e?.__html})]},String(t)):null},kc=e=>"href"in e,Sc=ht((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(le,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ee(n,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(le,{className:"w-fit",image:d})}):null,i?.src?o(le,{className:"lg:hidden",image:i}):null]})]})})})),Cc=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Tc=(e=[],t={})=>e.filter((({content:e={}})=>ci(t,e))).length,Ic=(e,t)=>e===t;const Bc=(Pc=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Ic,((e=Ic)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Pc(l,t[e])))));var Pc;const Mc=[],Rc={},Vc={primary:"bg-white/30",secondary:"bg-main-divider"},Dc={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},zc=d((({count:e,version:t="secondary"})=>{const l=Ne(),n=l?"bg-main-divider":Vc[t],a=Dc[t][l?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",n),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Ac=({text:e,description:t,icon:l,isActive:n,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(n);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[l?o(le,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},_c={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},jc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},$c={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Ec={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Lc=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",_c[n],l?Ec[n]:$c[n]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?jc[n]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Ac({text:r,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(zc,{count:m,version:Cc(l,n)})}):null]})})})),Oc=d((e=>o(e?.item?.href?Fc:Uc,{...e}))),Fc=d((e=>{const t=he(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(Lc,{...e,tag:"a",item:a,onClick:n})})),Uc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(Lc,{item:e,onClick:n,...l})})),Wc=(e,t,l)=>(n,a)=>o(Oc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Hc=d((({className:e,tabsType:t="default",items:l=[],activeItem:n,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:l.map(Wc(n,a,t))}))),qc={categories:[],extraOptions:[],propertyType:[],stage:[]},Kc=ht((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=mi(qc,{block:a.block,page:a.options?.page}),x=i(((e=qc)=>p(e)),[]),f=(({hotFilters:e=Mc,filtrationState:t=Rc,blocks:l=Mc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Bc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Tc(l,t.filter),version:Cc(t===e[a])})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Hc,{...f}),o(ai,{filtrationSchema:l,resetButton:n,field:m,reset:u}),o(ei,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Yc=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Xc=d((({children:e})=>Yc?e:null)),Gc=d((({color:e="text-primary-main",position:t="absolute"})=>o("div",{className:h("flex justify-center items-center h-full w-full backdrop-blur-sm z-50",t),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),Jc="/icons/MapMarkerClusterIcon.svg",Zc="/icons/MapMarkerClusterYellowIcon.svg";function Qc({yandexMaps:e,map:t,points:l,isLoad:n}){if(n||!l?.length)return;t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=ed("offices",e,a);if(l.length&&l.every((e=>"type"in e))){const n=ed("workplaces",e,a),r=td(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=td(l.filter((e=>"offices"===e.type)),"offices",e);i.add(s),n.add(r),t.geoObjects.add(n),t.geoObjects.add(i)}else{const n=td(l,"offices",e);i.add(n),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ed=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Jc:Zc,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),td=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Jc:Zc,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),ld={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},nd={...ld,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},ad=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(nd).join(" ")} ${l}`,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"})}),id=e=>globalThis[e];function rd(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=id(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(id(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(id(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const sd={...ld,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},od=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(sd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:l,width:"20",height:"16"})})})),cd=[55.753995,37.614069],dd=d((({points:e,className:t="",zoom:l=5,isLoad:n})=>{const i=s(null),r=rd("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?(Qc({yandexMaps:r,map:i.current,points:e,isLoad:n}),i.current.setCenter(md(e))):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:md(e),zoom:l,controls:[],suppressMapOpenBlock:!0})),Qc({yandexMaps:r,map:i.current,points:e,isLoad:n})}))}),[r,e,l,n]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[n?o(Gc,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(od,{yandexMaps:i}),o(od,{yandexMaps:i,direction:"out"})]}),ad(i,r,h("right-2 top-80",d))]})})),md=e=>{const t=[ud(hd(e,0)),ud(hd(e,1))];return t.every((e=>e))?t:cd},hd=(e,t)=>e.map((e=>e.coords?.[t])),ud=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,pd=({__html:e,list:t,richVersion:l})=>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(Pe,{__html:e,richVersion:l})}):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(le,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,gd={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},xd="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",fd=(e,{field:t,reset:l},n)=>{const a=n?5:6,i=(e||[]).map((e=>o(Gt,{text:gd[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:xd,children:r}),o(Ga,{className:xd,isUnfolded:e,children:s})]}),renderFoldButton:bd(l,n)})}):null})},bd=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(H,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:yd()})]}),yd=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(H,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),vd=()=>{},wd=()=>[],Nd=e=>"all"===e?"block":"hidden",kd=d((({className:e,data:t=[],isLoad:l,remoteWorkplaces:a=[],renderCard:i=vd,renderRemoteWorkplaceCard:s=vd,filterItems:d=wd,getBalloon:m=vd,getBalloonRemoteWorkplaces:u=vd,initFilterState:p={},descriptionData:g,title:x})=>{const f=x?.includes("Офис"),[b,{field:y,reset:v}]=At(p),[w,N,k,S]=r((()=>{const e=d(t,b),l=d(a,b),n=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m(e)}))),...l.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:u({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,n,l,e.length+l?.length]}),[t,a,b]),[C,T]=n("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Sd(x,S),g?pd(g):null,f&&Cd(t,C,T),o("div",{className:h("pb-3xl",Nd(C)),children:fd(Object.keys(p),{field:y,reset:v},f)})]}),o("div",{className:"h-[600px]",children:o(Xc,{children:o(dd,{points:N,isLoad:l,className:"h-full"})})})]}),c(Xc,{children:[w.map(i),k.map(s)]})]})})),Sd=(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(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Cd=(e,t,l)=>{const n=Cc("all"===t),a=Cc("business"===t),i=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Ot,{"data-id":"all",onClick:t=>i(t,"all",e),version:n,children:"Для физических лиц"}),o(Ot,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Td={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"}},Id=d((({className:e,children:t,color:l="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Td[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(le,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Td[l].text,children:t})]}))),Bd=d((({value:e,subText:t,children:l,isPhone:n,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,l,t].every((e=>!e))?null:Pd({textItems:i,subText:t,children:l,isPhone:n,...a})})),Pd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Md(l,s),a?o(Re,{color:n,size:"text-m",children:a}):null]}),Md=(e,t)=>e.filter(Boolean).map(((e,l)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${Rd(e)}`,children:e.trim()}):e.trim()},String(l)))),Rd=e=>e.replace(/\D/g,""),Vd=d((({className:e,children:t})=>o("div",{className:h("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}))),Dd=["ArrowDownIcon","ArrowUpIcon"],zd=["Подробнее","Скрыть"],Ad=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:zd[Number(e)]}),o(H,{className:"text-primary-text",name:Dd[Number(e)],width:"16",height:"16"})]}),_d=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Ed(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:Ed(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Id,{color:"green",children:Ed(s)})})]}),o("div",{className:"hidden sm:block",children:o(Vd,{className:"flex-wrap",children:m?.map($d)})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ga,{isUnfolded:e,children:o(Vd,{className:"flex-wrap",children:m?.map($d)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ad({isUnfolded:e,onToggle:t})})]},String(d))},jd=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Ed(t)} №${l}`,body:e.toUpperCase()}),$d=(e,t)=>o(Bd,{...e},String(t)),Ed=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Ld=[];const Od=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:Ld},Fd={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Ud={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)},Wd=d((({descriptionData:e,className:t})=>{const[l]=Qs(),n=l?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:l}=sn(`/api/v1/atms?regionCode=${e}`,Od);return{data:t||Ld,isLoad:!t&&!l}}(n);return o(kd,{className:t,filterItems:Hd,data:a,isLoad:i,initFilterState:Fd,renderCard:_d,getBalloon:jd,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Hd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Ud[t](e))),l=!n.length||n.some((t=>Ud[t](e)));return t&&l}))},qd=e=>{const t=Yd(e);return o(Bd,{label:"Режим работы",value:t,className:"max-w-none"})},Kd=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Yd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Kd({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Kd({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Xd=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Gd=e=>Xd.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Jd=e=>{if(!e)return null;const t=Zd(e);return c(Vd,{className:"border-none",children:[o(Bd,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Qd)})}),o(Bd,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},Zd=e=>{const t=Xd.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Qd=({short:e,status:t},l)=>o("div",{className:h("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(Re,{size:"text-xs",children:e})},String(l)),em=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Bd,{label:"Валюта",value:e.currency}):null,t?o(Bd,{label:"Купить",value:String(t)}):null,l?o(Bd,{label:"Продать",value:String(l)}):null]},String(n)),tm=(new Date).getDay(),lm=e=>{const[t]=e?.slice(tm-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Id,{color:"green",children:a}):null,l&&i?o(Id,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Id,{color:"red",children:"Выходной"})},nm=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",am=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Bd,{label:e,value:t&&l?l:"",subText:nm({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),im=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,rm=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,sm=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,om=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Gd(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),lm(u)]}),o("div",{className:"hidden sm:block",children:cm({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ga,{isUnfolded:e,children:cm({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ad({isUnfolded:e,onToggle:t})})]},String(h))},cm=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Gd(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Vd,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Bd,{label:"Факс",value:t,isPhone:!0}),o(Bd,{label:"Телефон филиала",value:e,isPhone:!0}),o(Bd,{label:"Для обращений юридических лиц",value:l,isPhone:!0}),o(Bd,{label:"Обслуживание физических лиц",value:n,isPhone:!0}),o(Bd,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Bd,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Vd,{children:o(Bd,{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(am)})})}):c(Vd,{children:[o(Bd,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Qd)})}),qd(d)]}),r?.businessScheduleVisibleTag?Jd(r?.businessScheduleDescription):null,s?.currencies?.length?o(Vd,{className:"flex-wrap",children:s?.currencies?.map(em)}):null]})},dm=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Gd(e),l=e?Yd(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?im(l):sm(l,n):rm(l):null})(l)}`;return{header:n,body:i}},mm=({address:e,workScheduleDescription:t},l)=>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(Re,{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(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:hm({workScheduleDescription:t})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ga,{isUnfolded:e,children:hm({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ad({isUnfolded:e,onToggle:t})})]},String(l)):null,hm=({workScheduleDescription:e})=>c("div",{children:[c(Vd,{className:"flex",children:[o(Bd,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Bd,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Bd,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Bd,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Bd,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),um=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),pm={branches:[],remoteWorkplaces:[]};const gm=async e=>await it(e,{method:"GET"})||pm,xm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},fm={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)},bm=d((({className:e})=>{const[t]=Qs(),l=t?.code??"000",{data:n,isLoad:a}=function(e){const{data:t,error:l}=sn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,gm);return{data:t||pm,isLoad:!t&&!l}}(l);return o(kd,{className:e,filterItems:ym,data:n?.branches,isLoad:a,remoteWorkplaces:n?.remoteWorkplaces,initFilterState:xm,renderCard:om,renderRemoteWorkplaceCard:mm,getBalloon:dm,getBalloonRemoteWorkplaces:um,title:`Офисы филиала ${t?.name}`})})),ym=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>fm[t](e)))))},vm=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...l,children:"offices"===n?o(bm,{}):o(Wd,{descriptionData:e})})})),wm=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(g,{className:h("box-border",e),...n,children:[o(C,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Nm=d((({className:e,padding:t,slides:l=[],...n})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...n,children:o(Ua,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),km=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,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(le,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Sm({__html:i,richVersion:r}):null,Cm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Cm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Cm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ee([n]):null]})]}))),Sm=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Cm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:n,children:t})]})]}):null,Tm=d((e=>{const{__html:t,richVersion:l="",...n}=e;return o(g,{defaultPadding:"p-0",...n,children:o(Pe,{__html:t,richVersion:l})})})),Im=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Xn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Xn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Bm=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(ul,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Pm=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Bm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Bm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Mm=["От 1 дня","До 365 дней"],Rm=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(yn,{min:1,max:365,value:e,items:Mm,onChange:t})]}))),Vm=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Bm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Bm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Dm=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Pm,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:zm(m)}),o(Rm,{days:a,setDays:e=>m({days:e})}),o(Vm,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Am(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{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(Im,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),zm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Am=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},_m=d((({days:e,tariffs:t=[]})=>{const l=$m(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[jm("Аренда за",e),jm("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(le,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),jm=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{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})]}),$m=(e,t)=>{const l=Em(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Em=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},Lm=(e,t)=>e.find((e=>e.branchCode===t)),Om=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Lm(n,l.selectedBranch),d=Fm(s?.safeBoxCaseVolumes),m=Um(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Wm(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Dm,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(_m,{days:l.days,tariffs:h})]})})),Fm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Um=(e,t)=>e?.find((e=>e.volume===t)),Wm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Hm=[];const qm=async e=>await it(e,{method:"GET"})||Hm,Km=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=An(),p=Ym(m.selectedRegion,u),x=function(e){const{data:t}=sn(e?`/api/v1/safeboxes?regionCode=${e}`:null,qm);return t||Hm}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Lm(x,m.selectedBranch)||x,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:l,defaultPadding:"",...a,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(Om,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(dd,{points:b,className:"h-[640px]"}):null]})})),Ym=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Xm={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"},Gm=(e,t,l)=>(n,a)=>{const{button:i}=n;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Jm(e,l)(n,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Zm(n),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Jm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Qm(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:eh({step:l,iconVersion:a,i:n,stepVersion:t})})})},Zm=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",Xm.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),Qm=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",eh=({step:e,iconVersion:t,i:l,stepVersion:n})=>{return $e(e?.icon)?o(le,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===n?Xm.iconText:(a=n,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:l+1});var a},th=d((({className:e="",title:t,description:l,steps:n=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=n.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:n.map(Gm(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),lh=d((({isActive:e,item:t,onClick:l})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),nh=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:h("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Ft,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),ah=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(nh,{onClick:e=>e.stopPropagation(),onClose:l,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(N,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function ih(e){throw new Error(e)}const rh=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:ih(e)}}))),[c,d]),l},sh=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const oh=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(Re,{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(ch,{...e},String(t))))})]}):null,ch=d((({icon:e,...t})=>{const l=he(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(le,{image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),dh=(e,t)=>l=>l.name?o(bs,{href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(l),data:fs(e,l.name),children:o(Re,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,mh=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(al,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),hh=d((({foreignOffices:e,branches:t})=>{const[l,a]=Qs(t?.default),r=he(),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=ph(An()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,uh),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Ut,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(bs,{href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(mh,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&sh(e.toLowerCase())(d.toLowerCase())>=.8)).map(dh(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(dh(f,x))]},e)))}),oh(e)]});var x,f})),uh=e=>e.name?.charAt(0)||"",ph=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),gh=d((({menuRef:e,menuItem:t,locationDialogProps:l,closeAll:n})=>{const i=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(hh,{...e}),l),close:l}})(l||{}),[{name:r}]=Qs(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&n(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(nh,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(N,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),xh="burgerMenuDialog",fh=({menuRef:e,centralMenuItem:t,closeAll:l,openDialog:n,locationDialogProps:a})=>{const i=rh(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(xh,i);return[r,{toggle:()=>{r?l():n(o(gh,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:l}),{id:xh})}}]},bh=[],yh=ht((({sticky:e,...t})=>{const{menuItems:l=bh}=e??{},a=l.find((e=>"Меню"===e.title)),r=l.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=n(-1),[x,f]=n(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),w=cl(v),N=s(null),[k,{toggle:S}]=fh({menuRef:N,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=ah({menuRef:N,dialogRef:w,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(vh(I,"left",{activeIndex:u,currentItemPosition:x})),o(lh,{item:a,isActive:k,onClick:e=>T(e)}),h.map(vh(I,"right",{activeIndex:u,currentItemPosition:x}))]})})})),vh=(e,t,l)=>(n,a,i)=>o(lh,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),wh="hidden sm:flex absolute z-40",Nh={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},kh=d((({className:e,items:t=[],activeItem:l,onChange:n,tabsType:i="default"})=>{const[r,s]=Va({itemCount:t?.length||0});return a((()=>Sh(r.current,t,l)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(ya,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Nh[i].item,gap:Nh[i].gap,children:t.map(Wc(l,n,i))}),s.canScrollLeft?o(ja,{className:h("left-6",wh,Nh[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o($a,{className:h("right-6",wh,Nh[i].buttonTop),onClick:s.scrollRight}):null]})})),Sh=(e,t,l)=>{const n=t.findIndex((e=>e===l));e&&n>0&&e.scrollTo({left:e?.children[n]?.offsetLeft,behavior:"smooth"})},Ch={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Th=({className:e="",tabsType:t="animated",...l})=>t?o("div",{className:h(Ch[t].wrapper,e),children:o(kh,{className:Ch[t].component,tabsType:t,...l})}):null,Ih=ht((({className:e="",tabs:t=[],block:l,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=Bh(l??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?l?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=n(Rh(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),w=f[y],N=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):N;v(-1===e?0:e)}),[b,N,u]);const k=Mh(f[y],y),S=i((e=>{const t=f.indexOf(e),l=f[t];v(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(p.query);e.text?l.set(u,e?.tabName??String(t)):l.delete(u),p.replace(`${p.pathname}?${l}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:l,...m,children:[Th({className:h({"pb-1":l?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:Ph(t,f),activeItem:w,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(l?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:l,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Mh)?.filter(Boolean)||[]}),Bh=({__id:e,anchor:t})=>t??e??"tabs",Ph=(e,t)=>t?.length?t:e,Mh=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Rh=(e,t)=>t?Number(t):e.reduce(((e,t,l)=>t.selected?l:e),0),Vh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Dh=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Vh[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),zh=d((({className:e="",isOpen:t,onClick:l})=>o(be,{className:e,appendRight:o(le,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Ah={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(le,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:l,pdfUrl:n,isOpen:a})=>e?o(zh,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:l,pdfUrl:n})}}):null},_h=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return jh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),jh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Ah))return null;return o(Ah[l],{...t,...n})},$h=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(_h,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Eh=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Lh=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Oh=d((({rows:e})=>{return o(ya,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=h("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Eh(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?Lh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Fh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{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(Oh,{rows:t.rowsData})})})]},n)}))}))),Uh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Wh=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===l}),onClick:()=>n(t),children:o(Re,{size:"text-xl",font:"font-light",color:Uh(t===l),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Hh=ht((({tableSource:e,pdfUrl:t,onClick:l})=>{const a=e?.tableData,[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Wh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Fh,{activeTabIndex:r,items:m}),o(zh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(zh,{onClick:l,isOpen:!0})]})})),qh=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@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(Hh,{...t,onClick:l})}):null]}))),Kh=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[u,p]=n(void 0),g=i((e=>p(e)),[]);return c(qh,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(le,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Dh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o($h,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Yh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(_a,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(_a,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Xh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=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,Yh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Gh=d((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(Kh,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Xh,{controls:f,children:[y,o(Ga,{isUnfolded:e,children:v})]}),renderFoldButton:Ya}):o(Xh,{controls:f,children:b})})]})})),Jh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===n?Zh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Qh(l):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),Zh=()=>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"}),Qh=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),eu=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:l})}):null]}))),tu=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(eu,{prefix:t,unit:l,suffix:n})})})),lu={AdTile:pt,ApplicationForm:oa,BankAccountFiltration:pi,BenefitsBlock:yi,BonusBenefitsBlock:Ni,ButtonsBlock:Si,CalculatorBonus:Ei,CalculatorBusinessDeposit:ar,CalculatorCredit:yr,CalculatorDeposit:jr,CalculatorRefinancing:Hr,CardTransfer:Zr,Carousel:rs,CarouselCard:ds,CarouselCatalogCard:hs,CarouselLinks:gs,CarouselRecommendationCard:ks,CarouselTariffsCard:Ts,DepositFiltration:Vs,Depository:Xs,ErrorBlock:Js,ExchangeRateTile:Co,Footer:qo,GrantSupport:Ko,Header:ic,Headline:C,HorizontalLayout:cc,ImgBlock:dc,LinkDocs:vc,MobileAppTile:Sc,MortgageFiltration:Kc,OfficesAtmsMap:vm,Placeholder:wm,ProductBlock:ut,ProductGallery:Nm,RepresentativeOfficeInfo:km,RichTextBlock:Tm,RollupItem:Do,SafeDepositRental:Km,StepsBlock:th,StickyBottomMenu:yh,TabsLayout:Ih,TariffsTable:Gh,TextBlock:Jh,UnitBlock:tu,VerticalLayout:oc},nu=me((()=>{a((()=>{Ct()}),[]);const e=Dt();ol(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");kt({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const au="cookie",iu=d((({__html:e})=>{const[t,{setTrue:l,setFalse:n}]=ll();!function(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(au)||l()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(au,"true"),n()}),[]);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(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Ft,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),ru=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=rh({onCloseAll:e,onClose:t}),{close:n}=de(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return ol(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:n!==l.length-1}),children:e},String(t||n))))}):null})),su=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:ih(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return ol(globalThis.document,"keydown",r),e?o("div",{className:h("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})),ou="header",cu="footer",du="sticky-footer",mu={},hu=d((({className:e,data:t=mu,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);nu();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:ou})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:cu})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:du})}):null,o(ru,{}),o(su,{}),o(iu,{__html:d?.cookieContent?.__html})]})}));Object.assign(hu,{childrenTypes:[],slots:()=>[ou,cu,du]});e.Blocks=lu,e.ContentPage=hu,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=me,e.joinList=li,e.packageVersion="0.14.548",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|