@redneckz/wildless-cms-uni-blocks 0.13.21 → 0.13.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/bin/migration-scripts/0.13.14.js +6 -2
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +43 -38
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/CarouselLinks/CarouselLinks.d.ts +0 -1
  6. package/bundle/components/CarouselLinks/maxLinksCount.d.ts +1 -0
  7. package/bundle/components/CarouselLinks/maxLinksCount.mobile.d.ts +1 -0
  8. package/bundle/icons/IconName.d.ts +18 -4
  9. package/bundle/services/search/useSearch.d.ts +3 -3
  10. package/bundle/ui-kit/Logo/iconSize.d.ts +4 -0
  11. package/bundle/ui-kit/Logo/iconSize.mobile.d.ts +4 -0
  12. package/bundle/ui-kit/Logo/logoTitleSizeStyle.d.ts +1 -0
  13. package/bundle/ui-kit/Logo/logoTitleSizeStyle.mobile.d.ts +1 -0
  14. package/bundle/utils/Nullable.d.ts +1 -0
  15. package/bundle/utils/isOnlyDigits.d.ts +1 -0
  16. package/cosmos-static/icons/BriefcaseIcon2.svg +1 -0
  17. package/cosmos-static/icons/CardSendIcon.svg +1 -0
  18. package/cosmos-static/icons/CoinIcon.svg +1 -0
  19. package/cosmos-static/icons/HeartTickIcon.svg +1 -0
  20. package/cosmos-static/icons/NotificationBingIcon.svg +1 -0
  21. package/cosmos-static/icons/SecurityCardIcon.svg +1 -0
  22. package/cosmos-static/icons//320/241onvert/320/241ardIcon.svg +1 -0
  23. package/dist/components/Carousel/renderCarouselCards.js +1 -1
  24. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  25. package/dist/components/CarouselLinks/CarouselLinks.d.ts +0 -1
  26. package/dist/components/CarouselLinks/CarouselLinks.js +5 -4
  27. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  28. package/dist/components/CarouselLinks/maxLinksCount.d.ts +1 -0
  29. package/dist/components/CarouselLinks/maxLinksCount.js +4 -0
  30. package/dist/components/CarouselLinks/maxLinksCount.js.map +1 -0
  31. package/dist/components/CarouselLinks/maxLinksCount.mobile.d.ts +1 -0
  32. package/dist/components/CarouselLinks/maxLinksCount.mobile.js +4 -0
  33. package/dist/components/CarouselLinks/maxLinksCount.mobile.js.map +1 -0
  34. package/dist/components/ContentPage/ContentPage.js +1 -1
  35. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  36. package/dist/components/Footer/Footer.mobile.js +2 -2
  37. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  38. package/dist/components/Header/Header.mobile.js +4 -1
  39. package/dist/components/Header/Header.mobile.js.map +1 -1
  40. package/dist/components/RollupItem/RollupItem.js +11 -13
  41. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  42. package/dist/icons/IconName.d.ts +18 -4
  43. package/dist/icons/IconName.js +14 -0
  44. package/dist/icons/IconName.js.map +1 -1
  45. package/dist/services/search/useSearch.d.ts +3 -3
  46. package/dist/services/search/useSearch.js +2 -5
  47. package/dist/services/search/useSearch.js.map +1 -1
  48. package/dist/ui-kit/DialogManager/DialogManager.js +2 -0
  49. package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
  50. package/dist/ui-kit/Icon/Icon.js +11 -7
  51. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  52. package/dist/ui-kit/Icon/RoundedIcon.js +1 -1
  53. package/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
  54. package/dist/ui-kit/Logo/Logo.js +11 -3
  55. package/dist/ui-kit/Logo/Logo.js.map +1 -1
  56. package/dist/ui-kit/Logo/iconSize.d.ts +4 -0
  57. package/dist/ui-kit/Logo/iconSize.js +4 -0
  58. package/dist/ui-kit/Logo/iconSize.js.map +1 -0
  59. package/dist/ui-kit/Logo/iconSize.mobile.d.ts +4 -0
  60. package/dist/ui-kit/Logo/iconSize.mobile.js +4 -0
  61. package/dist/ui-kit/Logo/iconSize.mobile.js.map +1 -0
  62. package/dist/ui-kit/Logo/logoTitleSizeStyle.d.ts +1 -0
  63. package/dist/ui-kit/Logo/logoTitleSizeStyle.js +4 -0
  64. package/dist/ui-kit/Logo/logoTitleSizeStyle.js.map +1 -0
  65. package/dist/ui-kit/Logo/logoTitleSizeStyle.mobile.d.ts +1 -0
  66. package/dist/ui-kit/Logo/logoTitleSizeStyle.mobile.js +4 -0
  67. package/dist/ui-kit/Logo/logoTitleSizeStyle.mobile.js.map +1 -0
  68. package/dist/ui-kit/SearchDialog/SearchDialog.js +0 -1
  69. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  70. package/dist/utils/Nullable.d.ts +1 -0
  71. package/dist/utils/Nullable.js +2 -0
  72. package/dist/utils/Nullable.js.map +1 -0
  73. package/dist/utils/isOnlyDigits.d.ts +1 -0
  74. package/dist/utils/isOnlyDigits.js +5 -0
  75. package/dist/utils/isOnlyDigits.js.map +1 -0
  76. package/lib/components/Carousel/renderCarouselCards.js +1 -1
  77. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  78. package/lib/components/CarouselLinks/CarouselLinks.d.ts +0 -1
  79. package/lib/components/CarouselLinks/CarouselLinks.js +5 -4
  80. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  81. package/lib/components/CarouselLinks/maxLinksCount.d.ts +1 -0
  82. package/lib/components/CarouselLinks/maxLinksCount.js +2 -0
  83. package/lib/components/CarouselLinks/maxLinksCount.js.map +1 -0
  84. package/lib/components/CarouselLinks/maxLinksCount.mobile.d.ts +1 -0
  85. package/lib/components/CarouselLinks/maxLinksCount.mobile.js +2 -0
  86. package/lib/components/CarouselLinks/maxLinksCount.mobile.js.map +1 -0
  87. package/lib/components/ContentPage/ContentPage.js +1 -1
  88. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  89. package/lib/components/Footer/Footer.mobile.js +2 -2
  90. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  91. package/lib/components/Header/Header.mobile.js +4 -1
  92. package/lib/components/Header/Header.mobile.js.map +1 -1
  93. package/lib/components/RollupItem/RollupItem.js +11 -13
  94. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  95. package/lib/icons/IconName.d.ts +18 -4
  96. package/lib/icons/IconName.js +14 -0
  97. package/lib/icons/IconName.js.map +1 -1
  98. package/lib/services/search/useSearch.d.ts +3 -3
  99. package/lib/services/search/useSearch.js +3 -6
  100. package/lib/services/search/useSearch.js.map +1 -1
  101. package/lib/ui-kit/DialogManager/DialogManager.js +2 -0
  102. package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
  103. package/lib/ui-kit/Icon/Icon.js +11 -7
  104. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  105. package/lib/ui-kit/Icon/RoundedIcon.js +1 -1
  106. package/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
  107. package/lib/ui-kit/Logo/Logo.js +12 -4
  108. package/lib/ui-kit/Logo/Logo.js.map +1 -1
  109. package/lib/ui-kit/Logo/iconSize.d.ts +4 -0
  110. package/lib/ui-kit/Logo/iconSize.js +2 -0
  111. package/lib/ui-kit/Logo/iconSize.js.map +1 -0
  112. package/lib/ui-kit/Logo/iconSize.mobile.d.ts +4 -0
  113. package/lib/ui-kit/Logo/iconSize.mobile.js +2 -0
  114. package/lib/ui-kit/Logo/iconSize.mobile.js.map +1 -0
  115. package/lib/ui-kit/Logo/logoTitleSizeStyle.d.ts +1 -0
  116. package/lib/ui-kit/Logo/logoTitleSizeStyle.js +2 -0
  117. package/lib/ui-kit/Logo/logoTitleSizeStyle.js.map +1 -0
  118. package/lib/ui-kit/Logo/logoTitleSizeStyle.mobile.d.ts +1 -0
  119. package/lib/ui-kit/Logo/logoTitleSizeStyle.mobile.js +2 -0
  120. package/lib/ui-kit/Logo/logoTitleSizeStyle.mobile.js.map +1 -0
  121. package/lib/ui-kit/SearchDialog/SearchDialog.js +0 -1
  122. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  123. package/lib/utils/Nullable.d.ts +1 -0
  124. package/lib/utils/Nullable.js +2 -0
  125. package/lib/utils/Nullable.js.map +1 -0
  126. package/lib/utils/isOnlyDigits.d.ts +1 -0
  127. package/lib/utils/isOnlyDigits.js +2 -0
  128. package/lib/utils/isOnlyDigits.js.map +1 -0
  129. package/mobile/bundle/bundle.umd.js +47 -43
  130. package/mobile/bundle/bundle.umd.min.js +1 -1
  131. package/mobile/bundle/components/CarouselLinks/CarouselLinks.d.ts +0 -1
  132. package/mobile/bundle/components/CarouselLinks/maxLinksCount.d.ts +1 -0
  133. package/mobile/bundle/icons/IconName.d.ts +18 -4
  134. package/mobile/bundle/services/search/useSearch.d.ts +3 -3
  135. package/mobile/bundle/ui-kit/Logo/iconSize.d.ts +4 -0
  136. package/mobile/bundle/ui-kit/Logo/logoTitleSizeStyle.d.ts +1 -0
  137. package/mobile/bundle/utils/Nullable.d.ts +1 -0
  138. package/mobile/bundle/utils/isOnlyDigits.d.ts +1 -0
  139. package/mobile/dist/components/Carousel/renderCarouselCards.js +1 -1
  140. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  141. package/mobile/dist/components/CarouselLinks/CarouselLinks.d.ts +0 -1
  142. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +5 -4
  143. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  144. package/mobile/dist/components/CarouselLinks/maxLinksCount.d.ts +1 -0
  145. package/mobile/dist/components/CarouselLinks/maxLinksCount.js +4 -0
  146. package/mobile/dist/components/CarouselLinks/maxLinksCount.js.map +1 -0
  147. package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
  148. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  149. package/mobile/dist/components/Footer/Footer.js +2 -2
  150. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  151. package/mobile/dist/components/Header/Header.js +4 -1
  152. package/mobile/dist/components/Header/Header.js.map +1 -1
  153. package/mobile/dist/components/RollupItem/RollupItem.js +11 -13
  154. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  155. package/mobile/dist/icons/IconName.d.ts +18 -4
  156. package/mobile/dist/icons/IconName.js +14 -0
  157. package/mobile/dist/icons/IconName.js.map +1 -1
  158. package/mobile/dist/services/search/useSearch.d.ts +3 -3
  159. package/mobile/dist/services/search/useSearch.js +2 -5
  160. package/mobile/dist/services/search/useSearch.js.map +1 -1
  161. package/mobile/dist/ui-kit/DialogManager/DialogManager.js +2 -0
  162. package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
  163. package/mobile/dist/ui-kit/Icon/Icon.js +11 -7
  164. package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
  165. package/mobile/dist/ui-kit/Icon/RoundedIcon.js +1 -1
  166. package/mobile/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
  167. package/mobile/dist/ui-kit/Logo/Logo.js +11 -4
  168. package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
  169. package/mobile/dist/ui-kit/Logo/iconSize.d.ts +4 -0
  170. package/mobile/dist/ui-kit/Logo/iconSize.js +4 -0
  171. package/mobile/dist/ui-kit/Logo/iconSize.js.map +1 -0
  172. package/mobile/dist/ui-kit/Logo/logoTitleSizeStyle.d.ts +1 -0
  173. package/mobile/dist/ui-kit/Logo/logoTitleSizeStyle.js +4 -0
  174. package/mobile/dist/ui-kit/Logo/logoTitleSizeStyle.js.map +1 -0
  175. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +0 -1
  176. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  177. package/mobile/dist/utils/Nullable.d.ts +1 -0
  178. package/mobile/dist/utils/Nullable.js +2 -0
  179. package/mobile/dist/utils/Nullable.js.map +1 -0
  180. package/mobile/dist/utils/isOnlyDigits.d.ts +1 -0
  181. package/mobile/dist/utils/isOnlyDigits.js +5 -0
  182. package/mobile/dist/utils/isOnlyDigits.js.map +1 -0
  183. package/mobile/lib/components/Carousel/renderCarouselCards.js +1 -1
  184. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  185. package/mobile/lib/components/CarouselLinks/CarouselLinks.d.ts +0 -1
  186. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +5 -4
  187. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  188. package/mobile/lib/components/CarouselLinks/maxLinksCount.d.ts +1 -0
  189. package/mobile/lib/components/CarouselLinks/maxLinksCount.js +2 -0
  190. package/mobile/lib/components/CarouselLinks/maxLinksCount.js.map +1 -0
  191. package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
  192. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  193. package/mobile/lib/components/Footer/Footer.js +2 -2
  194. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  195. package/mobile/lib/components/Header/Header.js +4 -1
  196. package/mobile/lib/components/Header/Header.js.map +1 -1
  197. package/mobile/lib/components/RollupItem/RollupItem.js +11 -13
  198. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  199. package/mobile/lib/icons/IconName.d.ts +18 -4
  200. package/mobile/lib/icons/IconName.js +14 -0
  201. package/mobile/lib/icons/IconName.js.map +1 -1
  202. package/mobile/lib/services/search/useSearch.d.ts +3 -3
  203. package/mobile/lib/services/search/useSearch.js +3 -6
  204. package/mobile/lib/services/search/useSearch.js.map +1 -1
  205. package/mobile/lib/ui-kit/DialogManager/DialogManager.js +2 -0
  206. package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
  207. package/mobile/lib/ui-kit/Icon/Icon.js +11 -7
  208. package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
  209. package/mobile/lib/ui-kit/Icon/RoundedIcon.js +1 -1
  210. package/mobile/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
  211. package/mobile/lib/ui-kit/Logo/Logo.js +12 -5
  212. package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
  213. package/mobile/lib/ui-kit/Logo/iconSize.d.ts +4 -0
  214. package/mobile/lib/ui-kit/Logo/iconSize.js +2 -0
  215. package/mobile/lib/ui-kit/Logo/iconSize.js.map +1 -0
  216. package/mobile/lib/ui-kit/Logo/logoTitleSizeStyle.d.ts +1 -0
  217. package/mobile/lib/ui-kit/Logo/logoTitleSizeStyle.js +2 -0
  218. package/mobile/lib/ui-kit/Logo/logoTitleSizeStyle.js.map +1 -0
  219. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +0 -1
  220. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  221. package/mobile/lib/utils/Nullable.d.ts +1 -0
  222. package/mobile/lib/utils/Nullable.js +2 -0
  223. package/mobile/lib/utils/Nullable.js.map +1 -0
  224. package/mobile/lib/utils/isOnlyDigits.d.ts +1 -0
  225. package/mobile/lib/utils/isOnlyDigits.js +2 -0
  226. package/mobile/lib/utils/isOnlyDigits.js.map +1 -0
  227. package/mobile/src/components/Carousel/renderCarouselCards.tsx +2 -2
  228. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +7 -16
  229. package/mobile/src/components/CarouselLinks/maxLinksCount.ts +1 -0
  230. package/mobile/src/components/ContentPage/ContentPage.tsx +4 -7
  231. package/mobile/src/components/Footer/Footer.tsx +3 -3
  232. package/mobile/src/components/Header/Header.tsx +8 -1
  233. package/mobile/src/components/RollupItem/RollupItem.tsx +35 -37
  234. package/mobile/src/icons/BriefcaseIcon2.svg +7 -0
  235. package/mobile/src/icons/CardSendIcon.svg +9 -0
  236. package/mobile/src/icons/CoinIcon.svg +6 -0
  237. package/mobile/src/icons/HeartTickIcon.svg +5 -0
  238. package/mobile/src/icons/IconName.ts +4 -4
  239. package/mobile/src/icons/NotificationBingIcon.svg +5 -0
  240. package/mobile/src/icons/SecurityCardIcon.svg +7 -0
  241. package/mobile/src/icons//320/241onvert/320/241ardIcon.svg +8 -0
  242. package/mobile/src/services/search/useSearch.ts +6 -13
  243. package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +2 -0
  244. package/mobile/src/ui-kit/Icon/Icon.tsx +18 -9
  245. package/mobile/src/ui-kit/Icon/RoundedIcon.tsx +1 -1
  246. package/mobile/src/ui-kit/Logo/Logo.tsx +35 -19
  247. package/mobile/src/ui-kit/Logo/iconSize.ts +1 -0
  248. package/mobile/src/ui-kit/Logo/logoTitleSizeStyle.ts +1 -0
  249. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +0 -1
  250. package/mobile/src/utils/Nullable.ts +1 -0
  251. package/mobile/src/utils/isOnlyDigits.ts +1 -0
  252. package/package.json +1 -1
  253. package/src/components/Carousel/renderCarouselCards.tsx +2 -2
  254. package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +0 -3
  255. package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +0 -3
  256. package/src/components/CarouselLinks/CarouselLinks.tsx +7 -16
  257. package/src/components/CarouselLinks/maxLinksCount.mobile.ts +1 -0
  258. package/src/components/CarouselLinks/maxLinksCount.ts +1 -0
  259. package/src/components/ContentPage/ContentPage.tsx +4 -7
  260. package/src/components/Footer/Footer.mobile.tsx +3 -3
  261. package/src/components/Header/Header.mobile.tsx +8 -1
  262. package/src/components/RollupItem/RollupItem.tsx +35 -37
  263. package/src/icons/BriefcaseIcon2.svg +7 -0
  264. package/src/icons/CardSendIcon.svg +9 -0
  265. package/src/icons/CoinIcon.svg +6 -0
  266. package/src/icons/HeartTickIcon.svg +5 -0
  267. package/src/icons/IconName.ts +23 -2
  268. package/src/icons/NotificationBingIcon.svg +5 -0
  269. package/src/icons/SecurityCardIcon.svg +7 -0
  270. package/src/icons//320/241onvert/320/241ardIcon.svg +8 -0
  271. package/src/services/search/useSearch.ts +6 -13
  272. package/src/ui-kit/DialogManager/DialogManager.tsx +2 -0
  273. package/src/ui-kit/Icon/Icon.tsx +18 -9
  274. package/src/ui-kit/Icon/RoundedIcon.tsx +1 -1
  275. package/src/ui-kit/Logo/Logo.tsx +23 -6
  276. package/src/ui-kit/Logo/iconSize.mobile.ts +1 -0
  277. package/src/ui-kit/Logo/iconSize.ts +1 -0
  278. package/src/ui-kit/Logo/logoTitleSizeStyle.mobile.ts +1 -0
  279. package/src/ui-kit/Logo/logoTitleSizeStyle.ts +1 -0
  280. package/src/ui-kit/SearchDialog/SearchDialog.tsx +0 -1
  281. package/src/utils/Nullable.ts +1 -0
  282. package/src/utils/isOnlyDigits.ts +1 -0
  283. package/bundle/ui-kit/Logo/Logo.mobile.d.ts +0 -10
  284. package/bundle/ui-kit/Logo/renderTitle.d.ts +0 -3
  285. package/dist/ui-kit/Logo/Logo.mobile.d.ts +0 -10
  286. package/dist/ui-kit/Logo/Logo.mobile.js +0 -10
  287. package/dist/ui-kit/Logo/Logo.mobile.js.map +0 -1
  288. package/dist/ui-kit/Logo/renderTitle.d.ts +0 -3
  289. package/dist/ui-kit/Logo/renderTitle.js +0 -12
  290. package/dist/ui-kit/Logo/renderTitle.js.map +0 -1
  291. package/lib/ui-kit/Logo/Logo.mobile.d.ts +0 -10
  292. package/lib/ui-kit/Logo/Logo.mobile.js +0 -8
  293. package/lib/ui-kit/Logo/Logo.mobile.js.map +0 -1
  294. package/lib/ui-kit/Logo/renderTitle.d.ts +0 -2
  295. package/lib/ui-kit/Logo/renderTitle.js +0 -9
  296. package/lib/ui-kit/Logo/renderTitle.js.map +0 -1
  297. package/mobile/bundle/ui-kit/Logo/renderTitle.d.ts +0 -3
  298. package/mobile/dist/ui-kit/Logo/renderTitle.d.ts +0 -3
  299. package/mobile/dist/ui-kit/Logo/renderTitle.js +0 -12
  300. package/mobile/dist/ui-kit/Logo/renderTitle.js.map +0 -1
  301. package/mobile/lib/ui-kit/Logo/renderTitle.d.ts +0 -3
  302. package/mobile/lib/ui-kit/Logo/renderTitle.js +0 -9
  303. package/mobile/lib/ui-kit/Logo/renderTitle.js.map +0 -1
  304. package/mobile/src/ui-kit/Logo/renderTitle.tsx +0 -15
  305. package/src/ui-kit/Logo/Logo.mobile.tsx +0 -37
  306. package/src/ui-kit/Logo/renderTitle.tsx +0 -15
