@redneckz/wildless-cms-uni-blocks 0.6.41 → 0.6.42

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 (233) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +130 -32
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  5. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  6. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  7. package/bundle/hooks/useCachedAsyncData.d.ts +2 -0
  8. package/bundle/hooks/useLocation.d.ts +6 -0
  9. package/bundle/hooks/useRegions.d.ts +6 -0
  10. package/bundle/services/sitemap/SitemapProps.d.ts +8 -0
  11. package/bundle/ui-kit/Location/Location.d.ts +19 -0
  12. package/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
  13. package/bundle/utils/groupBy.d.ts +1 -0
  14. package/dist/components/Blocks.js +4 -2
  15. package/dist/components/Blocks.js.map +1 -1
  16. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  17. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
  18. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  19. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  20. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  21. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  22. package/dist/components/Header/Header.js +2 -2
  23. package/dist/components/Header/Header.js.map +1 -1
  24. package/dist/components/Header/HeaderBurger.js +4 -3
  25. package/dist/components/Header/HeaderBurger.js.map +1 -1
  26. package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  27. package/dist/components/Header/HeaderSecondaryMenu.js +13 -4
  28. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  29. package/dist/components/Recommendation/RecommendationCard.js +1 -1
  30. package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  31. package/dist/hooks/useCachedAsyncData.d.ts +2 -0
  32. package/dist/hooks/useCachedAsyncData.js +25 -0
  33. package/dist/hooks/useCachedAsyncData.js.map +1 -0
  34. package/dist/hooks/useLocation.d.ts +6 -0
  35. package/dist/hooks/useLocation.js +26 -0
  36. package/dist/hooks/useLocation.js.map +1 -0
  37. package/dist/hooks/useRegions.d.ts +6 -0
  38. package/dist/hooks/useRegions.js +11 -0
  39. package/dist/hooks/useRegions.js.map +1 -0
  40. package/dist/services/sitemap/SitemapProps.d.ts +8 -0
  41. package/dist/ui-kit/Location/Location.d.ts +19 -0
  42. package/dist/ui-kit/Location/Location.js +44 -0
  43. package/dist/ui-kit/Location/Location.js.map +1 -0
  44. package/dist/ui-kit/Location/SearchBar.d.ts +6 -0
  45. package/dist/ui-kit/Location/SearchBar.js +9 -0
  46. package/dist/ui-kit/Location/SearchBar.js.map +1 -0
  47. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  48. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  49. package/dist/utils/groupBy.d.ts +1 -0
  50. package/dist/utils/groupBy.js +13 -0
  51. package/dist/utils/groupBy.js.map +1 -0
  52. package/lib/common.css +1 -1
  53. package/lib/components/Blocks.js +4 -2
  54. package/lib/components/Blocks.js.map +1 -1
  55. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  56. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  57. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +9 -0
  58. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
  59. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  60. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  61. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  62. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  63. package/lib/components/Header/Header.js +2 -2
  64. package/lib/components/Header/Header.js.map +1 -1
  65. package/lib/components/Header/HeaderBurger.js +4 -3
  66. package/lib/components/Header/HeaderBurger.js.map +1 -1
  67. package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  68. package/lib/components/Header/HeaderSecondaryMenu.js +13 -4
  69. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  70. package/lib/components/Recommendation/Recommendation.fixture.d.ts +1 -1
  71. package/lib/components/Recommendation/RecommendationCard.js +1 -1
  72. package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  73. package/lib/hooks/useCachedAsyncData.d.ts +2 -0
  74. package/lib/hooks/useCachedAsyncData.js +22 -0
  75. package/lib/hooks/useCachedAsyncData.js.map +1 -0
  76. package/lib/hooks/useLocation.d.ts +6 -0
  77. package/lib/hooks/useLocation.js +23 -0
  78. package/lib/hooks/useLocation.js.map +1 -0
  79. package/lib/hooks/useRegions.d.ts +6 -0
  80. package/lib/hooks/useRegions.js +8 -0
  81. package/lib/hooks/useRegions.js.map +1 -0
  82. package/lib/services/sitemap/SitemapProps.d.ts +8 -0
  83. package/lib/ui-kit/Location/Location.d.ts +19 -0
  84. package/lib/ui-kit/Location/Location.fixture.d.ts +6 -0
  85. package/lib/ui-kit/Location/Location.js +42 -0
  86. package/lib/ui-kit/Location/Location.js.map +1 -0
  87. package/lib/ui-kit/Location/SearchBar.d.ts +6 -0
  88. package/lib/ui-kit/Location/SearchBar.js +7 -0
  89. package/lib/ui-kit/Location/SearchBar.js.map +1 -0
  90. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  91. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  92. package/lib/utils/groupBy.d.ts +1 -0
  93. package/lib/utils/groupBy.js +10 -0
  94. package/lib/utils/groupBy.js.map +1 -0
  95. package/mobile/bundle/bundle.umd.js +48 -20
  96. package/mobile/bundle/bundle.umd.min.js +1 -1
  97. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  98. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  99. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  100. package/mobile/bundle/hooks/useCachedAsyncData.d.ts +2 -0
  101. package/mobile/bundle/hooks/useLocation.d.ts +6 -0
  102. package/mobile/bundle/hooks/useRegions.d.ts +6 -0
  103. package/mobile/bundle/services/sitemap/SitemapProps.d.ts +8 -0
  104. package/mobile/bundle/ui-kit/Location/Location.d.ts +19 -0
  105. package/mobile/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
  106. package/mobile/bundle/utils/groupBy.d.ts +1 -0
  107. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  108. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
  109. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  110. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  111. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  112. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  113. package/mobile/dist/components/Header/HeaderBurger.js +4 -3
  114. package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
  115. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  116. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +13 -4
  117. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  118. package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
  119. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  120. package/mobile/dist/hooks/useCachedAsyncData.d.ts +2 -0
  121. package/mobile/dist/hooks/useCachedAsyncData.js +25 -0
  122. package/mobile/dist/hooks/useCachedAsyncData.js.map +1 -0
  123. package/mobile/dist/hooks/useLocation.d.ts +6 -0
  124. package/mobile/dist/hooks/useLocation.js +26 -0
  125. package/mobile/dist/hooks/useLocation.js.map +1 -0
  126. package/mobile/dist/hooks/useRegions.d.ts +6 -0
  127. package/mobile/dist/hooks/useRegions.js +11 -0
  128. package/mobile/dist/hooks/useRegions.js.map +1 -0
  129. package/mobile/dist/services/sitemap/SitemapProps.d.ts +8 -0
  130. package/mobile/dist/ui-kit/Location/Location.d.ts +19 -0
  131. package/mobile/dist/ui-kit/Location/Location.js +44 -0
  132. package/mobile/dist/ui-kit/Location/Location.js.map +1 -0
  133. package/mobile/dist/ui-kit/Location/SearchBar.d.ts +6 -0
  134. package/mobile/dist/ui-kit/Location/SearchBar.js +9 -0
  135. package/mobile/dist/ui-kit/Location/SearchBar.js.map +1 -0
  136. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  137. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  138. package/mobile/dist/utils/groupBy.d.ts +1 -0
  139. package/mobile/dist/utils/groupBy.js +13 -0
  140. package/mobile/dist/utils/groupBy.js.map +1 -0
  141. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  142. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
  143. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  144. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  145. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  146. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  147. package/mobile/lib/components/Header/HeaderBurger.js +4 -3
  148. package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
  149. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  150. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +13 -4
  151. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  152. package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
  153. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  154. package/mobile/lib/hooks/useCachedAsyncData.d.ts +2 -0
  155. package/mobile/lib/hooks/useCachedAsyncData.js +22 -0
  156. package/mobile/lib/hooks/useCachedAsyncData.js.map +1 -0
  157. package/mobile/lib/hooks/useLocation.d.ts +6 -0
  158. package/mobile/lib/hooks/useLocation.js +23 -0
  159. package/mobile/lib/hooks/useLocation.js.map +1 -0
  160. package/mobile/lib/hooks/useRegions.d.ts +6 -0
  161. package/mobile/lib/hooks/useRegions.js +8 -0
  162. package/mobile/lib/hooks/useRegions.js.map +1 -0
  163. package/mobile/lib/services/sitemap/SitemapProps.d.ts +8 -0
  164. package/mobile/lib/ui-kit/Location/Location.d.ts +19 -0
  165. package/mobile/lib/ui-kit/Location/Location.js +42 -0
  166. package/mobile/lib/ui-kit/Location/Location.js.map +1 -0
  167. package/mobile/lib/ui-kit/Location/SearchBar.d.ts +6 -0
  168. package/mobile/lib/ui-kit/Location/SearchBar.js +7 -0
  169. package/mobile/lib/ui-kit/Location/SearchBar.js.map +1 -0
  170. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  171. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  172. package/mobile/lib/utils/groupBy.d.ts +1 -0
  173. package/mobile/lib/utils/groupBy.js +10 -0
  174. package/mobile/lib/utils/groupBy.js.map +1 -0
  175. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
  176. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
  177. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
  178. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
  179. package/mobile/src/components/Header/HeaderBurger.tsx +5 -7
  180. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
  181. package/mobile/src/components/MiniGallery/MiniGallery.ui.json +1 -1
  182. package/mobile/src/components/Recommendation/Recommendation.example.json +6 -5
  183. package/mobile/src/components/Recommendation/Recommendation.ui.json +8 -0
  184. package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
  185. package/mobile/src/hooks/useCachedAsyncData.ts +37 -0
  186. package/mobile/src/hooks/useLocation.ts +48 -0
  187. package/mobile/src/hooks/useRegions.ts +16 -0
  188. package/mobile/src/services/sitemap/SitemapProps.ts +9 -0
  189. package/mobile/src/ui-kit/Location/Location.tsx +168 -0
  190. package/mobile/src/ui-kit/Location/SearchBar.tsx +30 -0
  191. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
  192. package/mobile/src/utils/groupBy.ts +10 -0
  193. package/package.json +2 -2
  194. package/src/components/Blocks.ts +4 -2
  195. package/src/components/Carousel/Carousel.fixture.tsx +22 -4
  196. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
  197. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +47 -0
  198. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
  199. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
  200. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
  201. package/src/components/Header/Header.tsx +6 -4
  202. package/src/components/Header/HeaderBurger.tsx +5 -7
  203. package/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
  204. package/src/components/MiniGallery/MiniGallery.ui.json +1 -1
  205. package/src/components/Recommendation/Recommendation.example.json +6 -5
  206. package/src/components/Recommendation/Recommendation.fixture.tsx +11 -10
  207. package/src/components/Recommendation/Recommendation.ui.json +8 -0
  208. package/src/components/Recommendation/RecommendationCard.tsx +1 -1
  209. package/src/hooks/useCachedAsyncData.ts +37 -0
  210. package/src/hooks/useLocation.ts +48 -0
  211. package/src/hooks/useRegions.ts +16 -0
  212. package/src/services/sitemap/SitemapProps.ts +9 -0
  213. package/src/ui-kit/Location/Location.fixture.tsx +81 -0
  214. package/src/ui-kit/Location/Location.tsx +168 -0
  215. package/src/ui-kit/Location/SearchBar.tsx +30 -0
  216. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
  217. package/src/utils/groupBy.ts +10 -0
  218. package/bundle/hooks/useGeolocation.d.ts +0 -1
  219. package/dist/hooks/useGeolocation.d.ts +0 -1
  220. package/dist/hooks/useGeolocation.js +0 -21
  221. package/dist/hooks/useGeolocation.js.map +0 -1
  222. package/lib/hooks/useGeolocation.d.ts +0 -1
  223. package/lib/hooks/useGeolocation.js +0 -18
  224. package/lib/hooks/useGeolocation.js.map +0 -1
  225. package/mobile/bundle/hooks/useGeolocation.d.ts +0 -1
  226. package/mobile/dist/hooks/useGeolocation.d.ts +0 -1
  227. package/mobile/dist/hooks/useGeolocation.js +0 -21
  228. package/mobile/dist/hooks/useGeolocation.js.map +0 -1
  229. package/mobile/lib/hooks/useGeolocation.d.ts +0 -1
  230. package/mobile/lib/hooks/useGeolocation.js +0 -18
  231. package/mobile/lib/hooks/useGeolocation.js.map +0 -1
  232. package/mobile/src/hooks/useGeolocation.ts +0 -22
  233. package/src/hooks/useGeolocation.ts +0 -22
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),i=n("useState"),r=n("useEffect"),l=n("useCallback"),s=n("useMemo"),a=n("useRef");function o(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}}}}const 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 ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CDN(){return this._.CDN}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d="likesToken";function m(){async function e(){try{const e=JSON.parse(globalThis.localStorage.getItem(d)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage.setItem(d,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:i}=await e.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const h=(...e)=>globalThis._uni._jsx(...e),u=(...e)=>globalThis._uni._jsxs(...e),p=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,n){const{children:i,...r}=t||{},l=n?.slots?.default,s=i||l&&l();return e(Object.assign(r,s&&{children:s}),n)}return t.inheritAttrs=!1,t};function b(e){return e?e.filter(Boolean).join(" "):""}const x=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),f=[],N=["col-span-12"];function y(e,t){const{key:n,blockDecorator:i=x,blocksRegistry:r={},ancestors:l=f,className:s=""}=t,{type:a}=e;a&&a in r||console.warn(`No block with "${a}" is registered`);const o=a&&r[a];return i({blockClassName:`scroll-mt-12 ${s} ${b(e.style||N)}`,block:e,ancestors:l,render:({block:i,blockClassName:r})=>{const{content:l}=i;return o?h(o,{className:r,block:e,options:t,...l},n):null}},n)}const v=[],w=(e,{key:t,ancestors:n=v,slotName:i=null,renderChild:r=y,...l})=>(e||[]).map(((e,s)=>r(e,{...l,key:`${t||e.type}-${s}`,ancestors:l.parent?[...n||v,[l.parent,i]]:n})));function k({children:e,block:t,options:n,renderChild:i}){return e||(t&&n?w(t.blocks,{...n,parent:t,renderChild:i}):null)}class ${static inst=new $;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}function C(e,{sensitivity:t,rootRef:n}={}){const i=a(null),l=s((()=>({threshold:S(t),root:n?.current})),[t,n?.current]);return r((()=>{if(!i.current)return;const t=new IntersectionObserver(e,l);return t.observe(i.current),()=>{t.disconnect()}}),[e,l]),i}function S(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const T=e=>e?.replace("#","");class _{static inst=new _;eventBus=new $;constructor(){const e=T(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=T(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",`#${T(e)}`)}replace(e){globalThis.history?.replaceState(null,"",`#${T(e)}`)}reset(){globalThis.history?.replaceState(null,"","#")}}const I=p((({className:e,block:t,tag:n="section",role:s,children:a})=>{const o=n,c=function(e,t=_.inst){const n=C(l((n=>{if(!e||!n?.length)return;const i=n[n.length-1];t.eventBus.fire("intersection",{block:e,intersection:i})}),[e,t]),{sensitivity:1});return r((()=>{if(n.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{n.current&&e?.anchor===t&&n.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),n}(t),[d,m]=i(!0);return r((()=>$.inst.subscribe("tab",(e=>{if("group"===e.type){const n=t?.labels?.length||t?.anchor;m(!e.label||(!n||Boolean(t?.labels?.includes(e.label))))}else m(!0)}))),[t]),d?h(o,{className:e,role:s,...t?.anchor?{id:t.anchor,ref:c}:{},children:a}):null})),R={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},j=p((e=>{const{className:t,headingType:n="h3",title:i,as:r="h3"}=e;return h(r,{className:`font-sans font-medium m-0 ${R[n]} ${t||""}`,children:i})})),A=p((e=>{const{size:t="",color:n="",align:i="",font:r="",children:l}=e;return h("p",{className:`font-sans ${t} ${n} ${i} ${r}`,children:l})})),D=p((({children:e})=>h("ul",{className:"list-none m-0 p-0",children:e}))),O=p((({title:e,description:t,className:n="",...i})=>u(I,{className:`py-6 px-4 bg-white text-primary-text ${n}`,...i,children:[e?h(j,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?h("div",{className:"mb-5",children:h(A,{size:"text-m",font:"font-light",align:"text-center",children:t})}):null,h(D,{children:k(i)})]})));O.childrenTypes=["AccordionItem"];const V=p((({isFoldButtonOnTop:e=!1,unfoldedByDefault:t=!1,renderFoldableSection:n,renderFoldButton:r})=>{const[s,a]=i(t),o=l((()=>{a((e=>!e))}),[]),c=n({isUnfolded:s,onToggle:o}),d=r?r({isUnfolded:s,onToggle:o}):null;return u("div",e?{children:[d,c]}:{children:[c,d]})})),M=p((({className:e="",isUnfolded:t,children:n})=>{const i=a(null);return r((()=>{i.current&&(i.current.style.maxHeight=t?`${i.current.scrollHeight}px`:"")}),[t,n?.length]),h("div",{ref:i,className:`transition-max-h duration-300 overflow-hidden ${i.current||!t?"max-h-0":""} ${e}`,children:n})})),B={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},L=p((({className:e="",imageClassName:t="",name:n="",alt:i=`Иконка ${n}`,title:r=i,iconVersion:l="color",asSVG:s,...a})=>{const o=`${c.CDN||""}icons/${n}.svg`;return s&&"normal"!==l?h(E,{className:e,children:u("svg",{className:[P(e,a.width),B[l],t,F(l)].join(" "),...a,"aria-hidden":"true",children:[r?h("title",{children:r}):null,i?h("desc",{children:i}):null,h("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):h("img",{className:e,src:o,alt:i,title:r,...a,"aria-hidden":"true"})})),F=e=>"white"===e?"invert":"",P=(e,t)=>t?`width: ${t}px `:"w-full h-full",E=p((({className:e,children:t})=>e?h("div",{className:e,children:t}):t));function z(e){return"string"==typeof e?"normal":e?.iconVersion||"normal"}const G=(e,t)=>e.media&&t.media?e.media-t.media:0,H=p((({className:e="",image:t,imageClassName:n="",isMobile:i=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return u("picture",{className:`${i?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(G).map((({src:e,format:n,media:i},r)=>h("source",{srcSet:e,type:U(n),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,J(t,n,i)]})})),J=(e,t="",n=!1)=>{const i={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",l=e.alt||e.title,s=n?"m-auto":"m-0";return h("img",{src:e.src,className:`${s} ${t}`,alt:l,title:r,style:i,...e.size})};function U(e){return e?`image/${String(e)}`:void 0}const W=p((({className:e="",image:t,imageClassName:n="",isMobile:i,...r})=>{if(!t)return null;const l="string"==typeof t?t:t.icon;return l||""===l?l.length?h(L,{className:e,imageClassName:n,iconVersion:z(t),name:l,...r}):null:h(H,{className:e,imageClassName:n,image:t,isMobile:i})})),Y=p((e=>h(W,{...e,isMobile:!0}))),K=p((e=>{const{size:t="",color:n="",align:i="",font:r="",children:l}=e;return h("span",{className:`font-sans ${t} ${n} ${i} ${r}`,children:l})})),X=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),q=["PlusIcon","MinusIcon"],Q=p((({className:e="",label:t="",labelIcon:n,isExpanded:i,...r})=>{const{bordered:l}=function(e,t){const{content:n}=function(e){return e?.parent||{}}(e);return n||t}(r.options,{});return h("li",{className:`${l?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"} border-solid border-main-divider ${e}`,children:h(V,{isFoldButtonOnTop:!0,unfoldedByDefault:i,renderFoldableSection:({isUnfolded:e})=>h(M,{className:"flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0",isUnfolded:e,children:k(r)}),renderFoldButton:({isUnfolded:e,onToggle:i})=>h(Z,{className:l?"":"py-3.5 px-0",label:t,icon:q[Number(e)],primaryIcon:n,onClick:i})})})}));Q.childrenTypes=[];const Z=p((({className:e,icon:t,label:n,primaryIcon:i,onClick:r})=>u("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text group cursor-pointer ${e}`,onClick:r,children:[u("div",{className:"flex group-hover:text-primary-main",children:[i?h(Y,{image:X(i),className:"mr-3 flex-shrink-0",width:"24",height:"24",asSVG:!0}):null,h(K,{size:"text-m-title-xs",font:"font-medium",children:n})]}),h(Y,{className:"flex-shrink-0",image:X({icon:t}),width:"24",height:"24",asSVG:!0})]}))),ee=p((({className:e="",style:t,idx:n,activeIndex:i,observerOptions:r,children:s,onIntersection:a})=>{const o=C(l((e=>{e.length&&a&&a(n||0,e[e.length-1])}),[a,n]),r);return h("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(n===i),ref:o,children:s})})),te=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],ne=p((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:i,gap:r=0,padding:s=0,snapAlign:o="snap-center",children:c,onVisibleItemsChange:d,onVisibleIndicesChange:m})=>{const u={sensitivity:1,rootRef:t},p=a([]),g=l(((e,t)=>{const n=[...p.current||[]];n[e]=t,p.current=n,d&&d(n),m&&m(re(n))}),[d,m]);return h("div",{className:`box-border overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...ie(s),gap:`${r}px`},role:"list",ref:t,children:(b=(e,t)=>h(ee,{className:`${o} ${i?te[i-1]:""}`,style:ie(s/4),activeIndex:n,idx:t,observerOptions:u,onIntersection:g,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(b):b(e,0))(c)});var b})),ie=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),re=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),le=p((({containerRef:e,activeIndex:t,dotCount:n=0})=>n?h("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:new Array(n).fill(null).map(((n,i)=>h("div",{className:"cursor-pointer bg-primary-main h-2 rounded-full transition-width duration-300 "+(i===t?"w-6":"w-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(i)},String(i))))}):null)),se=e=>e,ae=(e=se)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),oe=(e=se)=>ae((t=>-e(t))),ce=e=>t=>e.scrollWidth/t,de=e=>(t,n)=>{e.scrollBy({left:n*ce(e)(t),behavior:"smooth"})},me=({itemCount:e,isCyclic:t,onVisibleIndicesChange:n})=>{const r=a(null),[s,o]=i([]),c=l((e=>{o((t=>{return(n=t)===(i=e)||Boolean(n&&i&&n?.length===i?.length&&n.every(((e,t)=>e===i[t])))?t:e;var n,i})),n&&n(e)}),[e]),[d,m]=s.length?[oe()(s),ae()(s)]:[-1,-1],h=d>0,u=m<e-1,p=l((()=>{var n;r.current&&(t&&!h?(n=r.current).scrollTo({left:n.scrollWidth,behavior:"smooth"}):de(r.current)(e,-1))}),[t,e,h]),g=l((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):de(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:g,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},he=p((({className:e,gap:t=14,padding:n=16,showDots:i=!0,children:r,onVisibleIndicesChange:l})=>{const s=Array.isArray(r)?r.length:0,[a,o]=me({itemCount:s,onVisibleIndicesChange:l}),[c]=o.visibleIndicesRange;return u("div",{className:e,children:[h(ne,{containerRef:a,activeIndex:c,visibleItemCount:1,gap:t,padding:n,onVisibleIndicesChange:o.handleVisibleIndicesChange,children:r}),i?h(le,{containerRef:a,activeIndex:c,dotCount:s}):null]})}));const ue=e=>e?.includes("//"),pe=e=>(e||"").replace(/\/?\?.*/,""),ge=e=>{if(!e||!ue(e))return;const t=e,n=t.indexOf("//"),i=t.indexOf("/",n+"//".length);return-1!==i?t.substring(0,i):t},be=e=>e?.startsWith("#");var xe=Object.freeze({__proto__:null,isURL:ue,withoutQuery:pe,getOrigin:ge,getHash:e=>{if(!e||!ue(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:be});const fe=(e,t)=>fe._impl(e,t);function Ne(){return Ne._impl()}function ye(){const e=Ne(),t=_.inst;return n=>{const i=((e,t)=>{if(!e)return e;const n=ge(t?.href);return n?e.replace(n,"")||"/":e})(n.href,e);return{...n,href:i,"aria-label":n.text,onClick:fe((r=>{n.onClick&&n.onClick(r);const l=i&&!ue(i),s=!n.target||"_self"===n.target;l&&s&&(r?.preventDefault(),be(i)?t.goto(i):e.push(i))}),n)}}}fe._impl=e=>e,fe.setup=e=>{fe._impl=e},Ne._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),Ne.setup=e=>{Ne._impl=e};const ve={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:""},we="bg-main-divider text-main-disabled",ke={primary:we,secondary:we,white:we,link:""},$e="text-center font-sans select-none",Ce={primary:"group-hover:brightness-0 group-hover:invert",secondary:"group-hover:brightness-0 group-hover:invert",white:"group-hover:brightness-0 group-hover:invert",link:""},Se=p((e=>{const{text:t,aboveText:n,appendLeft:i,appendRight:r,version:l="primary"}=e;return u("div",{className:Te(e),children:[i?h("div",{className:Ce[l],children:i}):null,_e(e)?u("div",{children:[n?h("div",{className:"text-xs-light text-left",children:n}):null,h("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?h("div",{className:Ce[l],children:r}):null]})})),Te=e=>{const{version:t,aboveText:n,rounded:i}=e;if("link"===t)return"";const r="gap-2 "+(n?"py-2.5 px-7":"py-4 px-4");return["group flex items-center justify-center",_e(e)?r:"h-12 w-12",i?"rounded-full":""].join(" ")},_e=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),Ie=({className:e,rounded:t,version:n})=>["inline-block",$e,n?ke[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Re=({className:e,rounded:t,version:n})=>[$e,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border",n?ve[n]:"",t?"rounded-full":"rounded-md",e].join(" "),je=p((({disabled:e,children:t,...n})=>{const i=ye()(n),r=t??h(Se,{...i});return h(e?De:Ae,{...i,children:r})})),Ae=p((({className:e="",href:t,rel:n,target:i,ariaLabel:r,version:l,rounded:s,onClick:a,children:o})=>h("a",{className:Re({className:e,version:l,rounded:s}),href:t,rel:n,target:i,"aria-label":r,role:t?"link":"button",onClick:a,children:o}))),De=p((({className:e,ariaLabel:t,version:n,rounded:i,children:r})=>h("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Ie({className:e,rounded:i,version:n}),children:r}))),Oe=(e=!1)=>e?"text-white":"",Ve=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Me=p((({icon:e,image:t,title:n,subtitle:i,isFillGradient:r})=>u("div",{role:"columnheader",children:[e?h(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&h("div",{className:"mb-3.5",children:h(Y,{image:t})}),n?h(j,{headingType:"h4",className:Oe(r),title:n}):null,i?h("div",{className:Ve(r),children:i}):null]}))),Be=p((({cell:e,rowHeader:t,isFillGradient:n=!1})=>h("div",{className:"box-border flex flex-col",role:"cell",children:h("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Le(n,t))})}))),Le=(e,t)=>({label:n,description:i},r)=>u("div",{className:"flex justify-between text-s py-3.5",children:[h("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),u("div",{className:"basis-1/2",children:[n?h("div",{className:"text-right "+(e?"text-white":""),children:n}):null,i?h("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:i}):null]})]},String(r)),Fe=p((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:i,showRow:r,onToggleColumn:l})=>{const s=t?.slice(0,r?t.length:n),a=i?"secondary":"primary";return u("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${i?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[h(Me,{...e,isFillGradient:i}),s?.length?s.map((({rowHeader:e,cell:t},n)=>h(Be,{cell:t,rowHeader:e,isFillGradient:i},String(n)))):null,r&&e?.link?h(je,{href:e.link.href,target:e.link.target,version:a,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}):null,Pe({onToggleColumn:l,isFillGradient:i,showRow:r})]})})),Pe=({onToggleColumn:e,isFillGradient:t,showRow:n})=>h("div",{className:"mt-5",role:"cell",children:h("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),Ee=p((e=>{const{className:t,title:n}=e;return u("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${t||""}`,children:[n?h(j,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,h("div",{role:"table",children:h(ze,{...e})})]})})),ze=p((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:r,orientation:s,...a})=>{const[o,c]=i(new Array(e.length).fill(!r)),d=l((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),m=l((()=>c((e=>new Array(e.length).fill(!1)))),[]),u=e?.map((({data:e,header:i},l)=>{return h(Fe,{visibleRowLength:r,showRow:o[l],header:i,columnData:(s=e,s?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===l&&n,onToggleColumn:()=>d(l),...a},String(l));var s}));return"horizontal"===s?h(he,{onVisibleIndicesChange:m,children:u}):u})),Ge=new Map;function He(e,t,{fallback:n}={}){const l=s((()=>Je(e)),[e]),[a,o]=i(),[c,d]=i(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!l.every((e=>null===e)))try{const e=t(...l);"then"in e?(e=>{e.then((e=>Ge.get(l)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...l]);const u=l[0],p=n&&"string"==typeof u&&n[u];return{data:a||c||!p?a:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function Je(e){return e?Array.isArray(e)?e:e instanceof Function?Je(e()):[e]:[e]}async function Ue(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function We(e,t={}){const{data:n}=He(`/wcms-resources/${e}.json`,Ue,{fallback:t});return n||{}}const Ye=p((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:r}=(()=>{const[e,t]=i("");return{term:e,setTerm:e=>t(e)}})(),l=t?"text-s":"text-l-light",s=t?" placeholder-transparent":"h-full",a=t?"some search":void 0;return u("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[h("div",{className:t?"w-5 h-5":"w-6 h-6",children:h(Y,{image:"LoupeIcon",width:"24",height:"24"})}),n?null:h("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${l}`,children:"Поиск по сайту"})]}),h("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${s}`,value:n,onChange:e=>r(e.target.value),type:"text",name:"search-bar-input",placeholder:a}),t?h("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),r("")},children:h(Y,{image:"CloseIcon",width:"24",height:"24"})}):h(je,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:h("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),Ke=p((e=>h(Ye,{...e,isMobile:!0}))),Xe=p((({className:e="",documents:t,...n})=>h(I,{className:`font-sans bg-white mt-2.5 ${e}`,...n,children:h("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?qe(t):null})}))),qe=e=>e.map(((e,t)=>{const{text:n,...i}=e;return h("li",{className:"mb-4 list-none",children:h("a",{className:"hover:text-primary-main",role:"link",...i,children:n||null})},`list_item_${String(t)}`)})),Qe={"bg-white":"color",transparent:"white"},Ze={"bg-white":"text-primary-main",transparent:"text-white"},et=(e,t,n)=>h(Y,t?.src?{image:t,className:Ze[e],width:n?.width,height:n?.height,asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Qe[e]},className:Ze[e],width:n?.width,height:n?.height,asSVG:!0}),tt={"bg-white":"text-primary-text",transparent:"text-white"},nt=(e,t,n)=>h("span",{className:`${tt[t]} ml-2.5 font-medium ${n||""}`,children:e||"Россельхозбанк"}),it=p((({bgColor:e="bg-white",children:t,className:n="",href:i,logo:r,showTitle:l=!0,targetBlank:s})=>u("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:i||"https://rshb.ru/",target:s?"_blank":"_self","aria-label":r?.title||"Россельхозбанк",children:[et(e,r?.image,{width:"34",height:"34"}),l?nt(t||r?.title,e,"text-s"):null]}))),rt=p((({className:e="",title:t="Мобильное приложение",description:n,href:i="#"})=>h("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:i?u("div",{className:"flex",children:[h("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-12 h-12",children:h(it,{className:"w-8",bgColor:"transparent",showTitle:!0})}),u("a",{href:i,target:"_blank",className:"flex flex-col justify-center pl-3",children:[h("div",{className:"text-s font-medium mb-[3px]",children:t}),h("div",{className:"text-s text-secondary-text",children:n})]})]}):null}))),lt=p((({className:e="",items:t,hasButton:n})=>u("div",{className:e,children:[t?.length?t.map(st):null,n?h(je,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),st=(e,t)=>{const{type:n,text:i,description:r}=e;return u("div",{className:"mb-4",children:[h("div",{children:at(n,i)}),h("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},at=(e,t="")=>{switch(e){case"tel":return h("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${ot(t)}`,children:t});case"email":return h("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return h("span",{children:t})}},ot=e=>e.replaceAll(/\D/g,""),ct=p((({className:e="",index:t,text:n,...i})=>{const r=ye(),{href:l,target:s,onClick:a}=r(i);return h("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:l,target:s,onClick:a,children:n||`Документ ${t}`})})),dt=p((({title:e,links:t,className:n=""})=>u("div",{className:n,children:[h("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?h("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>h(ct,{index:t,className:"text-s",...e},String(t))))}):null]}))),mt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],ht=p((({version:e="primary",...t})=>{const n=ye(),{href:i,onClick:r}=n(t),{icon:l,label:s}=mt.find((({origins:e})=>e.some((e=>i?.includes(e)))))||{};if(!l)return null;return h("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===e?"bg-white hover:bg-secondary-hover":"border-solid border border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===e?"hover:text-black":""}`,href:i,"aria-label":s,target:"_blank",rel:"noopener noreferrer",onClick:r,children:l?h(Y,{image:X(l),imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),ut=p((({className:e="",media:t,version:n})=>h("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e}`,children:t?.map(((e,t)=>h(ht,{version:n,...e},String(t))))}))),pt=p((({className:e="",index:t,...n})=>{const i=ye(),{href:r,target:l,text:s,onClick:a}=i(n);return h("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:a,children:s||`Документ ${t}`})})),gt=p((({className:e="",links:t})=>u("div",{className:e,children:[h("div",{className:"py-6",children:h("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?h("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>h(pt,{index:t,...e},String(t))))}):null]}))),bt=p((({className:e="",...t})=>{const n=t.options?.page?.fallback,i=We(c.SITEMAP||"sitemap",n),{documents:r,relatedEnterprises:l,contacts:s,socialMedia:a,horizontalNavigationTitle:o}=We(c.FOOTER||"footer",n);return u("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[h(lt,{className:"overflow-hidden",items:s,hasButton:!0}),h(D,{children:i.topItems?.map(((e,t)=>h(Q,{label:e.text,children:h(Xe,{documents:e.items})},String(t))))}),h("div",{children:i?.dispositions?.map(xt)}),h(rt,{title:"Мобильное приложение",description:"Загрузить для IOS и Android",...t}),h(Ke,{className:"grow"}),h(ut,{className:"pb-4",media:a}),h(dt,{title:o,links:l}),h(gt,{links:r})]})})),xt=(e,t)=>{const{icon:n,href:i,text:r}=e;return u(je,{version:"link",href:i,className:"flex text-s mb-4 w-6",children:[n?h(Y,{className:"pr-1",image:X(n),width:"24",height:"24",asSVG:!0}):null,h("span",{className:"pl-2.5 font-medium text-primary-text",children:r})]},`footer-${t}`)},ft={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Nt=p((({title:e,description:t,cards:n=[],className:i,orientation:r="horizontal"})=>u("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${i}`,children:[u("div",{className:"flex flex-col items-center mb-5",children:[e?h(j,{headingType:"h3",className:`text-center ${t?"mb-2":"mb-5"}`,title:e}):null,t?h("div",{className:"text-m max-w-[600px] text-center mb-5",children:t}):null]}),yt(r,n)]})));function yt(e,t){return"horizontal"===e?h(he,{children:t?.map(vt)}):h("div",{className:"grid gap-3.5",children:t?.map(vt)})}function vt(e,t){return u("div",{className:`w-full h-full flex flex-col justify-between shrink-0 box-border snap-start snap-always border-solid border rounded-md border-main-stroke p-4\n ${ft[e.version??"primary"]}`,children:[u("div",{children:[wt(e.icon),e.title?h("h3",{className:"text-m-title-xs font-medium m-0",children:e.title}):null,e.description?kt(e):null,e.items?.length?Ct(e.items,e.isDotted,e.version):null]}),e?.button?.text?(n=e.button,h(je,{className:"mt-3",...n})):null]},t);var n}const wt=e=>e?.src||e?.icon?h("div",{className:"flex justify-center",children:h(Y,{className:"mb-3.5",image:e})}):null;function kt(e){return h("div",{className:"text-secondary-text mt-1 text-s "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}const $t={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"};function Ct(e,t,n="primary"){return h("section",{className:"mt-3",children:e.map(((e,i)=>u("div",{children:[t?h("div",{className:`rounded-full inline-block mr-3 mt-2 w-2 h-2 min-w-2 min-h-2 ${$t[n]}`}):null,h("span",{className:"text-m font-medium",children:e.title}),h("span",{className:"text-s pl-2 "+("primary"===n?"text-secondary-text":""),children:e.text})]},String(i))))})}const St=(e,t,n=((e,t)=>t.startsWith(e)))=>n(pe(e),pe(ue(e)?t.href:t.pathname)),Tt=e=>t=>St(t.href,e),_t=e=>t=>t.items?.some(Tt(e))||St(t.href,e)||((e,t)=>ge(e)===ge(t.href))(t.href,e),It="absolute left-0 -bottom-3 w-full h-0.5",Rt=p((({className:e="",text:t,href:n,target:i,active:r,onClick:l,children:s,bgColor:a="bg-white"})=>u("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:n,target:i,onClick:l,children:[h("span",{className:jt(a,r),children:t||s}),r?h("div",{className:At(a,r)}):null]}))),jt=(e,t=!1)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans text-s`},At=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${It}`:It,Dt=o("https://10.80.4.9");const Ot=p((({burgerSubMenu:e,onClick:t,defaultLocation:n="",children:s})=>{const[a,o]=function(e){const[t,n]=i(e);return r((()=>{n(globalThis?.localStorage.getItem("location")||e)}),[e]),[t,l((()=>{Dt.getFetcherAddress().then((t=>{const i=t||e;globalThis?.localStorage.setItem("location",i),n(i)}))}),[e])]}(n);return u("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[h("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:t,children:h(Y,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),u("button",{onClick:o,className:"flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[h(Y,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),a]}),s,h("div",{className:"mb-7",children:e?.map(Vt)}),h(Ke,{className:"grow"})]})})),Vt=(e,t)=>{const{icon:n,href:i,text:r}=e;return u("a",{href:i,className:"flex text-s mb-4 hover:text-primary-main",children:[n?h(Y,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,h("span",{className:"font-medium pl-0.5",children:r})]},`headerSubMenu-${t}`)},Mt=p((({onClick:e,bgColor:t,logo:n})=>u("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-12",children:[u("div",{className:"flex items-center",children:[h("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:h(Y,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),h(it,{className:"mr-8",bgColor:t,logo:n})]}),h("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-s border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),Bt=p((({className:e="",bgColor:t="bg-white",...n})=>{const r=Ne(),s=n.options?.page?.fallback,{topItems:a,dispositions:o,defaultLocation:d,logo:m}=We(c.SITEMAP||"sitemap",s),p=a?.find(_t(r)),g=p?.items,b=(e=>(t=[])=>{const n=t?.filter(Tt(e));return n?.length?ae((e=>e.href?.length||0))(n):void 0})(r)(g),[x,f]=i(!1),N=l((()=>f((e=>!e))),[]);return u("header",{className:`${t} ${e}`,children:[u("div",{className:"container px-4 py-0 box-border",children:[h(Mt,{onClick:N,bgColor:t,logo:m}),h("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-12",children:h("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:g?.map(((e,n)=>h(Rt,{className:"mr-8 whitespace-nowrap text-s",active:e===b,bgColor:t,...e},String(n))))})})]}),x?h(Ot,{onClick:N,burgerSubMenu:o,defaultLocation:d,children:h(D,{children:a?.map(((e,t)=>h(Q,{label:e.text,children:h(Xe,{documents:e.items})},String(t))))})}):null]})})),Lt={left:"text-left",center:"text-center",right:"text-right"},Ft={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"}},Pt=p((({bgColorHeadline:e="transparent",className:t="",title:n,description:i,image:r,align:l="left"})=>{const s=Ft[e];return u("section",{className:`px-4 py-6 flex flex-col gap-2.5 ${s.background} ${t}`,children:[n?h(j,{headingType:"h2",className:`${s.text} ${Lt[l]}`,title:n}):null,i?h("p",{className:`text-m ${s.description} ${Lt[l]}`,children:i}):null,r?.src&&h("div",{className:"mt-2.5 mx-auto flex justify-center",children:h(Y,{image:r})})]})})),Et=p((({className:e,iconClassName:t,textClassName:n,suffixClassName:i,doc:r,icon:l})=>{const{text:s,fileSize:a,...o}=r;return u("a",{className:e,role:"link",...o,children:[l?h(Y,{className:t,image:X(l),width:"24px",height:"24px",asSVG:!0}):null,s?u("span",{className:n,children:[s,h("span",{className:i,children:o?.href&&zt(Gt(o.href),a)})]}):null]})})),zt=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Gt=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Ht=p((({className:e="",doc:t,icon:n})=>h(Et,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),Jt=p((({hasBorder:e=!0,documents:t,icon:n})=>h(he,{className:"text-s text-primary-main mt-5",children:t?.length?t.map(((t,i)=>h(Ht,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:n},String(i)))):null}))),Ut=p((({hasBorder:e=!0,documents:t,icon:n})=>h("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>h("div",{role:"listitem",children:h(Ht,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:n})},String(i)))):null}))),Wt=p((({className:e="",title:t,description:n,icon:i={icon:"DocIconMonoColor"},documents:r,orientation:l="vertical",hasBorder:s=!0,...a})=>u("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[h(Pt,{className:"!p-0 "+(n?"gap-2":"gap-5"),title:t,description:n,align:"center",...a}),h("vertical"===l?Ut:Jt,{hasBorder:s,documents:r,icon:i})]}))),Yt=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function Kt(e=""){const t=Yt(e);return t<=4?"S":t<=8?"M":"L"}function Xt(e=""){const t=Yt(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function qt(e=""){const t=Yt(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Qt=p((({className:e,title:t,description:n="Блок в разработке...",...i})=>u(I,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${qt(e)} ${Xt(e)} `,...i,children:[h(Pt,{className:"!p-0 max-w-[600px]",title:t,description:n,headlineVersion:Kt(e),...i}),h("figure",{className:"m-0 min-w-[80%]",children:Zt()})]}))),Zt=(e=3)=>tn(100,e).map((e=>Math.floor(e))).map(en),en=(e,t)=>h("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),tn=(e,t)=>[e].concat(t>0?tn(e/1.618,t-1):[]),nn=p((({className:e="",buttons:t})=>t&&t?.length?h("div",{className:e,children:t.map(((e,t)=>rn({button:e,index:t})))}):null));function rn({button:e,buttonClassName:t,index:n}){const{icon:i,iconRight:r,version:l,text:s,...a}=e,o="secondary"===l?"color":"white",c=ln({...i,iconVersion:o}),d=ln({...r,iconVersion:o});return s?h(je,{className:t,appendLeft:c,appendRight:d,version:l,text:s,...a},n?String(n):""):null}const ln=e=>{if(!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return h(Y,{image:{...e},width:t,height:"24",asSVG:!0})},sn={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"},an={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},on=p((({className:e="",isDotted:t=!0,children:n,version:i="primary",size:r="M"})=>u("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?h("div",{children:h("div",{className:`rounded-full align-middle inline-block ${sn[i]} ${an[r]}`})}):null,h("span",{children:n})]}))),cn={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},dn={S:"text-l-light",M:"text-h6",L:"text-h5"},mn={S:"ml-2",M:"ml-3",L:"ml-4"},hn=p((e=>{const{className:t="",hasIndent:n,isDotted:i,itemClassName:r="",items:l,listItemSize:s="M",version:a="primary"}=e;return l?.length?h("section",{className:`${cn[a]} ${dn[s]} ${t} ${n?mn[s]:""}`,role:"list",children:l.map(((e,t)=>h(on,{className:`${r} mb-1.5`,isDotted:i,version:a,size:s,children:e},String(t))))}):null})),un=p((({className:e="",title:t="",buttons:n,image:i,children:r})=>u("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,u("div",{className:"flex grow w-full justify-between",children:[u("div",{className:"flex flex-col justify-between w-full",children:[h("div",{className:"h-full",children:r}),n?h("div",{className:"mt-auto pt-8",children:n}):null]}),i]})]}))),pn={primary:"text-primary-text",secondary:"text-white"},gn={primary:"text-secondary-text",secondary:"text-white"},bn=p((e=>{const{className:t="",icon:n,label:i,description:r,version:l="primary",benefitsVersion:s="normal"}=e,a="white"===s?"secondary":"primary";return u("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[n?h("div",{className:xn(l,s),children:h(Y,{className:"w-6 h-6",image:X(n,a),asSVG:!0})}):null,u("div",{className:"gap-0.5",children:[i?h("div",{className:`text-h6 ${pn[l]}`,children:i}):null,r?h("div",{className:`text-m-light ${gn[l]}`,children:r}):null]})]})}));function xn(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${n}`}const fn=(e="primary",t="normal")=>({icon:n,label:i,description:r},l)=>h(bn,{icon:n,label:i,description:r,version:e,benefitsVersion:t},String(l)),Nn=p((({className:e="",headlineVersion:t="L",benefits:n,benefitsVersion:i="normal",buttons:r,image:l,items:s,version:a="primary",isDotted:o=!0,label:c,...d})=>u("div",{className:`w-full ${e}`,children:[u("div",{children:[c?wn(c,a):null,h(Pt,{className:"!p-0 max-w-[600px]",bgColorHeadline:a,headlineVersion:t,...d}),u(un,{buttons:r?.length?h(nn,{buttons:r,className:"flex flex-col mt-5 gap-2.5"}):null,children:[n?.filter((e=>e.label))?.length?h("div",{className:"mt-3",children:n.map(fn(a,i))}):null,s?.length?h(hn,{className:"mt-3 text-m",items:s,version:a,isDotted:o}):null]})]}),yn(l)]})));function yn(e){return e?.src?h(Y,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const vn={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},wn=(e,t)=>h("div",{className:`px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${vn[t]}`,children:e}),kn=p((e=>{const{className:t="",version:n="primary"}=e;return h("section",{className:`font-sans bg-white px-4 py-6 ${ft[n]} ${t}`,children:h(Nn,{...e})})})),$n={primary:{background:"bg-white",title:"text-primary-text",description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{background:"bg-primary-main",title:"text-white",description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},Cn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-12 w-12 min-w-12 min-h-12"},Sn={normal:"min-h-[70px]",small:"min-h-12"},Tn=p((({className:e,title:t,description:n,showLines:i=!0,steps:r,size:l="normal",version:s="primary"})=>{const a=$n[s];return u("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${a.background} ${a.title} ${e||""}`,children:[t?h(j,{headingType:"h3",className:`text-center ${a.title}`,title:t}):null,n?h("p",{className:`text-m-light text-center ${a.description} ${t?"mt-2":""}`,children:n}):null,r?.length?h("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:h("div",{className:"flex flex-col justify-between gap-x-[101px]",children:r.map(_n(l,s,i))})}):null]})})),_n=(e,t,n)=>(i,r,l)=>{const s=l.length-1===r,a="normal"===e?"ml-[34px]":"ml-6",o=$n[t];return h("div",{children:u("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex-shrink-0",children:[In(e,t)(i,r),s?null:h("div",{className:`min-h-8 h-full w-0.5 ${n?o.iconConnector:""} ${a}`})]}),u("div",{className:`flex flex-col justify-center h-fit ${Sn[e]}`,children:[i.label?h("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:i.label}):null,i.description?h("div",{className:`text-s ${o.description} text-left`,children:i.description}):null]})]})},String(r))},In=(e,t)=>(n,i)=>{const r=$n[t],l="normal"===e?"38":"27",s="normal"===e?"text-m-title":"text-m-title-xs";return h("div",{className:`${Cn[e]} ${r.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:h("span",{className:`font-medium flex self-center ${r.title} ${s}`,children:(a=n?.icon,Boolean(a?.icon||a?.src)?h(Y,{image:X({...n.icon},t),width:l,height:l,asSVG:!0}):h("span",{children:i+1}))})});var a},Rn={Buttons:({buttons:e})=>e&&e?.length?h("div",{children:e.map((({rounded:e,icon:t,...n},i)=>rn({button:{rounded:e,icon:t,...n},buttonClassName:`mt-3 ${i>0&&e?"ml-2.5":""} ${t?"w-12 h-12":""}`,index:i})))}):null,Img:({image:e})=>e?.src?h(Y,{image:{...e,className:"m-0"}}):null,List:({isDotted:e,...t})=>h(hn,{className:"flex flex-col justify-between items-start text-m",version:"gray",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>u("div",{children:[e?h("div",{className:"text-xl font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?h("div",{className:"text-s text-secondary-text",children:t}):null]})},jn=p((({title:e,icon:t})=>u("div",{className:"flex gap-2.5 mb-2",children:[e?h(j,{headingType:"h3",className:"font-medium",title:e}):null,t?h(Y,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),An=p((({tile:e,...t})=>u("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[h(jn,{...e?.header}),e?.data?.length?e.data.map(((e,n)=>u("div",{children:[n>0?h("div",{className:"h-5"}):null,Dn(e,t)]},String(n)))):null]})));function Dn(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Rn))return null;const n=Rn[e.tableCellType];return h(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const On=p((({tiles:e,...t})=>e?.length?h(he,{...t,children:e.map(((e,n)=>h(An,{tile:e,...t},String(n))))}):null)),Vn=p((({tiles:e,...t})=>e?.length?h("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>h(An,{tile:e,...t},String(n))))}):null)),Mn=p((({className:e,title:t,description:n,tariffsColumns:i,rowHeaders:r,orientation:l="vertical",...s})=>{const a=Bn(i),o=Ln(r,a);return u("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[t?h(j,{headingType:"h2",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?h("div",{className:"mb-5 text-center text-m",children:n}):null,h("vertical"===l?Vn:On,{tiles:o,...s})]})})),Bn=e=>e?.[0]?.data?e[0].data:[],Ln=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Fn={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"}},Pn=p((({title:e,description:t,blockVersion:n="primary",iconVersion:i,image:r,className:l="",items:s,isDotted:a=!0})=>{const o=Fn[n],c="secondary"===n?"secondary":"gray";return u("section",{className:`font-sans px-4 py-[18px] flex flex-col ${o.background} ${l}`,children:["small"===i?En(o.icon):null,"big"===i?zn(r):null,u("div",{className:"py-0.5",children:[e?h("div",{className:`text-l font-medium mb-1 ${o.title}`,children:e}):null,t?h("div",{className:`text-s ${o.description}`,children:t}):null,s?.length?h(hn,{className:"mt-1 text-m",items:s,isDotted:a,version:c}):null]})]})}));function En(e){return h("div",{className:"mb-3",children:h("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function zn(e){return e?.src?h(Y,{className:"pb-3 mr-auto",image:e}):null}const Gn={Accordion:O,AccordionItem:Q,ComparisonTable:Ee,Footer:bt,Gallery:Nt,Header:Bt,Headline:Pt,LinkDocs:Wt,LinkList:Xe,MobileAppTile:rt,ProductBlock:kn,StepsBlock:Tn,TariffsTable:Mn,TextBlock:Pn,Placeholder:Qt},Hn=["Header","Footer"],Jn=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Un(e=_.inst,t=globalThis){const n=a(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{n.current&&n.current.set(e,t)}))),[e]),r((()=>{const i=((e,t=600)=>{let n;const i=(...r)=>{i.dispose(),n=setTimeout((()=>{e(...r)}),t)};return i.dispose=()=>{n&&clearTimeout(n)},i})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Hn.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?oe(Jn)(t):[];return n}([...n.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",i),()=>{i.dispose(),t.removeEventListener("scroll",i)}}),[e,t])}const Wn=m();const Yn=p((({className:e,onClick:t,ariaLabel:n})=>h("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:Kn()}))),Kn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return u("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h("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"}),h("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"})]})},Xn=p((({className:e=""})=>{const t=function(e){const[t,n]=i(0);return r((()=>{(async()=>{const[t]=await Wn.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:l((async()=>{n(await Wn.like(e))}),[e]),dislike:l((async()=>{n(await Wn.dislike(e))}),[e])}}(Ne().pathname);return u("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:[h(Yn,{onClick:fe(t.like),ariaLabel:"Поставить отметку «лайк»"}),h(Yn,{onClick:fe(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),h("span",{className:"select-none",children:t.likeCount})]})})),qn=p((e=>{const{className:t="",blocksRegistry:n,blockDecorator:i,data:r={}}=e,{style:l,blocks:s,slots:a,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:n,blockDecorator:i,parent:r};return Un(),u("section",{className:`relative ${b(l)} ${t}`,"data-theme":c,children:[a?.header?h("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:w(a?.header,{...d,slotName:"header"})}):null,u("div",{className:"container grid grid-cols-12 gap-1",children:[w(s,d),a?.footer?w(a?.footer,{...d,slotName:"footer"}):null]}),o?h("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:h(Xn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));qn.childrenTypes=[],qn.slots=()=>["header","footer"];e.Blocks=Gn,e.ContentPage=qn,e.DaDataAPI=o,e.LikeAPI=m,e.handlerDecorator=fe,e.joinList=function(e){return t=>t.reduce(((t,n,i)=>t.length?t.concat({...e,key:i},n):[n]),[])},e.packageVersion="0.6.41",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=xe,e.useRouter=Ne,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),i=n("useState"),r=n("useEffect"),l=n("useCallback"),s=n("useMemo"),a=n("useRef");const 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 ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CDN(){return this._.CDN}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage.getItem(c)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage.setItem(c,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:i}=await e.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:i}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:t,user_name:i})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,n){const{children:i,...r}=t||{},l=n?.slots?.default,s=i||l&&l();return e(Object.assign(r,s&&{children:s}),n)}return t.inheritAttrs=!1,t};function g(e){return e?e.filter(Boolean).join(" "):""}const b=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),x=[],f=["col-span-12"];function N(e,t){const{key:n,blockDecorator:i=b,blocksRegistry:r={},ancestors:l=x,className:s=""}=t,{type:a}=e;a&&a in r||console.warn(`No block with "${a}" is registered`);const o=a&&r[a];return i({blockClassName:`scroll-mt-12 ${s} ${g(e.style||f)}`,block:e,ancestors:l,render:({block:i,blockClassName:r})=>{const{content:l}=i;return o?m(o,{className:r,block:e,options:t,...l},n):null}},n)}const y=[],v=(e,{key:t,ancestors:n=y,slotName:i=null,renderChild:r=N,...l})=>(e||[]).map(((e,s)=>r(e,{...l,key:`${t||e.type}-${s}`,ancestors:l.parent?[...n||y,[l.parent,i]]:n})));function w({children:e,block:t,options:n,renderChild:i}){return e||(t&&n?v(t.blocks,{...n,parent:t,renderChild:i}):null)}class k{static inst=new k;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}function $(e,{sensitivity:t,rootRef:n}={}){const i=a(null),l=s((()=>({threshold:C(t),root:n?.current})),[t,n?.current]);return r((()=>{if(!i.current)return;const t=new IntersectionObserver(e,l);return t.observe(i.current),()=>{t.disconnect()}}),[e,l]),i}function C(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const S=e=>e?.replace("#","");class T{static inst=new T;eventBus=new k;constructor(){const e=S(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=S(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",`#${S(e)}`)}replace(e){globalThis.history?.replaceState(null,"",`#${S(e)}`)}reset(){globalThis.history?.replaceState(null,"","#")}}const _=u((({className:e,block:t,tag:n="section",role:s,children:a})=>{const o=n,c=function(e,t=T.inst){const n=$(l((n=>{if(!e||!n?.length)return;const i=n[n.length-1];t.eventBus.fire("intersection",{block:e,intersection:i})}),[e,t]),{sensitivity:1});return r((()=>{if(n.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{n.current&&e?.anchor===t&&n.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),n}(t),[d,h]=i(!0);return r((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const n=t?.labels?.length||t?.anchor;h(!e.label||(!n||Boolean(t?.labels?.includes(e.label))))}else h(!0)}))),[t]),d?m(o,{className:e,role:s,...t?.anchor?{id:t.anchor,ref:c}:{},children:a}):null})),I={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},R=u((e=>{const{className:t,headingType:n="h3",title:i,as:r="h3"}=e;return m(r,{className:`font-sans font-medium m-0 ${I[n]} ${t||""}`,children:i})})),j=u((e=>{const{size:t="",color:n="",align:i="",font:r="",children:l}=e;return m("p",{className:`font-sans ${t} ${n} ${i} ${r}`,children:l})})),D=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),A=u((({title:e,description:t,className:n="",...i})=>h(_,{className:`py-6 px-4 bg-white text-primary-text ${n}`,...i,children:[e?m(R,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?m("div",{className:"mb-5",children:m(j,{size:"text-m",font:"font-light",align:"text-center",children:t})}):null,m(D,{children:w(i)})]})));A.childrenTypes=["AccordionItem"];const O=u((({isFoldButtonOnTop:e=!1,unfoldedByDefault:t=!1,renderFoldableSection:n,renderFoldButton:r})=>{const[s,a]=i(t),o=l((()=>{a((e=>!e))}),[]),c=n({isUnfolded:s,onToggle:o}),d=r?r({isUnfolded:s,onToggle:o}):null;return h("div",e?{children:[d,c]}:{children:[c,d]})})),V=u((({className:e="",isUnfolded:t,children:n})=>{const i=a(null);return r((()=>{i.current&&(i.current.style.maxHeight=t?`${i.current.scrollHeight}px`:"")}),[t,n?.length]),m("div",{ref:i,className:`transition-max-h duration-300 overflow-hidden ${i.current||!t?"max-h-0":""} ${e}`,children:n})})),M={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},B=u((({className:e="",imageClassName:t="",name:n="",alt:i=`Иконка ${n}`,title:r=i,iconVersion:l="color",asSVG:s,...a})=>{const c=`${o.CDN||""}icons/${n}.svg`;return s&&"normal"!==l?m(F,{className:e,children:h("svg",{className:[P(e,a.width),M[l],t,L(l)].join(" "),...a,"aria-hidden":"true",children:[r?m("title",{children:r}):null,i?m("desc",{children:i}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:i,title:r,...a,"aria-hidden":"true"})})),L=e=>"white"===e?"invert":"",P=(e,t)=>t?`width: ${t}px `:"w-full h-full",F=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t));function E(e){return"string"==typeof e?"normal":e?.iconVersion||"normal"}const z=(e,t)=>e.media&&t.media?e.media-t.media:0,G=u((({className:e="",image:t,imageClassName:n="",isMobile:i=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${i?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(z).map((({src:e,format:n,media:i},r)=>m("source",{srcSet:e,type:J(n),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,H(t,n,i)]})})),H=(e,t="",n=!1)=>{const i={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",l=e.alt||e.title,s=n?"m-auto":"m-0";return m("img",{src:e.src,className:`${s} ${t}`,alt:l,title:r,style:i,...e.size})};function J(e){return e?`image/${String(e)}`:void 0}const U=u((({className:e="",image:t,imageClassName:n="",isMobile:i,...r})=>{if(!t)return null;const l="string"==typeof t?t:t.icon;return l||""===l?l.length?m(B,{className:e,imageClassName:n,iconVersion:E(t),name:l,...r}):null:m(G,{className:e,imageClassName:n,image:t,isMobile:i})})),W=u((e=>m(U,{...e,isMobile:!0}))),Y=u((e=>{const{size:t="",color:n="",align:i="",font:r="",children:l}=e;return m("span",{className:`font-sans ${t} ${n} ${i} ${r}`,children:l})})),K=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),X=["PlusIcon","MinusIcon"],q=u((({className:e="",label:t="",labelIcon:n,isExpanded:i,...r})=>{const{bordered:l}=function(e,t){const{content:n}=function(e){return e?.parent||{}}(e);return n||t}(r.options,{});return m("li",{className:`${l?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"} border-solid border-main-divider ${e}`,children:m(O,{isFoldButtonOnTop:!0,unfoldedByDefault:i,renderFoldableSection:({isUnfolded:e})=>m(V,{className:"flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0",isUnfolded:e,children:w(r)}),renderFoldButton:({isUnfolded:e,onToggle:i})=>m(Q,{className:l?"":"py-3.5 px-0",label:t,icon:X[Number(e)],primaryIcon:n,onClick:i})})})}));q.childrenTypes=[];const Q=u((({className:e,icon:t,label:n,primaryIcon:i,onClick:r})=>h("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text group cursor-pointer ${e}`,onClick:r,children:[h("div",{className:"flex group-hover:text-primary-main",children:[i?m(W,{image:K(i),className:"mr-3 flex-shrink-0",width:"24",height:"24",asSVG:!0}):null,m(Y,{size:"text-m-title-xs",font:"font-medium",children:n})]}),m(W,{className:"flex-shrink-0",image:K({icon:t}),width:"24",height:"24",asSVG:!0})]}))),Z=u((({className:e="",style:t,idx:n,activeIndex:i,observerOptions:r,children:s,onIntersection:a})=>{const o=$(l((e=>{e.length&&a&&a(n||0,e[e.length-1])}),[a,n]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(n===i),ref:o,children:s})})),ee=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],te=u((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:i=0,gap:r=0,padding:s=0,snapAlign:o="snap-center",children:c,onVisibleItemsChange:d,onVisibleIndicesChange:h})=>{const u={sensitivity:1,rootRef:t},p=a([]),g=l(((e,t)=>{const n=[...p.current||[]];n[e]=t,p.current=n,d&&d(n),h&&h(ie(n))}),[d,h]),b=i>0?r*Number(i)-1:0;return m("div",{className:`box-border overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...ne(s,b),gap:`${r}px`},role:"list",ref:t,children:(x=(e,t)=>m(Z,{className:`${o} ${i?ee[i-1]:""}`,style:ne(s/4),activeIndex:n,idx:t,observerOptions:u,onIntersection:g,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(x):x(e,0))(c)});var x})),ne=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),ie=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),re=u((({containerRef:e,activeIndex:t,dotCount:n=0})=>n?m("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:new Array(n).fill(null).map(((n,i)=>m("div",{className:"cursor-pointer bg-primary-main h-2 rounded-full transition-width duration-300 "+(i===t?"w-6":"w-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(i)},String(i))))}):null)),le=e=>e,se=(e=le)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ae=(e=le)=>se((t=>-e(t))),oe=e=>t=>e.scrollWidth/t,ce=e=>(t,n)=>{e.scrollBy({left:n*oe(e)(t),behavior:"smooth"})},de=({itemCount:e,isCyclic:t,onVisibleIndicesChange:n})=>{const r=a(null),[s,o]=i([]),c=l((e=>{o((t=>{return(n=t)===(i=e)||Boolean(n&&i&&n?.length===i?.length&&n.every(((e,t)=>e===i[t])))?t:e;var n,i})),n&&n(e)}),[e]),[d,m]=s.length?[ae()(s),se()(s)]:[-1,-1],h=d>0,u=m<e-1,p=l((()=>{var n;r.current&&(t&&!h?(n=r.current).scrollTo({left:n.scrollWidth,behavior:"smooth"}):ce(r.current)(e,-1))}),[t,e,h]),g=l((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):ce(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:g,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},me=u((({className:e,gap:t=14,padding:n=16,showDots:i=!0,children:r,onVisibleIndicesChange:l})=>{const s=Array.isArray(r)?r.length:0,[a,o]=de({itemCount:s,onVisibleIndicesChange:l}),[c]=o.visibleIndicesRange;return h("div",{className:e,children:[m(te,{containerRef:a,activeIndex:c,visibleItemCount:1,gap:t,padding:n,onVisibleIndicesChange:o.handleVisibleIndicesChange,children:r}),i?m(re,{containerRef:a,activeIndex:c,dotCount:s}):null]})}));const he=e=>e?.includes("//"),ue=e=>(e||"").replace(/\/?\?.*/,""),pe=e=>{if(!e||!he(e))return;const t=e,n=t.indexOf("//"),i=t.indexOf("/",n+"//".length);return-1!==i?t.substring(0,i):t},ge=e=>e?.startsWith("#");var be=Object.freeze({__proto__:null,isURL:he,withoutQuery:ue,getOrigin:pe,getHash:e=>{if(!e||!he(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:ge});const xe=(e,t)=>xe._impl(e,t);function fe(){return fe._impl()}function Ne(){const e=fe(),t=T.inst;return n=>{const i=((e,t)=>{if(!e)return e;const n=pe(t?.href);return n?e.replace(n,"")||"/":e})(n.href,e);return{...n,href:i,"aria-label":n.text,onClick:xe((r=>{n.onClick&&n.onClick(r);const l=i&&!he(i),s=!n.target||"_self"===n.target;l&&s&&(r?.preventDefault(),ge(i)?t.goto(i):e.push(i))}),n)}}}xe._impl=e=>e,xe.setup=e=>{xe._impl=e},fe._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),fe.setup=e=>{fe._impl=e};const ye={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:""},ve="bg-main-divider text-main-disabled",we={primary:ve,secondary:ve,white:ve,link:""},ke="text-center font-sans select-none",$e={primary:"group-hover:brightness-0 group-hover:invert",secondary:"group-hover:brightness-0 group-hover:invert",white:"group-hover:brightness-0 group-hover:invert",link:""},Ce=u((e=>{const{text:t,aboveText:n,appendLeft:i,appendRight:r,version:l="primary"}=e;return h("div",{className:Se(e),children:[i?m("div",{className:$e[l],children:i}):null,Te(e)?h("div",{children:[n?m("div",{className:"text-xs-light text-left",children:n}):null,m("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:$e[l],children:r}):null]})})),Se=e=>{const{version:t,aboveText:n,rounded:i}=e;if("link"===t)return"";const r="gap-2 "+(n?"py-2.5 px-7":"py-4 px-4");return["group flex items-center justify-center",Te(e)?r:"h-12 w-12",i?"rounded-full":""].join(" ")},Te=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),_e=({className:e,rounded:t,version:n})=>["inline-block",ke,n?we[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ie=({className:e,rounded:t,version:n})=>[ke,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border",n?ye[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Re=u((({disabled:e,children:t,...n})=>{const i=Ne()(n),r=t??m(Ce,{...i});return m(e?De:je,{...i,children:r})})),je=u((({className:e="",href:t,rel:n,target:i,ariaLabel:r,version:l,rounded:s,onClick:a,children:o})=>m("a",{className:Ie({className:e,version:l,rounded:s}),href:t,rel:n,target:i,"aria-label":r,role:t?"link":"button",onClick:a,children:o}))),De=u((({className:e,ariaLabel:t,version:n,rounded:i,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:_e({className:e,rounded:i,version:n}),children:r}))),Ae=(e=!1)=>e?"text-white":"",Oe=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Ve=u((({icon:e,image:t,title:n,subtitle:i,isFillGradient:r})=>h("div",{role:"columnheader",children:[e?m(W,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&m("div",{className:"mb-3.5",children:m(W,{image:t})}),n?m(R,{headingType:"h4",className:Ae(r),title:n}):null,i?m("div",{className:Oe(r),children:i}):null]}))),Me=u((({cell:e,rowHeader:t,isFillGradient:n=!1})=>m("div",{className:"box-border flex flex-col",role:"cell",children:m("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Be(n,t))})}))),Be=(e,t)=>({label:n,description:i},r)=>h("div",{className:"flex justify-between text-s py-3.5",children:[m("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),h("div",{className:"basis-1/2",children:[n?m("div",{className:"text-right "+(e?"text-white":""),children:n}):null,i?m("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:i}):null]})]},String(r)),Le=u((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:i,showRow:r,onToggleColumn:l})=>{const s=t?.slice(0,r?t.length:n),a=i?"secondary":"primary";return h("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${i?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[m(Ve,{...e,isFillGradient:i}),s?.length?s.map((({rowHeader:e,cell:t},n)=>m(Me,{cell:t,rowHeader:e,isFillGradient:i},String(n)))):null,r&&e?.link?m(Re,{href:e.link.href,target:e.link.target,version:a,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}):null,Pe({onToggleColumn:l,isFillGradient:i,showRow:r})]})})),Pe=({onToggleColumn:e,isFillGradient:t,showRow:n})=>m("div",{className:"mt-5",role:"cell",children:m("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),Fe=u((e=>{const{className:t,title:n}=e;return h("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${t||""}`,children:[n?m(R,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,m("div",{role:"table",children:m(Ee,{...e})})]})})),Ee=u((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:r,orientation:s,...a})=>{const[o,c]=i(new Array(e.length).fill(!r)),d=l((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),h=l((()=>c((e=>new Array(e.length).fill(!1)))),[]),u=e?.map((({data:e,header:i},l)=>{return m(Le,{visibleRowLength:r,showRow:o[l],header:i,columnData:(s=e,s?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===l&&n,onToggleColumn:()=>d(l),...a},String(l));var s}));return"horizontal"===s?m(me,{onVisibleIndicesChange:h,children:u}):u})),ze=new Map;function Ge(e,t,{fallback:n}={}){const l=s((()=>He(e)),[e]),[a,o]=i(),[c,d]=i(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!l.every((e=>null===e)))try{const e=t(...l);"then"in e?(e=>{e.then((e=>ze.get(l)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...l]);const u=l[0],p=n&&"string"==typeof u&&n[u];return{data:a||c||!p?a:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function He(e){return e?Array.isArray(e)?e:e instanceof Function?He(e()):[e]:[e]}async function Je(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Ue(e,t={}){const{data:n}=Ge(`/wcms-resources/${e}.json`,Je,{fallback:t});return n||{}}const We=u((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:r}=(()=>{const[e,t]=i("");return{term:e,setTerm:e=>t(e)}})(),l=t?"text-s":"text-l-light",s=t?" placeholder-transparent":"h-full",a=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(W,{image:"LoupeIcon",width:"24",height:"24"})}),n?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${l}`,children:"Поиск по сайту"})]}),m("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${s}`,value:n,onChange:e=>r(e.target.value),type:"text",name:"search-bar-input",placeholder:a}),t?m("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),r("")},children:m(W,{image:"CloseIcon",width:"24",height:"24"})}):m(Re,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),Ye=u((e=>m(We,{...e,isMobile:!0}))),Ke=u((({className:e="",documents:t,...n})=>m(_,{className:`font-sans bg-white mt-2.5 ${e}`,...n,children:m("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?Xe(t):null})}))),Xe=e=>e.map(((e,t)=>{const{text:n,...i}=e;return m("li",{className:"mb-4 list-none",children:m("a",{className:"hover:text-primary-main",role:"link",...i,children:n||null})},`list_item_${String(t)}`)})),qe={"bg-white":"color",transparent:"white"},Qe={"bg-white":"text-primary-main",transparent:"text-white"},Ze=(e,t,n)=>m(W,t?.src?{image:t,className:Qe[e],width:n?.width,height:n?.height,asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:qe[e]},className:Qe[e],width:n?.width,height:n?.height,asSVG:!0}),et={"bg-white":"text-primary-text",transparent:"text-white"},tt=(e,t,n)=>m("span",{className:`${et[t]} ml-2.5 font-medium ${n||""}`,children:e||"Россельхозбанк"}),nt=u((({bgColor:e="bg-white",children:t,className:n="",href:i,logo:r,showTitle:l=!0,targetBlank:s})=>h("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:i||"https://rshb.ru/",target:s?"_blank":"_self","aria-label":r?.title||"Россельхозбанк",children:[Ze(e,r?.image,{width:"34",height:"34"}),l?tt(t||r?.title,e,"text-s"):null]}))),it=u((({className:e="",title:t="Мобильное приложение",description:n,href:i="#"})=>m("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:i?h("div",{className:"flex",children:[m("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-12 h-12",children:m(nt,{className:"w-8",bgColor:"transparent",showTitle:!0})}),h("a",{href:i,target:"_blank",className:"flex flex-col justify-center pl-3",children:[m("div",{className:"text-s font-medium mb-[3px]",children:t}),m("div",{className:"text-s text-secondary-text",children:n})]})]}):null}))),rt=u((({className:e="",items:t,hasButton:n})=>h("div",{className:e,children:[t?.length?t.map(lt):null,n?m(Re,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),lt=(e,t)=>{const{type:n,text:i,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:st(n,i)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},st=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${at(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},at=e=>e.replaceAll(/\D/g,""),ot=u((({className:e="",index:t,text:n,...i})=>{const r=Ne(),{href:l,target:s,onClick:a}=r(i);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:l,target:s,onClick:a,children:n||`Документ ${t}`})})),ct=u((({title:e,links:t,className:n=""})=>h("div",{className:n,children:[m("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?m("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>m(ot,{index:t,className:"text-s",...e},String(t))))}):null]}))),dt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],mt=u((({version:e="primary",...t})=>{const n=Ne(),{href:i,onClick:r}=n(t),{icon:l,label:s}=dt.find((({origins:e})=>e.some((e=>i?.includes(e)))))||{};if(!l)return null;return m("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===e?"bg-white hover:bg-secondary-hover":"border-solid border border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===e?"hover:text-black":""}`,href:i,"aria-label":s,target:"_blank",rel:"noopener noreferrer",onClick:r,children:l?m(W,{image:K(l),imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),ht=u((({className:e="",media:t,version:n})=>m("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e}`,children:t?.map(((e,t)=>m(mt,{version:n,...e},String(t))))}))),ut=u((({className:e="",index:t,...n})=>{const i=Ne(),{href:r,target:l,text:s,onClick:a}=i(n);return m("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:a,children:s||`Документ ${t}`})})),pt=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"py-6",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>m(ut,{index:t,...e},String(t))))}):null]}))),gt=u((({className:e="",...t})=>{const n=t.options?.page?.fallback,i=Ue(o.SITEMAP||"sitemap",n),{documents:r,relatedEnterprises:l,contacts:s,socialMedia:a,horizontalNavigationTitle:c}=Ue(o.FOOTER||"footer",n);return h("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[m(rt,{className:"overflow-hidden",items:s,hasButton:!0}),m(D,{children:i.topItems?.map(((e,t)=>m(q,{label:e.text,children:m(Ke,{documents:e.items})},String(t))))}),m("div",{children:i?.dispositions?.map(bt)}),m(it,{title:"Мобильное приложение",description:"Загрузить для IOS и Android",...t}),m(Ye,{className:"grow"}),m(ht,{className:"pb-4",media:a}),m(ct,{title:c,links:l}),m(pt,{links:r})]})})),bt=(e,t)=>{const{icon:n,href:i,text:r}=e;return h(Re,{version:"link",href:i,className:"flex text-s mb-4 w-6",children:[n?m(W,{className:"pr-1",image:K(n),width:"24",height:"24",asSVG:!0}):null,m("span",{className:"pl-2.5 font-medium text-primary-text",children:r})]},`footer-${t}`)},xt={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ft=u((({title:e,description:t,cards:n=[],className:i,orientation:r="horizontal"})=>h("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${i}`,children:[h("div",{className:"flex flex-col items-center mb-5",children:[e?m(R,{headingType:"h3",className:`text-center ${t?"mb-2":"mb-5"}`,title:e}):null,t?m("div",{className:"text-m max-w-[600px] text-center mb-5",children:t}):null]}),Nt(r,n)]})));function Nt(e,t){return"horizontal"===e?m(me,{children:t?.map(yt)}):m("div",{className:"grid gap-3.5",children:t?.map(yt)})}function yt(e,t){return h("div",{className:`w-full h-full flex flex-col justify-between shrink-0 box-border snap-start snap-always border-solid border rounded-md border-main-stroke p-4\n ${xt[e.version??"primary"]}`,children:[h("div",{children:[vt(e.icon),e.title?m("h3",{className:"text-m-title-xs font-medium m-0",children:e.title}):null,e.description?wt(e):null,e.items?.length?$t(e.items,e.isDotted,e.version):null]}),e?.button?.text?(n=e.button,m(Re,{className:"mt-3",...n})):null]},t);var n}const vt=e=>e?.src||e?.icon?m("div",{className:"flex justify-center",children:m(W,{className:"mb-3.5",image:e})}):null;function wt(e){return m("div",{className:"text-secondary-text mt-1 text-s "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}const kt={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"};function $t(e,t,n="primary"){return m("section",{className:"mt-3",children:e.map(((e,i)=>h("div",{children:[t?m("div",{className:`rounded-full inline-block mr-3 mt-2 w-2 h-2 min-w-2 min-h-2 ${kt[n]}`}):null,m("span",{className:"text-m font-medium",children:e.title}),m("span",{className:"text-s pl-2 "+("primary"===n?"text-secondary-text":""),children:e.text})]},String(i))))})}const Ct=(e,t,n=((e,t)=>t.startsWith(e)))=>n(ue(e),ue(he(e)?t.href:t.pathname)),St=e=>t=>Ct(t.href,e),Tt=e=>t=>t.items?.some(St(e))||Ct(t.href,e)||((e,t)=>pe(e)===pe(t.href))(t.href,e),_t="absolute left-0 -bottom-3 w-full h-0.5",It=u((({className:e="",text:t,href:n,target:i,active:r,onClick:l,children:s,bgColor:a="bg-white"})=>h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:n,target:i,onClick:l,children:[m("span",{className:Rt(a,r),children:t||s}),r?m("div",{className:jt(a,r)}):null]}))),Rt=(e,t=!1)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans text-s`},jt=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${_t}`:_t,Dt=864e5;function At(e,t,n=globalThis?.localStorage){const i=l((async(...i)=>{const r=`async:${e}`,l=function(e){const{data:t=null,timestamp:n=null}=e?JSON.parse(e):{};return t&&Date.now()-n<Dt?t:void 0}(n.getItem(r));if(l)return l;const s=await t(...i);return n.setItem(r,JSON.stringify({data:s,timestamp:Date.now()})),s}),[e,t]);return Ge(e,i)}const Ot=globalThis?.localStorage.getItem("location"),Vt=Ot?JSON.parse(Ot):null;const Mt=u((({burgerSubMenu:e,onClick:t,defaultLocation:n="",children:s})=>{const[a]=function(e){const[t,n]=i(Vt?.region??{name:e}),{data:s}=At("/api/v1/region",Je);return r((()=>{n(Vt?.region&&Vt?.manual?Vt.region:s||{name:e})}),[s]),[t,l((e=>{globalThis?.localStorage.setItem("location",JSON.stringify({manual:!0,region:e})),n(e)}),[n])]}(n);return h("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[m("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:t,children:m(W,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),h("button",{className:"flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer",children:[m(W,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),m(Y,{color:"text-secondary-text",children:a.name})]}),s,m("div",{className:"mb-7",children:e?.map(Bt)}),m(Ye,{className:"grow"})]})})),Bt=(e,t)=>{const{icon:n,href:i,text:r}=e;return h("a",{href:i,className:"flex text-s mb-4 hover:text-primary-main",children:[n?m(W,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,m("span",{className:"font-medium pl-0.5",children:r})]},`headerSubMenu-${t}`)},Lt=u((({onClick:e,bgColor:t,logo:n})=>h("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-12",children:[h("div",{className:"flex items-center",children:[m("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:m(W,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),m(nt,{className:"mr-8",bgColor:t,logo:n})]}),m("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-s border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),Pt=u((({className:e="",bgColor:t="bg-white",...n})=>{const r=fe(),s=n.options?.page?.fallback,{topItems:a,dispositions:c,defaultLocation:d,logo:u}=Ue(o.SITEMAP||"sitemap",s),p=a?.find(Tt(r)),g=p?.items,b=(e=>(t=[])=>{const n=t?.filter(St(e));return n?.length?se((e=>e.href?.length||0))(n):void 0})(r)(g),[x,f]=i(!1),N=l((()=>f((e=>!e))),[]);return h("header",{className:`${t} ${e}`,children:[h("div",{className:"container px-4 py-0 box-border",children:[m(Lt,{onClick:N,bgColor:t,logo:u}),m("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-12",children:m("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:g?.map(((e,n)=>m(It,{className:"mr-8 whitespace-nowrap text-s",active:e===b,bgColor:t,...e},String(n))))})})]}),x?m(Mt,{onClick:N,burgerSubMenu:c,defaultLocation:d,children:m(D,{children:a?.map(((e,t)=>m(q,{label:e.text,children:m(Ke,{documents:e.items})},String(t))))})}):null]})})),Ft={left:"text-left",center:"text-center",right:"text-right"},Et={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"}},zt=u((({bgColorHeadline:e="transparent",className:t="",title:n,description:i,image:r,align:l="left"})=>{const s=Et[e];return h("section",{className:`px-4 py-6 flex flex-col gap-2.5 ${s.background} ${t}`,children:[n?m(R,{headingType:"h2",className:`${s.text} ${Ft[l]}`,title:n}):null,i?m("p",{className:`text-m ${s.description} ${Ft[l]}`,children:i}):null,r?.src&&m("div",{className:"mt-2.5 mx-auto flex justify-center",children:m(W,{image:r})})]})})),Gt=u((({className:e,iconClassName:t,textClassName:n,suffixClassName:i,doc:r,icon:l})=>{const{text:s,fileSize:a,...o}=r;return h("a",{className:e,role:"link",...o,children:[l?m(W,{className:t,image:K(l),width:"24px",height:"24px",asSVG:!0}):null,s?h("span",{className:n,children:[s,m("span",{className:i,children:o?.href&&Ht(Jt(o.href),a)})]}):null]})})),Ht=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Jt=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Ut=u((({className:e="",doc:t,icon:n})=>m(Gt,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),Wt=u((({hasBorder:e=!0,documents:t,icon:n})=>m(me,{className:"text-s text-primary-main mt-5",children:t?.length?t.map(((t,i)=>m(Ut,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:n},String(i)))):null}))),Yt=u((({hasBorder:e=!0,documents:t,icon:n})=>m("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>m("div",{role:"listitem",children:m(Ut,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:n})},String(i)))):null}))),Kt=u((({className:e="",title:t,description:n,icon:i={icon:"DocIconMonoColor"},documents:r,orientation:l="vertical",hasBorder:s=!0,...a})=>h("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[m(zt,{className:"!p-0 "+(n?"gap-2":"gap-5"),title:t,description:n,align:"center",...a}),m("vertical"===l?Yt:Wt,{hasBorder:s,documents:r,icon:i})]}))),Xt=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function qt(e=""){const t=Xt(e);return t<=4?"S":t<=8?"M":"L"}function Qt(e=""){const t=Xt(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function Zt(e=""){const t=Xt(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const en=u((({className:e,title:t,description:n="Блок в разработке...",...i})=>h(_,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Zt(e)} ${Qt(e)} `,...i,children:[m(zt,{className:"!p-0 max-w-[600px]",title:t,description:n,headlineVersion:qt(e),...i}),m("figure",{className:"m-0 min-w-[80%]",children:tn()})]}))),tn=(e=3)=>rn(100,e).map((e=>Math.floor(e))).map(nn),nn=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),rn=(e,t)=>[e].concat(t>0?rn(e/1.618,t-1):[]),ln=u((({className:e="",buttons:t})=>t&&t?.length?m("div",{className:e,children:t.map(((e,t)=>sn({button:e,index:t})))}):null));function sn({button:e,buttonClassName:t,index:n}){const{icon:i,iconRight:r,version:l,text:s,...a}=e,o="secondary"===l?"color":"white",c=an({...i,iconVersion:o}),d=an({...r,iconVersion:o});return s?m(Re,{className:t,appendLeft:c,appendRight:d,version:l,text:s,...a},n?String(n):""):null}const an=e=>{if(!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(W,{image:{...e},width:t,height:"24",asSVG:!0})},on={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"},cn={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},dn=u((({className:e="",isDotted:t=!0,children:n,version:i="primary",size:r="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block ${on[i]} ${cn[r]}`})}):null,m("span",{children:n})]}))),mn={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},hn={S:"text-l-light",M:"text-h6",L:"text-h5"},un={S:"ml-2",M:"ml-3",L:"ml-4"},pn=u((e=>{const{className:t="",hasIndent:n,isDotted:i,itemClassName:r="",items:l,listItemSize:s="M",version:a="primary"}=e;return l?.length?m("section",{className:`${mn[a]} ${hn[s]} ${t} ${n?un[s]:""}`,role:"list",children:l.map(((e,t)=>m(dn,{className:`${r} mb-1.5`,isDotted:i,version:a,size:s,children:e},String(t))))}):null})),gn=u((({className:e="",title:t="",buttons:n,image:i,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),n?m("div",{className:"mt-auto pt-8",children:n}):null]}),i]})]}))),bn={primary:"text-primary-text",secondary:"text-white"},xn={primary:"text-secondary-text",secondary:"text-white"},fn=u((e=>{const{className:t="",icon:n,label:i,description:r,version:l="primary",benefitsVersion:s="normal"}=e,a="white"===s?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[n?m("div",{className:Nn(l,s),children:m(W,{className:"w-6 h-6",image:K(n,a),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[i?m("div",{className:`text-h6 ${bn[l]}`,children:i}):null,r?m("div",{className:`text-m-light ${xn[l]}`,children:r}):null]})]})}));function Nn(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${n}`}const yn=(e="primary",t="normal")=>({icon:n,label:i,description:r},l)=>m(fn,{icon:n,label:i,description:r,version:e,benefitsVersion:t},String(l)),vn=u((({className:e="",headlineVersion:t="L",benefits:n,benefitsVersion:i="normal",buttons:r,image:l,items:s,version:a="primary",isDotted:o=!0,label:c,...d})=>h("div",{className:`w-full ${e}`,children:[h("div",{children:[c?$n(c,a):null,m(zt,{className:"!p-0 max-w-[600px]",bgColorHeadline:a,headlineVersion:t,...d}),h(gn,{buttons:r?.length?m(ln,{buttons:r,className:"flex flex-col mt-5 gap-2.5"}):null,children:[n?.filter((e=>e.label))?.length?m("div",{className:"mt-3",children:n.map(yn(a,i))}):null,s?.length?m(pn,{className:"mt-3 text-m",items:s,version:a,isDotted:o}):null]})]}),wn(l)]})));function wn(e){return e?.src?m(W,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const kn={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},$n=(e,t)=>m("div",{className:`px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${kn[t]}`,children:e}),Cn=u((e=>{const{className:t="",version:n="primary"}=e;return m("section",{className:`font-sans bg-white px-4 py-6 ${xt[n]} ${t}`,children:m(vn,{...e})})})),Sn={primary:{background:"bg-white",title:"text-primary-text",description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{background:"bg-primary-main",title:"text-white",description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},Tn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-12 w-12 min-w-12 min-h-12"},_n={normal:"min-h-[70px]",small:"min-h-12"},In=u((({className:e,title:t,description:n,showLines:i=!0,steps:r,size:l="normal",version:s="primary"})=>{const a=Sn[s];return h("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${a.background} ${a.title} ${e||""}`,children:[t?m(R,{headingType:"h3",className:`text-center ${a.title}`,title:t}):null,n?m("p",{className:`text-m-light text-center ${a.description} ${t?"mt-2":""}`,children:n}):null,r?.length?m("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:m("div",{className:"flex flex-col justify-between gap-x-[101px]",children:r.map(Rn(l,s,i))})}):null]})})),Rn=(e,t,n)=>(i,r,l)=>{const s=l.length-1===r,a="normal"===e?"ml-[34px]":"ml-6",o=Sn[t];return m("div",{children:h("div",{className:"flex flex-row text-center relative",children:[h("div",{className:"overflow-hidden flex-shrink-0",children:[jn(e,t)(i,r),s?null:m("div",{className:`min-h-8 h-full w-0.5 ${n?o.iconConnector:""} ${a}`})]}),h("div",{className:`flex flex-col justify-center h-fit ${_n[e]}`,children:[i.label?m("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:i.label}):null,i.description?m("div",{className:`text-s ${o.description} text-left`,children:i.description}):null]})]})},String(r))},jn=(e,t)=>(n,i)=>{const r=Sn[t],l="normal"===e?"38":"27",s="normal"===e?"text-m-title":"text-m-title-xs";return m("div",{className:`${Tn[e]} ${r.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:m("span",{className:`font-medium flex self-center ${r.title} ${s}`,children:(a=n?.icon,Boolean(a?.icon||a?.src)?m(W,{image:K({...n.icon},t),width:l,height:l,asSVG:!0}):m("span",{children:i+1}))})});var a},Dn={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({rounded:e,icon:t,...n},i)=>sn({button:{rounded:e,icon:t,...n},buttonClassName:`mt-3 ${i>0&&e?"ml-2.5":""} ${t?"w-12 h-12":""}`,index:i})))}):null,Img:({image:e})=>e?.src?m(W,{image:{...e,className:"m-0"}}):null,List:({isDotted:e,...t})=>m(pn,{className:"flex flex-col justify-between items-start text-m",version:"gray",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-xl font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-s text-secondary-text",children:t}):null]})},An=u((({title:e,icon:t})=>h("div",{className:"flex gap-2.5 mb-2",children:[e?m(R,{headingType:"h3",className:"font-medium",title:e}):null,t?m(W,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),On=u((({tile:e,...t})=>h("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[m(An,{...e?.header}),e?.data?.length?e.data.map(((e,n)=>h("div",{children:[n>0?m("div",{className:"h-5"}):null,Vn(e,t)]},String(n)))):null]})));function Vn(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Dn))return null;const n=Dn[e.tableCellType];return m(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const Mn=u((({tiles:e,...t})=>e?.length?m(me,{...t,children:e.map(((e,n)=>m(On,{tile:e,...t},String(n))))}):null)),Bn=u((({tiles:e,...t})=>e?.length?m("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>m(On,{tile:e,...t},String(n))))}):null)),Ln=u((({className:e,title:t,description:n,tariffsColumns:i,rowHeaders:r,orientation:l="vertical",...s})=>{const a=Pn(i),o=Fn(r,a);return h("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[t?m(R,{headingType:"h2",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?m("div",{className:"mb-5 text-center text-m",children:n}):null,m("vertical"===l?Bn:Mn,{tiles:o,...s})]})})),Pn=e=>e?.[0]?.data?e[0].data:[],Fn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),En={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"}},zn=u((({title:e,description:t,blockVersion:n="primary",iconVersion:i,image:r,className:l="",items:s,isDotted:a=!0})=>{const o=En[n],c="secondary"===n?"secondary":"gray";return h("section",{className:`font-sans px-4 py-[18px] flex flex-col ${o.background} ${l}`,children:["small"===i?Gn(o.icon):null,"big"===i?Hn(r):null,h("div",{className:"py-0.5",children:[e?m("div",{className:`text-l font-medium mb-1 ${o.title}`,children:e}):null,t?m("div",{className:`text-s ${o.description}`,children:t}):null,s?.length?m(pn,{className:"mt-1 text-m",items:s,isDotted:a,version:c}):null]})]})}));function Gn(e){return m("div",{className:"mb-3",children:m("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Hn(e){return e?.src?m(W,{className:"pb-3 mr-auto",image:e}):null}const Jn={Accordion:A,AccordionItem:q,ComparisonTable:Fe,Footer:gt,Gallery:ft,Header:Pt,Headline:zt,LinkDocs:Kt,LinkList:Ke,MobileAppTile:it,ProductBlock:Cn,StepsBlock:In,TariffsTable:Ln,TextBlock:zn,Placeholder:en},Un=["Header","Footer"],Wn=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Yn(e=T.inst,t=globalThis){const n=a(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{n.current&&n.current.set(e,t)}))),[e]),r((()=>{const i=((e,t=600)=>{let n;const i=(...r)=>{i.dispose(),n=setTimeout((()=>{e(...r)}),t)};return i.dispose=()=>{n&&clearTimeout(n)},i})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!Un.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?ae(Wn)(t):[];return n}([...n.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",i),()=>{i.dispose(),t.removeEventListener("scroll",i)}}),[e,t])}const Kn=d();const Xn=u((({className:e,onClick:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:qn()}))),qn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},Qn=u((({className:e=""})=>{const t=function(e){const[t,n]=i(0);return r((()=>{(async()=>{const[t]=await Kn.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:l((async()=>{n(await Kn.like(e))}),[e]),dislike:l((async()=>{n(await Kn.dislike(e))}),[e])}}(fe().pathname);return h("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:[m(Xn,{onClick:xe(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(Xn,{onClick:xe(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),Zn=u((e=>{const{className:t="",blocksRegistry:n,blockDecorator:i,data:r={}}=e,{style:l,blocks:s,slots:a,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:n,blockDecorator:i,parent:r};return Yn(),h("section",{className:`relative ${g(l)} ${t}`,"data-theme":c,children:[a?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:v(a?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[v(s,d),a?.footer?v(a?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(Qn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));Zn.childrenTypes=[],Zn.slots=()=>["header","footer"];e.Blocks=Jn,e.ContentPage=Zn,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.LikeAPI=d,e.handlerDecorator=xe,e.joinList=function(e){return t=>t.reduce(((t,n,i)=>t.length?t.concat({...e,key:i},n):[n]),[])},e.packageVersion="0.6.42",e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=be,e.useRouter=fe,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -0,0 +1,5 @@
1
+ import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
3
+ export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {
4
+ }
5
+ export declare const CarouselRecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
@@ -0,0 +1,44 @@
1
+ import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
+ import type { LinkCommonProps } from '../../model/LinkProps';
4
+ import type { Picture } from '../../model/Picture';
5
+ import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
+ /**
8
+ * @title Карточка рекомендаций
9
+ */
10
+ export interface CarouselRecommendationCardContent extends HeadlineCommonProps, ListContent {
11
+ /**
12
+ * @title Соц сети
13
+ * @minItems 3
14
+ * @default [
15
+ * { "href": "https://t.me" },
16
+ * { "href": "https://vk.com" },
17
+ * { "href": "https://ok.ru" },
18
+ * ]
19
+ */
20
+ socialMedia?: LinkCommonProps[];
21
+ /**
22
+ * @default {
23
+ * "format": "webp",
24
+ * "size": {
25
+ * "width": 290
26
+ * },
27
+ * "sources": [{
28
+ * "media": 1279,
29
+ * "width": 174,
30
+ * "format": "webp",
31
+ * "alignment": "southeast"
32
+ * }]
33
+ * }
34
+ */
35
+ image?: Picture;
36
+ /**
37
+ * @default {
38
+ * "text": "",
39
+ * "version": "secondary"
40
+ * }
41
+ */
42
+ button?: ButtonProps;
43
+ version?: BlockVersion;
44
+ }
@@ -1,8 +1,10 @@
1
1
  import type { BgColorVersion } from '../../model/BgColorVersion';
2
+ import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
2
3
  interface HeaderSecondaryMenuContent {
3
4
  defaultLocation?: string;
4
5
  officesLink?: string;
5
6
  bgColor?: BgColorVersion;
7
+ foreignOffices?: ForeignOffice[];
6
8
  }
7
9
  export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent {
8
10
  className?: string;
@@ -0,0 +1,2 @@
1
+ import type { AsyncDataResponse, Fetcher } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
2
+ export declare function useCachedAsyncData<Data = any>(key: string, fetcher: Fetcher<Data, string>, storage?: any): AsyncDataResponse<Data>;
@@ -0,0 +1,6 @@
1
+ export interface RegionData {
2
+ id?: number;
3
+ code?: string;
4
+ name?: string;
5
+ }
6
+ export declare function useLocation(defaultLocation: string): [RegionData, (newLocation: RegionData) => void];
@@ -0,0 +1,6 @@
1
+ export interface Region {
2
+ id?: number;
3
+ code?: string;
4
+ name?: string;
5
+ }
6
+ export declare function useRegions(): Region[];
@@ -17,10 +17,18 @@ export interface DispositionItem extends LinkProps {
17
17
  /** @hidden */
18
18
  icon?: Picture;
19
19
  }
20
+ /**
21
+ * @title Представительства за рубежом
22
+ * @required ["text", "href"]
23
+ */
24
+ export interface ForeignOffice extends LinkProps {
25
+ icon?: Picture;
26
+ }
20
27
  export interface SitemapDataProps {
21
28
  topItems?: TopMenuItem[];
22
29
  dispositions?: DispositionItem[];
23
30
  logo?: LogoType;
31
+ foreignOffices?: ForeignOffice[];
24
32
  defaultLocation?: string;
25
33
  officesLink?: string;
26
34
  }
@@ -0,0 +1,19 @@
1
+ import type { Region } from '../../hooks/useRegions';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
3
+ import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
4
+ interface RegionLinkProps {
5
+ onChangeLocation?: (region: Region) => void;
6
+ }
7
+ interface CloseButtonProps {
8
+ close?: () => void;
9
+ }
10
+ interface CurrentLocationProps {
11
+ currentLocation?: Region;
12
+ }
13
+ interface ForeignOfficeProps {
14
+ foreignOffices?: ForeignOffice[];
15
+ }
16
+ export declare type LocationProps = ForeignOfficeProps & CloseButtonProps & RegionLinkProps & CurrentLocationProps & UniBlockProps;
17
+ export declare const Location: import("@redneckz/uni-jsx").UNIComponent<LocationProps, any, any>;
18
+ declare const ForeignOffice: import("@redneckz/uni-jsx").UNIComponent<ForeignOffice, any, any>;
19
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface SearchBarInnerProps {
2
+ className?: string;
3
+ searchTerm?: string;
4
+ onSearch: (_: string) => void;
5
+ }
6
+ export declare const SearchBar: import("@redneckz/uni-jsx").UNIComponent<SearchBarInnerProps, any, any>;
@@ -0,0 +1 @@
1
+ export declare const groupBy: <K, V>(list: V[], keyGetter: (input: V) => K) => Map<K, V[]>;
@@ -0,0 +1,5 @@
1
+ import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
3
+ export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {
4
+ }
5
+ export declare const CarouselRecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
@@ -0,0 +1,22 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.CarouselRecommendationCard = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const BaseTile_1 = require("../BaseTile/BaseTile");
5
+ const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
6
+ const BorderVersion_1 = require("../../model/BorderVersion");
7
+ const Heading_1 = require("../../ui-kit/Heading/Heading");
8
+ const Img_1 = require("../../ui-kit/Img/Img");
9
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
10
+ const List_1 = require("../../ui-kit/List/List");
11
+ const ButtonSection_1 = require("../../ui-kit/Button/ButtonSection");
12
+ const SocialMedia_1 = require("../Footer/SocialMedia");
13
+ const BlockVersion_1 = require("../../model/BlockVersion");
14
+ exports.CarouselRecommendationCard = (0, uni_jsx_1.JSX)(({ button, className = '', description, image, items = [], socialMedia = [], title, version = 'primary', ...rest }) => {
15
+ const tileTitle = title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
16
+ const tileImage = image?.src ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
17
+ return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `relative text-left border border-solid box-border p-7 min-w-[524px]
18
+ ${BorderVersion_1.BorderVersionStyleMap[version]}
19
+ ${BlockVersion_1.VersionStyleMap[version]}
20
+ ${className}`, ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: (0, jsx_runtime_1.jsxs)("div", { className: "h-full flex flex-col justify-between", children: [description ? (0, jsx_runtime_1.jsx)("span", { className: "mb-2", children: description }) : null, items.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia.length ? ((0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? (0, jsx_runtime_1.jsx)("div", { className: "pt-2 mt-16", children: (0, ButtonSection_1.renderButton)({ button }) }) : null] }) }) }));
21
+ });
22
+ //# sourceMappingURL=CarouselRecommendationCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselRecommendationCard.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,4DAAyD;AACzD,6DAAkE;AAClE,0DAAuD;AACvD,8CAA2C;AAC3C,+CAAwC;AACxC,iDAA8C;AAC9C,qEAAiE;AACjE,uDAAoD;AACpD,2DAA2D;AAM9C,QAAA,0BAA0B,GAAG,IAAA,aAAG,EAC3C,CAAC,EACC,MAAM,EACN,SAAS,GAAG,EAAE,EACd,WAAW,EACX,KAAK,EACL,KAAK,GAAG,EAAE,EACV,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CACxB,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAC7B,uBAAC,SAAG,IAAC,SAAS,EAAC,+BAA+B,EAAC,KAAK,EAAE,KAAK,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE;UACT,qCAAqB,CAAC,OAAO,CAAC;UAC9B,8BAAe,CAAC,OAAO,CAAC;UACxB,SAAS,EAAE,KACT,IAAI,YAER,uBAAC,mBAAQ,IAAC,SAAS,EAAC,sBAAsB,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,YAC3E,iCAAK,SAAS,EAAC,sCAAsC,aAClD,WAAW,CAAC,CAAC,CAAC,iCAAM,SAAS,EAAC,MAAM,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACd,uBAAC,WAAI,IACH,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CACpB,uBAAC,yBAAW,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAI,CAC7E,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAC,YAAY,YAAE,IAAA,4BAAY,EAAC,EAAE,MAAM,EAAE,CAAC,GAAO,CAAC,CAAC,CAAC,IAAI,IAC/E,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
+ import type { LinkCommonProps } from '../../model/LinkProps';
4
+ import type { Picture } from '../../model/Picture';
5
+ import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
+ /**
8
+ * @title Карточка рекомендаций
9
+ */
10
+ export interface CarouselRecommendationCardContent extends HeadlineCommonProps, ListContent {
11
+ /**
12
+ * @title Соц сети
13
+ * @minItems 3
14
+ * @default [
15
+ * { "href": "https://t.me" },
16
+ * { "href": "https://vk.com" },
17
+ * { "href": "https://ok.ru" },
18
+ * ]
19
+ */
20
+ socialMedia?: LinkCommonProps[];
21
+ /**
22
+ * @default {
23
+ * "format": "webp",
24
+ * "size": {
25
+ * "width": 290
26
+ * },
27
+ * "sources": [{
28
+ * "media": 1279,
29
+ * "width": 174,
30
+ * "format": "webp",
31
+ * "alignment": "southeast"
32
+ * }]
33
+ * }
34
+ */
35
+ image?: Picture;
36
+ /**
37
+ * @default {
38
+ * "text": "",
39
+ * "version": "secondary"
40
+ * }
41
+ */
42
+ button?: ButtonProps;
43
+ version?: BlockVersion;
44
+ }
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ //# sourceMappingURL=CarouselRecommendationCardContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselRecommendationCardContent.js","sourceRoot":"","sources":["../../../src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts"],"names":[],"mappings":""}
@@ -2,12 +2,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.HeaderBurger = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const useGeolocation_1 = require("../../hooks/useGeolocation");
5
+ const useLocation_1 = require("../../hooks/useLocation");
6
6
  const Img_1 = require("../../ui-kit/Img/Img");
7
7
  const SearchBar_1 = require("../../ui-kit/SearchBar/SearchBar");
8
+ const Text_1 = require("../../ui-kit/Text/Text");
8
9
  exports.HeaderBurger = (0, uni_jsx_1.JSX)(({ burgerSubMenu, onClick, defaultLocation = '', children }) => {
9
- const [city, getCity] = (0, useGeolocation_1.useGeolocation)(defaultLocation);
10
- return ((0, jsx_runtime_1.jsxs)("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [(0, jsx_runtime_1.jsx)("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), (0, jsx_runtime_1.jsxs)("button", { onClick: getCity, className: "flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer", children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), city] }), children, (0, jsx_runtime_1.jsx)("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), (0, jsx_runtime_1.jsx)(SearchBar_1.SearchBar, { className: "grow" })] }));
10
+ const [location] = (0, useLocation_1.useLocation)(defaultLocation);
11
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20", children: [(0, jsx_runtime_1.jsx)("button", { className: "absolute top-4 right-4 border-none bg-transparent cursor-pointer", onClick: onClick, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: "CloseIcon", width: "24", height: "24", asSVG: true }) }), (0, jsx_runtime_1.jsxs)("button", { className: "flex items-center text-s p-0 mb-4 bg-transparent cursor-pointer", children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { image: "GeolocationIcon", width: "20", height: "20", className: "text-primary-main box-border mr-2", asSVG: true }), (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-secondary-text", children: location.name })] }), children, (0, jsx_runtime_1.jsx)("div", { className: "mb-7", children: burgerSubMenu?.map(renderBurgerSubMenuItem) }), (0, jsx_runtime_1.jsx)(SearchBar_1.SearchBar, { className: "grow" })] }));
11
12
  });
