@redneckz/wildless-cms-uni-blocks 0.3.20 → 0.3.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 (397) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +233 -21
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/ArrowDownIcon.svg +1 -0
  5. package/cosmos-static/icons/ArrowUpIcon.svg +1 -0
  6. package/dist/components/Accordion/Accordion.js +6 -2
  7. package/dist/components/Accordion/Accordion.js.map +1 -1
  8. package/dist/components/Accordion/AccordionContent.d.ts +10 -73
  9. package/dist/components/Accordion/AccordionItem.js +14 -5
  10. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  11. package/dist/components/Accordion/AccordionItem.mobile.js +2 -2
  12. package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
  13. package/dist/components/Accordion/AccordionItemInner.js +4 -12
  14. package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
  15. package/dist/components/Accordion/AccordionItemInner.mobile.js +5 -11
  16. package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
  17. package/dist/components/Accordion/useActiveHandler.d.ts +7 -0
  18. package/{mobile/dist/components/Accordion/utils/isActiveHandler.js → dist/components/Accordion/useActiveHandler.js} +5 -5
  19. package/dist/components/Accordion/useActiveHandler.js.map +1 -0
  20. package/dist/components/Blocks.d.ts +1 -0
  21. package/dist/components/Blocks.js +2 -0
  22. package/dist/components/Blocks.js.map +1 -1
  23. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
  24. package/dist/components/ComparisonTable/HeaderCell.d.ts +1 -0
  25. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  26. package/dist/components/ComparisonTable/TableColumn.d.ts +3 -2
  27. package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
  28. package/dist/components/Gallery/GalleryContent.d.ts +1 -1
  29. package/dist/components/Headline/Headline.js +1 -1
  30. package/dist/components/Headline/Headline.js.map +1 -1
  31. package/dist/components/LinkDocs/LinkDocs.mobile.js +1 -1
  32. package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
  33. package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  34. package/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  35. package/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  36. package/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  37. package/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  38. package/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  39. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  40. package/dist/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
  41. package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
  42. package/dist/components/OtherProducts/OtherProducts.d.ts +5 -0
  43. package/dist/components/OtherProducts/OtherProducts.js +9 -0
  44. package/dist/components/OtherProducts/OtherProducts.js.map +1 -0
  45. package/dist/components/OtherProducts/OtherProductsContent.d.ts +39 -0
  46. package/dist/components/OtherProducts/OtherProductsContent.js +2 -0
  47. package/dist/components/OtherProducts/OtherProductsContent.js.map +1 -0
  48. package/dist/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  49. package/dist/components/OtherProducts/OtherProductsItem.js +16 -0
  50. package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -0
  51. package/dist/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  52. package/dist/components/OtherProducts/OtherProductsItemInner.js +10 -0
  53. package/dist/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  54. package/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
  55. package/dist/components/OtherProducts/useActiveHandler.js +21 -0
  56. package/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
  57. package/dist/components/TariffsTable/TariffsTable.mobile.js +1 -1
  58. package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
  59. package/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
  60. package/dist/content-page-repository/transformPicture.js +2 -1
  61. package/dist/content-page-repository/transformPicture.js.map +1 -1
  62. package/dist/icons/IconName.d.ts +81 -2
  63. package/dist/icons/IconName.js +82 -1
  64. package/dist/icons/IconName.js.map +1 -1
  65. package/dist/model/BlockVersion.d.ts +1 -1
  66. package/dist/model/Picture.d.ts +2 -2
  67. package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
  68. package/dist/ui-kit/BlocksList/BlocksListProps.js +2 -0
  69. package/dist/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  70. package/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  71. package/dist/ui-kit/BlocksList/EmbeddableBlocks.js +25 -0
  72. package/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  73. package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
  74. package/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
  75. package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  76. package/dist/ui-kit/Heading/Heading.js.map +1 -1
  77. package/dist/ui-kit/Icon/Icon.js +2 -1
  78. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  79. package/dist/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
  80. package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  81. package/lib/common.css +1 -1
  82. package/lib/components/Accordion/Accordion.fixture.d.ts +0 -1
  83. package/lib/components/Accordion/Accordion.js +6 -2
  84. package/lib/components/Accordion/Accordion.js.map +1 -1
  85. package/lib/components/Accordion/AccordionContent.d.ts +10 -73
  86. package/lib/components/Accordion/AccordionItem.js +14 -5
  87. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  88. package/lib/components/Accordion/AccordionItem.mobile.js +2 -2
  89. package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
  90. package/lib/components/Accordion/AccordionItemInner.js +4 -12
  91. package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
  92. package/lib/components/Accordion/AccordionItemInner.mobile.js +5 -11
  93. package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
  94. package/lib/components/Accordion/useActiveHandler.d.ts +7 -0
  95. package/{mobile/lib/components/Accordion/utils/isActiveHandler.js → lib/components/Accordion/useActiveHandler.js} +3 -3
  96. package/lib/components/Accordion/useActiveHandler.js.map +1 -0
  97. package/lib/components/Blocks.d.ts +1 -0
  98. package/lib/components/Blocks.js +2 -0
  99. package/lib/components/Blocks.js.map +1 -1
  100. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
  101. package/lib/components/ComparisonTable/HeaderCell.d.ts +1 -0
  102. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  103. package/lib/components/ComparisonTable/TableColumn.d.ts +3 -2
  104. package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
  105. package/lib/components/Gallery/GalleryContent.d.ts +1 -1
  106. package/lib/components/Headline/Headline.js +1 -1
  107. package/lib/components/Headline/Headline.js.map +1 -1
  108. package/lib/components/LinkDocs/LinkDocs.mobile.js +1 -1
  109. package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
  110. package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  111. package/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  112. package/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  113. package/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  114. package/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  115. package/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  116. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  117. package/lib/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
  118. package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
  119. package/lib/components/OtherProducts/OtherProducts.d.ts +5 -0
  120. package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +5 -0
  121. package/lib/components/OtherProducts/OtherProducts.js +7 -0
  122. package/lib/components/OtherProducts/OtherProducts.js.map +1 -0
  123. package/lib/components/OtherProducts/OtherProductsContent.d.ts +39 -0
  124. package/lib/components/OtherProducts/OtherProductsContent.js +2 -0
  125. package/lib/components/OtherProducts/OtherProductsContent.js.map +1 -0
  126. package/lib/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  127. package/lib/components/OtherProducts/OtherProductsItem.js +14 -0
  128. package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -0
  129. package/lib/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  130. package/lib/components/OtherProducts/OtherProductsItemInner.js +8 -0
  131. package/lib/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  132. package/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
  133. package/lib/components/OtherProducts/useActiveHandler.js +18 -0
  134. package/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
  135. package/lib/components/TariffsTable/TariffsTable.mobile.js +1 -1
  136. package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
  137. package/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
  138. package/lib/content-page-repository/transformPicture.js +2 -1
  139. package/lib/content-page-repository/transformPicture.js.map +1 -1
  140. package/lib/icons/IconName.d.ts +81 -2
  141. package/lib/icons/IconName.js +81 -0
  142. package/lib/icons/IconName.js.map +1 -1
  143. package/lib/model/BlockVersion.d.ts +1 -1
  144. package/lib/model/Picture.d.ts +2 -2
  145. package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
  146. package/lib/ui-kit/BlocksList/BlocksListProps.js +2 -0
  147. package/lib/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  148. package/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  149. package/lib/ui-kit/BlocksList/EmbeddableBlocks.js +23 -0
  150. package/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  151. package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
  152. package/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
  153. package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  154. package/lib/ui-kit/Heading/Heading.js.map +1 -1
  155. package/lib/ui-kit/Icon/Icon.js +2 -1
  156. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  157. package/lib/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
  158. package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  159. package/mobile/bundle/bundle.umd.js +183 -19
  160. package/mobile/bundle/bundle.umd.min.js +1 -1
  161. package/mobile/dist/components/Accordion/AccordionContent.d.ts +10 -73
  162. package/mobile/dist/components/Accordion/AccordionItem.js +2 -2
  163. package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
  164. package/mobile/dist/components/Accordion/AccordionItemInner.js +5 -11
  165. package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
  166. package/mobile/dist/components/Accordion/useActiveHandler.d.ts +7 -0
  167. package/{dist/components/Accordion/utils/isActiveHandler.js → mobile/dist/components/Accordion/useActiveHandler.js} +5 -5
  168. package/mobile/dist/components/Accordion/useActiveHandler.js.map +1 -0
  169. package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
  170. package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +3 -2
  171. package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
  172. package/mobile/dist/components/Gallery/GalleryContent.d.ts +1 -1
  173. package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
  174. package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  175. package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  176. package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  177. package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  178. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  179. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  180. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  181. package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  182. package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  183. package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  184. package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +5 -0
  185. package/mobile/dist/components/OtherProducts/OtherProducts.js +9 -0
  186. package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -0
  187. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +39 -0
  188. package/mobile/dist/components/OtherProducts/OtherProductsContent.js +2 -0
  189. package/mobile/dist/components/OtherProducts/OtherProductsContent.js.map +1 -0
  190. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  191. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +16 -0
  192. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -0
  193. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  194. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js +10 -0
  195. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  196. package/mobile/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
  197. package/mobile/dist/components/OtherProducts/useActiveHandler.js +21 -0
  198. package/mobile/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
  199. package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
  200. package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  201. package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
  202. package/mobile/dist/content-page-repository/transformPicture.js +2 -1
  203. package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
  204. package/mobile/dist/icons/IconName.d.ts +81 -2
  205. package/mobile/dist/icons/IconName.js +82 -1
  206. package/mobile/dist/icons/IconName.js.map +1 -1
  207. package/mobile/dist/model/BlockVersion.d.ts +1 -1
  208. package/mobile/dist/model/Picture.d.ts +2 -2
  209. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
  210. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.js +2 -0
  211. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  212. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  213. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js +25 -0
  214. package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  215. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
  216. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +17 -0
  217. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  218. package/mobile/dist/ui-kit/Icon/Icon.js +2 -1
  219. package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
  220. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  221. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  222. package/mobile/lib/components/Accordion/AccordionContent.d.ts +10 -73
  223. package/mobile/lib/components/Accordion/AccordionItem.js +2 -2
  224. package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
  225. package/mobile/lib/components/Accordion/AccordionItemInner.js +5 -11
  226. package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
  227. package/mobile/lib/components/Accordion/useActiveHandler.d.ts +7 -0
  228. package/{lib/components/Accordion/utils/isActiveHandler.js → mobile/lib/components/Accordion/useActiveHandler.js} +3 -3
  229. package/mobile/lib/components/Accordion/useActiveHandler.js.map +1 -0
  230. package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +15 -0
  231. package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +3 -2
  232. package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
  233. package/mobile/lib/components/Gallery/GalleryContent.d.ts +1 -1
  234. package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
  235. package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  236. package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  237. package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  238. package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  239. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  240. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  241. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  242. package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  243. package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  244. package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  245. package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +5 -0
  246. package/mobile/lib/components/OtherProducts/OtherProducts.js +7 -0
  247. package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -0
  248. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +39 -0
  249. package/mobile/lib/components/OtherProducts/OtherProductsContent.js +2 -0
  250. package/mobile/lib/components/OtherProducts/OtherProductsContent.js.map +1 -0
  251. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +5 -0
  252. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +14 -0
  253. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -0
  254. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.d.ts +2 -0
  255. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js +8 -0
  256. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js.map +1 -0
  257. package/mobile/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
  258. package/mobile/lib/components/OtherProducts/useActiveHandler.js +18 -0
  259. package/mobile/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
  260. package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
  261. package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  262. package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
  263. package/mobile/lib/content-page-repository/transformPicture.js +2 -1
  264. package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
  265. package/mobile/lib/icons/IconName.d.ts +81 -2
  266. package/mobile/lib/icons/IconName.js +81 -0
  267. package/mobile/lib/icons/IconName.js.map +1 -1
  268. package/mobile/lib/model/BlockVersion.d.ts +1 -1
  269. package/mobile/lib/model/Picture.d.ts +2 -2
  270. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +99 -0
  271. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.js +2 -0
  272. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.js.map +1 -0
  273. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +12 -0
  274. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js +23 -0
  275. package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -0
  276. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +13 -0
  277. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +13 -0
  278. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -0
  279. package/mobile/lib/ui-kit/Icon/Icon.js +2 -1
  280. package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
  281. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  282. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  283. package/mobile/src/components/Accordion/Accordion.example.json +6 -6
  284. package/mobile/src/components/Accordion/AccordionContent.ts +10 -109
  285. package/mobile/src/components/Accordion/AccordionItem.tsx +2 -2
  286. package/mobile/src/components/Accordion/AccordionItemInner.tsx +12 -25
  287. package/mobile/src/components/Accordion/{utils/isActiveHandler.ts → useActiveHandler.ts} +4 -3
  288. package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +18 -0
  289. package/mobile/src/components/ComparisonTable/TableColumn.tsx +3 -2
  290. package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
  291. package/mobile/src/components/Gallery/Gallery.example.json +2 -20
  292. package/mobile/src/components/Gallery/GalleryContent.ts +1 -1
  293. package/mobile/src/components/Headline/Headline.example.json +8 -1
  294. package/mobile/src/components/LinkDocs/LinkDocs.example.json +2 -2
  295. package/mobile/src/components/LinkDocs/LinkDocs.tsx +3 -1
  296. package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
  297. package/mobile/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
  298. package/mobile/src/components/LinkDocs/LinkDocsVerticalList.tsx +4 -2
  299. package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +1 -0
  300. package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
  301. package/mobile/src/components/OtherProducts/OtherProducts.example.json +50 -0
  302. package/mobile/src/components/OtherProducts/OtherProducts.tsx +20 -0
  303. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +41 -0
  304. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +38 -0
  305. package/mobile/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
  306. package/mobile/src/components/OtherProducts/useActiveHandler.ts +24 -0
  307. package/mobile/src/components/ProductBlock/ProductBlock.example.json +2 -1
  308. package/mobile/src/components/ProductGallery/ProductGallery.example.json +2 -1
  309. package/mobile/src/components/StepsBlock/StepsBlock.example.json +1 -0
  310. package/mobile/src/components/TariffsTable/TariffsTable.tsx +3 -1
  311. package/mobile/src/components/TextBlock/TextBlock.example.json +2 -2
  312. package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -1
  313. package/mobile/src/content-page-repository/transformPicture.ts +2 -1
  314. package/mobile/src/icons/ArrowDownIcon.svg +4 -0
  315. package/mobile/src/icons/ArrowUpIcon.svg +4 -0
  316. package/mobile/src/icons/IconName.ts +8 -3
  317. package/mobile/src/model/BlockVersion.ts +1 -1
  318. package/mobile/src/model/Picture.ts +2 -2
  319. package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +104 -0
  320. package/mobile/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
  321. package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +38 -0
  322. package/mobile/src/ui-kit/Icon/Icon.tsx +2 -1
  323. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
  324. package/package.json +1 -1
  325. package/src/components/Accordion/Accordion.example.json +6 -6
  326. package/src/components/Accordion/Accordion.fixture.mobile.tsx +13 -13
  327. package/src/components/Accordion/Accordion.fixture.tsx +28 -93
  328. package/src/components/Accordion/Accordion.tsx +27 -14
  329. package/src/components/Accordion/AccordionContent.ts +10 -109
  330. package/src/components/Accordion/AccordionItem.mobile.tsx +2 -2
  331. package/src/components/Accordion/AccordionItem.tsx +48 -26
  332. package/src/components/Accordion/AccordionItemInner.mobile.tsx +12 -25
  333. package/src/components/Accordion/AccordionItemInner.tsx +8 -27
  334. package/src/components/Accordion/{utils/isActiveHandler.ts → useActiveHandler.ts} +4 -3
  335. package/src/components/Blocks.ts +2 -0
  336. package/src/components/ComparisonTable/ComparisonTableContent.ts +18 -0
  337. package/src/components/ComparisonTable/HeaderCell.tsx +1 -0
  338. package/src/components/ComparisonTable/TableColumn.tsx +3 -2
  339. package/src/components/ContentPage/ContentPage.page.json +1 -1
  340. package/src/components/Gallery/Gallery.example.json +2 -20
  341. package/src/components/Gallery/GalleryContent.ts +1 -1
  342. package/src/components/Headline/Headline.example.json +8 -1
  343. package/src/components/Headline/Headline.tsx +4 -2
  344. package/src/components/LinkDocs/LinkDocs.example.json +2 -2
  345. package/src/components/LinkDocs/LinkDocs.mobile.tsx +3 -1
  346. package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
  347. package/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
  348. package/src/components/LinkDocs/LinkDocsVerticalList.tsx +4 -2
  349. package/src/components/MiniGallery/MiniGalleryContent.ts +1 -0
  350. package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +1 -1
  351. package/src/components/OtherProducts/OtherProducts.example.json +50 -0
  352. package/src/components/OtherProducts/OtherProducts.fixture.tsx +137 -0
  353. package/src/components/OtherProducts/OtherProducts.tsx +20 -0
  354. package/src/components/OtherProducts/OtherProductsContent.ts +41 -0
  355. package/src/components/OtherProducts/OtherProductsItem.tsx +38 -0
  356. package/src/components/OtherProducts/OtherProductsItemInner.tsx +14 -0
  357. package/src/components/OtherProducts/useActiveHandler.ts +24 -0
  358. package/src/components/ProductBlock/ProductBlock.example.json +2 -1
  359. package/src/components/ProductGallery/ProductGallery.example.json +2 -1
  360. package/src/components/StepsBlock/StepsBlock.example.json +1 -0
  361. package/src/components/TariffsTable/TariffsTable.mobile.tsx +3 -1
  362. package/src/components/TextBlock/TextBlock.example.json +2 -2
  363. package/src/components/TextBlock/TextBlockContent.ts +1 -1
  364. package/src/content-page-repository/transformPicture.ts +2 -1
  365. package/src/icons/ArrowDownIcon.svg +4 -0
  366. package/src/icons/ArrowUpIcon.svg +4 -0
  367. package/src/icons/IconName.ts +82 -148
  368. package/src/model/BlockVersion.ts +1 -1
  369. package/src/model/Picture.ts +2 -2
  370. package/src/ui-kit/BlocksList/BlocksListProps.ts +104 -0
  371. package/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +23 -0
  372. package/src/ui-kit/BlocksList/renderBlocksList.tsx +38 -0
  373. package/src/ui-kit/Heading/Heading.tsx +1 -3
  374. package/src/ui-kit/Icon/Icon.tsx +2 -1
  375. package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
  376. package/dist/components/Accordion/AccordionBlocks.d.ts +0 -12
  377. package/dist/components/Accordion/AccordionBlocks.js +0 -25
  378. package/dist/components/Accordion/AccordionBlocks.js.map +0 -1
  379. package/dist/components/Accordion/utils/isActiveHandler.d.ts +0 -9
  380. package/dist/components/Accordion/utils/isActiveHandler.js.map +0 -1
  381. package/lib/components/Accordion/AccordionBlocks.d.ts +0 -12
  382. package/lib/components/Accordion/AccordionBlocks.js +0 -23
  383. package/lib/components/Accordion/AccordionBlocks.js.map +0 -1
  384. package/lib/components/Accordion/utils/isActiveHandler.d.ts +0 -9
  385. package/lib/components/Accordion/utils/isActiveHandler.js.map +0 -1
  386. package/mobile/dist/components/Accordion/AccordionBlocks.d.ts +0 -12
  387. package/mobile/dist/components/Accordion/AccordionBlocks.js +0 -25
  388. package/mobile/dist/components/Accordion/AccordionBlocks.js.map +0 -1
  389. package/mobile/dist/components/Accordion/utils/isActiveHandler.d.ts +0 -9
  390. package/mobile/dist/components/Accordion/utils/isActiveHandler.js.map +0 -1
  391. package/mobile/lib/components/Accordion/AccordionBlocks.d.ts +0 -12
  392. package/mobile/lib/components/Accordion/AccordionBlocks.js +0 -23
  393. package/mobile/lib/components/Accordion/AccordionBlocks.js.map +0 -1
  394. package/mobile/lib/components/Accordion/utils/isActiveHandler.d.ts +0 -9
  395. package/mobile/lib/components/Accordion/utils/isActiveHandler.js.map +0 -1
  396. package/mobile/src/components/Accordion/AccordionBlocks.tsx +0 -23
  397. package/src/components/Accordion/AccordionBlocks.tsx +0 -23
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,r)=>{t._jsx=e,t._jsxs=r||e};t.vue=e=>{t(((t,{children:r,dangerouslySetInnerHTML:a,...n}={})=>{const l=Object.assign({},n,a?{innerHTML:a.__html}:{});return e(t,l,"string"!=typeof t?()=>r:r)}))};const r=(...e)=>t._jsx(...e),a=(...e)=>t._jsxs(...e),n=e=>(e._tmpl||(e._tmpl=function(t,r){const{children:a,...n}=t||{},l=r?.slots?.default,i=a||l&&l();return e(Object.assign(n,i&&{children:i}),r)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-title-lg tracking-[-0.3px]",h2:"text-title",h3:"text-title-sm",h4:"text-title-xs",h5:"text-title-2xs tracking-[0.2px]",h6:"text-title-2xs tracking-[0.2px]"},s=n((e=>{const{className:t="",headingType:a,title:n}=e;if(!a)return;return r(a,{className:`font-sans font-medium m-0 ${i[a]} ${t}`,children:n})})),c=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},o={none:"",primary:"text-primary-main"},d=n((({className:e="",name:t,alt:n=`Icon ${t}`,title:l=n,asSVG:i,color:s="primary",...d})=>{const m=`${c.CDN||""}icons/${t}.svg`;return i?a("svg",{className:`${o[s]} ${e}`,...d,"aria-hidden":"true",children:[l?r("title",{children:l}):null,n?r("desc",{children:n}):null,r("use",{href:`${m}#icon`,xlinkHref:`${m}#icon`})]}):r("img",{className:e,src:m,alt:n,title:l,...d,"aria-hidden":"true"})})),m={left:"text-left",center:"text-center",right:"text-right"},h={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},x=n((({bgColorHeadline:e="transparent",align:t="left",className:n="",title:l,description:i})=>a("section",{className:`p-[50px] ${h[e].background} ${n}`,children:[l&&r(s,{headingType:"h2",className:`text-primary-text ${m[t]}`,title:l}),i&&r("p",{className:`font-normal text-base mt-4 ${m[t]}`,children:i})]}))),p=n((({className:e,iconClassName:t,textClassName:n,suffixClassName:l,doc:i,icon:s})=>{const{text:c,fileSize:o,...m}=i;return a("a",{className:e,role:"link",...m,children:[s?r(d,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,c?a("span",{className:n,children:[c,r("span",{className:l,children:m?.href&&u(b(m.href),o)})]}):null]})})),u=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),b=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},f=n((({className:e="",doc:t,icon:a})=>r(p,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6 text-primary-text",textClassName:"self-center",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:a}))),g=n((({className:e,documents:t,columnsMode:a="double",icon:n})=>t?.length?r("div",{className:e,role:"list",children:t.map(((e,t)=>r("div",{className:"double"===a?"basis-[calc(50%-20px)]":"",role:"listitem",children:r(f,{className:"group flex text-sm align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:n})},String(t))))}):null)),N={left:"text-left",center:"text-center",right:"text-right"},v={double:"mb-8",single:"mb-[26px]"},y={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},w=n((({className:e="",title:t,subtitle:n,align:l,documents:i,icon:c="DocIcon",columnsMode:o="double"})=>a("section",{className:`font-sans text-primary-text p-12 bg-white ${e}`,children:[t?r(s,{headingType:"h2",className:`${n?"mb-2.5":v[o]} ${N[l??"center"]}`,title:t}):null,n?r("h3",{className:`text-base mt-0 font-normal ${v[o]} ${N[l??"center"]}`,children:n}):null,r(g,{className:y[o],columnsMode:o,documents:i,icon:c})]}))),k=n((({className:e="",image:{size:t,...n},imageClassName:l=""})=>{const i={width:t?.width?`${t?.width}px`:"100%",height:t?.height?`${t?.height}px`:"100%"};return a("picture",{className:`flex-none ${e}`,children:[n.sources?.length?n.sources.map((({src:e,format:t},a)=>r("source",{srcSet:e,type:$(t)},`${a}_${e}`))):null,r("img",{className:l,src:n.src,alt:n.alt||n.title,title:n.title,style:i,...t})]})}));function $(e){return e?`image/${String(e)}`:void 0}const C=n((({className:e="",title:t,image:n,benefits:l})=>a("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[r(s,{headingType:"h2",className:"text-center",title:t}),a("div",{className:"flex justify-center mt-9",children:[n?.src&&r(k,{className:"mr-6",image:n}),l?.length?r("div",{className:"flex flex-col",children:l.map(S)}):null]})]})));function S(e,t){return a("div",{className:"flex flex-row mb-8",children:[e.icon&&r(d,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),a("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&r("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&r("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const T=e=>e?.includes("//"),I=e=>(e||"").replace(/\/?\?.*/,""),R=e=>{if(!e||!T(e))return;const t=e,r=t.indexOf("//"),a=t.indexOf("/",r+"//".length);return-1!==a?t.substring(0,a):t};var D=Object.freeze({__proto__:null,isURL:T,withoutQuery:I,getOrigin:R});const L="/mobile",j=(e,t)=>{if(!e)return e;const r=R(t?.href);return r?e.replace(r,"")||"/":e},_=e=>e;function A({router:e,handlerDecorator:t=_},r){const a=((e,t)=>{if(!e)return e;const r=j(e,t)||"",a=t?.pathname.startsWith(L);return a&&!T(r)?`/mobile${r}`:r})(r.href,e);return{...r,href:a,ariaLabel:r.text,onClick:t((t=>{const n=a&&!T(a),l=!r.target||"_self"===r.target;n&&l&&(t.preventDefault(),e.push(a))}),r)}}const M=n((({text:e,href:t,target:a,onClick:n,className:l="",children:i})=>t?r("a",{className:`no-underline ${l}`,href:t,target:a,onClick:n,children:r("span",{className:l,children:e||i})}):r("span",{className:l,children:e||i})));function P(e){return t=>t.reduce(((t,r,a)=>t.length?t.concat({...e,key:a},r):[r]),[])}const V=n((e=>{const{text:t,aboveText:n,appendLeft:l}=e;return a("div",{className:B(e),children:[l||null,O(e)?a("div",{children:[r("div",{className:"text-m-2xs text-left",children:n}),r("div",{className:"text-m-button font-medium text-left",children:t})]}):null]})})),B=e=>{const{version:t,aboveText:r,rounded:a}=e;if("link"===t)return"";const n="px-8 gap-2 "+(r?"py-2":"py-3.5");return["flex items-center justify-center",O(e)?n:"h-12 w-12",a?"rounded-full":""].join(" ")},O=({text:e,aboveText:t,appendLeft:r})=>Boolean(e||t||!r),F={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:""},H={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},G="text-center font-sans select-none",Z=n((e=>{const{text:t,aboveText:a,appendLeft:n,children:l,disabled:i,rounded:s}=e,c=l??r(V,{text:t,aboveText:a,appendLeft:n,rounded:s});return r(i?z:E,{...e,children:c})})),E=n((({className:e,ariaLabel:t,version:a="none",rounded:n,href:l,target:i,children:s,onClick:c,...o})=>r("a",{className:`${G} inline-block cursor-pointer no-underline ${F[a]||""} ${n?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:i,onClick:c,"aria-label":t,role:l?"link":"button",...o,children:s}))),z=n((({className:e,children:t,ariaLabel:a,version:n="none",rounded:l})=>r("div",{role:"button","aria-disabled":"true","aria-label":a,tabIndex:"-1",className:`inline-block ${G} ${H[n]||""} ${l?"rounded-full":"rounded-md"} ${e||""}`,children:t}))),U=n((({context:e,className:t="",buttons:a})=>{const{handlerDecorator:n}=e,l=e.useRouter();return a?.length?r("div",{className:`${t}`,children:a.map(((e,t)=>function({icon:e,...t},a){if(!t?.text)return;return r(Z,e?{appendLeft:r(d,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(a))}(A({router:l,handlerDecorator:n},e),t)))}):null}));const W=n((e=>{const{className:t="",description:a}=e;return r("div",{className:`font-normal text-base ${t}`,children:a})})),J={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},X={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},q=n((({className:e="",isDotted:t=!0,children:n,version:l="primary"})=>a("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&r("div",{className:Q(l)}),r("span",{className:`text-m-md ${J[l]}`,children:n})]}))),Q=e=>`rounded-full inline-block mr-3 mt-2 ${X[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,K=n((e=>{const{className:t="",itemClassName:a,isDotted:n,items:l,version:i}=e;return r("section",{className:`${t}`,role:"list",children:l?.length?l.map(((e,t)=>r(q,{className:a,isDotted:n,version:i,children:e},String(t)))):null})})),Y=n((({className:e="",title:t,children:n,buttons:l,image:i})=>a("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,a("div",{className:"flex grow w-full justify-between",children:[a("div",{className:"flex flex-col justify-between w-full",children:[r("div",{children:n}),l?r("div",{children:l}):null]}),i]})]}))),ee={primary:"bg-main",secondary:"bg-white/30"},te={primary:"text-primary-text",secondary:"text-white"},re={primary:"text-secondary-text",secondary:"text-white"};const ae=n((({className:e="",context:t,title:n,headingType:l="h2",description:i,benefits:s,buttons:c,image:o,items:m,version:h="primary",textBlockClassName:x=""})=>a("div",{className:`flex grow justify-between items-stretch ${e}`,children:[r("div",{className:`flex flex-col ${x}`,children:a(Y,{context:t,title:ne(n,l,"secondary"===h?"text-white":""),buttons:le(t,c),children:[i&&r(W,{className:"mt-4 max-w-[600px]",description:i}),s?.filter((e=>e.label))?.length?r("div",{className:"flex gap-6 mt-6",children:s.map(((e,t)=>function(e,t,n){return a("div",{className:"flex gap-4 items-center",children:[e.icon&&r(d,{className:`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${ee[n]}`,name:e.icon,width:"24",height:"24",asSVG:!0}),a("div",{className:"flex gap-1 flex-col h-full max-w-[149px]",children:[r("div",{className:`font-medium text-xl m-0 ${te[n]}`,children:e.label}),e.description&&r("div",{className:`font-normal text-sm ${re[n]}`,children:e.description})]})]},String(t))}(e,t,h)))}):null,m?.length?r(K,{className:"mt-5",items:m,itemClassName:"mb-[10px]",version:h}):null]})}),o?.src&&r(k,{className:"mt-auto",image:o})]}))),ne=(e,t,a)=>e&&r(s,{headingType:t,title:e,className:`whitespace-pre-wrap max-w-[600px] ${a}`}),le=(e,t)=>t?.length?r(U,{context:e,buttons:t,className:"flex mt-9 gap-3"}):null,ie={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},se={primary:"text-secondary-text",secondary:"text-white/80"},ce=n((e=>{const{context:t,className:n,breadcrumbs:l,version:i="primary"}=e,s=t.useRouter(),{handlerDecorator:c}=t;return a("section",{className:`font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${n||""} ${ie[i]}`,children:[l?.length?r("div",{className:"text-xs mb-6",children:P(r("span",{className:`mx-2 ${se[i]}`,children:"/"}))(l.map(((e,t)=>r(M,{...A({router:s,handlerDecorator:c},{className:se[i],...e})},String(t)))))}):null,r(ae,{...e})]})})),oe={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},de=n((({title:e,description:t,blockVersion:n="primary",iconVersion:l,image:i,className:s})=>{const c=oe[n];return a("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,children:["small"===l?me(c.icon):null,"big"===l?he(i):null,a("div",{className:"py-0.5",children:[e&&r("div",{className:`font-medium text-base mb-1 ${c.title}`,children:e}),t&&r("div",{className:`text-sm ${c.description}`,children:t})]})]})}));function me(e){return r("div",{className:"pt-1.5 pl-1 pr-4",children:r("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function he(e){return e?.src?r(k,{className:"pt-0.5 pr-3",image:e}):null}const xe=e=>{const t="col-span-",r=e.split(/\s+/).find((e=>e.startsWith(t)));return r?parseInt(r.substring(t.length),10):12};function pe(e=""){const t=xe(e);return t<=4?"h4":t<=8?"h3":"h2"}function ue(e=""){const t=xe(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function be(e=""){const t=xe(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const fe={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ge=n((e=>{const{context:t,title:n,description:l,items:i,children:c,buttons:o,image:d,className:m="",version:h="primary",role:x}=e;return r("section",{className:`overflow-hidden font-sans p-9 box-border ${m} ${fe[h]} ${be(m)} ${ue(m)} `,role:x,children:a(Y,{context:t,title:n&&r(s,{headingType:pe(m),title:n,className:`whitespace-pre-wrap max-w-[600px] ${n?"mb-3":""}\n ${"primary"===h?"text-primary-text":""}`}),buttons:o?.length?r(U,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,image:d?.src&&r(k,{className:"mt-auto ml-7",image:d}),children:[l&&r(W,{className:"mt-4 max-w-[600px]",description:l}),c,Ne(i,h)]})})}));function Ne(e,t){return e?.length?r(K,{items:e,version:t}):null}const ve={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ye=n((({context:e,className:t="",title:n,description:l,benefits:i,buttons:c,image:o,version:d="primary"})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${ve[d]} ${be(t)} ${ue(t)} `,children:a(Y,{context:e,title:n&&r(s,{headingType:pe(t),title:n,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?r(U,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:o?.src&&r(k,{className:"mt-auto ml-7",image:o}),children:[l&&r(W,{className:"mt-4 max-w-[600px]",description:l}),a("div",{className:"flex mt-5 mb-1",children:[i?.length?r("div",{className:"mr-8",children:i.map(we)}):null,i?.length?r("div",{className:"pt-1",children:i.map(((e,t)=>function(e,t,a="primary"){return r("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[a]}`,children:e.description},String(t))}(e,t,d)))}):null]})]})})));function we(e,t){return r("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const ke=n((({className:e,viewBox:t,fill:a="none",width:n,height:l,paths:i,...s})=>r("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:a,width:n,height:l,children:i.map((({d:e,fill:t,...a},n)=>r("path",{d:e,fill:t||"currentColor",...s,...a},n)))}))),$e=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],Ce=n((({className:e,disabled:t,...a})=>r(Z,{rounded:!0,className:`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,...a,children:r(ke,{paths:$e,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),Se={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},Te={normal:3,mini:4},Ie={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Re={normal:380,mini:276},De={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},Le={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},je=n((({className:e="",isDotted:t=!0,text:n,children:l,version:i="primary"})=>a("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&r("div",{className:_e(i)}),r("span",{className:De[i],children:n||l})]}))),_e=e=>`rounded-full inline-block mr-3 mt-2 ${Le[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,Ae=n((({title:e,description:t,image:n,items:l,button:i,version:s})=>{const c=function(e,t,r){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||r?.length?"":"text-center"}\n `}(s,t,l);return a("div",{children:[a("div",{children:[n?.src?r("div",{className:"flex justify-center",children:r(k,{className:"mb-6",image:n})}):null,e?Pe(e,c):null,t?r("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,l?.length?Ve(l,s):null]}),i?.text?Me(i):null]})}));function Me(e){return r(Z,{className:"mt-6 w-full",appendLeft:e.icon&&r(d,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Pe(e,t){return r("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function Ve(e,t){return r("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,a)=>function(e,t,a){return r(je,{version:a??"primary",children:r("span",{className:"text-sm",children:e})},String(t))}(e.text,a,t)))})}const Be=n((({context:e,title:t,description:n,cards:l=[],version:i="normal",activeCardIndex:c})=>a("div",{children:[r("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),a("div",{className:"flex flex-col items-center mb-8",children:[t?r(s,{headingType:"h2",className:"text-center",title:t}):null,n?r("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:n}):null]}),r("div",{className:`flex ${l?.length<=Te[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*Re[i]}px)`},role:"list",children:l?.map(((t,a)=>function({card:e,version:t},a){return r("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${Ie[t]} ${Se[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:r(Ae,{...e})},String(a))}({card:t,version:i,context:e},a)))})]})));const Oe=n((({context:e,cards:t=[],className:n="",version:l="normal",...i})=>{const[s,c]=e.useState(0),o=t?.length>Te[l],d=o&&t?.length-s>Te[l],m=o&&s>0;return a("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${n}`,children:[r(Be,{context:e,cards:t,version:l,activeCardIndex:s,...i}),m&&r(Ce,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>c(s-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),d&&r(Ce,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>c(s+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),r("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),r("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),Fe=n((e=>r(Oe,{...e,version:"normal"}))),He=n((e=>r(Oe,{...e,version:"mini"}))),Ge=n((({className:e="",documents:t})=>r("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:r("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Ze(t):null})}))),Ze=e=>e.map(((e,t)=>{const{text:a,...n}=e;return r("li",{className:"mb-4 list-none",children:r("a",{className:"hover:text-primary-main",role:"link",...n,children:a||null})},`list_item_${String(t)}`)})),Ee={Headline:x,LinkDocs:w,TextBlock:de,PictureText:C,ProductBlock:ce,Tile:ge,ProductTile:ye,Gallery:Fe,MiniGallery:He,LinkList:Ge},ze=n((({blocks:e,columns:t=1,context:a})=>r("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 flex flex-wrap",children:e?.length?e.map(Ue(a,t)):null}))),Ue=(e,t)=>(a,n)=>{const l=a?.accordionBlockType;if(!l||!(l in Ee))return null;return r("div",{className:`mb-5 last:mb-0 pb-5 ${2===t?"w-1/2":""}`,children:r(Ee[l],{context:e,...a,className:"!p-0"})},`block_${n}`)},We=n((({label:e,blocks:t,columns:n,context:l})=>{const{hasContent:i,icon:s,handleToggle:c}=(({context:e,blocks:t})=>{const[r,a]=e.useState(!1),n=t?.length;return{isActive:r,hasContent:n,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!n)return;a(!r);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:t});return a("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[a("button",{className:"border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text\n "+(i?"group cursor-pointer":""),onClick:c,children:[r("span",{className:"text-xl pr-2.5 font-medium "+(i?"group-hover:text-primary-main":""),children:e}),i?r(d,{name:s,width:"24",height:"24",asSVG:!0}):null]}),i?r(ze,{columns:n,blocks:t,context:l}):null]})})),Je=n((({title:e,accordionItems:t,context:n,className:l})=>a("section",{className:`p-[50px] font-sans bg-white text-primary-text ${l||""}`,children:[e?r(s,{headingType:"h4",className:"mb-2.5",title:e}):null,t?.length?r("ul",{className:"list-none m-0 p-0",children:t.map(((e,t)=>r(We,{...e,context:n},`AccordionItem${t}`)))}):null]}))),Xe=n((({className:e,title:t,benefits:n})=>a("section",{className:`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${e||""}`,children:[t?r(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}):null,n?.length?r("div",{className:"grid grid-cols-2 gap-8 mt-9",children:n.map(qe)}):null]}))),qe=(e,t)=>a("div",{className:"flex items-center gap-5 max-w-[500px]",children:[e.icon&&r(d,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),a("div",{children:[r("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&r("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),Qe="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Ke="border-main-stroke border-solid border",Ye="border-main-divider border border-t-0 border-x-0",et="w-[200px] mr-6",tt=n((({children:e})=>r("div",{className:"self-start flex flex-col",role:"row",children:r("div",{className:"flex",children:e})}))),rt={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},at=n((({children:e,activeCardIndex:t,columnWidth:a,version:n="comparison"})=>r("div",{className:"flex flex-1 overflow-hidden",children:r("div",{className:rt[n],style:{transform:`translateX(-${t*a}px)`},children:e})}))),nt=n((({icon:e,image:t,title:n,link:l})=>a("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Ke} ${Qe}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&r(d,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&r(k,{className:"mb-[18px]",image:t}),n&&r(s,{headingType:"h4",className:"text-center text-white",title:n}),l?.text&&r("div",{className:"mt-auto w-full",children:r(Z,{href:l.href,target:l.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:r("div",{className:"font-medium text-xs py-[11px]",children:l.text})})})]}))),lt=n((({colHeaders:e,activeCardIndex:t,router:n,handlerDecorator:l})=>a(tt,{children:[r("div",{className:et,role:"columnheader",scope:"col"}),r(at,{activeCardIndex:t,columnWidth:336,children:e.map(((e,t)=>r(nt,{...e,link:e.link&&A({router:n,handlerDecorator:l},e.link)},String(t))))})]}))),it=n((({cell:e,isFirstRow:t,isLastRow:a,isFillGradient:n})=>r("div",{className:`w-80 box-border flex flex-col ${Ke} ${a?"border-t-0 rounded-b-md":"border-y-0"} ${n?Qe:""}`,role:"cell",children:r("div",{className:`mx-7 h-full ${Ye} ${n&&t?"border-t":""} ${a?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>st(e,t,n)))})}))),st=({label:e,description:t},n,l)=>a("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&r("h5",{className:"text-xl font-medium m-0 "+(l?"text-white":""),children:e}),t&&r("div",{className:"text-sm opacity-80 "+(l?"text-white":"text-secondary-text"),children:t})]},String(n)),ct=n((({row:{header:e,data:t},activeCardIndex:n,isColoredFirstColumn:l,isFirstRow:i,isLastRow:s})=>a(tt,{children:[e?.title?r("div",{className:`text-sm py-7 ${Ye} w-[200px] mr-6 ${s?"border-b-0":"border-solid"}`,children:e.title}):null,t?.length?r(at,{activeCardIndex:n,columnWidth:336,children:t.map(((e,t)=>r(it,{cell:e,isFirstRow:i,isLastRow:s,isFillGradient:l&&0===t},String(t))))}):null]}))),ot=n((({isScrollAvailable:e,onNextClick:t,onPrevClick:n,showNextButton:l,showPrevButton:i})=>e?r("div",{children:a("div",{className:"absolute top-7 right-7 z-10",children:[r(Ce,{onClick:t,disabled:!l,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),r(Ce,{className:"mt-4 rotate-180",onClick:n,disabled:!i,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"})]})}):null)),dt=n((({rowData:e,activeCardIndex:t,isColoredFirstColumn:n,...l})=>a("div",{className:"relative",children:[e.map(((e,a,{length:l})=>r(ct,{row:e,isFirstRow:0===a,isLastRow:a+1===l,activeCardIndex:t,isColoredFirstColumn:n},String(a)))),r(ot,{...l})]}))),mt=({columnsLength:e,colsLengthForScroll:t,activeCardIndex:r,setActiveCardIndex:a})=>{const n=e>t;return{onNextClick:()=>a(r+1),onPrevClick:()=>a(r-1),isScrollAvailable:n,showNextButton:n&&e-r>t,showPrevButton:Boolean(n&&r>0)}},ht=n((({context:e,columns:t,rowHeaders:n,isShowAllRow:l,visibleRowLength:i,isColoredFirstColumn:s})=>{const c=e.useRouter(),{handlerDecorator:o}=e,d=t?.map((({header:e})=>e||{})),m=t?.map((({data:e})=>e))||[],h=n?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[{}]))}))).slice(0,l?n.length:i),[x,p]=e.useState(0),u=mt({columnsLength:m.length,colsLengthForScroll:2,activeCardIndex:x,setActiveCardIndex:p}),{isScrollAvailable:b}=u;return a("div",{children:[a("div",{role:"table",children:[d?.length?r(lt,{colHeaders:d,activeCardIndex:x,router:c,handlerDecorator:o}):null,h?.length?r(dt,{rowData:h,activeCardIndex:x,isColoredFirstColumn:s,...u}):null]}),b?r("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),xt=n((({className:e,context:t,title:n,rowHeaders:l,columns:i,visibleRowLength:c=0,isColoredFirstColumn:o=!1})=>{const[d,m]=t.useState(!c);return a("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[r(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:n}),r(ht,{context:t,columns:i,rowHeaders:l,isShowAllRow:d,isColoredFirstColumn:o,visibleRowLength:c}),c?pt({isShowAllRow:d,onClick:()=>m(!d)}):null]})})),pt=({isShowAllRow:e,onClick:t})=>r("div",{className:"pr-[50px]",children:a("div",{className:"flex w-full",children:[r("div",{className:et}),r("button",{onClick:t,className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:r("div",{className:"font-sans font-medium text-xs py-[11px]",children:e?"Скрыть":"Показать все параметры"})})]})}),ut=n((({tabs:e,currentTabIndex:t,onTabClick:a})=>r("div",{className:"flex items-end border-b border-main-stroke",role:"tablist",children:e?.map(bt(t,a))}))),bt=(e,t)=>(n,l)=>{const i=e===l;return a("div",{className:"flex h-full flex-1 cursor-pointer mr-2 last:mr-0 "+(i?"px-2 h-16 pt-4 pb-2 text-white bg-primary-main":"px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke"),role:"tab",onClick:()=>t(l),"aria-selected":String(i),children:[n?.icon?ft(n,i):null,a("div",{children:[n?.title?r("h3",{className:"font-medium m-0 text-base",children:n?.title}):null,n?.description?r("span",{className:"font-light text-xs "+(i?"":"text-secondary-text"),children:n?.description}):null]})]},String(l))},ft=(e,t)=>r("div",{className:"h-full mt-1",style:t?{filter:"invert(1)"}:null,children:r(d,{className:"w-5 h-5 mr-3",name:e?.icon||"CardIcon",asSVG:!t})});async function gt(e){const t=await fetch(e);return await t.json()}const Nt=[{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"}],vt=n((({text:e,checked:t,onChange:n,className:l})=>r("div",{className:l,children:a("label",{className:"flex items-center cursor-pointer relative",children:[r("input",{className:`peer appearance-none w-5 h-5 border-solid border ${t?"border-black":"border-main-stroke"} rounded checked:bg-primary-main checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{n(e.target.checked)},checked:t}),r(ke,{paths:Nt,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?r("span",{className:"font-sans ml-3 text-sm leading-5 cursor-pointer",children:e}):null]})}))),yt=(e,t,r)=>Math.max(t,Math.min(e,r)),wt=3e4,kt=3e6,$t=Math.round(41.5);const Ct=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),St=n((({className:e,title:t,items:n=[],min:l=1,max:i=100,step:s=1,value:c=l,onChange:o})=>{const d=e=>{if(!o)return;const t=Number(e.replace(/\D/g,""));o(t)},m={backgroundSize:`${(100*(c-l)/(i-l)).toFixed(2)}% 100%`};return a("div",{className:e,children:[a("label",{className:"block relative",children:[t?r("span",{className:"absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5",children:t}):null,r("input",{className:"m-0 font-sans text-sm w-full h-12 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:Ct(c),onChange:e=>d(e.target.value),onBlur:()=>{o&&(c<l&&o(l),c>i&&o(i))}}),r("div",{className:"absolute inset-x-0 top-[35px] px-4 leading-[18px]",children:r("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:l,max:i,step:s,value:c,onChange:e=>d(e.target.value),style:m})})]}),r("div",{className:"flex justify-between my-3",children:n.map(((e,t)=>a("span",{className:"text-xs leading-[14px] text-secondary-text pl-4",children:[" ",e," "]},String(t))))})]})}));function Tt(e){const{minMonths:t,maxMonths:a,monthsValue:n,defaultMonths:l,setMonthsValue:i}=e;return r(St,{className:"mt-[23px]",title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:t,max:a,step:1,value:n||l,onChange:i})}function It(e,t){return a("div",{className:"box-border h-fit p-9 bg-primary-main rounded-md text-white",children:[r("div",{className:"text-base mb-[18px]",children:"Наше предложение"}),r("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),a("div",{className:"text-lg mb-3",children:[Ct(Math.round(e))," ₽"]}),r("div",{className:"text-sm opacity-60",children:"Ставка"}),a("div",{className:"text-lg",children:[t," %"]})]})}function Rt(e){const{calculatorParams:t,moneyValue:a,defaultSum:n,setMoneyValue:l}=e,i=t?.minSum||wt,s=t?.maxSum||kt;return r(St,{title:"Желаемая сумма кредита, ₽",items:[`От ${Ct(i)} рублей`,`До ${Ct(s)} рублей`],min:i,max:s,step:1e3,value:a||n,onChange:l})}const Dt=n((({context:e,directoryName:t})=>{const[n,l]=e.useState(void 0),[i,s]=e.useState(void 0),[c,o]=e.useState(!0),[d,m]=e.useState(!0),h=function(e,t){const{data:r}=e(function(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}(t),gt);return r||{}}(e.useAsyncData,t).rows,x=(e=>{const{tableRows:t,isAnnuity:r=!1}=e;return t&&t.find((e=>e.isAnnuity===r))||{}})({tableRows:h,isAnnuity:c}),p=(e=>e.maxSum&&e.minSum?(e.maxSum-e.minSum)/2:1485e3)(x),u=(e=>e.maxMonths&&e.minMonths?Math.round((e.maxMonths-e.minMonths)/2):$t)(x),b=x?.minMonths||1,f=x?.maxMonths||84,g=(e=>{const{calculatorParams:t,isInsurance:r}=e;return t?r?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),N=(e=>{const{calculatorParams:t,paymentType:r,rate:a,sum:n,months:l}=e;if(!t)return 0;const i=yt(n,t.minSum||wt,t.maxSum||kt);if("annuity"===r){const e=Number(a)/1200;return i*(e+e/(Math.pow(1+e,l)-1))}return i/l+i*(Number(a)/12)})({calculatorParams:x,paymentType:"annuity",rate:g,sum:n||p,months:i||u}),v=((e,t)=>{const r=Math.ceil((t-e)/12),a=Math.floor(e/12)+1,n=new Array(Math.min(r-1,5)).fill(0).map(((e,t)=>a+t)),l=r+a-1;return n.concat(l)})(b,f);function y(e){s(yt(12*e,b,f))}return r("section",{className:"mt-7",children:a("div",{className:"box-border p-[49px] pr-[56px] mx-auto w-max border-solid border-[3px] border-primary-main rounded-md",children:[a("div",{className:"flex justify-between",children:[a("div",{className:"mr-[42px]",children:[Rt({calculatorParams:x,moneyValue:n,defaultSum:p,setMoneyValue:l}),Tt({minMonths:b,maxMonths:f,monthsValue:i,defaultMonths:u,setMonthsValue:s}),r("div",{className:"flex mb-7",children:v.map(((e,t)=>function(e,t,n){return r("button",{className:"bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none",onClick:()=>n(e),children:a("span",{className:"font-semibold text-sm",children:[e," ",1===e?"год":e>4?"лет":"года"]})},String(t))}(e,t,y)))}),r(vt,{text:"Получаю пенсию на карту Россельхозбанка",checked:c,onChange:o}),r(vt,{className:"mt-3 mb-7",text:"Комплексная страховая защита",checked:d,onChange:m})]}),It(N,g)]}),a("div",{className:"flex items-center",children:[r(Z,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),r("div",{className:"w-80 text-2xs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})})),Lt=[{title:"Кредит",description:"Ставка от 6% до 7 лет",directoryName:"credit-calculator-data",icon:"CardIcon"},{title:"Кредит",description:"Ставка от 4% до 7 лет",directoryName:"credit-calculator-data1",icon:"ChartSquareIcon"},{title:"Кредит",description:"Ставка от 3% до 6 лет",directoryName:"credit-calculator-data2",icon:"DiscountShapeIcon"}],jt=n((({className:e="",context:t,tabs:n=Lt})=>{const[l,i]=t.useState(0);return a("section",{className:`font-sans text-primary-text py-10 bg-white ${e}`,children:[r(s,{className:"w-full text-center mb-8",headingType:pe(e),title:"Калькулятор"}),r(ut,{tabs:n,currentTabIndex:l,onTabClick:i}),r(Dt,{context:t,directoryName:n[l]?.directoryName})]})}));async function _t(){try{const e=await fetch(At);return await e.json()}catch(e){console.error(e)}}const At="/api/v1/exchangerates.json",Mt=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Pt=e=>e?Mt.format(e):"",Vt="text-left font-normal text-sm text-secondary-text",Bt={USD:"DollarIcon",EUR:"EuroIcon"},Ot=n((({className:e,exchangeCurrencyItems:t})=>a("table",{className:`h-fit w-fit ${e}`,children:[r("thead",{children:a("tr",{children:[r("th",{className:Vt,children:"Валюта"}),r("th",{className:`${Vt} pl-11`,children:"Купить"}),r("th",{className:`${Vt} pl-11`,children:"Продать"})]})}),r("tbody",{children:t.map((e=>Ft(e)))})]}))),Ft=e=>{const t=e?.currency?.currency;return a("tr",{children:[r("td",{className:"pt-4",children:a("div",{className:"flex items-center",children:[t?r(d,{name:Bt[t],width:"24",height:"24"}):null,r("span",{className:"ml-2",children:t})]})}),r("td",{className:"pt-4 pl-11",children:Pt(e.buyExchangeRate)}),r("td",{className:"pt-4 pl-11",children:Pt(e.saleExchangeRate)})]},t)},Ht=n((({className:e="",address:t,distance:n})=>a("div",{className:`flex text-sm ${e}`,children:[r(d,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),a("div",{className:"ml-1.5",children:[t?r("p",{className:"m-0",children:t}):null,n?a("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",n]}):null]})]}))),Gt=n((({className:e="",id:t,name:a,type:n="text",placeholder:l})=>r("input",{className:e,id:t,name:a||t,type:n,placeholder:l}))),Zt=n((({className:e="",id:t,name:a,children:n})=>r("select",{className:e,id:t,name:a||t,children:n}))),Et=n((({className:e="",value:t,children:a})=>r("option",{className:e,value:`${t}`,children:a}))),zt=n((({codes:e,className:t=""})=>a("div",{className:`grid gap-3.5 ${t}`,children:[Ut("Хочу продать",e),Ut("Получу",e),r(Z,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function Ut(e,t){return a("div",{className:"flex items-center",children:[r(Gt,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?r(Zt,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>r(Et,{value:e,children:e},String(t))))}):null]})}const Wt=["USD","EUR"],Jt=["RUB","USD","EUR"],Xt=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],qt={address:"Москва, ул.Ленина д.28",distance:"6км"},Qt=n((({className:e="",context:t,title:n="Курсы обмена валют"})=>{const l=function(e){const{data:t}=e(At,_t);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==Wt.indexOf(e?.currency?.currency||"")))||Xt;return r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:r(Y,{context:t,title:r(s,{headingType:pe(e),title:n,className:"whitespace-pre-wrap mb-3"}),children:a("div",{className:"flex",children:[a("div",{className:"mr-20 pt-3",children:[l?r(Ot,{className:"mb-7",exchangeCurrencyItems:l}):null,r(Ht,{...qt})]}),l?.length?r(zt,{className:"grow",exchangeCurrencyItems:l,codes:Jt}):null]})})})})),Kt=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Yt={"bg-white":"text-primary-main",transparent:"text-white"},er={"bg-white":"text-black",transparent:"text-white"},tr=n((({className:e,href:t,children:n,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>a("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[r(ke,{className:`${Yt[i]} w-10`,viewBox:"0 0 40 45",paths:Kt.map((e=>({d:e})))}),!s&&r("span",{className:`${er[i]} text-base font-medium ml-2.5`,children:n||"Россельхозбанк"})]}))),rr=n((({className:e,context:t})=>{const{term:n,setTerm:l}=t.useSearch();return a("form",{className:`relative ${e||""}`,children:[a("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[r("div",{className:"w-[24px] h-[24px]",children:r(d,{name:"LoupeIcon",width:"24",height:"24"})}),!n&&r("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),r("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:n,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input"}),r(Z,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e.preventDefault(),console.log("click")},children:r("div",{className:"font-normal text-sm px-9 py-[9px]",children:"Найти"})})]})})),ar=n((({className:e,items:t,hasButton:n,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return a("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(nr):null,n?r(Z,{version:"primary",className:"mt-0.5 mb-5",...A({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),nr=(e,t)=>{const{type:n,text:l,description:i}=e;return a("div",{className:"mb-3.5",children:[r("div",{children:lr(n,l)}),r("div",{className:"font-sans text-sm text-secondary-text",children:i})]},String(t))},lr=(e,t="")=>{switch(e){case"tel":return r("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${ir(t)}`,children:t});case"email":return r("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return r("span",{children:t})}},ir=e=>e.replaceAll(/\D/g,""),sr=n((({links:e,className:t="",context:a})=>{const n=a.useRouter(),{handlerDecorator:l}=a;return r("div",{className:t,children:e?.length?r("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:e.map(((e,t)=>r(cr,{index:t,...A({router:n,handlerDecorator:l},e)},String(t))))}):null})})),cr=n((({className:e="",index:t,text:a,href:n,target:l,onClick:i})=>r("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:n,target:l,onClick:i,children:a||`Документ ${t}`}))),or=e=>t=>e?.href===t?.href,dr=(e,t)=>{return(a=e,n=t,(a||[]).map((e=>n?.find(or(e))||e))).concat((r=e,(t||[]).filter((e=>!r?.find(or(e))))));var r,a,n};function mr(e){const{data:t}=e(xr(),hr);return t||{}}async function hr(){const e=await fetch(xr());return await e.json()}function xr(){return`/wcms-resources/${c.SITEMAP||"sitemap"}.json`}const pr=n((({className:e,items:t,context:a})=>{const n=mr(a.useAsyncData),l=dr(n.topItems,t),i={router:a.useRouter(),handlerDecorator:a.handlerDecorator};return r("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:l?.map(((e,t)=>ur(e,t,i)))})})),ur=(e,t,{router:n,handlerDecorator:l})=>{const{text:i,href:s,items:c,target:o}=e;return a("div",{className:"flex flex-col gap-[14px]",children:[r("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:o||"_self",children:i||`Раздел ${t}`}),c?.map(((e,t)=>r(br,{...A({router:n,handlerDecorator:l},e),index:t},String(t))))]},String(t))},br=n((({text:e,href:t,target:a,index:n})=>r("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:a||"_self",children:e||`Раздел ${n}`}))),fr=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],gr=n((({href:e})=>{const{icon:t,width:a,height:n,label:l}=fr.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?r("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:d&&r(d,{name:t,width:a,height:n,asSVG:!0,className:"block",color:"none"})}):null})),Nr=n((({className:e,media:t,context:a})=>{const n=a.useRouter(),{handlerDecorator:l}=a;return r("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>r(gr,{...A({router:n,handlerDecorator:l},e)},String(t))))})})),vr=n((({className:e,links:t,context:n})=>{const l=n.useRouter(),{handlerDecorator:i}=n;return a("div",{className:`${e||""}`,children:[r("div",{className:"pt-5 pb-[5px]",children:r("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?r("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>r(yr,{index:t,...A({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),yr=n((({className:e,index:t,text:a,href:n,target:l,onClick:i})=>r("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:n,target:l,onClick:i,children:a||`Документ ${t}`}))),wr=n((({className:e,documents:t,relatedEnterprises:n,contacts:l,socialMedia:i,topItems:s,context:c})=>a("footer",{className:`px-9 py-10 bg-white ${e||""}`,children:[a("div",{className:"flex items-stretch gap-[54px] pb-8 xl:gap-8",children:[r(tr,{className:"w-[280px] xl:w-[220px]"}),r(rr,{context:c,className:"grow"})]}),a("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[r(ar,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:l,context:c,hasButton:!0}),r(pr,{className:"pt-[3px]",context:c,items:s})]}),r(Nr,{media:i,context:c}),r(sr,{links:n,context:c}),r(vr,{links:t,context:c})]}))),kr=(e,t,r=((e,t)=>t.startsWith(e)))=>r(I(e),(e=>(e||"").replace(L,""))(I(T(e)?t.href:t.pathname))),$r=e=>t=>kr(t.href,e),Cr=e=>(t=[])=>{const r=t?.filter($r(e));var a;return r?.length?(a=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>a(e)>a(t)?e:t)))(r):null},Sr=e=>t=>t.items?.some($r(e))||kr(t.href,e)||((e,t)=>R(e)===R(t.href))(t.href,e),Tr="absolute left-0 -bottom-3 w-full h-[2px]",Ir=n((({className:e,text:t,href:n,target:l,active:i,onClick:s,children:c,bgColor:o="bg-white"})=>a("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:n,target:l,onClick:s,children:[r("span",{className:Rr(o,i),children:t||c}),i?r("div",{className:Dr(o,i)}):null]}))),Rr=(e,t)=>{let r="text-white";return"bg-white"===e&&(r=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${r} font-sans font-normal text-base`},Dr=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Tr}`:Tr,Lr=n((({className:e="",text:t,href:a,target:n,active:l,flat:i,onClick:s,children:c,ariaLabel:o,bgColor:d="bg-white"})=>r("a",{className:`${jr(d,l,i)} ${e}`,href:a,target:n,onClick:s,rel:"noopener noreferrer","aria-label":o,children:r("span",{className:_r(d,l,i),children:t||c})}))),jr=(e,t,r)=>{let a="border-transparent";return t&&(a="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${a} inline-block border border-solid bg-transparent text-center no-underline ${r?"":"px-4 py-2"}`},_r=(e,t,r)=>{let a="text-white";return"bg-white"===e&&(a=t?"text-primary-main":(r?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"),`${a} font-sans font-normal text-sm`},Ar=n((({className:e="",children:t,ariaLabel:a})=>r("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":a,children:t}))),Mr={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},Pr={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},Vr={"bg-white":"GridIcon",transparent:"GridIconWhite"},Br=n((({context:e,className:t,defaultLocation:n="",bgColor:l="bg-white"})=>{const[i,s]=e.useGeolocation(n);return a("div",{className:`flex items-center ${t||""}`,children:[r(Lr,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:l}),r(Lr,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:l}),r(Ar,{className:`mr-5 ${Mr[l]}`,ariaLabel:"Поиск по сайту",children:r(d,{name:"LoupeIcon",className:"h-full",asSVG:!0,color:"none"})}),r(Ar,{className:`mr-5 ${Mr[l]}`,ariaLabel:"Профиль",children:r(d,{name:"ProfileIcon",className:"h-full",asSVG:!0,color:"none"})}),r(Ar,{className:`${Pr[l]} min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:r(d,{name:Vr[l],className:"h-full",asSVG:!0,color:"none"})})]})})),Or={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},Fr=n((({className:e,defaultLocation:t,bgColor:n="bg-white",context:l,topItems:i})=>{const s=l.useRouter(),c=mr(l.useAsyncData),{handlerDecorator:o}=l,d=dr(c.topItems,i),m=d.find(Sr(s)),h=m?.items,x=Cr(s)(h),p=d.map(((e,t)=>r(Lr,{active:e===m,...A({router:s,handlerDecorator:o},e),ariaLabel:e.text,bgColor:n},String(t)))),u=h?.map((e=>r(Ir,{className:"mr-8",active:e===x,...A({router:s,handlerDecorator:o},e),bgColor:n},e.href)));return r("header",{className:`pt-5 pb-8 px-20 ${n} ${e||""}`,children:a("div",{className:"container",children:[a("div",{className:"flex items-center",children:[r(tr,{className:"mr-8",bgColor:n}),p,r(Br,{context:l,className:"ml-auto",defaultLocation:t,bgColor:n})]}),r("div",{className:`mt-5 h-[1px] ${Or[n]}`}),r("nav",{className:"mt-5",children:u})]})})})),Hr=n((({className:e="",context:t,title:n="Мобильное приложение",qr:l,buttons:i=[]})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${be(e)} ${ue(e)} `,children:r(Y,{context:t,title:n&&r(s,{headingType:pe(e),title:n,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:i?.length?r(U,{context:t,buttons:i,className:"flex mt-9 gap-3"}):null,children:a("div",{className:"flex items-center",children:[l?.src&&l?.href&&r("a",{href:l.href,target:"_blank","aria-label":n,children:r("img",{src:l.src,alt:n,title:n,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),r("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})})}))),Gr=n((({className:e,text:t,onClick:a,href:n,target:l,isActive:i})=>r("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${e||""} ${i?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:a,href:n,target:l,children:t}))),Zr=n((({className:e,context:t,title:n,buttons:l})=>{const i=t.useRouter(),{handlerDecorator:s}=t,c=Cr(i)(l);return a("section",{className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,children:[r("h2",{className:"font-medium text-xl m-0",children:n}),l?.length?r("div",{className:"flex rounded-md overflow-hidden bg-white",children:l.filter((({text:e})=>e)).map(((e,t)=>r(Gr,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===c,...A({router:i,handlerDecorator:s},e)},String(t))))}):null]})})),Er=n((({className:e,context:t,title:n,description:l="Блок в разработке..."})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${be(e)} ${ue(e)} `,children:a(Y,{context:t,title:n?r(s,{headingType:pe(e),title:n,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?r(W,{className:"mt-4 max-w-[600px]",description:l}):null,r("figure",{className:"m-0 min-w-[600px]",children:zr()})]})}))),zr=(e=3)=>Wr(100,e).map((e=>Math.floor(e))).map(Ur),Ur=(e=100,t)=>r("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Wr=(e,t)=>[e].concat(t>0?Wr(e/1.618,t-1):[]),Jr=n((({className:e,context:t,duration:n=0,slides:l=[]})=>{const i=l.map((e=>e.nav)),s=l.map((e=>e.productBlock)),[c,o]=t.useState(0);return a("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[r("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:s.map(((e,a)=>function(e,t,a){return r("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:r("div",{className:"p-10 flex grow",children:r(ae,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:a,...e})})},String(t))}(e,a,t)))}),r("div",{className:"flex",children:i.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:l,duration:i}){const s=t===n,c=s?"animate-slide":"",o=s?"text-primary-text":"text-secondary-text";return a("button",{type:"button",onClick:l,"aria-label":e?.title,className:"font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0",children:[a("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[r("div",{className:`text-sm font-medium pb-[3px] group-hover:text-primary-text ${o}`,children:e?.title}),r("div",{className:"text-xs text-secondary-text",children:e.desc})]}),r("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${c}`,style:{animationDuration:`${i}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>o(t),duration:n})))})]})}));const Xr=n((({className:e="",context:t,slides:n=[]})=>{const l=n.map((e=>e.nav)),i=n.map((e=>e.productBlock)),[s,c]=t.useState(0);return a("section",{className:`box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${e}`,children:[r("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${s}00%)`},role:"list",children:i.map(((e,n)=>function(e,t,n){return r("section",{className:"box-border relative flex grow-0 shrink-0 basis-full px-9",role:"listitem",children:a("div",{className:"flex grow",children:[e.backgroundText?r("div",{className:"absolute text-[454px] font-bold text-white tracking-[-10px] leading-[299px] opacity-[.1] right-12 top-20 z-0",children:e.backgroundText}):null,r(ae,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem] z-[1]",context:n,textBlockClassName:"mb-[154px]",version:"secondary",...e}),r(d,{className:"absolute right-[460px] top-[200px] z-0 mb-4",name:"ArrowsRewindRight",width:"230",height:"187"})]})},String(t))}(e,n,t)))}),r("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-9 box-border",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:l}){const i=t===n,s=i?"bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0":"bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300",c=i?"text-primary-text":"text-white",o=i?"text-secondary-text":"text-white";return r("button",{type:"button",onClick:l,"aria-label":e?.title,className:`box-border font-sans group relative overflow-hidden border-white/50 border-[1px] cursor-pointer text-left mb-6a mx-1 grow basis-0 backdrop-blur-sm\n ${s}\n `,children:a("div",{className:"border-0 px-6",children:[r("div",{className:`text-sm font-medium pb-[3px] ${c}`,children:e?.title}),r("div",{className:`text-xs text-secondary-text ${o}`,children:e.description})]})},String(t))}({slide:e,i:t,activeSlideIndex:s,onClick:()=>c(t)})))})]})}));const qr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Qr=n((({className:e="",context:t,title:n="Акции и спецпредложения",date:l,description:i,buttons:c=[],version:o="primary"})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${qr[o]} ${be(e)} ${ue(e)} `,children:r(Y,{context:t,title:n?r(s,{headingType:pe(e),title:n,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:c?.length?r(U,{context:t,buttons:c,className:"flex mt-9 gap-3"}):null,children:a("div",{className:"mt-1.5",children:[l?r("div",{className:"text-sm mb-2",children:Kr(l)}):null,r("div",{className:"text-base",children:i})]})})})));function Kr(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Yr=n((({context:e,className:t="",title:n,description:l,items:i,image:c,version:o})=>r("section",{className:`border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${t}`,role:"listitem",children:a(Y,{context:e,title:n&&r(s,{headingType:"h4",title:n,className:"mb-4"}),image:c?.src&&r(k,{className:"mt-auto ml-7",image:c}),children:[l?r(W,{description:l}):null,i?.length?r(K,{items:i,version:o}):null]})}))),ea="absolute top-0 bottom-0 w-[84px]",ta=n((({context:e,recommendations:t=[],className:n="",title:l,version:i})=>{const[c,o]=e.useState(0),d="secondary"===i?"border-main-divider":"border-main-stroke";return a("section",{className:`relative font-sans p-[50px] overflow-hidden ${"secondary"===i?"bg-primary-main text-white":"bg-white text-primary-text"} ${n}`,children:[l?r(s,{headingType:"h3",className:"mb-8",title:l}):null,r("div",{className:"flex duration-1000 gap-4",style:{transform:`translateX(-${525*c}px)`},role:"list",children:t?.length?t.map(ra({context:e,version:i,className:d})):null}),aa({cardsCount:t.length,activeCardIndex:c,setActiveCardIndex:o}),r("div",{className:`${ea} left-0 ${"secondary"===i?"bg-opacity-from-main":"bg-opacity-from-white"}`}),r("div",{className:`${ea} right-0 ${"secondary"===i?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),ra=({context:e,version:t,className:a})=>(n,l)=>r(Yr,{context:e,...n,version:t,className:a},String(l)),aa=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:n})=>{const l=e>2,i=l&&e-t>2;return a("div",{children:[l&&t>0&&r(Ce,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-6",onClick:()=>n(t-1),ariaLabel:"Пролистать влево"}),i&&r(Ce,{className:"absolute top-1/2 right-8 z-10 mt-6",onClick:()=>n(t+1),ariaLabel:"Пролистать вправо"})]})},na=n((({className:e,title:t,showLines:n=!0,steps:l})=>a("section",{className:`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${e||""}`,children:[r(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}),l?.length?a("div",{className:"box-border py-0.5 mb-0.5 "+(t?"mt-9":""),children:[r("div",{className:"flex items-center px-[88px]",children:P(r("div",{className:"h-0.5 w-full bg-secondary-light "+(n?"":"opacity-0")}))(l.map(((e,t)=>la(e,t))))}),r("div",{className:"flex justify-between gap-x-[101px]",children:l.map(ia)})]}):null]}))),la=(e,t)=>r("div",{className:"flex flex-col items-center text-center relative",children:r("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&r(d,{name:e.icon,width:"48",height:"48"})||r("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),ia=(e,t)=>a("div",{className:"flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden",children:[e.label&&r("div",{className:"font-medium text-xl m-0 mt-4",children:e.label}),e.description&&r("div",{className:"font-normal text-sm text-secondary-text "+(e.label?"mt-2":"mt-4"),children:e.description})]},String(t)),sa=n((({cell:e,isLastRow:t})=>r("div",{className:"first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(t?"border-t-0 rounded-b-md":""),role:"cell",children:r("div",{children:e.map(ca)})}))),ca=({label:e,description:t,list:n,image:l,buttons:i},s)=>a("div",{className:"first:pt-5 last:pb-5",children:[s>0&&r("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-4"}),e?r("div",{className:"text-xl font-medium m-0",children:e}):null,t?r("div",{className:"text-sm text-secondary-text",children:t}):null,n?.items?.length?r("div",{className:"flex flex-col justify-between items-start",children:r("div",{role:"list",children:n.items.map(((e,t)=>r(je,{className:"text-sm",text:e,version:"gray",isDotted:n.isDotted??!0},String(t))))})}):null,l&&r(k,{image:l}),i?.length?i.map((({icon:e,...t},a)=>r(Z,{className:(a>0?"ml-3":"")+" w-12 h-12",appendLeft:e&&r(d,{name:e,width:"24px",height:"24px",asSVG:!0}),...t},String(a)))):null]},String(s)),oa=n((({row:{header:e,data:t},activeCardIndex:n,isLastRow:l})=>a(tt,{children:[r("div",{className:"text-sm py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(l?"":"border-solid"),children:a("div",{className:"flex items-center text-primary-text",children:[e?.icon&&r(d,{className:"mr-[14px] max-w-6 max-h-6",name:e.icon,width:"24px",height:"24px",asSVG:!0}),e?.title]})}),t?.length?r(at,{activeCardIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>r(sa,{cell:e,isLastRow:l},String(t))))}):null]}))),da=n((({className:e,context:t,title:n,description:l,rowHeaders:i,columns:c})=>{const[o,d]=t.useState(0),m=ma(c),h=ha(i,m),x=mt({columnsLength:m.length,colsLengthForScroll:2,activeCardIndex:o,setActiveCardIndex:d}),{isScrollAvailable:p}=x;return a("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[n?r(s,{headingType:"h2",className:"text-center "+(l?"mb-2.5":"mb-9"),title:n}):null,l?r("div",{className:"mb-9 text-center text-m-base",children:l}):null,h?.length?a("div",{role:"table",children:[a("div",{className:"relative",children:[h.map(((e,t,{length:a})=>r(oa,{row:e,isLastRow:t+1===a,activeCardIndex:o},String(t)))),r(ot,{...x})]}),p?r("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]}):null]})})),ma=e=>e?.map((({data:e})=>e))||[],ha=(e,t)=>e?.map(((e,r)=>({header:e,data:t.map((e=>e?.[r]||[{}]))}))),xa={Accordion:Je,BenefitsBlock:Xe,ComparisonTable:xt,CreditCalculator:jt,ExchangeRateTile:Qt,Footer:wr,Gallery:Fe,Header:Fr,Headline:x,LinkDocs:w,MiniGallery:He,MobileAppTile:Hr,PictureText:C,ProductBlock:ce,ProductGallery:Jr,ProductGalleryGreen:Xr,ProductTile:ye,PromoTile:Qr,Recommendation:ta,StepsBlock:na,TariffsTable:da,TextBlock:de,Tile:ge,Navigation:Zr,Placeholder:Er},pa=n((({className:e,onClick:t,ariaLabel:a})=>r("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":a,children:ua()}))),ua=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r("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"}),r("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"})]})},ba=n((({className:e,context:t})=>{const n=t.useLikeService();return a("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[r(pa,{onClick:n.like,ariaLabel:"Поставить отметку «лайк»"}),r(pa,{onClick:n.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),r("span",{className:"select-none",children:n.likeCount})]})})),fa=({blockClassName:e,block:t,render:r})=>r({blockClassName:e,block:t}),ga=n((({className:e,context:t,blocksRegistry:n,data:{style:l,blocks:i,slots:s={},likeControl:c,colorPalette:o="pc"},blockDecorator:d=fa})=>{const{header:m}=s;return a("section",{className:`relative ${va(l)} ${e||""}`,"data-theme":o,children:[m?.blocks?.length?r("div",{className:`${va(m?.style)}`,children:m.blocks.map(((e,r)=>Na({block:e,blockDecorator:d,blocksRegistry:n,context:t},r)))}):null,i?.length?r("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,r)=>Na({block:e,blockDecorator:d,blocksRegistry:n,context:t},r)))}):null,c&&r("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:r(ba,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function Na({block:e,blockDecorator:t,blocksRegistry:a,context:n},l){const{type:i}=e;i&&i in a||console.warn(`No block with "${i}" is registered`);const s=a[i||"Placeholder"]||Er;return t({blockClassName:va(e.style),block:e,render:e=>{const{version:t,content:a}=e.block;return r(s,{className:e.blockClassName,version:t,context:n,...a},`${i}-${l}`)}},`block-${l}`)}function va(e){return e?e.join(" "):""}const ya=n((({HeadComponent:e,data:t,children:n})=>{const{title:l,main:i,og:s,twitter:c,jsonLd:o}=t,{description:d,keywords:m,canonical:h,robots:x}=i||{};return a(e,{children:[r("title",{children:l}),r("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),d&&r("meta",{name:"description",content:d}),m&&r("meta",{name:"keywords",content:m.join(",")}),x&&r("meta",{name:"robots",content:x.join(",")}),wa(s),ka(c),h&&r("link",{rel:"canonical",href:h}),o&&r("script",{type:"application/ld+json",children:o}),n]})}));function wa(e){return e?Object.entries(e).map((([e,t])=>r("meta",{property:`og:${e}`,content:t},e))):null}function ka(e){return e?Object.entries(e).map((([e,t])=>r("meta",{name:`twitter:${e}`,content:t},e))):null}function $a(e){const{mobile:t,...r}=e;return r}function Ca(e){return e?.filter((e=>{return t=e?.type,(t||"")in xa;var t})).map($a)}e.Blocks=xa,e.ContentPage=ga,e.ContentPageHead=ya,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))))))(),r=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await r.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=Fr,e.Icon=d,e.LikeAPI=function(e,t=""){async function r(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:r,name:a}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:r,name:a})),{token:r,name:a}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...a){if(!a.length)return[];const{token:n}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:a})}),{likes:l}=await r.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(a){if(!a)return 0;const{token:n,name:l}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:l},body:JSON.stringify({node_id:a,user_name:l})}),{likes:i}=await r.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(a){if(!a)return 0;const{token:n,name:l}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:l},body:JSON.stringify({node_id:a,user_name:l})}),{likes:i}=await r.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=P,e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:r}=e;return{...e,blocks:Ca(t),slots:r&&Object.keys(r).reduce(((e,t)=>({...e,[t]:{...r[t],blocks:Ca(r[t].blocks)}})),{})}},e.projectSettings=c,e.setup=t,e.url=D,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...a}={})=>{const l=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,l,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...a}=t||{},l=n?.slots?.default,i=r||l&&l();return e(Object.assign(a,i&&{children:i}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-title-lg tracking-[-0.3px]",h2:"text-title",h3:"text-title-sm",h4:"text-title-xs",h5:"text-title-2xs tracking-[0.2px]",h6:"text-title-2xs tracking-[0.2px]"},s=a((e=>{const{className:t="",headingType:r,title:a}=e;if(!r)return;return n(r,{className:`font-sans font-medium m-0 ${i[r]} ${t}`,children:a})})),o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}};var c,d;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.BurgerIconWhite="BurgerIconWhite",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CalendarWhiteIcon="CalendarWhiteIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.ChartSquareIcon="ChartSquareIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EmptyWalletWhiteIcon="EmptyWalletWhiteIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.GridIconWhite="GridIconWhite",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PercentageSquareWhiteIcon="PercentageSquareWhiteIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon"}(c||(c={})),function(e){e.ActualBalanceIcon="Деньги",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="ArrowDownIcon",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.BurgerIconWhite="Бургер (белый)",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CalendarWhiteIcon="Календарь белый",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.ChartSquareIcon="Деньги внутри кошелька",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EmptyWalletWhiteIcon="Пустой кошелёк (белый)",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка",e.GridIconWhite="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PercentageSquareWhiteIcon="Проценты белые",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами"}(d||(d={}));const m={none:"",primary:"text-primary-main"},h=a((({className:e="",name:t,alt:a=`Иконка ${d[t]||t}`,title:l=a,asSVG:i,color:s="primary",...c})=>{const h=`${o.CDN||""}icons/${t}.svg`;return i?r("svg",{className:`${m[s]} ${e}`,...c,"aria-hidden":"true",children:[l?n("title",{children:l}):null,a?n("desc",{children:a}):null,n("use",{href:`${h}#icon`,xlinkHref:`${h}#icon`})]}):n("img",{className:e,src:h,alt:a,title:l,...c,"aria-hidden":"true"})})),x={left:"text-left",center:"text-center",right:"text-right"},p={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},u=a((({bgColorHeadline:e="transparent",align:t="left",className:a="",title:l,description:i})=>{const o=p[e];return r("section",{className:`p-[50px] ${o.background} ${a}`,children:[l&&n(s,{headingType:"h2",className:`text-primary-text ${o.text} ${x[t]}`,title:l}),i&&n("p",{className:`font-normal text-base mt-4 ${o.text} ${x[t]}`,children:i})]})})),b=a((({className:e,iconClassName:t,textClassName:a,suffixClassName:l,doc:i,icon:s})=>{const{text:o,fileSize:c,...d}=i;return r("a",{className:e,role:"link",...d,children:[s?n(h,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,o?r("span",{className:a,children:[o,n("span",{className:l,children:d?.href&&g(f(d.href),c)})]}):null]})})),g=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),f=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},N=a((({className:e="",doc:t,icon:r})=>n(b,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6 text-primary-text",textClassName:"self-center",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:r}))),v=a((({className:e,documents:t,columnsMode:r="double",icon:a})=>t?.length?n("div",{className:e,role:"list",children:t.map(((e,t)=>n("div",{className:"double"===r?"basis-[calc(50%-20px)]":"",role:"listitem",children:n(N,{className:"group flex text-sm align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),y={left:"text-left",center:"text-center",right:"text-right"},w={double:"mb-8",single:"mb-[26px]"},I={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},k=a((({className:e="",title:t,subtitle:a,align:l,documents:i,icon:o="DocIcon",columnsMode:c="double"})=>r("section",{className:`font-sans text-primary-text p-12 bg-white ${e}`,children:[t?n(s,{headingType:"h2",className:`${a?"mb-2.5":w[c]} ${y[l??"center"]}`,title:t}):null,a?n("h3",{className:`text-base mt-0 font-normal ${w[c]} ${y[l??"center"]}`,children:a}):null,n(v,{className:I[c],columnsMode:c,documents:i,icon:o})]}))),C=a((({className:e="",image:{size:t,...a},imageClassName:l=""})=>{const i={width:t?.width?`${t?.width}px`:"100%",height:t?.height?`${t?.height}px`:"100%"};return r("picture",{className:`flex-none ${e}`,children:[a.sources?.length?a.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:$(t)},`${r}_${e}`))):null,n("img",{className:l,src:a.src,alt:a.alt||a.title,title:a.title,style:i,...t})]})}));function $(e){return e?`image/${String(e)}`:void 0}const S=a((({className:e="",title:t,image:a,benefits:l})=>r("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[n(s,{headingType:"h2",className:"text-center",title:t}),r("div",{className:"flex justify-center mt-9",children:[a?.src&&n(C,{className:"mr-6",image:a}),l?.length?n("div",{className:"flex flex-col",children:l.map(T)}):null]})]})));function T(e,t){return r("div",{className:"flex flex-row mb-8",children:[e.icon&&n(h,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const D=e=>e?.includes("//"),R=e=>(e||"").replace(/\/?\?.*/,""),A=e=>{if(!e||!D(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var M=Object.freeze({__proto__:null,isURL:D,withoutQuery:R,getOrigin:A});const P="/mobile",L=(e,t)=>{if(!e)return e;const n=A(t?.href);return n?e.replace(n,"")||"/":e},j=e=>e;function _({router:e,handlerDecorator:t=j},n){const r=((e,t)=>{if(!e)return e;const n=L(e,t)||"",r=t?.pathname.startsWith(P);return r&&!D(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const a=r&&!D(r),l=!n.target||"_self"===n.target;a&&l&&(t.preventDefault(),e.push(r))}),n)}}const B=a((({text:e,href:t,target:r,onClick:a,className:l="",children:i})=>t?n("a",{className:`no-underline ${l}`,href:t,target:r,onClick:a,children:n("span",{className:l,children:e||i})}):n("span",{className:l,children:e||i})));function W(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])}const G=a((e=>{const{text:t,aboveText:a,appendLeft:l}=e;return r("div",{className:V(e),children:[l||null,E(e)?r("div",{children:[n("div",{className:"text-m-2xs text-left",children:a}),n("div",{className:"text-m-button font-medium text-left",children:t})]}):null]})})),V=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const a="px-8 gap-2 "+(n?"py-2":"py-3.5");return["flex items-center justify-center",E(e)?a:"h-12 w-12",r?"rounded-full":""].join(" ")},E=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),O={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:""},F={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},H="text-center font-sans select-none",U=a((e=>{const{text:t,aboveText:r,appendLeft:a,children:l,disabled:i,rounded:s}=e,o=l??n(G,{text:t,aboveText:r,appendLeft:a,rounded:s});return n(i?z:Z,{...e,children:o})})),Z=a((({className:e,ariaLabel:t,version:r="none",rounded:a,href:l,target:i,children:s,onClick:o,...c})=>n("a",{className:`${H} inline-block cursor-pointer no-underline ${O[r]||""} ${a?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:i,onClick:o,"aria-label":t,role:l?"link":"button",...c,children:s}))),z=a((({className:e,children:t,ariaLabel:r,version:a="none",rounded:l})=>n("div",{role:"button","aria-disabled":"true","aria-label":r,tabIndex:"-1",className:`inline-block ${H} ${F[a]||""} ${l?"rounded-full":"rounded-md"} ${e||""}`,children:t}))),q=a((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:a}=e,l=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(U,e?{appendLeft:n(h,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(_({router:l,handlerDecorator:a},e),t)))}):null}));const J=a((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),K={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},X={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},Q=a((({className:e="",isDotted:t=!0,children:a,version:l="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Y(l)}),n("span",{className:`text-m-md ${K[l]}`,children:a})]}))),Y=e=>`rounded-full inline-block mr-3 mt-2 ${X[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,ee=a((e=>{const{className:t="",itemClassName:r,isDotted:a,items:l,version:i}=e;return n("section",{className:`${t}`,role:"list",children:l?.length?l.map(((e,t)=>n(Q,{className:r,isDotted:a,version:i,children:e},String(t)))):null})})),te=a((({className:e="",title:t,children:a,buttons:l,image:i})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:a}),l?n("div",{children:l}):null]}),i]})]}))),ne={primary:"bg-main",secondary:"bg-white/30"},re={primary:"text-primary-text",secondary:"text-white"},ae={primary:"text-secondary-text",secondary:"text-white"};const le=a((({className:e="",context:t,title:a,headingType:l="h2",description:i,benefits:s,buttons:o,image:c,items:d,version:m="primary",textBlockClassName:x=""})=>r("div",{className:`flex grow justify-between items-stretch ${e}`,children:[n("div",{className:`flex flex-col ${x}`,children:r(te,{context:t,title:ie(a,l,"secondary"===m?"text-white":""),buttons:se(t,o),children:[i&&n(J,{className:"mt-4 max-w-[600px]",description:i}),s?.filter((e=>e.label))?.length?n("div",{className:"flex gap-6 mt-6",children:s.map(((e,t)=>function(e,t,a){return r("div",{className:"flex gap-4 items-center",children:[e.icon&&n(h,{className:`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${ne[a]}`,name:e.icon,width:"24",height:"24",asSVG:!0}),r("div",{className:"flex gap-1 flex-col h-full max-w-[149px]",children:[n("div",{className:`font-medium text-xl m-0 ${re[a]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-sm ${ae[a]}`,children:e.description})]})]},String(t))}(e,t,m)))}):null,d?.length?n(ee,{className:"mt-5",items:d,itemClassName:"mb-[10px]",version:m}):null]})}),c?.src&&n(C,{className:"mt-auto",image:c})]}))),ie=(e,t,r)=>e&&n(s,{headingType:t,title:e,className:`whitespace-pre-wrap max-w-[600px] ${r}`}),se=(e,t)=>t?.length?n(q,{context:e,buttons:t,className:"flex mt-9 gap-3"}):null,oe={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ce={primary:"text-secondary-text",secondary:"text-white/80"},de=a((e=>{const{context:t,className:a,breadcrumbs:l,version:i="primary"}=e,s=t.useRouter(),{handlerDecorator:o}=t;return r("section",{className:`font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${a||""} ${oe[i]}`,children:[l?.length?n("div",{className:"text-xs mb-6",children:W(n("span",{className:`mx-2 ${ce[i]}`,children:"/"}))(l.map(((e,t)=>n(B,{..._({router:s,handlerDecorator:o},{className:ce[i],...e})},String(t)))))}):null,n(le,{...e})]})})),me={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},he=a((({title:e,description:t,blockVersion:a="primary",iconVersion:l,image:i,className:s})=>{const o=me[a];return r("section",{className:`font-sans px-9 py-4 flex ${o.background} ${s||""}`,children:["small"===l?xe(o.icon):null,"big"===l?pe(i):null,r("div",{className:"py-0.5",children:[e&&n("div",{className:`font-medium text-base mb-1 ${o.title}`,children:e}),t&&n("div",{className:`text-sm ${o.description}`,children:t})]})]})}));function xe(e){return n("div",{className:"pt-1.5 pl-1 pr-4",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function pe(e){return e?.src?n(C,{className:"pt-0.5 pr-3",image:e}):null}const ue=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function be(e=""){const t=ue(e);return t<=4?"h4":t<=8?"h3":"h2"}function ge(e=""){const t=ue(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function fe(e=""){const t=ue(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Ne={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ve=a((e=>{const{context:t,title:a,description:l,items:i,children:o,buttons:c,image:d,className:m="",version:h="primary",role:x}=e;return n("section",{className:`overflow-hidden font-sans p-9 box-border ${m} ${Ne[h]} ${fe(m)} ${ge(m)} `,role:x,children:r(te,{context:t,title:a&&n(s,{headingType:be(m),title:a,className:`whitespace-pre-wrap max-w-[600px] ${a?"mb-3":""}\n ${"primary"===h?"text-primary-text":""}`}),buttons:c?.length?n(q,{context:t,buttons:c,className:"flex mt-9 gap-3"}):null,image:d?.src&&n(C,{className:"mt-auto ml-7",image:d}),children:[l&&n(J,{className:"mt-4 max-w-[600px]",description:l}),o,ye(i,h)]})})}));function ye(e,t){return e?.length?n(ee,{items:e,version:t}):null}const we={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Ie=a((({context:e,className:t="",title:a,description:l,benefits:i,buttons:o,image:c,version:d="primary"})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${we[d]} ${fe(t)} ${ge(t)} `,children:r(te,{context:e,title:a&&n(s,{headingType:be(t),title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?n(q,{context:e,buttons:o,className:"flex mt-9 gap-3"}):null,image:c?.src&&n(C,{className:"mt-auto ml-7",image:c}),children:[l&&n(J,{className:"mt-4 max-w-[600px]",description:l}),r("div",{className:"flex mt-5 mb-1",children:[i?.length?n("div",{className:"mr-8",children:i.map(ke)}):null,i?.length?n("div",{className:"pt-1",children:i.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.description},String(t))}(e,t,d)))}):null]})]})})));function ke(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const Ce=a((({className:e,viewBox:t,fill:r="none",width:a,height:l,paths:i,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:a,height:l,children:i.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...s,...r},a)))}))),$e=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],Se=a((({className:e,disabled:t,...r})=>n(U,{rounded:!0,className:`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,...r,children:n(Ce,{paths:$e,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),Te={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},De={normal:3,mini:4},Re={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Ae={normal:380,mini:276},Me={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},Pe={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},Le=a((({className:e="",isDotted:t=!0,text:a,children:l,version:i="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:je(i)}),n("span",{className:Me[i],children:a||l})]}))),je=e=>`rounded-full inline-block mr-3 mt-2 ${Pe[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,_e=a((({title:e,description:t,image:a,items:l,button:i,version:s})=>{const o=function(e,t,n){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||n?.length?"":"text-center"}\n `}(s,t,l);return r("div",{children:[r("div",{children:[a?.src?n("div",{className:"flex justify-center",children:n(C,{className:"mb-6",image:a})}):null,e?We(e,o):null,t?n("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,l?.length?Ge(l,s):null]}),i?.text?Be(i):null]})}));function Be(e){return n(U,{className:"mt-6 w-full",appendLeft:e.icon&&n(h,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function We(e,t){return n("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function Ge(e,t){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,r)=>function(e,t,r){return n(Le,{version:r??"primary",children:n("span",{className:"text-sm",children:e})},String(t))}(e.text,r,t)))})}const Ve=a((({context:e,title:t,description:a,cards:l=[],version:i="normal",activeCardIndex:o})=>r("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),r("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,a?n("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:a}):null]}),n("div",{className:`flex ${l?.length<=De[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${o*Ae[i]}px)`},role:"list",children:l?.map(((t,r)=>function({card:e,version:t},r){return n("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${Re[t]} ${Te[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(_e,{...e})},String(r))}({card:t,version:i,context:e},r)))})]})));const Ee=a((({context:e,cards:t=[],className:a="",version:l="normal",...i})=>{const[s,o]=e.useState(0),c=t?.length>De[l],d=c&&t?.length-s>De[l],m=c&&s>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${a}`,children:[n(Ve,{context:e,cards:t,version:l,activeCardIndex:s,...i}),m&&n(Se,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>o(s-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),d&&n(Se,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>o(s+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),Oe=a((e=>n(Ee,{...e,version:"normal"}))),Fe=a((e=>n(Ee,{...e,version:"mini"}))),He=a((({className:e="",documents:t})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Ue(t):null})}))),Ue=e=>e.map(((e,t)=>{const{text:r,...a}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...a,children:r||null})},`list_item_${String(t)}`)})),Ze={Headline:u,LinkDocs:k,TextBlock:he,PictureText:S,ProductBlock:de,Tile:ve,ProductTile:Ie,Gallery:Oe,MiniGallery:Fe,LinkList:He},ze=({blocks:e,context:t,className:n,columns:r,version:a})=>e?.length?e.map(qe({context:t,className:n,columns:r,version:a})):null,qe=({context:e,columns:t,className:r,version:a})=>(l,i)=>{const s=l?.blockListType;if(!s||!(s in Ze))return null;return n("div",{className:`${r} ${2===t?"w-1/2":""}`,children:n(Ze[s],{context:e,...l,blockVersion:a,className:"!p-0"})},`block_${i}`)},Je=a((({blocks:e,columns:t=1,context:r,version:a="primary"})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden",children:ze({context:r,className:"mb-5 last:mb-0 pb-5",columns:t,blocks:e,version:a})}))),Ke={primary:"text-primary-text",secondary:"text-white"},Xe={primary:"group-hover:text-primary-main",secondary:"group-hover:text-white"},Qe=a((({label:e,isExpanded:t,blocks:a,columns:l,context:i,version:s="primary"})=>{const{isActive:o,hasContent:c,icon:d,handleToggle:m}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,a]=e.useState(n),l=t?.length;return{isActive:r,hasContent:l,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!l)return;a(!r);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:i,blocks:a,initialState:t});return r("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[r("button",{className:`border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans ${Ke[s]}\n ${c?"group cursor-pointer":""}`,onClick:m,children:[n("span",{className:`text-xl pr-2.5 font-medium ${c?Xe[s]:""}`,children:e}),c?n(h,{name:d,width:"24",height:"24",asSVG:!0}):null]}),c?n(Je,{isExpanded:o,columns:l,blocks:a,version:s,context:i}):null]})})),Ye={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},et=a((({title:e,accordionItems:t,context:a,className:l="",version:i="primary"})=>r("section",{className:`p-[50px] font-sans ${l} ${Ye[i]}`,children:[e?n(s,{headingType:"h4",className:"mb-2.5",title:e}):null,t?.length?n("ul",{className:"list-none m-0 p-0",children:t.map(((e,t)=>n(Qe,{...e,version:i,context:a},`AccordionItem${t}`)))}):null]}))),tt=a((({className:e,title:t,benefits:a})=>r("section",{className:`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${e||""}`,children:[t?n(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}):null,a?.length?n("div",{className:"grid grid-cols-2 gap-8 mt-9",children:a.map(nt)}):null]}))),nt=(e,t)=>r("div",{className:"flex items-center gap-5 max-w-[500px]",children:[e.icon&&n(h,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),r("div",{children:[n("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),rt="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",at="border-main-stroke border-solid border",lt="border-main-divider border border-t-0 border-x-0",it="w-[200px] mr-6",st=a((({children:e})=>n("div",{className:"self-start flex flex-col",role:"row",children:n("div",{className:"flex",children:e})}))),ot={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},ct=a((({children:e,activeCardIndex:t,columnWidth:r,version:a="comparison"})=>n("div",{className:"flex flex-1 overflow-hidden",children:n("div",{className:ot[a],style:{transform:`translateX(-${t*r}px)`},children:e})}))),dt=a((({icon:e,image:t,title:a,link:l})=>r("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${at} ${rt}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&n(h,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n(C,{className:"mb-[18px]",image:t}),a&&n(s,{headingType:"h4",className:"text-center text-white",title:a}),l?.text&&n("div",{className:"mt-auto w-full",children:n(U,{href:l.href,target:l.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:n("div",{className:"font-medium text-xs py-[11px]",children:l.text})})})]}))),mt=a((({colHeaders:e,activeCardIndex:t,router:a,handlerDecorator:l})=>r(st,{children:[n("div",{className:it,role:"columnheader",scope:"col"}),n(ct,{activeCardIndex:t,columnWidth:336,children:e.map(((e,t)=>n(dt,{...e,link:e.link&&_({router:a,handlerDecorator:l},e.link)},String(t))))})]}))),ht=a((({cell:e,isFirstRow:t,isLastRow:r,isFillGradient:a})=>n("div",{className:`w-80 box-border flex flex-col ${at} ${r?"border-t-0 rounded-b-md":"border-y-0"} ${a?rt:""}`,role:"cell",children:n("div",{className:`mx-7 h-full ${lt} ${a&&t?"border-t":""} ${r?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>xt(e,t,a)))})}))),xt=({label:e,description:t},a,l)=>r("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&n("h5",{className:"text-xl font-medium m-0 "+(l?"text-white":""),children:e}),t&&n("div",{className:"text-sm opacity-80 "+(l?"text-white":"text-secondary-text"),children:t})]},String(a)),pt=a((({row:{header:e,data:t},activeCardIndex:a,isColoredFirstColumn:l,isFirstRow:i,isLastRow:s})=>r(st,{children:[e?.title?n("div",{className:`text-sm py-7 ${lt} w-[200px] mr-6 ${s?"border-b-0":"border-solid"}`,children:e.title}):null,t?.length?n(ct,{activeCardIndex:a,columnWidth:336,children:t.map(((e,t)=>n(ht,{cell:e,isFirstRow:i,isLastRow:s,isFillGradient:l&&0===t},String(t))))}):null]}))),ut=a((({isScrollAvailable:e,onNextClick:t,onPrevClick:a,showNextButton:l,showPrevButton:i})=>e?n("div",{children:r("div",{className:"absolute top-7 right-7 z-10",children:[n(Se,{onClick:t,disabled:!l,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n(Se,{className:"mt-4 rotate-180",onClick:a,disabled:!i,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"})]})}):null)),bt=a((({rowData:e,activeCardIndex:t,isColoredFirstColumn:a,...l})=>r("div",{className:"relative",children:[e.map(((e,r,{length:l})=>n(pt,{row:e,isFirstRow:0===r,isLastRow:r+1===l,activeCardIndex:t,isColoredFirstColumn:a},String(r)))),n(ut,{...l})]}))),gt=({columnsLength:e,colsLengthForScroll:t,activeCardIndex:n,setActiveCardIndex:r})=>{const a=e>t;return{onNextClick:()=>r(n+1),onPrevClick:()=>r(n-1),isScrollAvailable:a,showNextButton:a&&e-n>t,showPrevButton:Boolean(a&&n>0)}},ft=a((({context:e,columns:t,rowHeaders:a,isShowAllRow:l,visibleRowLength:i,isColoredFirstColumn:s})=>{const o=e.useRouter(),{handlerDecorator:c}=e,d=t?.map((({header:e})=>e||{})),m=t?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[{}]))}))).slice(0,l?a.length:i),[x,p]=e.useState(0),u=gt({columnsLength:m.length,colsLengthForScroll:2,activeCardIndex:x,setActiveCardIndex:p}),{isScrollAvailable:b}=u;return r("div",{children:[r("div",{role:"table",children:[d?.length?n(mt,{colHeaders:d,activeCardIndex:x,router:o,handlerDecorator:c}):null,h?.length?n(bt,{rowData:h,activeCardIndex:x,isColoredFirstColumn:s,...u}):null]}),b?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Nt=a((({className:e,context:t,title:a,rowHeaders:l,columns:i,visibleRowLength:o=0,isColoredFirstColumn:c=!1})=>{const[d,m]=t.useState(!o);return r("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[n(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:a}),n(ft,{context:t,columns:i,rowHeaders:l,isShowAllRow:d,isColoredFirstColumn:c,visibleRowLength:o}),o?vt({isShowAllRow:d,onClick:()=>m(!d)}):null]})})),vt=({isShowAllRow:e,onClick:t})=>n("div",{className:"pr-[50px]",children:r("div",{className:"flex w-full",children:[n("div",{className:it}),n("button",{onClick:t,className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:n("div",{className:"font-sans font-medium text-xs py-[11px]",children:e?"Скрыть":"Показать все параметры"})})]})}),yt=a((({tabs:e,currentTabIndex:t,onTabClick:r})=>n("div",{className:"flex items-end border-b border-main-stroke",role:"tablist",children:e?.map(wt(t,r))}))),wt=(e,t)=>(a,l)=>{const i=e===l;return r("div",{className:"flex h-full flex-1 cursor-pointer mr-2 last:mr-0 "+(i?"px-2 h-16 pt-4 pb-2 text-white bg-primary-main":"px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke"),role:"tab",onClick:()=>t(l),"aria-selected":String(i),children:[a?.icon?It(a,i):null,r("div",{children:[a?.title?n("h3",{className:"font-medium m-0 text-base",children:a?.title}):null,a?.description?n("span",{className:"font-light text-xs "+(i?"":"text-secondary-text"),children:a?.description}):null]})]},String(l))},It=(e,t)=>n("div",{className:"h-full mt-1",style:t?{filter:"invert(1)"}:null,children:n(h,{className:"w-5 h-5 mr-3",name:e?.icon||"CardIcon",asSVG:!t})});async function kt(e){const t=await fetch(e);return await t.json()}const Ct=[{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=a((({text:e,checked:t,onChange:a,className:l})=>n("div",{className:l,children:r("label",{className:"flex items-center cursor-pointer relative",children:[n("input",{className:`peer appearance-none w-5 h-5 border-solid border ${t?"border-black":"border-main-stroke"} rounded checked:bg-primary-main checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{a(e.target.checked)},checked:t}),n(Ce,{paths:Ct,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?n("span",{className:"font-sans ml-3 text-sm leading-5 cursor-pointer",children:e}):null]})}))),St=(e,t,n)=>Math.max(t,Math.min(e,n)),Tt=3e4,Dt=3e6,Rt=Math.round(41.5);const At=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),Mt=a((({className:e,title:t,items:a=[],min:l=1,max:i=100,step:s=1,value:o=l,onChange:c})=>{const d=e=>{if(!c)return;const t=Number(e.replace(/\D/g,""));c(t)},m={backgroundSize:`${(100*(o-l)/(i-l)).toFixed(2)}% 100%`};return r("div",{className:e,children:[r("label",{className:"block relative",children:[t?n("span",{className:"absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5",children:t}):null,n("input",{className:"m-0 font-sans text-sm w-full h-12 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:At(o),onChange:e=>d(e.target.value),onBlur:()=>{c&&(o<l&&c(l),o>i&&c(i))}}),n("div",{className:"absolute inset-x-0 top-[35px] px-4 leading-[18px]",children:n("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:l,max:i,step:s,value:o,onChange:e=>d(e.target.value),style:m})})]}),n("div",{className:"flex justify-between my-3",children:a.map(((e,t)=>r("span",{className:"text-xs leading-[14px] text-secondary-text pl-4",children:[" ",e," "]},String(t))))})]})}));function Pt(e){const{minMonths:t,maxMonths:r,monthsValue:a,defaultMonths:l,setMonthsValue:i}=e;return n(Mt,{className:"mt-[23px]",title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:t,max:r,step:1,value:a||l,onChange:i})}function Lt(e,t){return r("div",{className:"box-border h-fit p-9 bg-primary-main rounded-md text-white",children:[n("div",{className:"text-base mb-[18px]",children:"Наше предложение"}),n("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),r("div",{className:"text-lg mb-3",children:[At(Math.round(e))," ₽"]}),n("div",{className:"text-sm opacity-60",children:"Ставка"}),r("div",{className:"text-lg",children:[t," %"]})]})}function jt(e){const{calculatorParams:t,moneyValue:r,defaultSum:a,setMoneyValue:l}=e,i=t?.minSum||Tt,s=t?.maxSum||Dt;return n(Mt,{title:"Желаемая сумма кредита, ₽",items:[`От ${At(i)} рублей`,`До ${At(s)} рублей`],min:i,max:s,step:1e3,value:r||a,onChange:l})}const _t=a((({context:e,directoryName:t})=>{const[a,l]=e.useState(void 0),[i,s]=e.useState(void 0),[o,c]=e.useState(!0),[d,m]=e.useState(!0),h=function(e,t){const{data:n}=e(function(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}(t),kt);return n||{}}(e.useAsyncData,t).rows,x=(e=>{const{tableRows:t,isAnnuity:n=!1}=e;return t&&t.find((e=>e.isAnnuity===n))||{}})({tableRows:h,isAnnuity:o}),p=(e=>e.maxSum&&e.minSum?(e.maxSum-e.minSum)/2:1485e3)(x),u=(e=>e.maxMonths&&e.minMonths?Math.round((e.maxMonths-e.minMonths)/2):Rt)(x),b=x?.minMonths||1,g=x?.maxMonths||84,f=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),N=(e=>{const{calculatorParams:t,paymentType:n,rate:r,sum:a,months:l}=e;if(!t)return 0;const i=St(a,t.minSum||Tt,t.maxSum||Dt);if("annuity"===n){const e=Number(r)/1200;return i*(e+e/(Math.pow(1+e,l)-1))}return i/l+i*(Number(r)/12)})({calculatorParams:x,paymentType:"annuity",rate:f,sum:a||p,months:i||u}),v=((e,t)=>{const n=Math.ceil((t-e)/12),r=Math.floor(e/12)+1,a=new Array(Math.min(n-1,5)).fill(0).map(((e,t)=>r+t)),l=n+r-1;return a.concat(l)})(b,g);function y(e){s(St(12*e,b,g))}return n("section",{className:"mt-7",children:r("div",{className:"box-border p-[49px] pr-[56px] mx-auto w-max border-solid border-[3px] border-primary-main rounded-md",children:[r("div",{className:"flex justify-between",children:[r("div",{className:"mr-[42px]",children:[jt({calculatorParams:x,moneyValue:a,defaultSum:p,setMoneyValue:l}),Pt({minMonths:b,maxMonths:g,monthsValue:i,defaultMonths:u,setMonthsValue:s}),n("div",{className:"flex mb-7",children:v.map(((e,t)=>function(e,t,a){return n("button",{className:"bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none",onClick:()=>a(e),children:r("span",{className:"font-semibold text-sm",children:[e," ",1===e?"год":e>4?"лет":"года"]})},String(t))}(e,t,y)))}),n($t,{text:"Получаю пенсию на карту Россельхозбанка",checked:o,onChange:c}),n($t,{className:"mt-3 mb-7",text:"Комплексная страховая защита",checked:d,onChange:m})]}),Lt(N,f)]}),r("div",{className:"flex items-center",children:[n(U,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),n("div",{className:"w-80 text-2xs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})})),Bt=[{title:"Кредит",description:"Ставка от 6% до 7 лет",directoryName:"credit-calculator-data",icon:"CardIcon"},{title:"Кредит",description:"Ставка от 4% до 7 лет",directoryName:"credit-calculator-data1",icon:"ChartSquareIcon"},{title:"Кредит",description:"Ставка от 3% до 6 лет",directoryName:"credit-calculator-data2",icon:"DiscountShapeIcon"}],Wt=a((({className:e="",context:t,tabs:a=Bt})=>{const[l,i]=t.useState(0);return r("section",{className:`font-sans text-primary-text py-10 bg-white ${e}`,children:[n(s,{className:"w-full text-center mb-8",headingType:be(e),title:"Калькулятор"}),n(yt,{tabs:a,currentTabIndex:l,onTabClick:i}),n(_t,{context:t,directoryName:a[l]?.directoryName})]})}));async function Gt(){try{const e=await fetch(Vt);return await e.json()}catch(e){console.error(e)}}const Vt="/api/v1/exchangerates.json",Et=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Ot=e=>e?Et.format(e):"",Ft="text-left font-normal text-sm text-secondary-text",Ht={USD:"DollarIcon",EUR:"EuroIcon"},Ut=a((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:Ft,children:"Валюта"}),n("th",{className:`${Ft} pl-11`,children:"Купить"}),n("th",{className:`${Ft} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>Zt(e)))})]}))),Zt=e=>{const t=e?.currency?.currency;return r("tr",{children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(h,{name:Ht[t],width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:Ot(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11",children:Ot(e.saleExchangeRate)})]},t)},zt=a((({className:e="",address:t,distance:a})=>r("div",{className:`flex text-sm ${e}`,children:[n(h,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-1.5",children:[t?n("p",{className:"m-0",children:t}):null,a?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",a]}):null]})]}))),qt=a((({className:e="",id:t,name:r,type:a="text",placeholder:l})=>n("input",{className:e,id:t,name:r||t,type:a,placeholder:l}))),Jt=a((({className:e="",id:t,name:r,children:a})=>n("select",{className:e,id:t,name:r||t,children:a}))),Kt=a((({className:e="",value:t,children:r})=>n("option",{className:e,value:`${t}`,children:r}))),Xt=a((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[Qt("Хочу продать",e),Qt("Получу",e),n(U,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function Qt(e,t){return r("div",{className:"flex items-center",children:[n(qt,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?n(Jt,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>n(Kt,{value:e,children:e},String(t))))}):null]})}const Yt=["USD","EUR"],en=["RUB","USD","EUR"],tn=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],nn={address:"Москва, ул.Ленина д.28",distance:"6км"},rn=a((({className:e="",context:t,title:a="Курсы обмена валют"})=>{const l=function(e){const{data:t}=e(Vt,Gt);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==Yt.indexOf(e?.currency?.currency||"")))||tn;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:n(te,{context:t,title:n(s,{headingType:be(e),title:a,className:"whitespace-pre-wrap mb-3"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-20 pt-3",children:[l?n(Ut,{className:"mb-7",exchangeCurrencyItems:l}):null,n(zt,{...nn})]}),l?.length?n(Xt,{className:"grow",exchangeCurrencyItems:l,codes:en}):null]})})})})),an=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],ln={"bg-white":"text-primary-main",transparent:"text-white"},sn={"bg-white":"text-black",transparent:"text-white"},on=a((({className:e,href:t,children:a,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(Ce,{className:`${ln[i]} w-10`,viewBox:"0 0 40 45",paths:an.map((e=>({d:e})))}),!s&&n("span",{className:`${sn[i]} text-base font-medium ml-2.5`,children:a||"Россельхозбанк"})]}))),cn=a((({className:e,context:t})=>{const{term:a,setTerm:l}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[24px] h-[24px]",children:n(h,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:a,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input"}),n(U,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e.preventDefault(),console.log("click")},children:n("div",{className:"font-normal text-sm px-9 py-[9px]",children:"Найти"})})]})})),dn=a((({className:e,items:t,hasButton:a,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(mn):null,a?n(U,{version:"primary",className:"mt-0.5 mb-5",..._({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),mn=(e,t)=>{const{type:a,text:l,description:i}=e;return r("div",{className:"mb-3.5",children:[n("div",{children:hn(a,l)}),n("div",{className:"font-sans text-sm text-secondary-text",children:i})]},String(t))},hn=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${xn(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},xn=e=>e.replaceAll(/\D/g,""),pn=a((({links:e,className:t="",context:r})=>{const a=r.useRouter(),{handlerDecorator:l}=r;return n("div",{className:t,children:e?.length?n("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:e.map(((e,t)=>n(un,{index:t,..._({router:a,handlerDecorator:l},e)},String(t))))}):null})})),un=a((({className:e="",index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),bn=e=>t=>e?.href===t?.href,gn=(e,t)=>{return(r=e,a=t,(r||[]).map((e=>a?.find(bn(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(bn(e))))));var n,r,a};function fn(e){const{data:t}=e(vn(),Nn);return t||{}}async function Nn(){const e=await fetch(vn());return await e.json()}function vn(){return`/wcms-resources/${o.SITEMAP||"sitemap"}.json`}const yn=a((({className:e,items:t,context:r})=>{const a=fn(r.useAsyncData),l=gn(a.topItems,t),i={router:r.useRouter(),handlerDecorator:r.handlerDecorator};return n("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:l?.map(((e,t)=>wn(e,t,i)))})})),wn=(e,t,{router:a,handlerDecorator:l})=>{const{text:i,href:s,items:o,target:c}=e;return r("div",{className:"flex flex-col gap-[14px]",children:[n("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:c||"_self",children:i||`Раздел ${t}`}),o?.map(((e,t)=>n(In,{..._({router:a,handlerDecorator:l},e),index:t},String(t))))]},String(t))},In=a((({text:e,href:t,target:r,index:a})=>n("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:r||"_self",children:e||`Раздел ${a}`}))),kn=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Cn=a((({href:e})=>{const{icon:t,width:r,height:a,label:l}=kn.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:h&&n(h,{name:t,width:r,height:a,asSVG:!0,className:"block",color:"none"})}):null})),$n=a((({className:e,media:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:l}=r;return n("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>n(Cn,{..._({router:a,handlerDecorator:l},e)},String(t))))})})),Sn=a((({className:e,links:t,context:a})=>{const l=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"pt-5 pb-[5px]",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>n(Tn,{index:t,..._({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Tn=a((({className:e,index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),Dn=a((({className:e,documents:t,relatedEnterprises:a,contacts:l,socialMedia:i,topItems:s,context:o})=>r("footer",{className:`px-9 py-10 bg-white ${e||""}`,children:[r("div",{className:"flex items-stretch gap-[54px] pb-8 xl:gap-8",children:[n(on,{className:"w-[280px] xl:w-[220px]"}),n(cn,{context:o,className:"grow"})]}),r("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[n(dn,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:l,context:o,hasButton:!0}),n(yn,{className:"pt-[3px]",context:o,items:s})]}),n($n,{media:i,context:o}),n(pn,{links:a,context:o}),n(Sn,{links:t,context:o})]}))),Rn=(e,t,n=((e,t)=>t.startsWith(e)))=>n(R(e),(e=>(e||"").replace(P,""))(R(D(e)?t.href:t.pathname))),An=e=>t=>Rn(t.href,e),Mn=e=>(t=[])=>{const n=t?.filter(An(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null},Pn=e=>t=>t.items?.some(An(e))||Rn(t.href,e)||((e,t)=>A(e)===A(t.href))(t.href,e),Ln="absolute left-0 -bottom-3 w-full h-[2px]",jn=a((({className:e,text:t,href:a,target:l,active:i,onClick:s,children:o,bgColor:c="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:l,onClick:s,children:[n("span",{className:_n(c,i),children:t||o}),i?n("div",{className:Bn(c,i)}):null]}))),_n=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${n} font-sans font-normal text-base`},Bn=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Ln}`:Ln,Wn=a((({className:e="",text:t,href:r,target:a,active:l,flat:i,onClick:s,children:o,ariaLabel:c,bgColor:d="bg-white"})=>n("a",{className:`${Gn(d,l,i)} ${e}`,href:r,target:a,onClick:s,rel:"noopener noreferrer","aria-label":c,children:n("span",{className:Vn(d,l,i),children:t||o})}))),Gn=(e,t,n)=>{let r="border-transparent";return t&&(r="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${r} inline-block border border-solid bg-transparent text-center no-underline ${n?"":"px-4 py-2"}`},Vn=(e,t,n)=>{let r="text-white";return"bg-white"===e&&(r=t?"text-primary-main":(n?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"),`${r} font-sans font-normal text-sm`},En=a((({className:e="",children:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":r,children:t}))),On={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},Fn={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},Hn={"bg-white":"GridIcon",transparent:"GridIconWhite"},Un=a((({context:e,className:t,defaultLocation:a="",bgColor:l="bg-white"})=>{const[i,s]=e.useGeolocation(a);return r("div",{className:`flex items-center ${t||""}`,children:[n(Wn,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:l}),n(Wn,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:l}),n(En,{className:`mr-5 ${On[l]}`,ariaLabel:"Поиск по сайту",children:n(h,{name:"LoupeIcon",className:"h-full",asSVG:!0,color:"none"})}),n(En,{className:`mr-5 ${On[l]}`,ariaLabel:"Профиль",children:n(h,{name:"ProfileIcon",className:"h-full",asSVG:!0,color:"none"})}),n(En,{className:`${Fn[l]} min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:n(h,{name:Hn[l],className:"h-full",asSVG:!0,color:"none"})})]})})),Zn={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},zn=a((({className:e,defaultLocation:t,bgColor:a="bg-white",context:l,topItems:i})=>{const s=l.useRouter(),o=fn(l.useAsyncData),{handlerDecorator:c}=l,d=gn(o.topItems,i),m=d.find(Pn(s)),h=m?.items,x=Mn(s)(h),p=d.map(((e,t)=>n(Wn,{active:e===m,..._({router:s,handlerDecorator:c},e),ariaLabel:e.text,bgColor:a},String(t)))),u=h?.map((e=>n(jn,{className:"mr-8",active:e===x,..._({router:s,handlerDecorator:c},e),bgColor:a},e.href)));return n("header",{className:`pt-5 pb-8 px-20 ${a} ${e||""}`,children:r("div",{className:"container",children:[r("div",{className:"flex items-center",children:[n(on,{className:"mr-8",bgColor:a}),p,n(Un,{context:l,className:"ml-auto",defaultLocation:t,bgColor:a})]}),n("div",{className:`mt-5 h-[1px] ${Zn[a]}`}),n("nav",{className:"mt-5",children:u})]})})})),qn=a((({className:e="",context:t,title:a="Мобильное приложение",qr:l,buttons:i=[]})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${fe(e)} ${ge(e)} `,children:n(te,{context:t,title:a&&n(s,{headingType:be(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:i?.length?n(q,{context:t,buttons:i,className:"flex mt-9 gap-3"}):null,children:r("div",{className:"flex items-center",children:[l?.src&&l?.href&&n("a",{href:l.href,target:"_blank","aria-label":a,children:n("img",{src:l.src,alt:a,title:a,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),n("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})})}))),Jn=a((({className:e,text:t,onClick:r,href:a,target:l,isActive:i})=>n("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${e||""} ${i?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:r,href:a,target:l,children:t}))),Kn=a((({className:e,context:t,title:a,buttons:l})=>{const i=t.useRouter(),{handlerDecorator:s}=t,o=Mn(i)(l);return r("section",{className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,children:[n("h2",{className:"font-medium text-xl m-0",children:a}),l?.length?n("div",{className:"flex rounded-md overflow-hidden bg-white",children:l.filter((({text:e})=>e)).map(((e,t)=>n(Jn,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===o,..._({router:i,handlerDecorator:s},e)},String(t))))}):null]})})),Xn=a((({className:e,context:t,title:a,description:l="Блок в разработке..."})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${fe(e)} ${ge(e)} `,children:r(te,{context:t,title:a?n(s,{headingType:be(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?n(J,{className:"mt-4 max-w-[600px]",description:l}):null,n("figure",{className:"m-0 min-w-[600px]",children:Qn()})]})}))),Qn=(e=3)=>er(100,e).map((e=>Math.floor(e))).map(Yn),Yn=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),er=(e,t)=>[e].concat(t>0?er(e/1.618,t-1):[]),tr=a((({className:e,context:t,duration:a=0,slides:l=[]})=>{const i=l.map((e=>e.nav)),s=l.map((e=>e.productBlock)),[o,c]=t.useState(0);return r("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[n("div",{className:"flex duration-1000",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,r)=>function(e,t,r){return n("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:n("div",{className:"p-10 flex grow",children:n(le,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:r,...e})})},String(t))}(e,r,t)))}),n("div",{className:"flex",children:i.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:l,duration:i}){const s=t===a,o=s?"animate-slide":"",c=s?"text-primary-text":"text-secondary-text";return r("button",{type:"button",onClick:l,"aria-label":e?.title,className:"font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0",children:[r("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[n("div",{className:`text-sm font-medium pb-[3px] group-hover:text-primary-text ${c}`,children:e?.title}),n("div",{className:"text-xs text-secondary-text",children:e.desc})]}),n("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${o}`,style:{animationDuration:`${i}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:o,onClick:()=>c(t),duration:a})))})]})}));const nr=a((({className:e="",context:t,slides:a=[]})=>{const l=a.map((e=>e.nav)),i=a.map((e=>e.productBlock)),[s,o]=t.useState(0);return r("section",{className:`box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${e}`,children:[n("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${s}00%)`},role:"list",children:i.map(((e,a)=>function(e,t,a){return n("section",{className:"box-border relative flex grow-0 shrink-0 basis-full px-9",role:"listitem",children:r("div",{className:"flex grow",children:[e.backgroundText?n("div",{className:"absolute text-[454px] font-bold text-white tracking-[-10px] leading-[299px] opacity-[.1] right-12 top-20 z-0",children:e.backgroundText}):null,n(le,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem] z-[1]",context:a,textBlockClassName:"mb-[154px]",version:"secondary",...e}),n(h,{className:"absolute right-[460px] top-[200px] z-0 mb-4",name:"ArrowsRewindRight",width:"230",height:"187"})]})},String(t))}(e,a,t)))}),n("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-9 box-border",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:l}){const i=t===a,s=i?"bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0":"bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300",o=i?"text-primary-text":"text-white",c=i?"text-secondary-text":"text-white";return n("button",{type:"button",onClick:l,"aria-label":e?.title,className:`box-border font-sans group relative overflow-hidden border-white/50 border-[1px] cursor-pointer text-left mb-6a mx-1 grow basis-0 backdrop-blur-sm\n ${s}\n `,children:r("div",{className:"border-0 px-6",children:[n("div",{className:`text-sm font-medium pb-[3px] ${o}`,children:e?.title}),n("div",{className:`text-xs text-secondary-text ${c}`,children:e.description})]})},String(t))}({slide:e,i:t,activeSlideIndex:s,onClick:()=>o(t)})))})]})}));const rr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ar=a((({className:e="",context:t,title:a="Акции и спецпредложения",date:l,description:i,buttons:o=[],version:c="primary"})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${rr[c]} ${fe(e)} ${ge(e)} `,children:n(te,{context:t,title:a?n(s,{headingType:be(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:o?.length?n(q,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,children:r("div",{className:"mt-1.5",children:[l?n("div",{className:"text-sm mb-2",children:lr(l)}):null,n("div",{className:"text-base",children:i})]})})})));function lr(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ir=a((({blocks:e,columns:t=1,context:r})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden",children:n("div",{className:"box-border w-full p-9 "+(t>1?"flex flex-wrap":""),children:ze({context:r,className:"box-border p-5",columns:t,blocks:e})})}))),sr=a((({label:e,isExpanded:t,blocks:a,columns:l,context:i})=>{const{hasContent:s,icon:o,handleToggle:c,isActive:d}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,a]=e.useState(n),l=t?.length;return{isActive:r,hasContent:l,icon:r?"ArrowUpIcon":"ArrowDownIcon",handleToggle:e=>{if(!l)return;a(!r);const t=(({currentTarget:e})=>e.previousSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:i,blocks:a,initialState:t});return r("div",{className:"border-0 border-b border-solid border-main-divider",children:[s?n(ir,{isExpanded:d,columns:l,blocks:a,context:i}):null,r("button",{className:"border-none bg-primary-main px-0 py-[25px] w-full font-sans text-white text-base flex justify-center cursor-pointer",onClick:c,children:[n("span",{className:"pr-3",children:d?"Скрыть":e}),s?n(h,{name:o,width:"20",height:"20",asSVG:!0}):null]})]})})),or=a((({blockItems:e,context:t,className:r})=>n("section",{className:`font-sans bg-white text-primary-text ${r||""}`,children:e?.length?n("div",{className:"list-none m-0 p-0",children:e.map(((e,r)=>n(sr,{...e,context:t},`BlockItem${r}`)))}):null}))),cr=a((({context:e,className:t="",title:a,description:l,items:i,image:o,version:c})=>n("section",{className:`border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${t}`,role:"listitem",children:r(te,{context:e,title:a&&n(s,{headingType:"h4",title:a,className:"mb-4"}),image:o?.src&&n(C,{className:"mt-auto ml-7",image:o}),children:[l?n(J,{description:l}):null,i?.length?n(ee,{items:i,version:c}):null]})}))),dr="absolute top-0 bottom-0 w-[84px]",mr=a((({context:e,recommendations:t=[],className:a="",title:l,version:i})=>{const[o,c]=e.useState(0),d="secondary"===i?"border-main-divider":"border-main-stroke";return r("section",{className:`relative font-sans p-[50px] overflow-hidden ${"secondary"===i?"bg-primary-main text-white":"bg-white text-primary-text"} ${a}`,children:[l?n(s,{headingType:"h3",className:"mb-8",title:l}):null,n("div",{className:"flex duration-1000 gap-4",style:{transform:`translateX(-${525*o}px)`},role:"list",children:t?.length?t.map(hr({context:e,version:i,className:d})):null}),xr({cardsCount:t.length,activeCardIndex:o,setActiveCardIndex:c}),n("div",{className:`${dr} left-0 ${"secondary"===i?"bg-opacity-from-main":"bg-opacity-from-white"}`}),n("div",{className:`${dr} right-0 ${"secondary"===i?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),hr=({context:e,version:t,className:r})=>(a,l)=>n(cr,{context:e,...a,version:t,className:r},String(l)),xr=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:a})=>{const l=e>2,i=l&&e-t>2;return r("div",{children:[l&&t>0&&n(Se,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-6",onClick:()=>a(t-1),ariaLabel:"Пролистать влево"}),i&&n(Se,{className:"absolute top-1/2 right-8 z-10 mt-6",onClick:()=>a(t+1),ariaLabel:"Пролистать вправо"})]})},pr=a((({className:e,title:t,showLines:a=!0,steps:l})=>r("section",{className:`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${e||""}`,children:[n(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}),l?.length?r("div",{className:"box-border py-0.5 mb-0.5 "+(t?"mt-9":""),children:[n("div",{className:"flex items-center px-[88px]",children:W(n("div",{className:"h-0.5 w-full bg-secondary-light "+(a?"":"opacity-0")}))(l.map(((e,t)=>ur(e,t))))}),n("div",{className:"flex justify-between gap-x-[101px]",children:l.map(br)})]}):null]}))),ur=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative",children:n("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&n(h,{name:e.icon,width:"48",height:"48"})||n("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),br=(e,t)=>r("div",{className:"flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden",children:[e.label&&n("div",{className:"font-medium text-xl m-0 mt-4",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text "+(e.label?"mt-2":"mt-4"),children:e.description})]},String(t)),gr=a((({cell:e,isLastRow:t})=>n("div",{className:"first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(t?"border-t-0 rounded-b-md":""),role:"cell",children:n("div",{children:e.map(fr)})}))),fr=({label:e,description:t,list:a,image:l,buttons:i},s)=>r("div",{className:"first:pt-5 last:pb-5",children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-4"}),e?n("div",{className:"text-xl font-medium m-0",children:e}):null,t?n("div",{className:"text-sm text-secondary-text",children:t}):null,a?.items?.length?n("div",{className:"flex flex-col justify-between items-start",children:n("div",{role:"list",children:a.items.map(((e,t)=>n(Le,{className:"text-sm",text:e,version:"gray",isDotted:a.isDotted??!0},String(t))))})}):null,l&&n(C,{image:l}),i?.length?i.map((({icon:e,...t},r)=>n(U,{className:(r>0?"ml-3":"")+" w-12 h-12",appendLeft:e&&n(h,{name:e,width:"24px",height:"24px",asSVG:!0}),...t},String(r)))):null]},String(s)),Nr=a((({row:{header:e,data:t},activeCardIndex:a,isLastRow:l})=>r(st,{children:[n("div",{className:"text-sm py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(l?"":"border-solid"),children:r("div",{className:"flex items-center text-primary-text",children:[e?.icon&&n(h,{className:"mr-[14px] max-w-6 max-h-6",name:e.icon,width:"24px",height:"24px",asSVG:!0}),e?.title]})}),t?.length?n(ct,{activeCardIndex:a,columnWidth:360,version:"tariff",children:t.map(((e,t)=>n(gr,{cell:e,isLastRow:l},String(t))))}):null]}))),vr=a((({className:e,context:t,title:a,description:l,rowHeaders:i,columns:o})=>{const[c,d]=t.useState(0),m=yr(o),h=wr(i,m),x=gt({columnsLength:m.length,colsLengthForScroll:2,activeCardIndex:c,setActiveCardIndex:d}),{isScrollAvailable:p}=x;return r("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[a?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2.5":"mb-9"),title:a}):null,l?n("div",{className:"mb-9 text-center text-m-base",children:l}):null,h?.length?r("div",{role:"table",children:[r("div",{className:"relative",children:[h.map(((e,t,{length:r})=>n(Nr,{row:e,isLastRow:t+1===r,activeCardIndex:c},String(t)))),n(ut,{...x})]}),p?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]}):null]})})),yr=e=>e?.map((({data:e})=>e))||[],wr=(e,t)=>e?.map(((e,n)=>({header:e,data:t.map((e=>e?.[n]||[{}]))}))),Ir={Accordion:et,BenefitsBlock:tt,ComparisonTable:Nt,CreditCalculator:Wt,ExchangeRateTile:rn,Footer:Dn,Gallery:Oe,Header:zn,Headline:u,LinkDocs:k,MiniGallery:Fe,MobileAppTile:qn,PictureText:S,ProductBlock:de,ProductGallery:tr,ProductGalleryGreen:nr,ProductTile:Ie,PromoTile:ar,OtherProducts:or,Recommendation:mr,StepsBlock:pr,TariffsTable:vr,TextBlock:he,Tile:ve,Navigation:Kn,Placeholder:Xn},kr=a((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:Cr()}))),Cr=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("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"}),n("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"})]})},$r=a((({className:e,context:t})=>{const a=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(kr,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(kr,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),Sr=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Tr=a((({className:e,context:t,blocksRegistry:a,data:{style:l,blocks:i,slots:s={},likeControl:o,colorPalette:c="pc"},blockDecorator:d=Sr})=>{const{header:m}=s;return r("section",{className:`relative ${Rr(l)} ${e||""}`,"data-theme":c,children:[m?.blocks?.length?n("div",{className:`${Rr(m?.style)}`,children:m.blocks.map(((e,n)=>Dr({block:e,blockDecorator:d,blocksRegistry:a,context:t},n)))}):null,i?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,n)=>Dr({block:e,blockDecorator:d,blocksRegistry:a,context:t},n)))}):null,o&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n($r,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function Dr({block:e,blockDecorator:t,blocksRegistry:r,context:a},l){const{type:i}=e;i&&i in r||console.warn(`No block with "${i}" is registered`);const s=r[i||"Placeholder"]||Xn;return t({blockClassName:Rr(e.style),block:e,render:e=>{const{version:t,content:r}=e.block;return n(s,{className:e.blockClassName,version:t,context:a,...r},`${i}-${l}`)}},`block-${l}`)}function Rr(e){return e?e.join(" "):""}const Ar=a((({HeadComponent:e,data:t,children:a})=>{const{title:l,main:i,og:s,twitter:o,jsonLd:c}=t,{description:d,keywords:m,canonical:h,robots:x}=i||{};return r(e,{children:[n("title",{children:l}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),d&&n("meta",{name:"description",content:d}),m&&n("meta",{name:"keywords",content:m.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),Mr(s),Pr(o),h&&n("link",{rel:"canonical",href:h}),c&&n("script",{type:"application/ld+json",children:c}),a]})}));function Mr(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function Pr(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function Lr(e){const{mobile:t,...n}=e;return n}function jr(e){return e?.filter((e=>{return t=e?.type,(t||"")in Ir;var t})).map(Lr)}e.Blocks=Ir,e.ContentPage=Tr,e.ContentPageHead=Ar,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))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=zn,e.Icon=h,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:r})}),{likes:l}=await n.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:l}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:l}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=W,e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:jr(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:jr(n[t].blocks)}})),{})}},e.projectSettings=o,e.setup=t,e.url=M,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -0,0 +1 @@
1
+ <svg id="icon" width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m13.842 10.709-2.184 2.183a1.655 1.655 0 0 1-2.333 0L3.9 7.46M17.1 7.459l-.867.867" stroke="#fff" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="icon" width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m13.342 9.292-2.184-2.184a1.655 1.655 0 0 0-2.333 0L3.4 12.542M16.6 12.542l-.867-.867" stroke="#fff" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -4,7 +4,11 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  const Heading_1 = require("../../ui-kit/Heading/Heading");
6
6
  const AccordionItem_1 = require("./AccordionItem");
7
- exports.Accordion = (0, uni_jsx_1.JSX)(({ title, accordionItems, context, className }) => {
8
- return ((0, jsx_runtime_1.jsxs)("section", { className: `p-[50px] font-sans bg-white text-primary-text ${className || ''}`, children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h4", className: "mb-2.5", title: title }) : null, accordionItems?.length ? ((0, jsx_runtime_1.jsx)("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => ((0, jsx_runtime_1.jsx)(AccordionItem_1.AccordionItem, { ...item, context: context }, `AccordionItem${i}`))) })) : null] }));
7
+ const accordionStyleMap = {
8
+ primary: 'bg-white text-primary-text',
9
+ secondary: 'bg-primary-main text-white',
10
+ };
11
+ exports.Accordion = (0, uni_jsx_1.JSX)(({ title, accordionItems, context, className = '', version = 'primary' }) => {
12
+ return ((0, jsx_runtime_1.jsxs)("section", { className: `p-[50px] font-sans ${className} ${accordionStyleMap[version]}`, children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h4", className: "mb-2.5", title: title }) : null, accordionItems?.length ? ((0, jsx_runtime_1.jsx)("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => ((0, jsx_runtime_1.jsx)(AccordionItem_1.AccordionItem, { ...item, version: version, context: context }, `AccordionItem${i}`))) })) : null] }));
9
13
  });
10
14
  //# sourceMappingURL=Accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,0DAAuD;AAEvD,mDAAgD;AAInC,QAAA,SAAS,GAAG,IAAA,aAAG,EAAiB,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;IAC7F,OAAO,CACL,qCAAS,SAAS,EAAE,iDAAiD,SAAS,IAAI,EAAE,EAAE,aACnF,KAAK,CAAC,CAAC,CAAC,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC5E,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,CACxB,+BAAI,SAAS,EAAC,mBAAmB,YAC9B,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/B,uBAAC,6BAAa,OAA+B,IAAI,EAAE,OAAO,EAAE,OAAO,IAA/C,gBAAgB,CAAC,EAAE,CAAgC,CACxE,CAAC,GACC,CACN,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,0DAAuD;AAEvD,mDAAgD;AAIhD,MAAM,iBAAiB,GAAiC;IACtD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,aAAG,EAC1B,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE;IAC1E,OAAO,CACL,qCAAS,SAAS,EAAE,sBAAsB,SAAS,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,aAChF,KAAK,CAAC,CAAC,CAAC,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC5E,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,CACxB,+BAAI,SAAS,EAAC,mBAAmB,YAC9B,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/B,uBAAC,6BAAa,OAER,IAAI,EACR,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,IAHX,gBAAgB,CAAC,EAAE,CAIxB,CACH,CAAC,GACC,CACN,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,73 +1,5 @@
1
- import type { GalleryContent } from '../Gallery/GalleryContent';
2
- import type { HeadlineContent } from '../Headline/HeadlineContent';
3
- import type { LinkDocsContent } from '../LinkDocs/LinkDocsContent';
4
- import type { MiniGalleryContent } from '../MiniGallery/MiniGalleryContent';
5
- import type { PictureTextContent } from '../PictureText/PictureTextContent';
6
- import type { ProductBlockContent } from '../ProductBlock/ProductBlockContent';
7
- import type { ProductTileContent } from '../ProductTile/ProductTileContent';
8
- import type { TextBlockContent } from '../TextBlock/TextBlockContent';
9
- import type { TileContent } from '../Tile/TileContent';
10
- import type { LinkListContent } from '../LinkList/LinkListContent';
11
- /**
12
- * @title Тип блока
13
- */
14
- export declare type AccordionBlockType = 'Headline' | 'LinkDocs' | 'TextBlock' | 'PictureText' | 'Tile' | 'ProductTile' | 'ProductBlock' | 'Gallery' | 'MiniGallery' | 'LinkList';
15
- interface AccordionBlockDef {
16
- accordionBlockType: AccordionBlockType;
17
- }
18
- /**
19
- * @title Заголовок
20
- */
21
- export declare type HeadlineAccordionBlockDef = HeadlineContent & AccordionBlockDef;
22
- /**
23
- * @title Список документов
24
- */
25
- export declare type LinkDocsAccordionBlockDef = LinkDocsContent & AccordionBlockDef;
26
- /**
27
- * @title Текстовый блок
28
- */
29
- export declare type TextBlockAccordionBlockDef = TextBlockContent & AccordionBlockDef;
30
- /**
31
- * @title Картинка с текстом
32
- */
33
- export declare type PictureTextAccordionBlockDef = PictureTextContent & AccordionBlockDef;
34
- /**
35
- * @title Продуктовый блок
36
- */
37
- export declare type ProductBlockAccordionBlockDef = ProductBlockContent & AccordionBlockDef;
38
- /**
39
- * @title Плитка
40
- */
41
- export declare type TileAccordionBlockDef = TileContent & AccordionBlockDef;
42
- /**
43
- * @title Продуктовая плитка
44
- */
45
- export declare type ProductTileAccordionBlockDef = ProductTileContent & AccordionBlockDef;
46
- /**
47
- * @title Галлерея
48
- */
49
- export declare type GalleryAccordionBlockDef = GalleryContent & AccordionBlockDef;
50
- /**
51
- * @title Мини-галлерея
52
- */
53
- export declare type MiniGalleryAccordionBlockDef = MiniGalleryContent & AccordionBlockDef;
54
- /**
55
- * @title Список ссылок
56
- */
57
- export declare type LinkListAccordionBlockDef = LinkListContent & AccordionBlockDef;
58
- /**
59
- * @title Выберите блок
60
- */
61
- export declare type EmptyOption = null;
62
- /**
63
- * @title Содержимое аккордеона
64
- */
65
- export declare type AccordionBlockProps = EmptyOption | HeadlineAccordionBlockDef | LinkDocsAccordionBlockDef | TextBlockAccordionBlockDef | PictureTextAccordionBlockDef | ProductBlockAccordionBlockDef | TileAccordionBlockDef | ProductTileAccordionBlockDef | GalleryAccordionBlockDef | MiniGalleryAccordionBlockDef | LinkListAccordionBlockDef;
66
- /**
67
- * @title Количество колонок
68
- * @enumNames ["1 колонка", "2 колонки"]
69
- */
70
- export declare type ColumnsCount = 1 | 2;
1
+ import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
2
+ import type { BlockVersion } from '../../model/BlockVersion';
71
3
  /**
72
4
  * @title Элемент списка
73
5
  */
@@ -77,13 +9,18 @@ export interface AccordionItemCommonProps {
77
9
  * @default Список
78
10
  */
79
11
  label?: string;
12
+ /**
13
+ * @title Отображать в раскрытом виде
14
+ */
15
+ isExpanded?: boolean;
80
16
  /** @title Блоки */
81
- blocks?: AccordionBlockProps[];
17
+ blocks?: BlockDef[];
82
18
  /**
83
19
  * @title Отображать/скрывать обводку элемента
84
20
  * @default false
85
21
  */
86
22
  bordered?: boolean;
23
+ version?: BlockVersion;
87
24
  columns?: ColumnsCount;
88
25
  }
89
26
  /**
@@ -92,9 +29,10 @@ export interface AccordionItemCommonProps {
92
29
  export interface AccordionContent {
93
30
  /** @title Заголовок */
94
31
  title?: string;
32
+ version?: BlockVersion;
95
33
  /** @title Список */
96
34
  accordionItems?: AccordionItemCommonProps[];
97
- /** @title Подзаголовок */
35
+ /** @title Описание */
98
36
  description?: string;
99
37
  /**
100
38
  * @title Отображать/скрывать обводку у элемента списка
@@ -102,4 +40,3 @@ export interface AccordionContent {
102
40
  */
103
41
  bordered?: boolean;
104
42
  }
105
- export {};
@@ -4,13 +4,22 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  const Icon_1 = require("../../ui-kit/Icon/Icon");
6
6
  const AccordionItemInner_1 = require("./AccordionItemInner");
7
- const isActiveHandler_1 = require("./utils/isActiveHandler");
8
- exports.AccordionItem = (0, uni_jsx_1.JSX)(({ label, blocks, columns, context }) => {
9
- const { hasContent, icon, handleToggle } = (0, isActiveHandler_1.isActiveHandler)({
7
+ const useActiveHandler_1 = require("./useActiveHandler");
8
+ const buttonStyleMap = {
9
+ primary: 'text-primary-text',
10
+ secondary: 'text-white',
11
+ };
12
+ const buttonHoverStyleMap = {
13
+ primary: 'group-hover:text-primary-main',
14
+ secondary: 'group-hover:text-white',
15
+ };
16
+ exports.AccordionItem = (0, uni_jsx_1.JSX)(({ label, isExpanded, blocks, columns, context, version = 'primary' }) => {
17
+ const { isActive, hasContent, icon, handleToggle } = (0, useActiveHandler_1.useActiveHandler)({
10
18
  context,
11
19
  blocks,
20
+ initialState: isExpanded,
12
21
  });
13
- return ((0, jsx_runtime_1.jsxs)("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [(0, jsx_runtime_1.jsxs)("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text
14
- ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [(0, jsx_runtime_1.jsx)("span", { className: `text-xl pr-2.5 font-medium ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: label }), hasContent ? (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, width: "24", height: "24", asSVG: true }) : null] }), hasContent ? ((0, jsx_runtime_1.jsx)(AccordionItemInner_1.AccordionItemInner, { columns: columns, blocks: blocks, context: context })) : null] }));
22
+ return ((0, jsx_runtime_1.jsxs)("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [(0, jsx_runtime_1.jsxs)("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans ${buttonStyleMap[version]}
23
+ ${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [(0, jsx_runtime_1.jsx)("span", { className: `text-xl pr-2.5 font-medium ${hasContent ? buttonHoverStyleMap[version] : ''}`, children: label }), hasContent ? (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, width: "24", height: "24", asSVG: true }) : null] }), hasContent ? ((0, jsx_runtime_1.jsx)(AccordionItemInner_1.AccordionItemInner, { isExpanded: isActive, columns: columns, blocks: blocks, version: version, context: context })) : null] }));
15
24
  });
16
25
  //# sourceMappingURL=AccordionItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItem.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iDAA8C;AAE9C,6DAA0D;AAC1D,6DAA0D;AAI7C,QAAA,aAAa,GAAG,IAAA,aAAG,EAAqB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IAC3F,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,IAAA,iCAAe,EAAC;QACzD,OAAO;QACP,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,CACL,gCAAI,SAAS,EAAC,oEAAoE,aAChF,oCACE,SAAS,EAAE;UACT,UAAU,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,EAAE,EAC5C,OAAO,EAAE,YAAY,aAErB,iCACE,SAAS,EAAE,8BACT,UAAU,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EACjD,EAAE,YAED,KAAK,GACD,EACN,UAAU,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,IAC/D,EACR,UAAU,CAAC,CAAC,CAAC,CACZ,uBAAC,uCAAkB,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,IACL,CACN,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"AccordionItem.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,iDAA8C;AAE9C,6DAA0D;AAC1D,yDAAsD;AAItD,MAAM,cAAc,GAAiC;IACnD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,+BAA+B;IACxC,SAAS,EAAE,wBAAwB;CACpC,CAAC;AAEW,QAAA,aAAa,GAAG,IAAA,aAAG,EAC9B,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE;IACvE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,IAAA,mCAAgB,EAAC;QACpE,OAAO;QACP,MAAM;QACN,YAAY,EAAE,UAAU;KACzB,CAAC,CAAC;IAEH,OAAO,CACL,gCAAI,SAAS,EAAC,oEAAoE,aAChF,oCACE,SAAS,EAAE,wFACT,cAAc,CAAC,OAAO,CACxB;UACA,UAAU,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,EAAE,EAC1C,OAAO,EAAE,YAAY,aAErB,iCACE,SAAS,EAAE,8BACT,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC9C,EAAE,YAED,KAAK,GACD,EACN,UAAU,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CAAC,CAAC,CAAC,IAAI,IAC/D,EACR,UAAU,CAAC,CAAC,CAAC,CACZ,uBAAC,uCAAkB,IACjB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,IACL,CACN,CAAC;AACJ,CAAC,CACF,CAAC"}