@@ -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=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=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};class f{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}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(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}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={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","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,M=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},R=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,P=e=>t=>l=>e(l)?[]:[t],_=e=>null!=e,z=new Map;function A(e,t,{fallback:l,cache:i}={}){const s=r((()=>j(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(_)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(_(n))return n;const a=e(l);return _(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function j(e){return Array.isArray(e)?e:e instanceof Function?j(e()):[e]}async function E(e,t){try{return e?await O(e,t):null}catch(e){console.error(e)}return null}async function O(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const L=[];function D(){const{data:e}=A("/api/v1/regions",O);return e||L}const $=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),W=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:W});const X=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||G(t,d.CDN))return t;const n=t.startsWith("/");return W(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),J=(e,t)=>J._impl(e,t);function Y(){return Y._impl()}function q(e={}){const{isRemote:t,basePath:l}=e,n=Y(),{closeAll:a}=$();return e=>({...e,href:t&&!l?e.href:X(n)(e.href,l),"aria-label":e.text,onClick:J(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}J._impl=e=>e,J.setup=e=>{J._impl=e},Y._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),Y.setup=e=>{Y._impl=e};const Q={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",ee={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},te="text-center font-sans select-none",le={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ne=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ae(e),"flex gap-xs"),children:[n?u("div",{className:le[i],children:n}):null,ie(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:le[i],children:a}):null]})})),ae=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 w("group/btn items-center justify-center",ie(e)?a:"h-12 w-12",n?"rounded-full":"")},ie=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),re=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=g((({disabled:e,children:t,...l})=>{const n=q()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:re({className:e,rounded:n,version:l}),children:a}))),me=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),ue=g((({link:e})=>p(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(he,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(oe,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(he,{children:e.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},ge=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),xe=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ge,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),fe=e=>"_"===e,be=e=>/\d/.test(e),ye=e=>fe(e)||be(e),ve=[..."+7 (___) ___-__-__"],Ne=ve.findIndex(fe),we=ve.map(((e,t)=>ye(e)?ve.slice(0,t).filter(ye).length:-1));const Se=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ve.map(((e,l)=>be(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(ge,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),ke=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Se,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ce="Некорректно заполненное поле",Ie=P((e=>null!=e&&""!==e))(Ce),Te=P((e=>"string"==typeof e&&e.length>1))(Ce),Be=P((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ce),Me=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,P((e=>"string"==typeof e&&Re.test(e))))(Ce);var Re;const Ve=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]})]}),Pe=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(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 ze=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=new Array(e.length),a=new Array(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 Ae={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=Y(),o=X(s)(W(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Oe,{className:e,children:p("svg",{className:w(Ee(r.width),Ae[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),Ee=e=>e?"":"w-full h-full",Oe=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Le=g((({className:e="",label:t,options:l=[],value:r,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=_e(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[De(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",We(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:He(r)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Fe(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:$e(l,b).map(Ue(S,g,(e=>e.key===r?.key)))})}):null]})]})})),De=e=>e?u("div",{className:"mb-xs",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,$e=(e,t)=>t?e.filter((e=>ze(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Fe=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(ge,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Ue=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:He(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),He=e=>e?.text||e?.key||"",We=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ke=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Le,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Xe=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Pe.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Ge=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Je=e=>p("div",{children:[u(Ge,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Ge,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Ye=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},qe={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Qe=R({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:Me}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;V(Qe(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=M(qe,a),o=D();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),Xe({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ve(r),Je(r),Ye(t),u(ue,{link:l})]})})),et=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)}),u(xe,{className:"shrink-0 w-full",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),tt=({regions:e,field:t})=>u(Ke,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)}),lt={name:"",phone:"",inn:"",mail:""},nt=R({region:Ie,name:Te,phone:Me,inn:Be,mail:Ie}),at=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;V(nt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=M(lt,a),o=D();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[tt({regions:o,field:r}),et(r),Ye(t),u(ue,{link:l})]})})),it=[];const rt=async e=>await E(e,{method:"GET"})||it,st=["От 1 000 ₽","До 1 000 000 000 ₽"],ot=["От 1 мес","До 15 лет"],ct=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(xe,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),dt=(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}},mt=(e,t,l)=>Math.max(t,Math.min(e,l)),ht=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function ut(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function pt({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,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=ut(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const gt=1,xt=100,ft=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:gt),max:s=(a.length?a.length-1:xt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=dt(e,{normalize:(e=0)=>a.length?bt(a)(e):mt(e,r,s),format:ht()}),g=i((e=>{m&&m(ut(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),pt({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),yt(n)]})})),bt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),yt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),vt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(ft,{items:st,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(ft,{items:ot,min:1,max:180,...e("term")})]})]}),Nt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(Ke,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),wt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},St=R({fullName:Ie,annualRevenue:Ie,inn:Be,name:Te,phone:Me,region:Ie,department:Ie}),kt=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;V(St(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=M(wt,n),o=D(),c=function(e){const{data:t}=A(e?`/api/v1/branches?regionCode=${e}`:null,rt);return t||it}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),vt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),ct(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),Nt({regions:o,branches:c,field:r}),Ye(e),u(ue,{link:t})]})})),Ct={name:"",phone:""},It=R({name:Te,phone:Me}),Tt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(It(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=M(Ct,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Имя",...pe(r("name"),Te)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(r("phone"),Me)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:l})}),Ye(t)]})]})})),Bt={},Mt="wcms-resources";function Rt(e,t={}){const{fallback:l=Bt,folderName:n=Mt,setBasePath:a=!1}=t,i=W("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=A(e?i:null,O,{fallback:l});return r||Bt}const Vt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Rt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Ke,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(oe,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Pt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,_t=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=Y();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Pt).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:At(a,n)(e),type:jt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?zt({...t,src:At(a,n)(t.src)},l):null]})})),zt=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),At=(e,t)=>l=>l&&!F(l)?X(e)(W(t,l)):l,jt=e=>e?`image/${String(e)}`:void 0,Et=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(_t,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),Ot=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("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)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Lt=[{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"}],Dt=g((({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]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Ot,{paths:Lt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":$t(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(he,{size:"text-l",font:"font-light",children:l})}):null]})})})),$t=e=>w("rounded border",e?"bg-primary-main":""),Ft=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Dt,{text:"Валютный контроль",...e("currencyControl")}),u(Dt,{text:"Документарные операции",...e("documentaryOperations")}),u(Dt,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ut=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...pe(e("fullName"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"ФИО",...pe(e("name"),Te)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(ke,{className:"shrink-0 w-full mb-s",label:"Телефон",...pe(e("phone"),Me)})}),u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...pe(e("mail"),Ie)})})]})]}),Ht={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Wt=R({fullName:Ie,name:Te,phone:Me,mail:Ie}),Kt={ApplicationFormBusinessCard:at,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;V(Wt(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=M(Ht,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ut(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),Ft(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Ye(t),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(Et,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Et,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Tt,ApplicationFormCredit:kt,ApplicationFormAcquiring:Ze,ApplicationFormGrantSupport:Vt},Xt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Et,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Gt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Jt=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Gt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Yt(l,o):null,r?u(Xt,{responseType:r}):null]})})})),Yt=(e,t)=>{const l=e?.formType;if(!l||!(l in Kt))return null;return u(Kt[l],{...e,onSubmit:t})},qt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Qt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",qt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),Zt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:w("space-y-x",e),defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-left sm:text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(el)}):null]}))),el=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Qt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Et,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),tl(e.description)]}):null]},String(t)),tl=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-2xs sm:mt-xs",children:"list"===t?nl(e):ll(e)}):null},ll=e=>e?.name?u(me,{font:"font-light",size:"text-l",color:"text-secondary-text group-data-secondary:text-white",children:e.name}):null,nl=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u(me,{font:"font-light",size:"text-l",color:"text-secondary-text group-data-secondary:text-white",children:e},`benefitListItem-${t}`)))}):null},al=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(il(l))}):null,il=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(oe,{className:w("basis-full sm:basis-auto",e),appendLeft:rl({...a,iconVersion:c}),appendRight:rl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},rl=e=>e?.icon||e?.src?u(Et,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,sl={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"}},ol={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},cl=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=sl[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(me,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),dl=g((({className:e="",title:t,description:l,bonusItems:n=[],...a})=>u(k,{className:e,defaultPadding:"p-6xl",...a,children:p("div",{className:"container",children:[u(cl,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m",children:[u("div",{className:"grow",children:u(cl,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:al(e?.buttons)}),e.bonusItemContent?.bonusType?ml(e.bonusItemContent):null]})]},String(t)))):null})]})}))),ml=e=>"count"===e.bonusType?hl(e):ul(e),hl=e=>p("div",{className:"w-full pt-default mt-s flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-10",children:u("span",{className:"font-mohave text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(he,{size:"text-h2",children:e.bonusName})}):null]}),ul=e=>e.image?u(Et,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,pl=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),gl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),xl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],fl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(yl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?bl(r,b):{},...y?pl(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(gl,{className:w(c,n?xl[n-1]:"",y?"h-full":""),style:v?bl(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),bl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),yl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),vl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Nl={"horizontal-list":"w-6","vertical-list":"h-6"},wl=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs @lg:hidden",vl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?Nl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),Sl=e=>e,kl=(e=Sl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Cl=kl(),Il=(e=Sl)=>kl((t=>-e(t))),Tl=Il(),Bl=e=>t=>e.scrollWidth/t,Ml=e=>(t,l)=>{e.scrollBy({left:l*Bl(e)(t),behavior:"smooth"})},Rl=({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)}),[e]),[c,d]=a.length?[Il()(a),kl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ml(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ml(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Vl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Rl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(fl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(wl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Pl="text-left",_l=(e,t,l)=>u(Vl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(he,{size:"text-h6",font:"font-normal",align:Pl,children:t}):null,e?u(Et,{image:e,height:"180",className:"w-auto"}):null,l?u(he,{size:"text-h6",font:"font-normal",align:Pl,children:l}):null]},String(n)))({...e},t)))}),zl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(cl,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?_l(e):null]}))),Al={start:"justify-start",center:"justify-center",end:"justify-end"},jl=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",Al[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:al(e)})})),El=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Ol=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Ll=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",ht(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),Dl=Math.round(23.5),$l={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Fl={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ul={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Hl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Wl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Kl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Xl=e=>e?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Gl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${ht(2)(l.min||0)} ₽`,`До ${ht(2)(l.max||0)} ₽`];return u(ft,{items:e?n:[],step:t,...l})}function Jl(e){const{data:t}=A(`/wcms-resources/${e}.json`,O);return t}const Yl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Jl(t||"bonus-calculator-data")||Ul,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},ql=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=M({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Yl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Gl({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Gl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Kl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Ll,{title:"Баллов за год",value:m}):null,al(l,{isVertical:!0}),Xl(n)]})]})})),Ql=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Zl={horizontal:"gap-5xl",vertical:"flex-col gap-s"},en=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Zl[a]}`,l),children:e?.map((({id:e,text:l})=>u(Dt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),tn=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(en,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),ln=e=>tn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),nn=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:t?p(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),an=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n})=>u(Kl,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,rateBlockClassName:"tracking-[-25px]",unit:"%"}),rn=({rate:e})=>u(Ll,{title:"Ставка",value:e,postfix:"%"}),sn=e=>0===e.rate?u(nn,{isUnavailableByTerm:e.isUnavailableByTerm}):p("div",{children:[u("div",{className:"hidden md:block",children:an(e)}),u("div",{className:"md:hidden",children:rn(e)})]}),on=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},cn=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:dn([e,t],n),dn=([e,t],l=[])=>({[e]:l.length?Tl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Cl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),mn=(e,[t,l],n)=>e>=n[t]&&e<=n[l],hn=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,un=(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)},pn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=M({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=Jl(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...Wl,...e,isDisabledOperatingDeposit:d,isUnavailableByTerm:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&hn(c,e)&&mn(n,["minSum","maxSum"],e)&&mn(l,["minDays","maxDays"],e)))||Wl,{rate:h}=m,u=un(h,e),p=n+u,g=o?.rateRows||[Wl];return{...m,...dn(["minSum","maxSum"],g),...dn(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isUnavailableByTerm:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Gl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(ft,{items:[`От ${Ql(x.min||0)}`,`До ${Ql(x.max||0)}`],step:1,...x})),gn(o,s),ln({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:m,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[xn(d,c),al(l,{isVertical:!0}),Xl(n),Xl(a)]})]});var x})),gn=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Dt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Dt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Dt,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),xn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Ll,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Ll,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),fn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(ft,{items:[`От ${bn(e)}`,`До ${bn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),bn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,yn=e=>vn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&vn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&vn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&vn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),vn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Nn=(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)},wn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Jl(t||"credit-calculator-data"),s=i?.rateRows||[$l],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>yn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=cn(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=cn(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>yn({row:e,userInputParams:t,paramsViewSettings:l})&&mn(n,["minSum","maxSum"],e)&&mn(a,["minMonths","maxMonths"],e)))||$l)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=Nn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},Sn=e=>tn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),kn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Dl}),o=wn(r,t,a),c=Sn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Gl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),fn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Cn({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Ll,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),al(l,{isVertical:!0}),Xl(n)]})]})})),Cn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Dt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Dt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),In=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Jl(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Mn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Bn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Bn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&mn(n,["minSum","maxSum"],t)&&mn(a||r,["minMonths","maxMonths"],t)))||Hl,{rate:d}=c,m=Tn(d,e),h=n+m,u=i?.rateRows||[Hl];return{...c,...dn(["minSum","maxSum"],u),...dn(["minMonths","maxMonths"],u),availableMonths:on(u.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:r,income:m,finalSum:h}},Tn=(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)},Bn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Mn=(e,t)=>e+Math.round((t-e)/2),Rn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=M({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=In(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Gl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),fn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Vn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),sn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Ll,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Ll,{title:"Сумма в конце срока",value:h,postfix:"₽"}),al(l,{isVertical:!0}),Xl(n)]})]})})),Vn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ln({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},tn({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Pn=e=>_n({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&_n({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),_n=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],zn=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=Jl(t||"refinancing-calculator-data"),c=o?.rateRows||[Fl],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Pn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=cn(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=cn(["minSumOld","maxSumOld"],d,c),{minMonths:g,maxMonths:x}=cn(["minMonths","maxMonths"],d,c),f=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Pn({row:e,userInputParams:t,paramsViewSettings:l})&&mn(n+r,["minSum","maxSum"],e)&&mn(i,["minSumOld","maxSumOld"],e)&&mn(r,["minSumExtra","maxSumExtra"],e)&&mn(a,["minMonths","maxMonths"],e)))||Fl)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:b}=f,y=Nn(b,e),v=e.oldMonthlyPayment-y;return r((()=>({...f,...e,minSum:m,maxSum:h,minSumOld:u,maxSumOld:p,minMonths:g,maxMonths:x,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:y,benefit:v})),[e,o])},An=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=zn(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Gl({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Gl({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),fn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),jn({...s,...a},r),s.isExtraMoney?Gl({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),sn({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Ll,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Ll,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,Sn({orientation:"vertical",...r("isAnnuity")}),al(l,{isVertical:!0}),Xl(n)]})]})})),jn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Dt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Dt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(Dt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),En={CreditCalculatorForm:kn,DepositCalculatorForm:Rn,BusinessDepositCalculatorForm:pn,BonusCalculatorForm:ql,RefinancingCalculatorForm:An},On=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Dn(t)}))),Ln=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in En))return null;return u(En[t],{...e.calculatorBlock,isMobile:!0})},Dn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Ln(e[0])}):e.map(((e,t)=>u(El,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Ol,{isUnfolded:t,children:u(k,{children:Ln(e)})}),renderFoldButton:$n(e)},t.toString())))},$n=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(he,{align:"text-left",color:"text-white",children:e.nav?.title}),u(he,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Fn=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=dt(e,{normalize:(e=a)=>l&&n?String(mt(Number(Un(e)),l,n)):Un(e),format:ht(r)}),c=i((e=>t&&t(Un(e))),[t]);return u(ge,{onChange:c,...s,...o})})),Un=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Hn=g((e=>u(Fn,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),Wn={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Kn={amount:1500,_amount:1500},Xn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=M(Kn),d=s<=0,m=d?re({version:a?.version}):se({className:"text-white",version:a?.version}),h=q();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Wn[i],children:[u(Hn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Gn=g((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Et,{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"})}))),Jn=g((e=>u(Gn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Yn=g((e=>u(Gn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),qn="absolute top-[calc(50%-24px)] z-40",Qn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Zn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[ea(e),h?u(Jn,{className:w(qn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Yn,{className:w(qn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),ea=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Qn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Qn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ta=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),la=[];function na(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=ta,blocksRegistry:r={},ancestors:s=la}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const aa=[],ia=(e,{key:t,ancestors:l=aa,slotName:n=null,extraProps:a,renderProps:i=na,...r})=>{const s=a?(e,t)=>na(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||aa,[r.parent,n]]:l},a)))};function ra({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?ia(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const sa=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),oa="relative h-full",ca={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},da=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ua);return ra({...n,renderProps:(n,a,r)=>p("div",{className:ma(n,{someCardsHighlighted:i}),children:[na(n,a,{className:ha(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),ua(n)?sa({className:"absolute top-0 -right-4 z-40"}):null]})})},ma=(e,{someCardsHighlighted:t})=>w(oa,t&&(ua(e)?"pt-3xl":"pt-3xl sm:pt-16")),ha=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(oa,"min-w-80",ca[n],t&&(ua(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ua=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,pa=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,arrowsPadded:s=!0,isGap:o=!0,cardSize:c="normal",...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[g,{inc:x,dec: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:h,visibleItemCount:l},Math.floor(l/2)),[b,y]=Rl({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return p(k,{className:e,defaultPadding:"p-6xl",...d,children:[p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(fl,{containerRef:b,visibleItemCount:l,snapAlign:"snap-start",gap:o?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:da({noCardBorder:a,activeIndex:g,cardSize:c,...d})}),u(Zn,{scroll:y,arrowsPadded:s,onScrollLeft:f,onScrollRight:x,hasEdgeBlocks:N,activeIndex:g,itemCount:h})]}),u(wl,{containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"})]})}));pa.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],pa.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ga=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(cl,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),xa="z-10 border border-solid w-full h-full",fa=w(xa,"absolute hidden sm:block border-transparent"),ba=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(fa,"top-9 right-12 bg-green-dark")}),u("div",{className:w(fa,"top-6 right-8 bg-green")}),u("div",{className:w(fa,"top-3 right-4 bg-green-light")}),p("div",{className:w(xa,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(cl,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),al([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ya={black:"bg-black",white:"bg-white"},va=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(Et,{className:"flex justify-center mb-xl",image:n}):null,u(cl,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Na)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,al([i],{buttonClassName:"w-full mt-lg"})]}))),Na=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ya[e]}`},String(t)),wa="bg-transparent border-white border h-[70px] absolute w-80 top-0",Sa=g((({text:e,href:t="",target:l="",className:n=""})=>{const a=q()({href:t,target:l});return e?p("div",{className:w("flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m",n),children:[p("a",{className:w("absolute border border-primary-main px-xl py-lg\n text-l font-light bg-white text-primary-text flex\n justify-between items-center group-hover/link:text-primary-main z-10","rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto"),role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6 hidden sm:block",children:u(Et,{className:"w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:wa+" hidden sm:block mx-1.5 mt-1.5"}),u("div",{className:wa+" hidden sm:block mt-3 mr-3"})]}):null})),ka=g((({className:e,additionalDescription:t,description:l,links:n,title:a,maxLinksCount:i=10,...r})=>p(k,{className:w("flex flex-col sm:flex-row w-full overflow-hidden",e),...r,children:[p("div",{className:"mr-xl flex-auto",children:[u(cl,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u(cl,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?Ca(n,i):null]}))),Ca=(e,t)=>{const l=Math.ceil(e.length/t);return u(pa,{className:"@container-normal sm:w-2/3 w-full p-0 sm:p-xs",version:"secondary",itemCount:l,arrowsPadded:!1,children:new Array(l).fill(null).map(((l,n)=>u("div",{className:w("flex flex-wrap self-start w-full sm:w-[672px]"),children:e.slice(n*t,(n+1)*t).map(((e,t)=>u(Sa,{className:"sm:m-2xs",...e},String(t))))},String(n))))})},Ia=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=q({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),Ta={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},Ba=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Ta[n])})}):null,u("span",{children:l})]}))),Ma={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Ra={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Va=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Ma[a],t?Ra[a]:"",e),role:"list",children:n.map(((e,t)=>u(Ba,{isDotted:l,size:a,children:e},String(t))))}):null)),Pa=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(Ia,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[za(i,g),Aa(a),Ea(h,o,x),ja(e),_a(s,d,m)]}),al([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),_a=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(Et,{className:"shrink-0",image:e}):null,e?.icon?u(Et,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),za=(e,t)=>t?u(he,{size:ol[e],children:t}):null,Aa=e=>e?u(me,{size:"text-l",children:e}):null,ja=e=>e?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,Ea=(e,t,l="primary")=>e?.length?u(Va,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Oa={start:"@lg:self-start",center:"@lg:self-center",end:"@lg:self-end"},La=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-col @lg:flex-row justify-around @lg:justify-between items-stretch gap-3xl",children:[Da(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"justify-center mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Da(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Da=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("md:flex-shrink-0 self-center",l&&Oa[l],t),children:e}):null,$a=(e=[])=>e.reduce(((e,t)=>e+t),0),Fa=(e=[])=>e?.length?$a(e)/e.length:0,Ua=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 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:u(Et,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ha=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Wa=(e,t)=>e?u(me,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ka=(e,t)=>e?u(he,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Xa=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ha,{...e},`rte-${t}`):["label"in e?Ka(e.label,t):null,"description"in e?Wa(e.description,t):null],Ga=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?Ua(l.icon,t):null,u("div",{children:Xa(l)})]}))),Ja=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ya=e=>{return((t=e.map(Ja))?.length?Math.sqrt(Math.abs(Fa(t.map((e=>e**2)))-Fa(t)**2)):0)>16;var t},qa=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Qa=e=>!e.some(qa),Za=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Ya(l)||Qa(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ga,{benefitsVersion:t,...e},String(l))))}):null)),ei=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Xa)}):null)),ti=g((({isTabularBenefits:e,...t})=>u(e?ei:Za,{...t}))),li=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(ni)}):null)),ni=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(he,{size:"text-m",font:"font-light",children:e})},String(t)),ai=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m=!0,items:h,isDotted:g=!0,listItemSize:x,tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(Et,{image:y}):null,C=u(cl,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),I=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(La,{className:e,padding:t,defaultPadding:l,...m?{insetTitle:C}:{title:C},...w?{backImage:k}:ii(k,N),imageAlign:v,buttons:al(b),children:p("div",{className:"flex flex-col gap-xl",children:[I?.length?u(ti,{benefitsVersion:s,isTabularBenefits:o,benefits:I}):null,d?u(Ha,{__html:d}):null,h?.length?u(Va,{items:h,isDotted:g,listItemSize:x}):null,S,ri(f)]})})})),ii=(e,t)=>t?{rightImage:e}:{leftImage:e},ri=e=>e?.length?u(li,{tags:e}):null,si=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(Ia,{className:"flex items-center h-full",href:a,target:i,children:u(ai,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),oi={default:"w-14 h-14",stretched:"flex-1 h-14"},ci=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",oi[t]),di=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"},label:"Rutube"}],mi=e=>di.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},hi=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=mi(a),c=ui(l)??s;return u(oe,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",ci(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(Et,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),ui=e=>e?.src||e?.icon?e:void 0,pi=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(hi,{buttonSize:n,...e},String(t))))})]}))),gi=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(Ia,{href:l,target:r,className:"space-y-lg",children:[u(cl,{title:s,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Va,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,xi(n),i.length?u(pi,{media:i}):null]})}))),xi=e=>e?.src||e?.icon?u("div",{children:u(Et,{image:e})}):null,fi=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(he,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:al(a)}):null]},String(t))},bi=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(fi),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[yi(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-m",...a}):null,i.length?u(El,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Ol,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?vi:null}):null]})})),yi=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(Et,{image:e}):null}),vi=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Ni=(e=!1)=>e?"text-white":"",wi=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Si=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Et,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Et,{image:t})}),l?u(T,{headingType:"h4",className:Ni(a),title:l}):null,n?u("div",{className:wi(a),children:n}):null]}))),ki=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Ci(l,t))})}))),Ci=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),Ii=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(Si,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(ki,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(oe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Ti({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Ti=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),Bi=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Mi,{...e})})]})})),Mi=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Ii,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(Vl,{onVisibleIndicesChange:m,children:h}):h})),Ri=e=>"Image"===e?.contentType&&e?.image?u(Et,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,Vi=g((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(k,{className:w("flex flex-col gap-2xl justify-center items-center",e),defaultPadding:w("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:Ri(n)}),u(cl,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0}),a?.text?u(oe,{version:a?.version,text:a?.text,...a}):null]})));var Pi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Pi||(Pi={}));const _i=new Intl.NumberFormat("ru",{style:"currency",currency:Pi.RUB}),zi=e=>e?_i.format(e):"",Ai="text-left text-m font-light text-secondary-text",ji=`${Ai} pl-5xl`,Ei={USD:"DollarIcon",EUR:"EuroIcon"},Oi=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ai,children:u(he,{size:"text-m",children:"Валюта"})}),u("th",{className:ji,children:u(he,{size:"text-m",children:"Купить"})}),u("th",{className:ji,children:u(he,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Li)})]}))),Li=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(Et,{image:{icon:Ei[t]},width:"24",height:"24"}):null,u(he,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:zi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:zi(e?.buyExchangeRate)})})]},t)},Di={icon:"GpsIcon"},$i=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Qt,{...Di,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Fi=(e,t,l)=>{const n=Number(Ui(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)},Ui=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Hi=e=>{return(t=[[e=>e.value!==Pi.RUB&&e.oppositeValue!==Pi.RUB,()=>e.handleConvert(e.value,Pi.RUB)],[e=>e.value===Pi.RUB&&e.oppositeValue===Pi.RUB,()=>e.handleConvert(e.value,Pi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Wi(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??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(ge,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Le,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ki=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Pi.RUB,selectBuy:l?.[0]?.currency?.currency||Pi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Wi({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Xi(r,o,l),value:r.inputSell,setValue:e=>Ji(o,l)(e,r.selectSell,r.selectBuy)}),Wi({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Gi(r,o,t),value:r.inputBuy,setValue:e=>Yi(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(oe,{text:a.text,version:a?.version,...a}):null]})})),Xi=(e,t,l)=>n=>{t({selectSell:n}),Hi({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Ji(t,l)(e.inputSell,n,a)}})},Gi=(e,t,l)=>n=>{t({selectBuy:n}),Hi({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Yi(t,l)(e.inputBuy,n,a)})},Ji=(e,t)=>(l,n,a)=>{e({inputSell:Ui(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Fi(l,i,n===Pi.RUB)||"")})},Yi=(e,t)=>(l,n,a)=>{e({inputBuy:Ui(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Fi(l,i,n===Pi.RUB)||"")})};const qi=async e=>{const t=await Qi(),l=t?.code||"000";return{region:t,exchangeRates:await Zi(e,l)}},Qi=async()=>{try{return await O("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Zi=async(e,t)=>{try{return await O(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},er=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=A("/api/v1/exchangerates",qi);return e||{}}(),i=tr(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:Pi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Pi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(La,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(Oi,{className:"mb-xl",exchangeCurrencyItems:i}):null,u($i,{address:a?.address})]}),i.length&&r.length&&s.length?u(Ki,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),tr=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],lr=e=>Rt(d.SITEMAP||"sitemap",{fallback:e}),nr=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(ar)}):null)),ar=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},ir=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(Et,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),rr=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",sr=(e,t)=>u(Qt,{...e,iconBgVersion:t,className:"shrink-0"}),or=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(El,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Ol,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:ra({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>cr({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));or.childrenTypes={exclude:["RollupItem"]};const cr=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?dr({label:r,labelIcon:l,labelIconBgVersion:n,icon:rr(a),onToggle:i}):u(ir,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},dr=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[sr(a,t),e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),mr=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(hr):null,u(oe,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),hr=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(he,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(ur)})]},String(t)),ur=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:pr(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),pr=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${gr(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},gr=e=>e.replaceAll(/\D/g,""),xr=g((({className:e="",index:t,text:l,...n})=>{const a=q(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),fr=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(he,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(xr,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),br=g((({className:e="",index:t,...l})=>{const n=q({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`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}`})})),yr=g((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(he,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @lg:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(br,{index:t,...e},String(t))))}):null]}))),vr=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=lr(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=Rt(d.FOOTER||"footer",{fallback:l});return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(or,{label:e?.text,labelIcon:e?.icon,children:u(nr,{items:e.items})},String(t))))}),u(mr,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(pi,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(Nr)})]}),u(fr,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(yr,{links:c})]})})),Nr=({href:e="/"},t)=>{const{label:l}=mi(e);return u(oe,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},wr={"bg-white":"color",transparent:"white"},Sr={"bg-white":"text-primary-main",transparent:"text-white"},kr=(e,t,l)=>u(Et,t?.src?{image:t,className:Sr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:wr[e]},className:Sr[e],width:l?.width,height:l?.height}),Cr={"bg-white":"text-primary-text",transparent:"text-white"},Ir=(e,t,l)=>u("span",{className:`${Cr[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),Tr=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[kr(e,a?.image,{width:"34",height:"34"}),i?Ir(t||a?.title,e,"text-s"):null]}))),Br={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Mr=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=Y(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(Tr,{className:"my-2xs",bgColor:e,logo:t})}):Rr(s),l?u("div",{children:u(oe,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Br["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),Rr=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Et,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Vr={"bg-white":"primary",transparent:"transparent"},Pr=g((({bgColor:e="bg-white",version:t=Vr[e],...l})=>{const{logo:n,internetBankUrl:a}=lr(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Mr,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),_r={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},zr=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",_r[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:ra({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));zr.childrenTypes=[];const Ar=g((e=>u(zr,{...e})));Ar.childrenTypes=[];const jr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(Et,{image:l})})})),Er=["байт","Кб","Мб","Гб","Тб","Пб"],Or=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(he,{size:"text-l",font:"font-light",children:[t,u(he,{color:"text-secondary-text",children:n?.href&&Lr(Dr(n.href),l)})]}):null]}))),Lr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Dr=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},$r={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Fr=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=Y();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(cl,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",$r[r]),role:"list",children:a.map(Ur(o,r,i))}):null]})})),Ur=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?X(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.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))} ${Er[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(Or,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(Et,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Hr={left:"text-left",center:"text-center",right:"text-right"},Wr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(he,{size:"text-xl","font-weight":"light",children:e})}):null,Kr=e=>e?.length?u(Va,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Xr=e=>{const t=e.length>2;return al(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Gr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(La,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Hr[l])}):null,rightImage:r?.src?u(Et,{className:"hidden lg:block",image:r}):null,buttons:Xr(n),children:[Wr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(Et,{className:"w-fit",image:o})}):null,Kr(s),r?.src?u(Et,{className:"lg:hidden",image:r}):null]})]})})})),Jr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Yr("Страховая сумма:",e):null,Number(t)>0?Yr("Ежемесячный лимит:",t):null]}):null,Yr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(he,{font:"font-light",size:"text-l",children:e}),p(he,{size:"text-h6",color:"text-primary-text",children:[ht(2)(t)," ₽"]})]}),qr=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(ai,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isFullWidthTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Jr(Number(a),Number(i))})}))),Qr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(cl,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Zr()})]}))),Zr=(e=3)=>ts(100,e).map((e=>Math.floor(e))).map(es),es=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),ts=(e,t)=>[e].concat(t>0?ts(e/1.618,t-1):[]);function ls(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"flex items-center gap-s",children:[u("div",{className:se({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(Et,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(oe,{version:"link",text:n,ariaLabel:n,onClick:t})]})}const ns=g((({className:e,padding:t,backwardButton:l,...n})=>{const a=Y(),r=i((e=>{e?.preventDefault(),a.back()}),[]);return p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?ls(n.version&&"primary"!==n.version?"white":"primary",r):null,u(ai,{className:"grow h-full",...n})]})})),as=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(Vl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(ai,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),is=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(ai,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),rs=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[ss(r),s?u(T,{headingType:"h4",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?os(i):null,cs("Адрес",e,"GeolocationIcon"),cs("Телефон",l,"PhoneIcon"),cs("E-mail",t,"MailIcon"),n?.text?al([n]):null]})]}))),ss=e=>u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:e?.src||e?.icon?u(Et,{image:e}):null}),os=e=>u("div",{className:"border-b border-main-divider",children:u(Ha,{__html:e})}),cs=(e,t,l)=>p("div",{className:"flex gap-m",children:[u(je,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col",children:[u(he,{size:"text-m",font:"font-light",children:e}),t?u(he,{size:"text-h6",color:"text-green",children:t}):null]})]}),ds=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Ha,{__html:t,richVersion:l})})})),ms=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function hs(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const us={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ps=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(us).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),gs={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},xs=(e,t,l)=>p("div",{className:`${Object.values(gs).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),fs={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},bs=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(fs).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ys=e=>globalThis[e];const vs=()=>function(e,t){const[l,r]=n(),s=i((()=>r(ys(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!ys(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Ns={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},ws=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Ns).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),Ss={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},ks=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=vs(),[c,d]=n(),[m,h]=n(Bs(ms)),g=Cs(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),hs(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?Bs(ms):m;hs(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?xs(ms,0,(e=>{if(e){const t=Bs(e);h(t)}})):ps(g)}),u("div",{className:`${Object.values(Ss).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(ws,{yandexMaps:r}),u(ws,{yandexMaps:r,direction:"out"})]}),bs(r.current,o,`right-2 top-80 ${x}`)]})})),Cs=e=>[Ts(Is(e,0)),Ts(Is(e,1))],Is=(e,t)=>e.map((e=>e[t])),Ts=e=>e.reduce(((e,t)=>e+t))/e.length,Bs=e=>e?e.map((e=>e.coords)):null,Ms=g((({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]}))),o=s.find((e=>e.key===n));return u(Le,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Rs=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Ms,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Ms,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Vs=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),Ps=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(Vs,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Vs,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),_s=["От 1 дня","До 365 дней"],zs=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(he,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(ft,{min:1,max:365,value:e,items:_s,onChange:t})]}))),As=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Ms,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Ms,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),js=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(Rs,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Es(c)}),u(zs,{days:a,setDays:e=>c({days:e})}),u(As,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Os(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(Ps,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Es=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Os=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ls=g((({days:e,tariffs:t=[]})=>{const l=$s(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[Ds("Аренда за",e),Ds("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(Et,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),Ds=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),$s=(e,t)=>{const l=Fs(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Fs=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},Us=(e,t)=>e.find((e=>e.branchCode===t)),Hs=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Us(n,l.selectedBranch),o=Ws(s?.safeBoxCaseVolumes),c=Ks(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Xs(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(js,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Ls,{days:l.days,tariffs:d})]})})),Ws=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ks=(e,t)=>e?.find((e=>e.volume===t)),Xs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Gs=[];const Js=async e=>await E(e,{method:"GET"})||Gs,Ys=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=D(),h=qs(c.selectedRegion,m),g=function(e){const{data:t}=A(e?`/api/v1/safeboxes?regionCode=${e}`:null,Js);return t||Gs}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Us(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Hs,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(me,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(ks,{points:f,className:"h-[640px]"}):null]})})),qs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Qs(e){throw new Error(e)}const Zs=e=>Boolean(e?.icon||e?.src),eo={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},to={normal:"",small:"min-h-6xl"},lo={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"},no=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(cl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(ao(i,r))})}):null,al(a,{isVertical:!0})]}))),ao=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return io(e,t)(l,n);case"rte":return u(Ha,{__html:l.__html});default:Qs(l)}},io=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:ro(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",to[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",lo.description),children:l.description}):null]})]})},String(n)),ro=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=eo[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${lo.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Zs(l?.icon)?u(Et,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},so=e=>({href:t})=>!!t&&H(F(t)?e.href:e.pathname).startsWith(H(t));function oo(e=[]){const t=Y(),l=e.findIndex((e=>so(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const co="location";function mo(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])]})(b,"location",uo()??{name:e}),r=i((e=>{po(e),l(e)}),[]),{data:s}=A("/api/v1/region",O);return a((()=>{s&&!ho()&&l(s)}),[s]),[t??{name:e},r]}const ho=()=>Boolean(globalThis.localStorage?.getItem(co)),uo=()=>{try{const e=globalThis.localStorage?.getItem(co);return e&&JSON.parse(e)}catch(e){return null}},po=e=>{try{globalThis.localStorage?.setItem(co,JSON.stringify(e))}catch(e){}},go=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Et,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),xo=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=$(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:w("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(go,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const fo=e=>e?.length?p("div",{className:"border-t border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-5xl",children:e.map(((e,t)=>u(bo,{...e},String(t))))})]}):null,bo=g((({icon:e,...t})=>{const l=q(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s",children:[e?u(Et,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:n}):null]})})),yo=e=>t=>u("div",{className:"mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),vo=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),No=g((()=>{const{defaultLocation:e,foreignOffices:t}=lr(),[l,a]=mo(e),[r,s]=n(""),o=So(function(){const{data:e}=A("/api/v1/regions",O);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((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})(o,wo),{close:d}=$(),m=i((e=>{a(e),d()}),[]);return p(xo,{head:p("div",{children:[l?p("div",{className:"mb-s",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(he,{color:"text-primary-main",children:l.name})})]}):null,u(vo,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&ze(e.toLowerCase())(r.toLowerCase())>=.8)).map(yo(m))}):u("div",{className:"columns-2 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(he,{size:"text-h6",children:e})}),t.map(yo(h))]},e)))}),fo(t)]});var h})),wo=e=>e.name?.charAt(0)||"",So=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),ko=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a})=>{const r=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(Et,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:w("h-12 w-full px-10 text-l text-black outline-none box-border","border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:l,onChange:r,onFocus:a})]})})),Co=(e,t,l=300)=>a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t);function Io(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const To=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Bo=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Mo=e=>t=>e.map((([e,l])=>[ze(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Vo(t,e))).reduce(To(Math.max,0),new Map),Ro=e=>t=>{return Io(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Bo(t||"");return l.length?$a(e.map((e=>Cl(l.map(ze(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},Vo=(e,t)=>new Map(e.map((e=>[e,t]))),Po=["/"],_o=({basePathList:e=Po,initialQuery:t="",wasOpened:l})=>{const[i,s]=n(t||"");a((()=>{null!=t&&s(t)}),[t]);const o=r((()=>e.map((e=>l?e:null))),[l,e]),{data:c}=A(o,zo),[d,m]=n(null);return Co((()=>{c&&m(c.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Bo(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Mo(i)).reduce(To(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Ro(a)(r)})(i)))}),[c,i]),[d,{value:i,onChange:s}]},zo=async(...e)=>(await Promise.allSettled(e.map((e=>E(W(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Ao=g((({className:e,topItems:t})=>{const l=q({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(jo)})})),jo=(e,t)=>{const{text:l,items:n,href:a,target:i,onClick:r}=e;return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),n?.filter((e=>!e.displayArea||"Footer"===e.displayArea)).map(((e,t)=>u(Eo,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Eo=g((({text:e,index:t,basePath:l,...n})=>{const a=q({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Oo=g((({initialQuery:e})=>{const{topItems:t}=lr(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=_o({basePathList:l,initialQuery:e,wasOpened:!1}),s=r((()=>Lo(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(xo,{head:u(ko,{autoFocus:!0,...i}),children:u(Ao,{topItems:s})})})),Lo=e=>t=>e?.length&&t?.length?Io(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:W("/",t)})))}))):[];const Do=g((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=$();return{open:(t={},l={})=>e(u(Oo,{...t}),l),close:t}})(),s=i((e=>{l(e),$o(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:w("relative",e),children:[u(ko,{value:t,onChange:s}),u(go,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),$o=e=>e&&e.length>=3,Fo=g((({item:e,basePath:t})=>{const l=q({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=Y(),s=so(r)({href:n});return p("a",{className:w(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(Et,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Uo=g((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(Fo,{item:e,basePath:t},String(l))))}):null)),Ho=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:w("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Wo=g((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=lr(e.options?.page?.fallback),[o]=mo(s),c=(()=>{const{open:e,close:t}=$();return{open:(t={})=>e(u(No,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=Rl({itemCount:t?.length??0}),[g]=oo(t),[x,f]=n(g),b=r((()=>t?.[x]),[t,x]),y=b?.items||[];a((()=>{f(g)}),[g]),a((()=>{x>0&&h.scrollTo(x)}),[x,h]);const v=i((e=>f(e)),[]);return u(xo,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(fl,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Ho,{item:e,isActive:x===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(Uo,{activeMenuSubItems:y,basePath:b?.href}),u(Do,{className:"grow mb-5"}),Ko(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(Et,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(he,{size:"text-h5",children:o.name}),u(he,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Ko=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(Et,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Xo=g((({isActive:e,item:t,onClick:l})=>{const n=q({isRemote:!d?.BASE_PATH||!t.href?.startsWith(d?.BASE_PATH)}),{href:a,target:i,onClick:r}=n({href:t.href,target:"_self"}),s="BurgerIcon"===t?.icon?.icon?t.isActive:e,o=s?"color":"black";return p("a",{className:w(s?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:()=>"BurgerIcon"===t?.icon?.icon&&l?l():r(),href:a,target:i,children:[u(Et,{className:"w-6 h-6",image:{icon:t?.icon?.icon,iconVersion:o}}),t.title]})})),Go=g((({menuItems:e,onClick:t})=>{const[l]=oo(e);return u(k,{className:"sticky bottom-0 left-0 right-0 bg-transparent z-[100]",padding:"p-0",children:u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,n)=>u(Xo,{isActive:n===l,item:e,onClick:t},String(n))))})})}));const Jo=({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((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Qs(e)}}))),[c,d]),l},Yo="burgerMenuDialog",qo=g((({...e})=>{const{menuItems:t=[]}=Rt(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{fallback:e.options?.page?.fallback,folderName:"portal-resources",setBasePath:!0}),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=$(),n=Jo(),a=((e,t)=>t.find((t=>t.id===e),e))(Yo,n),r=i((()=>e(u(Wo,{}),{id:Yo})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return p("div",{className:"contents",children:[u(Go,{menuItems:o,onClick:n}),l?u(Wo,{}):null]})})),Qo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Zo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},ec={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},tc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},lc=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Qo[n],l?tc[n]:ec[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Zo[n]:"text-secondary-text hover:text-primary-main"),children:[u(he,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),nc=g((e=>u(e?.item?.href?ac:ic,{...e}))),ac=g((e=>{const t=q(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(lc,{...e,tag:"a",item:a,onClick:n})})),ic=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(lc,{item:e,onClick:n,...l})})),rc=(e,t,l)=>(n,a)=>u(nc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),sc="hidden sm:flex absolute z-40 top-0",oc=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Rl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(fl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(rc(l,n,a))}),r.canScrollLeft?u(Jn,{className:w("left-6",sc),onClick:r.scrollLeft}):null,r.canScrollRight?u(Yn,{className:w("right-6",sc),onClick:r.scrollRight}):null]})})),cc=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(rc(n,a,t))}))),dc=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(cc,{...t});case"centered":return u("div",{className:"flex",children:u(cc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(oc,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},mc=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(uc)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&hc(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),hc(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:dc({items:c,value:c[d],tabsMode:s,onChange:h})})})),hc=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},uc=e=>"group"===e?.type?{text:e.title}:e,pc={Buttons:({buttons:e})=>al(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Et,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Va,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},gc=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(he,{size:"text-l",font:"font-light",children:e}):null,t?u(Et,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),xc=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(gc,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:fc(e,t)},String(l)))):null]})));function fc(e,t){if(!e||!e.tableCellType||!(e.tableCellType in pc))return null;const l=pc[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const bc=g((({tiles:e,...t})=>e?.length?u(Vl,{...t,padding:void 0,children:e.map(((e,l)=>u(xc,{tile:e,...t},String(l))))}):null)),yc=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(xc,{tile:e,...t},String(l))))}):null)),vc=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=Nc(n),o=wc(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(cl,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?yc:bc,{tiles:o,...r})]})})),Nc=e=>e?.[0]?.data?e[0].data:[],wc=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),Sc=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?kc():null,"big"===n?Cc(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(he,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Ic(l):null,r?.length?Tc(r,!0):null,i?u(Ha,{__html:i}):null]})]}))),kc=()=>u("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"}),Cc=e=>e?.src?u(Et,{className:"h-fit flex-shrink-0",image:e}):null,Ic=e=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Tc=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),Bc=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(ai,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),Mc=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rc=(e,t)=>Object.entries(e).map((([t,l])=>"number"==typeof l?((e,t)=>l=>Mc(t[e])||Mc(l[e])||Vc(t[e])<=Vc(l[e]))(t,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>l=>Mc(t[e])||Mc(l[e])||Vc(t[e]?.min)>=Vc(l[e]?.min)&&Vc(t[e]?.min)<=Vc(l[e]?.max))(t,e):Array.isArray(l)?((e,t)=>l=>Mc(t[e])||Mc(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(t,e):((e,t)=>l=>Mc(t[e])||Mc(l[e])||t[e]===l[e])(t,e))).every((e=>e(t))),Vc=e=>Number(e||0),Pc=["ArrowDownIcon","ArrowUpIcon"],_c="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",zc=g((({label:e="",filtrationState:t={},topItemsCount:l=0,block:n,notFound:a,...i})=>{const r=n?.blocks?.filter((e=>Rc(t,e.content||{})))||[],[s,o]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]];return p("div",{children:[u("div",{className:w(r.length?"hidden":"block"),children:a?Ac(a):null}),p("div",{className:w("space-y-2xs",r.length?"":"hidden"),children:[u("div",{className:w(_c),children:ia(s,{...i.options,parent:n})}),u(El,{renderFoldableSection:({isUnfolded:e})=>u(Ol,{className:w(_c),isUnfolded:e,children:ia(o,{...i.options,parent:n})}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(ir,{className:w(l<1?"hidden":""),disabled:!o?.length,label:e,icon:Pc[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})}));function Ac({title:e,description:t}){return u("div",{className:"bg-white py-20",children:u(cl,{title:e,description:t,headlineVersion:"S",isEmbedded:!0})})}const jc=g((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Ge,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Ec=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Oc(e))]}),n?u("div",{children:u(oe,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),Oc=e=>([t,l])=>{const n=l?.type;return"array"===n?Lc(t,e)(l):null},Lc=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(jc,{items:n,multiple:!0,...t(e)})]},e)},Dc=1e9,$c={sum:{min:1e4,max:Dc},period:{min:3,max:36}},Fc=g((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[r,{field:s,reset:o}]=M($c),c=a?.max||60,d=p("div",{children:[u(Hn,{label:n?.title,min:500,max:Dc,...s("sum",{parse:e=>({min:Number(e),max:Dc}),format:({min:e})=>String(e)})}),u(ft,{title:a?.title,items:["От 3 мес","До 5 лет"],min:a?.min||3,max:c,...s("period",{parse:e=>({min:e,max:c}),format:({min:e})=>e})})]});return p(k,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Ec({field:s,reset:o,filtrationSchema:t,resetButton:l,children:d}),u(zc,{filtrationState:r,...i})]})}));Fc.childrenTypes=["ProductTile"],Fc.childSchema=e=>e?.filtrationSchema||{};const Uc={primary:"bg-white/30",secondary:"bg-main-divider"},Hc={primary:"text-white",secondary:"text-secondary-text"},Wc=g((({count:e,version:t="secondary"})=>u("div",{className:w("w-6 h-6 rounded-full flex items-center justify-center",Uc[t]),children:u(he,{size:"text-xs",color:Hc[t],children:e})}))),Kc=(e=[],t={})=>e.filter((({content:e={}})=>Rc(t,e))).length,Xc=(e,t)=>e===t;const Gc=(Jc=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])=>Jc(l,t[e])))));var Jc;const Yc=[],qc={},Qc={categories:[],extraOptions:[],propertyType:[],stage:[]},Zc=g((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=M(Qc),m=i(((e=Qc)=>d(e)),[]),h=(({hotFilters:e=Yc,filtrationState:t=qc,blocks:l=Yc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Gc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Wc,{version:t===e[a]?"primary":"secondary",count:Kc(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:m});return p(k,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(cc,{...h}),Ec({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(zc,{filtrationState:s,...a})]})}));Zc.childrenTypes=["ProductTile"],Zc.childSchema=e=>e?.filtrationSchema||{};const ed={ApplicationForm:Jt,BenefitsBlock:Zt,Bonus:dl,BonusBenefitsBlock:zl,ButtonsBlock:jl,Calculator:On,CardTransfer:Xn,Carousel:pa,CarouselBankHistoryCard:ga,CarouselCard:ba,CarouselCatalogCard:va,CarouselLinks:ka,CarouselProductCard:Pa,CarouselProgramsCard:si,CarouselRecommendationCard:gi,CarouselTariffsCard:bi,ComparisonTable:Bi,DepositFiltration:Fc,MortgageFiltration:Zc,ErrorBlock:Vi,ExchangeRateTile:er,Footer:vr,Header:Pr,Headline:cl,HorizontalLayout:Ar,ImgBlock:jr,LinkDocs:Fr,MobileAppTile:Gr,PictureText:qr,Placeholder:Qr,ProductBlock:ns,ProductGallery:as,ProductTile:is,RepresentativeOfficeInfo:rs,RichTextBlock:ds,RollupItem:or,SafeDepositRental:Ys,StepsBlock:no,StickyBottomMenu:qo,Tabs:mc,TariffsTable:vc,TextBlock:Sc,Tile:Bc,VerticalLayout:zr};const td=["Header","Footer"],ld=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function nd(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!td.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Il(ld)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const ad="cookie",id=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=_e();Co((()=>{globalThis.localStorage?.getItem(ad)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(ad,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(me,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Ia,{isRemote:!0,className:rd(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Ia,{isRemote:!0,className:rd(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(go,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),rd=e=>w("inline mx-2xs",e?"text-green-dark":""),sd=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Jo({onCloseAll:e,onClose:t}),{close:n}=$();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),a((()=>{l.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),od=h();const cd=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:dd()}))),dd=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},md=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await od.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await od.like(e))}),[e]),dislike:i((async()=>{l(await od.dislike(e))}),[e])}}(Y().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(cd,{onClick:J(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(cd,{onClick:J(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),hd=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return nd(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:ia(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @lg:space-y-0 @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[ra({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),ia(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(md,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null,u(qo,{}),u(sd,{})]}),u(id,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));hd.childrenTypes=[],hd.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=ed,e.ContentPage=hd,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.LikeAPI=h,e.handlerDecorator=J,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.21",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=Y,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=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=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};class f{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}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(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}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={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","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,M=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},R=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],P=e=>!e?.length,V=e=>t=>l=>e(l)?[]:[t],_=e=>null!=e,z=new Map;function A(e,t,{fallback:l,cache:i}={}){const s=r((()=>j(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(_)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(_(n))return n;const a=e(l);return _(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function j(e){return Array.isArray(e)?e:e instanceof Function?j(e()):[e]}async function E(e,t){try{return e?await O(e,t):null}catch(e){console.error(e)}return null}async function O(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const L=[];function D(){const{data:e}=A("/api/v1/regions",O);return e||L}const $=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),W=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:W});const X=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||G(t,d.CDN))return t;const n=t.startsWith("/");return W(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),J=(e,t)=>J._impl(e,t);function Y(){return Y._impl()}function q(e={}){const{isRemote:t,basePath:l}=e,n=Y(),{closeAll:a}=$();return e=>({...e,href:t&&!l?e.href:X(n)(e.href,l),"aria-label":e.text,onClick:J(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}J._impl=e=>e,J.setup=e=>{J._impl=e},Y._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),Y.setup=e=>{Y._impl=e};const Q={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",ee={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},te="text-center font-sans select-none",le={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},ne=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ae(e),"flex gap-xs"),children:[n?u("div",{className:le[i],children:n}):null,ie(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:le[i],children:a}):null]})})),ae=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 w("group/btn items-center justify-center",ie(e)?a:"h-12 w-12",n?"rounded-full":"")},ie=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),re=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=g((({disabled:e,children:t,...l})=>{const n=q()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:re({className:e,rounded:n,version:l}),children:a}))),me=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),he=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),ue=g((({link:e})=>p(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(he,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(oe,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(he,{children:e.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},ge=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),xe=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ge,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),fe=e=>"_"===e,be=e=>/\d/.test(e),ye=e=>fe(e)||be(e),ve=[..."+7 (___) ___-__-__"],Ne=ve.findIndex(fe),we=ve.map(((e,t)=>ye(e)?ve.slice(0,t).filter(ye).length:-1));const Se=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ve.map(((e,l)=>be(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(ge,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),ke=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Se,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ce="Некорректно заполненное поле",Ie=V((e=>null!=e&&""!==e))(Ce),Te=V((e=>"string"==typeof e&&e.length>1))(Ce),Be=V((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ce),Me=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,V((e=>"string"==typeof e&&Re.test(e))))(Ce);var Re;const Pe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(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 ze=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=new Array(e.length),a=new Array(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 Ae={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},je=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=Y(),c=X(o)(W(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Le,{className:e,children:p("svg",{className:w(Oe(r),Ae[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:Ee(e,s)})})),Ee=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t)};var l},Oe=e=>e?"":"w-full h-full",Le=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),De=g((({className:e="",label:t,options:l=[],value:r,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=_e(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[$e(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Ke(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:We(r)||d}),u(je,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Ue(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:Fe(l,b).map(He(S,g,(e=>e.key===r?.key)))})}):null]})]})})),$e=e=>e?u("div",{className:"mb-xs",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Fe=(e,t)=>t?e.filter((e=>ze(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Ue=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(ge,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,He=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:We(n)}),u(je,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),We=e=>e?.text||e?.key||"",Ke=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Xe=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(De,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Ge=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Xe,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(Xe,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Je=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ye=e=>p("div",{children:[u(Je,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Je,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),qe=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Qe={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Ze=R({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:Me}),et=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;P(Ze(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=M(Qe,a),o=D();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),Ge({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Pe(r),Ye(r),qe(t),u(ue,{link:l})]})})),tt=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)}),u(xe,{className:"shrink-0 w-full",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),lt=({regions:e,field:t})=>u(Xe,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)}),nt={name:"",phone:"",inn:"",mail:""},at=R({region:Ie,name:Te,phone:Me,inn:Be,mail:Ie}),it=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;P(at(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=M(nt,a),o=D();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[lt({regions:o,field:r}),tt(r),qe(t),u(ue,{link:l})]})})),rt=[];const st=async e=>await E(e,{method:"GET"})||rt,ot=["От 1 000 ₽","До 1 000 000 000 ₽"],ct=["От 1 мес","До 15 лет"],dt=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(xe,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(xe,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),mt=(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}},ht=(e,t,l)=>Math.max(t,Math.min(e,l)),ut=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function pt(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function gt({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,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=pt(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const xt=1,ft=100,bt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:xt),max:s=(a.length?a.length-1:ft),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=mt(e,{normalize:(e=0)=>a.length?yt(a)(e):ht(e,r,s),format:ut()}),g=i((e=>{m&&m(pt(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),gt({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),vt(n)]})})),yt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),vt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Nt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(bt,{items:ot,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(bt,{items:ct,min:1,max:180,...e("term")})]})]}),wt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Xe,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(Xe,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),St={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},kt=R({fullName:Ie,annualRevenue:Ie,inn:Be,name:Te,phone:Me,region:Ie,department:Ie}),Ct=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;P(kt(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=M(St,n),o=D(),c=function(e){const{data:t}=A(e?`/api/v1/branches?regionCode=${e}`:null,st);return t||rt}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),Nt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),dt(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),wt({regions:o,branches:c,field:r}),qe(e),u(ue,{link:t})]})})),It={name:"",phone:""},Tt=R({name:Te,phone:Me}),Bt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;P(Tt(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=M(It,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(xe,{className:"shrink-0 w-full",label:"Имя",...pe(r("name"),Te)}),u(ke,{className:"shrink-0 w-full",label:"Телефон",...pe(r("phone"),Me)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:l})}),qe(t)]})]})})),Mt={},Rt="wcms-resources";function Pt(e,t={}){const{fallback:l=Mt,folderName:n=Rt,setBasePath:a=!1}=t,i=W("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=A(e?i:null,O,{fallback:l});return r||Mt}const Vt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Pt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Xe,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(oe,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),_t=(e,t)=>e?.media&&t?.media?e.media-t.media:0,zt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=Y();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(_t).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:jt(a,n)(e),type:Et(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?At({...t,src:jt(a,n)(t.src)},l):null]})})),At=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),jt=(e,t)=>l=>l&&!F(l)?X(e)(W(t,l)):l,Et=e=>e?`image/${String(e)}`:void 0,Ot=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(je,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(zt,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),Lt=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("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)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Dt=[{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"}],$t=g((({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]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Lt,{paths:Dt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ft(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(he,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ft=e=>w("rounded border",e?"bg-primary-main":""),Ut=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u($t,{text:"Валютный контроль",...e("currencyControl")}),u($t,{text:"Документарные операции",...e("documentaryOperations")}),u($t,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ht=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...pe(e("fullName"),Ie)})}),u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"ФИО",...pe(e("name"),Te)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(ke,{className:"shrink-0 w-full mb-s",label:"Телефон",...pe(e("phone"),Me)})}),u("div",{className:"sm:w-1/2",children:u(xe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...pe(e("mail"),Ie)})})]})]}),Wt={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Kt=R({fullName:Ie,name:Te,phone:Me,mail:Ie}),Xt={ApplicationFormBusinessCard:it,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;P(Kt(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=M(Wt,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Ht(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),Ut(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[qe(t),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(Ot,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Ot,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Bt,ApplicationFormCredit:Ct,ApplicationFormAcquiring:et,ApplicationFormGrantSupport:Vt},Gt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Ot,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Jt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Yt=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Jt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?qt(l,o):null,r?u(Gt,{responseType:r}):null]})})})),qt=(e,t)=>{const l=e?.formType;if(!l||!(l in Xt))return null;return u(Xt[l],{...e,onSubmit:t})},Qt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Zt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center",Qt[l],e),children:u(je,{...i,width:"54%",height:"54%",name:a})}):null})),el=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:w("space-y-x",e),defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-left sm:text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(tl)}):null]}))),tl=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Zt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Ot,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),ll(e.description)]}):null]},String(t)),ll=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-2xs sm:mt-xs",children:"list"===t?al(e):nl(e)}):null},nl=e=>e?.name?u(me,{font:"font-light",size:"text-l",color:"text-secondary-text group-data-secondary:text-white",children:e.name}):null,al=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u(me,{font:"font-light",size:"text-l",color:"text-secondary-text group-data-secondary:text-white",children:e},`benefitListItem-${t}`)))}):null},il=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(rl(l))}):null,rl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(oe,{className:w("basis-full sm:basis-auto",e),appendLeft:sl({...a,iconVersion:c}),appendRight:sl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},sl=e=>e?.icon||e?.src?u(Ot,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,ol={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"}},cl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},dl=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=ol[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(me,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),ml=g((({className:e="",title:t,description:l,bonusItems:n=[],...a})=>u(k,{className:e,defaultPadding:"p-6xl",...a,children:p("div",{className:"container",children:[u(dl,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"space-y-xs flex flex-col grow w-full sm:w-[49%] border border-gray p-m",children:[u("div",{className:"grow",children:u(dl,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:il(e?.buttons)}),e.bonusItemContent?.bonusType?hl(e.bonusItemContent):null]})]},String(t)))):null})]})}))),hl=e=>"count"===e.bonusType?ul(e):pl(e),ul=e=>p("div",{className:"w-full pt-default mt-s flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-10",children:u("span",{className:"font-mohave text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(he,{size:"text-h2",children:e.bonusName})}):null]}),pl=e=>e.image?u(Ot,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,gl=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),xl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),fl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],bl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(vl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?yl(r,b):{},...y?gl(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(xl,{className:w(c,n?fl[n-1]:"",y?"h-full":""),style:v?yl(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),yl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),vl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Nl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},wl={"horizontal-list":"w-6","vertical-list":"h-6"},Sl=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs @lg:hidden",Nl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?wl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),kl=e=>e,Cl=(e=kl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Il=Cl(),Tl=(e=kl)=>Cl((t=>-e(t))),Bl=Tl(),Ml=e=>t=>e.scrollWidth/t,Rl=e=>(t,l)=>{e.scrollBy({left:l*Ml(e)(t),behavior:"smooth"})},Pl=({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)}),[e]),[c,d]=a.length?[Tl()(a),Cl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Rl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Rl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Vl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Pl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(bl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Sl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),_l="text-left",zl=(e,t,l)=>u(Vl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(he,{size:"text-h6",font:"font-normal",align:_l,children:t}):null,e?u(Ot,{image:e,height:"180",className:"w-auto"}):null,l?u(he,{size:"text-h6",font:"font-normal",align:_l,children:l}):null]},String(n)))({...e},t)))}),Al=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(dl,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?zl(e):null]}))),jl={start:"justify-start",center:"justify-center",end:"justify-end"},El=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",jl[l]):"";return u(k,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:il(e)})})),Ol=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Ll=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Dl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",ut(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),$l=Math.round(23.5),Fl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ul={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Hl={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Wl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Kl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Xl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),Gl=e=>e?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Jl({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${ut(2)(l.min||0)} ₽`,`До ${ut(2)(l.max||0)} ₽`];return u(bt,{items:e?n:[],step:t,...l})}function Yl(e){const{data:t}=A(`/wcms-resources/${e}.json`,O);return t}const ql=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Yl(t||"bonus-calculator-data")||Hl,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},Ql=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=M({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=ql(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Jl({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Jl({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Xl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Dl,{title:"Баллов за год",value:m}):null,il(l,{isVertical:!0}),Gl(n)]})]})})),Zl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,en={horizontal:"gap-5xl",vertical:"flex-col gap-s"},tn=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${en[a]}`,l),children:e?.map((({id:e,text:l})=>u($t,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ln=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(tn,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),nn=e=>ln({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),an=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(je,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:t?p(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),rn=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n})=>u(Xl,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,rateBlockClassName:"tracking-[-25px]",unit:"%"}),sn=({rate:e})=>u(Dl,{title:"Ставка",value:e,postfix:"%"}),on=e=>0===e.rate?u(an,{isUnavailableByTerm:e.isUnavailableByTerm}):p("div",{children:[u("div",{className:"hidden md:block",children:rn(e)}),u("div",{className:"md:hidden",children:sn(e)})]}),cn=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},dn=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:mn([e,t],n),mn=([e,t],l=[])=>({[e]:l.length?Bl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Il(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),hn=(e,[t,l],n)=>e>=n[t]&&e<=n[l],un=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,pn=(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)},gn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=M({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=Yl(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...Kl,...e,isDisabledOperatingDeposit:d,isUnavailableByTerm:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&un(c,e)&&hn(n,["minSum","maxSum"],e)&&hn(l,["minDays","maxDays"],e)))||Kl,{rate:h}=m,u=pn(h,e),p=n+u,g=o?.rateRows||[Kl];return{...m,...mn(["minSum","maxSum"],g),...mn(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isUnavailableByTerm:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Jl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(bt,{items:[`От ${Zl(x.min||0)}`,`До ${Zl(x.max||0)}`],step:1,...x})),xn(o,s),nn({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),on({rate:m,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[fn(d,c),il(l,{isVertical:!0}),Gl(n),Gl(a)]})]});var x})),xn=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u($t,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u($t,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u($t,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),fn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Dl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Dl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),bn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(bt,{items:[`От ${yn(e)}`,`До ${yn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),yn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,vn=e=>Nn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Nn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Nn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Nn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],wn=(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)},Sn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Yl(t||"credit-calculator-data"),s=i?.rateRows||[Fl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>vn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=dn(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=dn(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>vn({row:e,userInputParams:t,paramsViewSettings:l})&&hn(n,["minSum","maxSum"],e)&&hn(a,["minMonths","maxMonths"],e)))||Fl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=wn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},kn=e=>ln({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Cn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:$l}),o=Sn(r,t,a),c=kn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Jl({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),bn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),In({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),on({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Dl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),il(l,{isVertical:!0}),Gl(n)]})]})})),In=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u($t,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u($t,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u($t,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u($t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Tn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Yl(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Rn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Mn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Mn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&hn(n,["minSum","maxSum"],t)&&hn(a||r,["minMonths","maxMonths"],t)))||Wl,{rate:d}=c,m=Bn(d,e),h=n+m,u=i?.rateRows||[Wl];return{...c,...mn(["minSum","maxSum"],u),...mn(["minMonths","maxMonths"],u),availableMonths:cn(u.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:r,income:m,finalSum:h}},Bn=(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)},Mn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Rn=(e,t)=>e+Math.round((t-e)/2),Pn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=M({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=Tn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Jl({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),bn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Vn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),on({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Dl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Dl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),il(l,{isVertical:!0}),Gl(n)]})]})})),Vn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?nn({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ln({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},_n=e=>zn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&zn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),zn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],An=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=Yl(t||"refinancing-calculator-data"),c=o?.rateRows||[Ul],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>_n({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=dn(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=dn(["minSumOld","maxSumOld"],d,c),{minMonths:g,maxMonths:x}=dn(["minMonths","maxMonths"],d,c),f=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>_n({row:e,userInputParams:t,paramsViewSettings:l})&&hn(n+r,["minSum","maxSum"],e)&&hn(i,["minSumOld","maxSumOld"],e)&&hn(r,["minSumExtra","maxSumExtra"],e)&&hn(a,["minMonths","maxMonths"],e)))||Ul)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:b}=f,y=wn(b,e),v=e.oldMonthlyPayment-y;return r((()=>({...f,...e,minSum:m,maxSum:h,minSumOld:u,maxSumOld:p,minMonths:g,maxMonths:x,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:y,benefit:v})),[e,o])},jn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=An(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Jl({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Jl({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),bn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),En({...s,...a},r),s.isExtraMoney?Jl({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),on({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Dl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Dl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,kn({orientation:"vertical",...r("isAnnuity")}),il(l,{isVertical:!0}),Gl(n)]})]})})),En=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u($t,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u($t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u($t,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),On={CreditCalculatorForm:Cn,DepositCalculatorForm:Pn,BusinessDepositCalculatorForm:gn,BonusCalculatorForm:Ql,RefinancingCalculatorForm:jn},Ln=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:$n(t)}))),Dn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in On))return null;return u(On[t],{...e.calculatorBlock,isMobile:!0})},$n=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Dn(e[0])}):e.map(((e,t)=>u(Ol,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Ll,{isUnfolded:t,children:u(k,{children:Dn(e)})}),renderFoldButton:Fn(e)},t.toString())))},Fn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(je,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(he,{align:"text-left",color:"text-white",children:e.nav?.title}),u(he,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(je,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Un=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=mt(e,{normalize:(e=a)=>l&&n?String(ht(Number(Hn(e)),l,n)):Hn(e),format:ut(r)}),c=i((e=>t&&t(Hn(e))),[t]);return u(ge,{onChange:c,...s,...o})})),Hn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Wn=g((e=>u(Un,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),Kn={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Xn={amount:1500,_amount:1500},Gn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=M(Xn),d=s<=0,m=d?re({version:a?.version}):se({className:"text-white",version:a?.version}),h=q();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Kn[i],children:[u(Wn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Jn=g((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Ot,{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"})}))),Yn=g((e=>u(Jn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),qn=g((e=>u(Jn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Qn="absolute top-[calc(50%-24px)] z-40",Zn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ea=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[ta(e),h?u(Yn,{className:w(Qn,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(qn,{className:w(Qn,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),ta=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Zn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Zn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),la=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),na=[];function aa(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=la,blocksRegistry:r={},ancestors:s=na}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const ia=[],ra=(e,{key:t,ancestors:l=ia,slotName:n=null,extraProps:a,renderProps:i=aa,...r})=>{const s=a?(e,t)=>aa(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||ia,[r.parent,n]]:l},a)))};function sa({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?ra(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const oa=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(je,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ca="relative h-full",da={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},ma=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(pa);return sa({...n,renderProps:(n,a,r)=>p("div",{className:ha(n,{someCardsHighlighted:i}),children:[aa(n,a,{className:ua(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),pa(n)?oa({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},ha=(e,{someCardsHighlighted:t})=>w(ca,t&&(pa(e)?"pt-3xl":"pt-3xl sm:pt-16")),ua=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(ca,"min-w-80",da[n],t&&(pa(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),pa=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ga=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,arrowsPadded:s=!0,isGap:o=!0,cardSize:c="normal",...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[g,{inc:x,dec: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:h,visibleItemCount:l},Math.floor(l/2)),[b,y]=Pl({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return p(k,{className:e,defaultPadding:"p-6xl",...d,children:[p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(bl,{containerRef:b,visibleItemCount:l,snapAlign:"snap-start",gap:o?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:ma({noCardBorder:a,activeIndex:g,cardSize:c,...d})}),u(ea,{scroll:y,arrowsPadded:s,onScrollLeft:f,onScrollRight:x,hasEdgeBlocks:N,activeIndex:g,itemCount:h})]}),u(Sl,{containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"})]})}));ga.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ga.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const xa=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(dl,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),fa="z-10 border border-solid w-full h-full",ba=w(fa,"absolute hidden sm:block border-transparent"),ya=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(ba,"top-9 right-12 bg-green-dark")}),u("div",{className:w(ba,"top-6 right-8 bg-green")}),u("div",{className:w(ba,"top-3 right-4 bg-green-light")}),p("div",{className:w(fa,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(dl,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),il([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),va={black:"bg-black",white:"bg-white"},Na=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(Ot,{className:"flex justify-center mb-xl",image:n}):null,u(dl,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(wa)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,il([i],{buttonClassName:"w-full mt-lg"})]}))),wa=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${va[e]}`},String(t)),Sa="bg-transparent border-white border h-[70px] absolute w-80 top-0",ka=g((({text:e,href:t="",target:l="",className:n=""})=>{const a=q()({href:t,target:l});return e?p("div",{className:w("flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m",n),children:[p("a",{className:w("absolute border border-primary-main px-xl py-lg\n text-l font-light bg-white text-primary-text flex\n justify-between items-center group-hover/link:text-primary-main z-10","rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto"),role:"link",...a,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6 hidden sm:block",children:u(Ot,{className:"w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24"})})]}),u("div",{className:Sa+" hidden sm:block mx-1.5 mt-1.5"}),u("div",{className:Sa+" hidden sm:block mt-3 mr-3"})]}):null})),Ca=g((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>p(k,{className:w("flex flex-col sm:flex-row w-full overflow-hidden",e),...i,children:[p("div",{className:"mr-xl flex-auto",children:[u(dl,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u(dl,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?Ia(n):null]}))),Ia=e=>{const t=Math.ceil(e.length/3);return u(ga,{className:"@container-normal sm:w-2/3 w-full p-0 sm:p-xs",version:"secondary",itemCount:t,arrowsPadded:!1,children:new Array(t).fill(null).map(((t,l)=>u("div",{className:w("flex flex-wrap self-start w-full sm:w-[672px]"),children:e.slice(3*l,3*(l+1)).map(((e,t)=>u(ka,{className:"sm:m-2xs",...e},String(t))))},String(l))))})},Ta=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=q({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),Ba={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},Ma=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Ba[n])})}):null,u("span",{children:l})]}))),Ra={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Pa={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Va=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Ra[a],t?Pa[a]:"",e),role:"list",children:n.map(((e,t)=>u(Ma,{isDotted:l,size:a,children:e},String(t))))}):null)),_a=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(Ta,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[Aa(i,g),ja(a),Oa(h,o,x),Ea(e),za(s,d,m)]}),il([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),za=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(Ot,{className:"shrink-0",image:e}):null,e?.icon?u(Ot,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),Aa=(e,t)=>t?u(he,{size:cl[e],children:t}):null,ja=e=>e?u(me,{size:"text-l",children:e}):null,Ea=e=>e?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,Oa=(e,t,l="primary")=>e?.length?u(Va,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,La={start:"@lg:self-start",center:"@lg:self-center",end:"@lg:self-end"},Da=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-col @lg:flex-row justify-around @lg:justify-between items-stretch gap-3xl",children:[$a(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"justify-center mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),$a(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),$a=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("md:flex-shrink-0 self-center",l&&La[l],t),children:e}):null,Fa=(e=[])=>e.reduce(((e,t)=>e+t),0),Ua=(e=[])=>e?.length?Fa(e)/e.length:0,Ha=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 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:u(Ot,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Wa=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Ka=(e,t)=>e?u(me,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Xa=(e,t)=>e?u(he,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ga=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Wa,{...e},`rte-${t}`):["label"in e?Xa(e.label,t):null,"description"in e?Ka(e.description,t):null],Ja=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?Ha(l.icon,t):null,u("div",{children:Ga(l)})]}))),Ya=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),qa=e=>{return((t=e.map(Ya))?.length?Math.sqrt(Math.abs(Ua(t.map((e=>e**2)))-Ua(t)**2)):0)>16;var t},Qa=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Za=e=>!e.some(Qa),ei=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",qa(l)||Za(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ja,{benefitsVersion:t,...e},String(l))))}):null)),ti=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Ga)}):null)),li=g((({isTabularBenefits:e,...t})=>u(e?ti:ei,{...t}))),ni=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(ai)}):null)),ai=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(he,{size:"text-m",font:"font-light",children:e})},String(t)),ii=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m=!0,items:h,isDotted:g=!0,listItemSize:x,tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(Ot,{image:y}):null,C=u(dl,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),I=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(Da,{className:e,padding:t,defaultPadding:l,...m?{insetTitle:C}:{title:C},...w?{backImage:k}:ri(k,N),imageAlign:v,buttons:il(b),children:p("div",{className:"flex flex-col gap-xl",children:[I?.length?u(li,{benefitsVersion:s,isTabularBenefits:o,benefits:I}):null,d?u(Wa,{__html:d}):null,h?.length?u(Va,{items:h,isDotted:g,listItemSize:x}):null,S,si(f)]})})})),ri=(e,t)=>t?{rightImage:e}:{leftImage:e},si=e=>e?.length?u(ni,{tags:e}):null,oi=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(Ta,{className:"flex items-center h-full",href:a,target:i,children:u(ii,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),ci={default:"w-14 h-14",stretched:"flex-1 h-14"},di=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",ci[t]),mi=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"},label:"Rutube"}],hi=e=>mi.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},ui=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=hi(a),c=pi(l)??s;return u(oe,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",di(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(Ot,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),pi=e=>e?.src||e?.icon?e:void 0,gi=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(ui,{buttonSize:n,...e},String(t))))})]}))),xi=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(Ta,{href:l,target:r,className:"space-y-lg",children:[u(dl,{title:s,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(Va,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,fi(n),i.length?u(gi,{media:i}):null]})}))),fi=e=>e?.src||e?.icon?u("div",{children:u(Ot,{image:e})}):null,bi=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(he,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:il(a)}):null]},String(t))},yi=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(bi),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[vi(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-m",...a}):null,i.length?u(Ol,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Ll,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?Ni:null}):null]})})),vi=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(Ot,{image:e}):null}),Ni=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(je,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),wi=(e=!1)=>e?"text-white":"",Si=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ki=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Ot,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Ot,{image:t})}),l?u(T,{headingType:"h4",className:wi(a),title:l}):null,n?u("div",{className:Si(a),children:n}):null]}))),Ci=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Ii(l,t))})}))),Ii=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),Ti=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(ki,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(Ci,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(oe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Bi({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Bi=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),Mi=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Ri,{...e})})]})})),Ri=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Ti,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(Vl,{onVisibleIndicesChange:m,children:h}):h})),Pi=e=>"Image"===e?.contentType&&e?.image?u(Ot,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,Vi=g((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(k,{className:w("flex flex-col gap-2xl justify-center items-center",e),defaultPadding:w("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:Pi(n)}),u(dl,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0}),a?.text?u(oe,{version:a?.version,text:a?.text,...a}):null]})));var _i;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(_i||(_i={}));const zi=new Intl.NumberFormat("ru",{style:"currency",currency:_i.RUB}),Ai=e=>e?zi.format(e):"",ji="text-left text-m font-light text-secondary-text",Ei=`${ji} pl-5xl`,Oi={USD:"DollarIcon",EUR:"EuroIcon"},Li=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:ji,children:u(he,{size:"text-m",children:"Валюта"})}),u("th",{className:Ei,children:u(he,{size:"text-m",children:"Купить"})}),u("th",{className:Ei,children:u(he,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Di)})]}))),Di=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(Ot,{image:{icon:Oi[t]},width:"24",height:"24"}):null,u(he,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:Ai(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:Ai(e?.buyExchangeRate)})})]},t)},$i={icon:"GpsIcon"},Fi=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Zt,{...$i,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Ui=(e,t,l)=>{const n=Number(Hi(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)},Hi=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Wi=e=>{return(t=[[e=>e.value!==_i.RUB&&e.oppositeValue!==_i.RUB,()=>e.handleConvert(e.value,_i.RUB)],[e=>e.value===_i.RUB&&e.oppositeValue===_i.RUB,()=>e.handleConvert(e.value,_i.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Ki(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??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(ge,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(De,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Xi=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||_i.RUB,selectBuy:l?.[0]?.currency?.currency||_i.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Ki({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Gi(r,o,l),value:r.inputSell,setValue:e=>Yi(o,l)(e,r.selectSell,r.selectBuy)}),Ki({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ji(r,o,t),value:r.inputBuy,setValue:e=>qi(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(oe,{text:a.text,version:a?.version,...a}):null]})})),Gi=(e,t,l)=>n=>{t({selectSell:n}),Wi({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Yi(t,l)(e.inputSell,n,a)}})},Ji=(e,t,l)=>n=>{t({selectBuy:n}),Wi({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>qi(t,l)(e.inputBuy,n,a)})},Yi=(e,t)=>(l,n,a)=>{e({inputSell:Hi(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ui(l,i,n===_i.RUB)||"")})},qi=(e,t)=>(l,n,a)=>{e({inputBuy:Hi(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ui(l,i,n===_i.RUB)||"")})};const Qi=async e=>{const t=await Zi(),l=t?.code||"000";return{region:t,exchangeRates:await er(e,l)}},Zi=async()=>{try{return await O("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},er=async(e,t)=>{try{return await O(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},tr=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=A("/api/v1/exchangerates",Qi);return e||{}}(),i=lr(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:_i.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:_i.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(Da,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(Li,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(Fi,{address:a?.address})]}),i.length&&r.length&&s.length?u(Xi,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),lr=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],nr=e=>Pt(d.SITEMAP||"sitemap",{fallback:e}),ar=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(ir)}):null)),ir=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},rr=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(Ot,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),sr=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",or=(e,t)=>u(Zt,{...e,iconBgVersion:t,className:"shrink-0"}),cr=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Ol,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Ll,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:sa({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>dr({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));cr.childrenTypes={exclude:["RollupItem"]};const dr=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?mr({label:r,labelIcon:l,labelIconBgVersion:n,icon:sr(a),onToggle:i}):u(rr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},mr=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[or(a,t),e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(je,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),hr=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(ur):null,u(oe,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),ur=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(he,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(pr)})]},String(t)),pr=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:gr(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),gr=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${xr(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},xr=e=>e.replaceAll(/\D/g,""),fr=g((({className:e="",index:t,text:l,...n})=>{const a=q(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),br=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(he,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(fr,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),yr=g((({className:e="",index:t,...l})=>{const n=q({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`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}`})})),vr=g((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(he,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @lg:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(yr,{index:t,...e},String(t))))}):null]}))),Nr=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=nr(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=Pt(d.FOOTER||"footer",{fallback:l});return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(cr,{label:e?.text,labelIcon:e?.icon,children:u(ar,{items:e.items})},String(t))))}),u(hr,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(gi,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(wr)})]}),u(br,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(vr,{links:c})]})})),wr=({href:e="/",text:t},l)=>{const{label:n}=hi(e);return u(oe,{className:"w-full mb-lg",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},Sr={width:"34",height:"34"},kr={"bg-white":"color",transparent:"white"},Cr={"bg-white":"text-primary-main",transparent:"text-white"},Ir=(e,t,l)=>u(Ot,t?.src?{image:t,className:Cr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:kr[e]},className:Cr[e],width:l?.width,height:l?.height}),Tr={"bg-white":"text-primary-text",transparent:"text-white"},Br=g((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:w("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Ir(i,l?.image,Sr),r?n??u("div",{className:"ml-s",children:u(he,{font:"font-medium",color:Tr[i],size:"text-s",children:l?.title})}):null]}))),Mr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Rr=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=Y(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(Br,{className:"my-2xs",bgColor:e,logo:t})}):Pr(s),l?u("div",{children:u(oe,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Mr["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),Pr=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Ot,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Vr={"bg-white":"primary",transparent:"transparent"},_r=g((({bgColor:e="bg-white",version:t=Vr[e],...l})=>{const{logo:n}=nr(l.options?.page?.fallback),{internetBankUrl:a}=Pt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Rr,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),zr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Ar=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",zr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:sa({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));Ar.childrenTypes=[];const jr=g((e=>u(Ar,{...e})));jr.childrenTypes=[];const Er=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(Ot,{image:l})})})),Or=["байт","Кб","Мб","Гб","Тб","Пб"],Lr=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(he,{size:"text-l",font:"font-light",children:[t,u(he,{color:"text-secondary-text",children:n?.href&&Dr($r(n.href),l)})]}):null]}))),Dr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),$r=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Fr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ur=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=Y();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(dl,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Fr[r]),role:"list",children:a.map(Hr(o,r,i))}):null]})})),Hr=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?X(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.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))} ${Or[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(Lr,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(Ot,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Wr={left:"text-left",center:"text-center",right:"text-right"},Kr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(he,{size:"text-xl","font-weight":"light",children:e})}):null,Xr=e=>e?.length?u(Va,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Gr=e=>{const t=e.length>2;return il(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Jr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Da,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Wr[l])}):null,rightImage:r?.src?u(Ot,{className:"hidden lg:block",image:r}):null,buttons:Gr(n),children:[Kr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(Ot,{className:"w-fit",image:o})}):null,Xr(s),r?.src?u(Ot,{className:"lg:hidden",image:r}):null]})]})})})),Yr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?qr("Страховая сумма:",e):null,Number(t)>0?qr("Ежемесячный лимит:",t):null]}):null,qr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(he,{font:"font-light",size:"text-l",children:e}),p(he,{size:"text-h6",color:"text-primary-text",children:[ut(2)(t)," ₽"]})]}),Qr=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(ii,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isFullWidthTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Yr(Number(a),Number(i))})}))),Zr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(dl,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:es()})]}))),es=(e=3)=>ls(100,e).map((e=>Math.floor(e))).map(ts),ts=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),ls=(e,t)=>[e].concat(t>0?ls(e/1.618,t-1):[]);function ns(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"flex items-center gap-s",children:[u("div",{className:se({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(Ot,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(oe,{version:"link",text:n,ariaLabel:n,onClick:t})]})}const as=g((({className:e,padding:t,backwardButton:l,...n})=>{const a=Y(),r=i((e=>{e?.preventDefault(),a.back()}),[]);return p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?ns(n.version&&"primary"!==n.version?"white":"primary",r):null,u(ii,{className:"grow h-full",...n})]})})),is=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(Vl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(ii,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),rs=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(ii,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),ss=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[os(r),s?u(T,{headingType:"h4",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?cs(i):null,ds("Адрес",e,"GeolocationIcon"),ds("Телефон",l,"PhoneIcon"),ds("E-mail",t,"MailIcon"),n?.text?il([n]):null]})]}))),os=e=>u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:e?.src||e?.icon?u(Ot,{image:e}):null}),cs=e=>u("div",{className:"border-b border-main-divider",children:u(Wa,{__html:e})}),ds=(e,t,l)=>p("div",{className:"flex gap-m",children:[u(je,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col",children:[u(he,{size:"text-m",font:"font-light",children:e}),t?u(he,{size:"text-h6",color:"text-green",children:t}):null]})]}),ms=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Wa,{__html:t,richVersion:l})})})),hs=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function us(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ps={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},gs=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(ps).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),xs={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},fs=(e,t,l)=>p("div",{className:`${Object.values(xs).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(je,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),bs={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},ys=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(bs).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(je,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),vs=e=>globalThis[e];const Ns=()=>function(e,t){const[l,r]=n(),s=i((()=>r(vs(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!vs(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ws={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Ss=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ws).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(je,{name:l,width:"20",height:"16"})})})),ks={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Cs=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=Ns(),[c,d]=n(),[m,h]=n(Ms(hs)),g=Is(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),us(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?Ms(hs):m;us(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?fs(hs,0,(e=>{if(e){const t=Ms(e);h(t)}})):gs(g)}),u("div",{className:`${Object.values(ks).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(je,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(Ss,{yandexMaps:r}),u(Ss,{yandexMaps:r,direction:"out"})]}),ys(r.current,o,`right-2 top-80 ${x}`)]})})),Is=e=>[Bs(Ts(e,0)),Bs(Ts(e,1))],Ts=(e,t)=>e.map((e=>e[t])),Bs=e=>e.reduce(((e,t)=>e+t))/e.length,Ms=e=>e?e.map((e=>e.coords)):null,Rs=g((({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]}))),o=s.find((e=>e.key===n));return u(De,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Ps=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Rs,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Rs,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Vs=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),_s=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(Vs,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Vs,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),zs=["От 1 дня","До 365 дней"],As=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(he,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(bt,{min:1,max:365,value:e,items:zs,onChange:t})]}))),js=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Rs,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Rs,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Es=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(Ps,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Os(c)}),u(As,{days:a,setDays:e=>c({days:e})}),u(js,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Ls(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(_s,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Os=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ls=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ds=g((({days:e,tariffs:t=[]})=>{const l=Fs(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[$s("Аренда за",e),$s("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(Ot,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),$s=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),Fs=(e,t)=>{const l=Us(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Us=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},Hs=(e,t)=>e.find((e=>e.branchCode===t)),Ws=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Hs(n,l.selectedBranch),o=Ks(s?.safeBoxCaseVolumes),c=Xs(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Gs(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(Es,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Ds,{days:l.days,tariffs:d})]})})),Ks=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Xs=(e,t)=>e?.find((e=>e.volume===t)),Gs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Js=[];const Ys=async e=>await E(e,{method:"GET"})||Js,qs=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=D(),h=Qs(c.selectedRegion,m),g=function(e){const{data:t}=A(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ys);return t||Js}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Hs(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Ws,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(me,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Cs,{points:f,className:"h-[640px]"}):null]})})),Qs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Zs(e){throw new Error(e)}const eo=e=>Boolean(e?.icon||e?.src),to={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},lo={normal:"",small:"min-h-6xl"},no={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"},ao=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(dl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(io(i,r))})}):null,il(a,{isVertical:!0})]}))),io=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return ro(e,t)(l,n);case"rte":return u(Wa,{__html:l.__html});default:Zs(l)}},ro=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:so(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",lo[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",no.description),children:l.description}):null]})]})},String(n)),so=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=to[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${no.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:eo(l?.icon)?u(Ot,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},oo=e=>({href:t})=>!!t&&H(F(t)?e.href:e.pathname).startsWith(H(t));function co(e=[]){const t=Y(),l=e.findIndex((e=>oo(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const mo="location";function ho(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])]})(b,"location",po()??{name:e}),r=i((e=>{go(e),l(e)}),[]),{data:s}=A("/api/v1/region",O);return a((()=>{s&&!uo()&&l(s)}),[s]),[t??{name:e},r]}const uo=()=>Boolean(globalThis.localStorage?.getItem(mo)),po=()=>{try{const e=globalThis.localStorage?.getItem(mo);return e&&JSON.parse(e)}catch(e){return null}},go=e=>{try{globalThis.localStorage?.setItem(mo,JSON.stringify(e))}catch(e){}},xo=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Ot,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),fo=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=$(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:w("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(xo,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const bo=e=>e?.length?p("div",{className:"border-t border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-5xl",children:e.map(((e,t)=>u(yo,{...e},String(t))))})]}):null,yo=g((({icon:e,...t})=>{const l=q(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s",children:[e?u(Ot,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:n}):null]})})),vo=e=>t=>u("div",{className:"mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),No=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),wo=g((()=>{const{defaultLocation:e,foreignOffices:t}=nr(),[l,a]=ho(e),[r,s]=n(""),o=ko(function(){const{data:e}=A("/api/v1/regions",O);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((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})(o,So),{close:d}=$(),m=i((e=>{a(e),d()}),[]);return p(fo,{head:p("div",{children:[l?p("div",{className:"mb-s",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(he,{color:"text-primary-main",children:l.name})})]}):null,u(No,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&ze(e.toLowerCase())(r.toLowerCase())>=.8)).map(vo(m))}):u("div",{className:"columns-2 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(he,{size:"text-h6",children:e})}),t.map(vo(h))]},e)))}),bo(t)]});var h})),So=e=>e.name?.charAt(0)||"",ko=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Co=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a})=>{const r=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(Ot,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:w("h-12 w-full px-10 text-l text-black outline-none box-border","border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:l,onChange:r,onFocus:a})]})})),Io=(e,t,l=300)=>a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t);function To(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Bo=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Mo=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Ro=e=>t=>e.map((([e,l])=>[ze(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Vo(t,e))).reduce(Bo(Math.max,0),new Map),Po=e=>t=>{return To(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Mo(t||"");return l.length?Fa(e.map((e=>Il(l.map(ze(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},Vo=(e,t)=>new Map(e.map((e=>[e,t]))),_o=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=A(e?.length?e:null,zo),[s,o]=n(null);return Io((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Mo(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Ro(i)).reduce(Bo(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Po(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},zo=async(...e)=>(await Promise.allSettled(e.map((e=>E(W(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Ao=g((({className:e,topItems:t})=>{const l=q({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(jo)})})),jo=(e,t)=>{const{text:l,items:n,href:a,target:i,onClick:r}=e;return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),n?.filter((e=>!e.displayArea||"Footer"===e.displayArea)).map(((e,t)=>u(Eo,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Eo=g((({text:e,index:t,basePath:l,...n})=>{const a=q({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Oo=g((({initialQuery:e})=>{const{topItems:t}=nr(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=_o({basePathList:l,initialQuery:e}),s=r((()=>Lo(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(fo,{head:u(Co,{autoFocus:!0,...i}),children:u(Ao,{topItems:s})})})),Lo=e=>t=>e?.length&&t?.length?To(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:W("/",t)})))}))):[];const Do=g((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=$();return{open:(t={},l={})=>e(u(Oo,{...t}),l),close:t}})(),s=i((e=>{l(e),$o(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:w("relative",e),children:[u(Co,{value:t,onChange:s}),u(xo,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),$o=e=>e&&e.length>=3,Fo=g((({item:e,basePath:t})=>{const l=q({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=Y(),s=oo(r)({href:n});return p("a",{className:w(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(Ot,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Uo=g((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(Fo,{item:e,basePath:t},String(l))))}):null)),Ho=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:w("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Wo=g((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=nr(e.options?.page?.fallback),[o]=ho(s),c=(()=>{const{open:e,close:t}=$();return{open:(t={})=>e(u(wo,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=Pl({itemCount:t?.length??0}),[g]=co(t),[x,f]=n(g),b=r((()=>t?.[x]),[t,x]),y=b?.items||[];a((()=>{f(g)}),[g]),a((()=>{x>0&&h.scrollTo(x)}),[x,h]);const v=i((e=>f(e)),[]);return u(fo,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(bl,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Ho,{item:e,isActive:x===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(Uo,{activeMenuSubItems:y,basePath:b?.href}),u(Do,{className:"grow mb-5"}),Ko(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(Ot,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(he,{size:"text-h5",children:o.name}),u(he,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Ko=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(Ot,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Xo=g((({isActive:e,item:t,onClick:l})=>{const n=q({isRemote:!d?.BASE_PATH||!t.href?.startsWith(d?.BASE_PATH)}),{href:a,target:i,onClick:r}=n({href:t.href,target:"_self"}),s="BurgerIcon"===t?.icon?.icon?t.isActive:e,o=s?"color":"black";return p("a",{className:w(s?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:()=>"BurgerIcon"===t?.icon?.icon&&l?l():r(),href:a,target:i,children:[u(Ot,{className:"w-6 h-6",image:{icon:t?.icon?.icon,iconVersion:o}}),t.title]})})),Go=g((({menuItems:e,onClick:t})=>{const[l]=co(e);return u(k,{className:"sticky bottom-0 left-0 right-0 bg-transparent z-[100]",padding:"p-0",children:u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,n)=>u(Xo,{isActive:n===l,item:e,onClick:t},String(n))))})})}));const Jo=({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((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Zs(e)}}))),[c,d]),l},Yo="burgerMenuDialog",qo=g((({...e})=>{const{menuItems:t=[]}=Pt(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{fallback:e.options?.page?.fallback,folderName:"portal-resources",setBasePath:!0}),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=$(),n=Jo(),a=((e,t)=>t.find((t=>t.id===e),e))(Yo,n),r=i((()=>e(u(Wo,{}),{id:Yo})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return p("div",{className:"contents",children:[u(Go,{menuItems:o,onClick:n}),l?u(Wo,{}):null]})})),Qo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Zo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},ec={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},tc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},lc=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Qo[n],l?tc[n]:ec[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Zo[n]:"text-secondary-text hover:text-primary-main"),children:[u(he,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),nc=g((e=>u(e?.item?.href?ac:ic,{...e}))),ac=g((e=>{const t=q(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(lc,{...e,tag:"a",item:a,onClick:n})})),ic=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(lc,{item:e,onClick:n,...l})})),rc=(e,t,l)=>(n,a)=>u(nc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),sc="hidden sm:flex absolute z-40 top-0",oc=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Pl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(bl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(rc(l,n,a))}),r.canScrollLeft?u(Yn,{className:w("left-6",sc),onClick:r.scrollLeft}):null,r.canScrollRight?u(qn,{className:w("right-6",sc),onClick:r.scrollRight}):null]})})),cc=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(rc(n,a,t))}))),dc=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(cc,{...t});case"centered":return u("div",{className:"flex",children:u(cc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(oc,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},mc=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(uc)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&hc(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),hc(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:dc({items:c,value:c[d],tabsMode:s,onChange:h})})})),hc=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},uc=e=>"group"===e?.type?{text:e.title}:e,pc={Buttons:({buttons:e})=>il(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Ot,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(Va,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},gc=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(he,{size:"text-l",font:"font-light",children:e}):null,t?u(Ot,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),xc=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(gc,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:fc(e,t)},String(l)))):null]})));function fc(e,t){if(!e||!e.tableCellType||!(e.tableCellType in pc))return null;const l=pc[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const bc=g((({tiles:e,...t})=>e?.length?u(Vl,{...t,padding:void 0,children:e.map(((e,l)=>u(xc,{tile:e,...t},String(l))))}):null)),yc=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(xc,{tile:e,...t},String(l))))}):null)),vc=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=Nc(n),o=wc(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(dl,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?yc:bc,{tiles:o,...r})]})})),Nc=e=>e?.[0]?.data?e[0].data:[],wc=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),Sc=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?kc():null,"big"===n?Cc(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(he,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Ic(l):null,r?.length?Tc(r,!0):null,i?u(Wa,{__html:i}):null]})]}))),kc=()=>u("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"}),Cc=e=>e?.src?u(Ot,{className:"h-fit flex-shrink-0",image:e}):null,Ic=e=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Tc=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),Bc=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(ii,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),Mc=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rc=(e,t)=>Object.entries(e).map((([t,l])=>"number"==typeof l?((e,t)=>l=>Mc(t[e])||Mc(l[e])||Pc(t[e])<=Pc(l[e]))(t,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>l=>Mc(t[e])||Mc(l[e])||Pc(t[e]?.min)>=Pc(l[e]?.min)&&Pc(t[e]?.min)<=Pc(l[e]?.max))(t,e):Array.isArray(l)?((e,t)=>l=>Mc(t[e])||Mc(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(t,e):((e,t)=>l=>Mc(t[e])||Mc(l[e])||t[e]===l[e])(t,e))).every((e=>e(t))),Pc=e=>Number(e||0),Vc=["ArrowDownIcon","ArrowUpIcon"],_c="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",zc=g((({label:e="",filtrationState:t={},topItemsCount:l=0,block:n,notFound:a,...i})=>{const r=n?.blocks?.filter((e=>Rc(t,e.content||{})))||[],[s,o]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]];return p("div",{children:[u("div",{className:w(r.length?"hidden":"block"),children:a?Ac(a):null}),p("div",{className:w("space-y-2xs",r.length?"":"hidden"),children:[u("div",{className:w(_c),children:ra(s,{...i.options,parent:n})}),u(Ol,{renderFoldableSection:({isUnfolded:e})=>u(Ll,{className:w(_c),isUnfolded:e,children:ra(o,{...i.options,parent:n})}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(rr,{className:w(l<1?"hidden":""),disabled:!o?.length,label:e,icon:Vc[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})}));function Ac({title:e,description:t}){return u("div",{className:"bg-white py-20",children:u(dl,{title:e,description:t,headlineVersion:"S",isEmbedded:!0})})}const jc=g((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Je,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Ec=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Oc(e))]}),n?u("div",{children:u(oe,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),Oc=e=>([t,l])=>{const n=l?.type;return"array"===n?Lc(t,e)(l):null},Lc=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(jc,{items:n,multiple:!0,...t(e)})]},e)},Dc=1e9,$c={sum:{min:1e4,max:Dc},period:{min:3,max:36}},Fc=g((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[r,{field:s,reset:o}]=M($c),c=a?.max||60,d=p("div",{children:[u(Wn,{label:n?.title,min:500,max:Dc,...s("sum",{parse:e=>({min:Number(e),max:Dc}),format:({min:e})=>String(e)})}),u(bt,{title:a?.title,items:["От 3 мес","До 5 лет"],min:a?.min||3,max:c,...s("period",{parse:e=>({min:e,max:c}),format:({min:e})=>e})})]});return p(k,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Ec({field:s,reset:o,filtrationSchema:t,resetButton:l,children:d}),u(zc,{filtrationState:r,...i})]})}));Fc.childrenTypes=["ProductTile"],Fc.childSchema=e=>e?.filtrationSchema||{};const Uc={primary:"bg-white/30",secondary:"bg-main-divider"},Hc={primary:"text-white",secondary:"text-secondary-text"},Wc=g((({count:e,version:t="secondary"})=>u("div",{className:w("w-6 h-6 rounded-full flex items-center justify-center",Uc[t]),children:u(he,{size:"text-xs",color:Hc[t],children:e})}))),Kc=(e=[],t={})=>e.filter((({content:e={}})=>Rc(t,e))).length,Xc=(e,t)=>e===t;const Gc=(Jc=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])=>Jc(l,t[e])))));var Jc;const Yc=[],qc={},Qc={categories:[],extraOptions:[],propertyType:[],stage:[]},Zc=g((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=M(Qc),m=i(((e=Qc)=>d(e)),[]),h=(({hotFilters:e=Yc,filtrationState:t=qc,blocks:l=Yc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Gc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Wc,{version:t===e[a]?"primary":"secondary",count:Kc(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:m});return p(k,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(cc,{...h}),Ec({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(zc,{filtrationState:s,...a})]})}));Zc.childrenTypes=["ProductTile"],Zc.childSchema=e=>e?.filtrationSchema||{};const ed={ApplicationForm:Yt,BenefitsBlock:el,Bonus:ml,BonusBenefitsBlock:Al,ButtonsBlock:El,Calculator:Ln,CardTransfer:Gn,Carousel:ga,CarouselBankHistoryCard:xa,CarouselCard:ya,CarouselCatalogCard:Na,CarouselLinks:Ca,CarouselProductCard:_a,CarouselProgramsCard:oi,CarouselRecommendationCard:xi,CarouselTariffsCard:yi,ComparisonTable:Mi,DepositFiltration:Fc,MortgageFiltration:Zc,ErrorBlock:Vi,ExchangeRateTile:tr,Footer:Nr,Header:_r,Headline:dl,HorizontalLayout:jr,ImgBlock:Er,LinkDocs:Ur,MobileAppTile:Jr,PictureText:Qr,Placeholder:Zr,ProductBlock:as,ProductGallery:is,ProductTile:rs,RepresentativeOfficeInfo:ss,RichTextBlock:ms,RollupItem:cr,SafeDepositRental:qs,StepsBlock:ao,StickyBottomMenu:qo,Tabs:mc,TariffsTable:vc,TextBlock:Sc,Tile:Bc,VerticalLayout:Ar};const td=["Header","Footer"],ld=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function nd(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!td.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Tl(ld)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const ad="cookie",id=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=_e();Io((()=>{globalThis.localStorage?.getItem(ad)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(ad,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(me,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Ta,{isRemote:!0,className:rd(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Ta,{isRemote:!0,className:rd(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(xo,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),rd=e=>w("inline mx-2xs",e?"text-green-dark":""),sd=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Jo({onCloseAll:e,onClose:t}),{close:n}=$();return a((()=>{const e=({key:e})=>{"Escape"===e&&n()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[n]),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?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),od=h();const cd=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:dd()}))),dd=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},md=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await od.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await od.like(e))}),[e]),dislike:i((async()=>{l(await od.dislike(e))}),[e])}}(Y().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(cd,{onClick:J(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(cd,{onClick:J(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),hd=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return nd(),p("div",{"data-theme":s,children:[p("section",{className:w("relative @container",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:ra(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @lg:space-y-0 @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[sa({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),ra(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(md,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(qo,{}),u(sd,{}),u(id,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));hd.childrenTypes=[],hd.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=ed,e.ContentPage=hd,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.LikeAPI=h,e.handlerDecorator=J,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.23",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=Y,Object.defineProperty(e,"__esModule",{value:!0})}));