12
13
  const renderBurgerSubMenuItem = (menu, i) => {
13
14
  const { icon, href, text } = menu;
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderBurger.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderBurger.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAE5D,8CAA2C;AAC3C,gEAA6D;AAUhD,QAAA,YAAY,GAAG,IAAA,aAAG,EAC7B,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,+BAAc,EAAC,eAAe,CAAC,CAAC;IAExD,OAAO,CACL,iCAAK,SAAS,EAAC,kEAAkE,aAC/E,mCACE,SAAS,EAAC,kEAAkE,EAC5E,OAAO,EAAE,OAAO,YAEhB,uBAAC,SAAG,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,GAC/C,EACT,oCACE,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,qFAAqF,aAE/F,uBAAC,SAAG,IACF,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAC,mCAAmC,EAC7C,KAAK,SACL,EACD,IAAI,IACE,EACR,QAAQ,EACT,gCAAK,SAAS,EAAC,MAAM,YAAE,aAAa,EAAE,GAAG,CAAC,uBAAuB,CAAC,GAAO,EACzE,uBAAC,qBAAS,IAAC,SAAS,EAAC,MAAM,GAAG,IAC1B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,IAAqB,EAAE,CAAS,EAAE,EAAE;IACnE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAElC,OAAO,CACL,+BAA8B,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,0CAA0C,aAC3F,IAAI,CAAC,CAAC,CAAC,CACN,uBAAC,SAAG,IAAC,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CACrF,CAAC,CAAC,CAAC,IAAI,EACR,iCAAM,SAAS,EAAC,oBAAoB,YAAE,IAAI,GAAQ,KAJ5C,iBAAiB,CAAC,EAAE,CAKxB,CACL,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"HeaderBurger.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderBurger.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yDAAsD;AAEtD,8CAA2C;AAC3C,gEAA6D;AAC7D,iDAA8C;AAUjC,QAAA,YAAY,GAAG,IAAA,aAAG,EAC7B,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAA,yBAAW,EAAC,eAAe,CAAC,CAAC;IAEhD,OAAO,CACL,iCAAK,SAAS,EAAC,kEAAkE,aAC/E,mCACE,SAAS,EAAC,kEAAkE,EAC5E,OAAO,EAAE,OAAO,YAEhB,uBAAC,SAAG,IAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,GAC/C,EACT,oCAAQ,SAAS,EAAC,iEAAiE,aACjF,uBAAC,SAAG,IACF,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAC,mCAAmC,EAC7C,KAAK,SACL,EACF,uBAAC,WAAI,IAAC,KAAK,EAAC,qBAAqB,YAAE,QAAQ,CAAC,IAAI,GAAQ,IACjD,EACR,QAAQ,EACT,gCAAK,SAAS,EAAC,MAAM,YAAE,aAAa,EAAE,GAAG,CAAC,uBAAuB,CAAC,GAAO,EACzE,uBAAC,qBAAS,IAAC,SAAS,EAAC,MAAM,GAAG,IAC1B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,IAAqB,EAAE,CAAS,EAAE,EAAE;IACnE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAElC,OAAO,CACL,+BAA8B,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,0CAA0C,aAC3F,IAAI,CAAC,CAAC,CAAC,CACN,uBAAC,SAAG,IAAC,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,SAAG,CACrF,CAAC,CAAC,CAAC,IAAI,EACR,iCAAM,SAAS,EAAC,oBAAoB,YAAE,IAAI,GAAQ,KAJ5C,iBAAiB,CAAC,EAAE,CAKxB,CACL,CAAC;AACJ,CAAC,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { BgColorVersion } from '../../model/BgColorVersion';
2
+ import type { ForeignOffice } from '../../services/sitemap/SitemapProps';
2
3
  interface HeaderSecondaryMenuContent {
3
4
  defaultLocation?: string;
4
5
  officesLink?: string;
5
6
  bgColor?: BgColorVersion;
7
+ foreignOffices?: ForeignOffice[];
6
8
  }
7
9
  export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent {
8
10
  className?: string;
@@ -2,8 +2,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.HeaderSecondaryMenu = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const useGeolocation_1 = require("../../hooks/useGeolocation");
5
+ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
6
+ const useLocation_1 = require("../../hooks/useLocation");
6
7
  const Img_1 = require("../../ui-kit/Img/Img");
8
+ const Location_1 = require("../../ui-kit/Location/Location");
7
9
  const TopItem_1 = require("../../ui-kit/TopItem/TopItem");
8
10
  const HeaderSecondaryMenuButton_1 = require("./HeaderSecondaryMenuButton");
9
11
  const COLORS_MAP = {
@@ -18,8 +20,15 @@ const LINKS_ICON_VERSION_MAP = {
18
20
  'bg-white': 'black',
19
21
  transparent: 'white',
20
22
  };
21
- exports.HeaderSecondaryMenu = (0, uni_jsx_1.JSX)(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
22
- const [city, getCity] = (0, useGeolocation_1.useGeolocation)(defaultLocation);
23
- return ((0, jsx_runtime_1.jsxs)("div", { className: `flex items-center ${className || ''}`, children: [(0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), officesLink ? ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
23
+ exports.HeaderSecondaryMenu = (0, uni_jsx_1.JSX)(({ className, officesLink, defaultLocation = 'Москва', foreignOffices, bgColor = 'bg-white', }) => {
24
+ const [isShowLocationModal, setShowLocationModal] = (0, hooks_1.useState)(false);
25
+ const [location, onChangeLocation] = (0, useLocation_1.useLocation)(defaultLocation);
26
+ const showLocationModal = () => {
27
+ setShowLocationModal(true);
28
+ };
29
+ const hideLocationModal = () => {
30
+ setShowLocationModal(false);
31
+ };
32
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `flex items-center ${className || ''}`, children: [(0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: showLocationModal, bgColor: bgColor }), officesLink ? ((0, jsx_runtime_1.jsx)(TopItem_1.TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), (0, jsx_runtime_1.jsx)(HeaderSecondaryMenuButton_1.HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) }), isShowLocationModal ? ((0, jsx_runtime_1.jsx)(Location_1.Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
24
33
  });
25
34
  //# sourceMappingURL=HeaderSecondaryMenu.js.map