@redneckz/wildless-cms-uni-blocks 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +44 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/ContentPageHead.js +1 -1
- package/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -8
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +3 -2
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -2
- package/dist/components/Headline/constants.d.ts +4 -0
- package/dist/components/Headline/constants.js +13 -0
- package/dist/components/Headline/constants.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/Recommendation/Recommendation.d.ts +5 -0
- package/dist/components/Recommendation/Recommendation.js +34 -0
- package/dist/components/Recommendation/Recommendation.js.map +1 -0
- package/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/dist/components/Recommendation/RecommendationCard.js +13 -0
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -0
- package/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/dist/components/Recommendation/RecommendationContent.js +2 -0
- package/dist/components/Recommendation/RecommendationContent.js.map +1 -0
- package/dist/model/BlockVersion.d.ts +6 -1
- package/dist/ui-kit/Description/Description.js +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/ContentPageHead.js +1 -1
- package/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +4 -2
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +2 -3
- package/lib/components/Headline/Headline.js +3 -8
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +3 -2
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -2
- package/lib/components/Headline/constants.d.ts +4 -0
- package/lib/components/Headline/constants.js +11 -0
- package/lib/components/Headline/constants.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/Recommendation/Recommendation.d.ts +5 -0
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +6 -0
- package/lib/components/Recommendation/Recommendation.js +32 -0
- package/lib/components/Recommendation/Recommendation.js.map +1 -0
- package/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/lib/components/Recommendation/RecommendationCard.js +11 -0
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -0
- package/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/lib/components/Recommendation/RecommendationContent.js +2 -0
- package/lib/components/Recommendation/RecommendationContent.js.map +1 -0
- package/lib/model/BlockVersion.d.ts +6 -1
- package/lib/ui-kit/Description/Description.js +1 -1
- package/mobile/bundle/bundle.umd.js +16 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +3 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -2
- package/mobile/dist/components/Headline/constants.d.ts +4 -0
- package/mobile/dist/components/Headline/constants.js +13 -0
- package/mobile/dist/components/Headline/constants.js.map +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +5 -0
- package/mobile/dist/components/Recommendation/Recommendation.js +34 -0
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js +13 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.js +2 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.js.map +1 -0
- package/mobile/dist/model/BlockVersion.d.ts +6 -1
- package/mobile/dist/ui-kit/Description/Description.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -2
- package/mobile/lib/components/Headline/constants.d.ts +4 -0
- package/mobile/lib/components/Headline/constants.js +11 -0
- package/mobile/lib/components/Headline/constants.js.map +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +5 -0
- package/mobile/lib/components/Recommendation/Recommendation.js +32 -0
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js +11 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.js +2 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.js.map +1 -0
- package/mobile/lib/model/BlockVersion.d.ts +6 -1
- package/mobile/lib/ui-kit/Description/Description.js +1 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +74 -0
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/mobile/src/components/Headline/Headline.example.json +1 -1
- package/mobile/src/components/Headline/Headline.tsx +20 -4
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -3
- package/mobile/src/components/Headline/constants.ts +14 -0
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
- package/mobile/src/components/Recommendation/Recommendation.example.json +38 -0
- package/mobile/src/components/Recommendation/Recommendation.tsx +105 -0
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +33 -0
- package/mobile/src/components/Recommendation/RecommendationContent.ts +19 -0
- package/mobile/src/model/BlockVersion.ts +7 -1
- package/mobile/src/ui-kit/Description/Description.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +74 -0
- package/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/src/components/Headline/Headline.example.json +1 -1
- package/src/components/Headline/Headline.fixture.mobile.tsx +39 -15
- package/src/components/Headline/Headline.fixture.tsx +20 -17
- package/src/components/Headline/Headline.mobile.tsx +20 -4
- package/src/components/Headline/Headline.tsx +9 -12
- package/src/components/Headline/HeadlineContent.ts +2 -3
- package/src/components/Headline/constants.ts +14 -0
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/Recommendation/Recommendation.example.json +38 -0
- package/src/components/Recommendation/Recommendation.fixture.tsx +73 -0
- package/src/components/Recommendation/Recommendation.tsx +105 -0
- package/src/components/Recommendation/RecommendationCard.tsx +33 -0
- package/src/components/Recommendation/RecommendationContent.ts +19 -0
- package/src/model/BlockVersion.ts +7 -1
- package/src/ui-kit/Description/Description.tsx +1 -1
|
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
export const Description = JSX((props) => {
|
|
4
4
|
const { className = '', description } = props;
|
|
5
|
-
return _jsx("div", { className: `font-normal text-
|
|
5
|
+
return _jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
6
6
|
});
|
|
7
7
|
//# sourceMappingURL=Description.js.map
|
|
@@ -267,8 +267,19 @@
|
|
|
267
267
|
return format ? `image/${String(format)}` : undefined;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
const
|
|
271
|
-
|
|
270
|
+
const ALIGN_TEXT = {
|
|
271
|
+
left: 'text-left',
|
|
272
|
+
center: 'text-center',
|
|
273
|
+
right: 'text-right',
|
|
274
|
+
};
|
|
275
|
+
const BACKGROUND_COLOR = {
|
|
276
|
+
transparent: 'bg-transparent',
|
|
277
|
+
primary: 'bg-white',
|
|
278
|
+
secondary: 'bg-primary-main',
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const Headline = JSX(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
|
|
282
|
+
return (jsxs("section", { className: `px-4 py-6 ${BACKGROUND_COLOR[bgColorHeadline]} ${className}`, children: [title && (jsx(Heading, { headingType: "h2", className: `text-primary-text ${ALIGN_TEXT[align]}`, title: title })), description && (jsx("p", { className: `font-normal text-m-md ${ALIGN_TEXT[align]} ${title ? 'mt-2.5' : ''}`, children: description })), image?.src && (jsx("div", { className: "mt-5 mx-auto flex justify-center", children: jsx(Img, { image: image }) }))] }));
|
|
272
283
|
});
|
|
273
284
|
|
|
274
285
|
// column-gap between children of SwipeListControl container
|
|
@@ -551,7 +562,7 @@
|
|
|
551
562
|
|
|
552
563
|
const Description = JSX((props) => {
|
|
553
564
|
const { className = '', description } = props;
|
|
554
|
-
return jsx("div", { className: `font-normal text-
|
|
565
|
+
return jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
555
566
|
});
|
|
556
567
|
|
|
557
568
|
const LIST_STYLE_CLASSES$1 = 'rounded-full inline-block mr-3 mt-2';
|
|
@@ -597,7 +608,7 @@
|
|
|
597
608
|
}
|
|
598
609
|
|
|
599
610
|
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
600
|
-
return (jsxs("div", { className: `w-full text-primary-text ${className}`, children: [jsx("div", { children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? jsx(Description, { className: "mt-3", description: description }) : null, benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? jsx(List, { className: "mt-3", items: items }) : null] }) }), renderImage$1(image)] }));
|
|
611
|
+
return (jsxs("div", { className: `w-full text-primary-text ${className}`, children: [jsx("div", { children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? (jsx(Description, { className: "mt-3 text-m-md", description: description })) : null, benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? jsx(List, { className: "mt-3", items: items }) : null] }) }), renderImage$1(image)] }));
|
|
601
612
|
});
|
|
602
613
|
function renderImage$1(image) {
|
|
603
614
|
return image?.src ? (jsx("div", { className: "mt-5", children: jsx(Img, { image: { className: 'block', ...image } }) })) : null;
|
|
@@ -1381,7 +1392,7 @@
|
|
|
1381
1392
|
});
|
|
1382
1393
|
function renderOpenGraph(og) {
|
|
1383
1394
|
return og
|
|
1384
|
-
? Object.entries(og).map(([key, value]) => (jsx("meta", {
|
|
1395
|
+
? Object.entries(og).map(([key, value]) => (jsx("meta", { property: `og:${key}`, content: value }, key)))
|
|
1385
1396
|
: null;
|
|
1386
1397
|
}
|
|
1387
1398
|
function renderTwitter(twitter) {
|
|
@@ -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";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...a}={})=>{const l=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,l,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...a}=t||{},l=n?.slots?.default,i=r||l&&l();return e(Object.assign(a,i&&{children:i}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-m-title",h2:"text-m-title",h3:"text-m-title-md",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},s=a((e=>{const{className:t,headingType:r,title:a}=e;if(!r)return;return n(r,{className:`font-sans font-medium m-0 ${i[r]} ${t||""}`,children:a})})),c=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},o={none:"",primary:"text-primary-main"},m=a((({className:e="",name:t,alt:a=`Icon ${t}`,title:l=a,asSVG:i,color:s="primary",...m})=>{const d=`${c.CDN||""}icons/${t}.svg`;return i?r("svg",{className:`${o[s]} ${e}`,...m,"aria-hidden":"true",children:[l?n("title",{children:l}):null,a?n("desc",{children:a}):null,n("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]}):n("img",{className:e,src:d,alt:a,title:l,...m,"aria-hidden":"true"})})),d=a((({className:e="",image:t,imageClassName:a})=>t?r("picture",{className:e,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:x(t)},`${r}_${e}`))):null,h(t,a)]}):null)),h=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},a=e.title||"",l=e.alt||e.title;return n("img",{src:e.src,className:`m-auto ${t}`,alt:l,title:a,style:r,...e.size})};function x(e){return e?`image/${String(e)}`:void 0}const u=a((({bgColor:e="transparent",className:t="",title:a,description:l,image:i})=>r("section",{className:`px-4 py-6 ${e} ${t}`,children:[a&&n(s,{headingType:"h2",className:"text-primary-text",title:a}),l&&n("p",{className:"font-normal text-m-md "+(a?"mt-2.5":""),children:l}),i?.src&&n("div",{className:"mt-5 mx-auto flex justify-center",children:n(d,{image:i})})]}))),p=a((({children:e,activeIndex:t,indexFraction:r,showDots:a})=>{const l=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth"})};return a&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,a)=>n("div",{onClick:l(a),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:g(a,t,r),"aria-hidden":!0},String(a))))}):null})),g=(e,t,n)=>{if(e<t||e>t+1)return null;const r=1-n;return e===t?{opacity:""+(.3+.7*r),width:6+16*r+"px"}:{opacity:""+(.3+.7*n),width:6+16*n+"px"}},b=a((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),f=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),N=a((({className:e="",children:t,activeIndex:r,onScroll:a,gap:l=14,padding:i=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...f(i),gap:`${l}px`},role:"list",onScroll:a,children:t?.length?t?.map(((e,t)=>n(b,{style:f(i/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(b,{children:t})}))),v=a((({className:e,context:t,children:a,gap:l=14,padding:i=16,showDots:s=!0,onSlideChange:c})=>{const[o,m]=t.useState(0),[d,h]=t.useState(0),x={activeIndex:o,indexFraction:d,showDots:s,children:a};return r("div",{className:e,children:[n(N,{gap:l,padding:i,activeIndex:o,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:a,children:s}=e.currentTarget,d=s[0].offsetWidth-i/2,x=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:a,itemWidth:l})=>{const i=l+e,s=r-n,c=n-e-t,o=a-2,m=new Array(a).fill(0).map(((e,t)=>0===t||t===o?[t>0?s-c:0,t>0?s:c]:[(t-1)*i+c,t*i+c]));return m[a-1]=[s,r],m})({gap:l,padding:i,clientWidth:n,scrollWidth:a,childElementCount:r,itemWidth:d}),{index:u,fraction:p}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,a]=t[n];return{index:n,fraction:(e-r)/(a-r)}})(t,x);u!==o&&c&&c(),m(u),h(p)},children:a}),n(p,{...x})]})})),y=a((({className:e,iconClassName:t,textClassName:a,suffixClassName:l,doc:i,icon:s})=>{const{text:c,fileSize:o,...d}=i;return r("a",{className:e,role:"link",...d,children:[s?n(m,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,c?r("span",{className:a,children:[c,n("span",{className:l,children:d?.href&&w(k(d.href),o)})]}):null]})})),w=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),k=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},$=a((({className:e="",doc:t,icon:r})=>n(y,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),C=a((({context:e,hasBorder:t=!0,documents:r,icon:a})=>n(v,{context:e,className:"text-m-sm text-primary-main",children:r?.length?r.map(((e,r)=>n($,{className:t?"rounded-md border-main-stroke border p-4":"",doc:e,icon:a},String(r)))):null}))),S=a((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-m-sm text-primary-main flex flex-col "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,a)=>n("div",{role:"listitem",children:n($,{className:e?"rounded-md border-main-stroke border p-4":"",doc:t,icon:r})},String(a)))):null}))),T=a((({className:e="",context:t,title:a,subtitle:l,icon:i="DocIconMonoColor",documents:c,listMode:o="vertical",hasBorder:m=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white ${e}`,children:[a?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2":"mb-5"),title:a}):null,l?n("h3",{className:"mt-0 font-normal mb-5 text-center text-m-md",children:l}):null,"vertical"===o?n(S,{hasBorder:m,documents:c,icon:i}):n(C,{context:t,hasBorder:m,documents:c,icon:i})]}))),D=a((({className:e="",title:t,image:a,benefits:l})=>r("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[n(s,{headingType:"h2",className:"text-center",title:t}),r("div",{className:"flex justify-center mt-9",children:[a?.src&&n(d,{className:"mr-6",image:a}),l?.length?n("div",{className:"flex flex-col",children:l.map(j)}):null]})]})));function j(e,t){return r("div",{className:"flex flex-row mb-8",children:[e.icon&&n(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const R=e=>e?.includes("//"),_=e=>(e||"").replace(/\/?\?.*/,""),L=e=>{if(!e||!R(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var I=Object.freeze({__proto__:null,isURL:R,withoutQuery:_,getOrigin:L});const V="/mobile",A=(e,t)=>{if(!e)return e;const n=L(t?.href);return n?e.replace(n,"")||"/":e},B=e=>e;function O({router:e,handlerDecorator:t=B},n){const r=((e,t)=>{if(!e)return e;const n=A(e,t)||"",r=t?.pathname.startsWith(V);return r&&!R(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const a=r&&!R(r),l=!n.target||"_self"===n.target;a&&l&&(t.preventDefault(),e.push(r))}),n)}}const G=a((e=>{const{text:t,aboveText:a,appendLeft:l}=e;return r("div",{className:E(e),children:[l||null,F(e)?r("div",{children:[n("div",{className:"text-m-2xs text-left",children:a}),n("div",{className:"text-m-button font-medium text-left",children:t})]}):null]})})),E=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const a="px-8 gap-2 "+(n?"py-2":"py-3.5");return["flex items-center justify-center",F(e)?a:"h-12 w-12",r?"rounded-full":""].join(" ")},F=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),H={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:"text-primary-main"},M={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},P="w-full text-center font-sans select-none",Z=a((({className:e,text:t,aboveText:r,appendLeft:a,href:l,target:i,onClick:s,children:c,disabled:o,rounded:m,version:d="primary",ariaLabel:h,...x})=>{const u=c??n(G,{text:t,aboveText:r,appendLeft:a,rounded:m,version:d});return o?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`inline-block ${P} ${M[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,children:u}):n("a",{className:`${P} inline-block cursor-pointer no-underline ${H[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:i,onClick:s,"aria-label":h,role:l?"link":"button",...x,children:u})})),z=a((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:a}=e,l=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(Z,e?{appendLeft:n(m,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(O({router:l,handlerDecorator:a},e),t)))}):null}));const W=a((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-m-md ${t}`,children:r})})),U={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},J={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},K=a((({className:e="",isDotted:t=!0,children:a,version:l="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Q(l)}),n("span",{className:`text-m-md ${U[l]}`,children:a})]}))),Q=e=>`rounded-full inline-block mr-3 mt-2 ${J[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,X=a((e=>{const{className:t="",itemClassName:r,isDotted:a,items:l,version:i}=e;return n("section",{className:`${t}`,role:"list",children:l?.length?l.map(((e,t)=>n(K,{className:r,isDotted:a,version:i,children:e},String(t)))):null})})),Y=a((({className:e="",title:t,children:a,buttons:l,image:i})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:a}),l?.length?n("div",{children:l}):null]}),i]})]}))),q={primary:"text-primary-text",secondary:"text-white"},ee={primary:"text-secondary-text",secondary:"text-white"};const te=a((({className:e="",context:t,title:a,headingType:l="h2",description:i,benefits:c,buttons:o,image:d,items:h,version:x="primary"})=>r("div",{className:`w-full text-primary-text ${e}`,children:[n("div",{children:r(Y,{context:t,title:a&&n(s,{headingType:l,title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?n(z,{context:t,buttons:o,className:"flex flex-col mt-5 gap-2.5"}):null,children:[i?n(W,{className:"mt-3",description:i}):null,c?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:c.map(((e,t)=>function(e,t,a){return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon&&n(m,{className:"w-6 h-6 rounded-full box-border",name:e.icon,width:"24",height:"24",asSVG:!0}),n("div",{className:`font-medium text-m-title-xs m-0 ${q[a]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-m-sm ${ee[a]}`,children:e.description})]},String(t))}(e,t,x)))}):null,h?.length?n(X,{className:"mt-3",items:h}):null]})}),ne(d)]})));function ne(e){return e?.src?n("div",{className:"mt-5",children:n(d,{image:{className:"block",...e}})}):null}const re=a((e=>{const{className:t}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${t||""}`,children:n(te,{...e})})})),ae={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"}},le=a((({title:e,description:t,blockVersion:a="primary",iconVersion:l,image:i,className:s="",items:c,isDotted:o=!0})=>{const m=ae[a];return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${m.background} ${s}`,children:["small"===l?ie(m.icon):null,"big"===l?se(i):null,r("div",{className:"py-0.5",children:[e?n("div",{className:`font-medium text-base mb-1 ${m.title}`,children:e}):null,t?n("div",{className:`text-sm ${m.description}`,children:t}):null,c?.length?n(X,{className:"mt-1",items:c,isDotted:o,version:-1!==a.indexOf("secondary")?"secondary":"gray"}):null]})]})}));function ie(e){return n("div",{className:"mb-3",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function se(e){return e?.src?n(d,{className:"pb-3 mr-auto",image:e}):null}const ce=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function oe(e=""){const t=ce(e);return t<=4?"h4":t<=8?"h3":"h2"}function me(e=""){const t=ce(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function de(e=""){const t=ce(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const he={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},xe=a((e=>{const{context:t,title:a,description:l,items:i,children:c,buttons:o,image:m,className:h="",version:x="primary",role:u}=e;return n("section",{className:`overflow-hidden font-sans p-9 box-border ${h} ${he[x]} ${de(h)} ${me(h)} `,role:u,children:r(Y,{context:t,title:a&&n(s,{headingType:oe(h),title:a,className:`whitespace-pre-wrap max-w-[600px] ${a?"mb-3":""}\n ${"primary"===x?"text-primary-text":""}`}),buttons:o?.length?n(z,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,image:m?.src&&n(d,{className:"mt-auto ml-7",image:m}),children:[l&&n(W,{className:"mt-4 max-w-[600px]",description:l}),c,ue(i,x)]})})}));function ue(e,t){return e?.length?n(X,{items:e,version:t}):null}const pe={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ge=a((({context:e,className:t="",title:a,description:l,benefits:i,buttons:c,image:o,version:m="primary"})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${pe[m]} ${de(t)} ${me(t)} `,children:r(Y,{context:e,title:a&&n(s,{headingType:oe(t),title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?n(z,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:o?.src&&n(d,{className:"mt-auto ml-7",image:o}),children:[l&&n(W,{className:"mt-4 max-w-[600px]",description:l}),r("div",{className:"flex mt-5 mb-1",children:[i?.length?n("div",{className:"mr-8",children:i.map(be)}):null,i?.length?n("div",{className:"pt-1",children:i.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function be(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const fe={primary:"bg-white",secondary:"bg-primary-main text-white"},Ne=a((({context:e,title:t,description:a,cards:l=[],className:i,isScroll:c=!0})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${i}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(s,{headingType:"h3",className:"text-center "+(a?"mb-2":"mb-5"),title:t}):null,a?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:a}):null]}),ve(c,l,e)]})));function ve(e,t,r){return e?n(v,{context:r,children:t?.map(ye)}):n("div",{className:"grid gap-[14px]",children:t?.map(ye)})}function ye(e,t){return r("div",{className:`h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col\n ${fe[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-3.5",image:e.image})}):null,e.title?n("h3",{className:"font-medium text-m-title-xs m-0",children:e.title}):null,e.description?we(e):null,e.items?.length?ke(e.items,e.version):null]}),e?.button?.text?(a=e.button,n(Z,{className:"mt-3",appendLeft:a?.icon&&n(m,{name:a?.icon,width:"24px",height:"24px",asSVG:!0}),...a})):null]},t);var a}function we(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function ke(e,t="primary"){return n("section",{className:"mt-3",children:e.map(((e,a)=>r("div",{children:[n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===t?"text-secondary-text":""),children:e.text})]},String(a))))})}const $e=a((({className:e,viewBox:t,fill:r="none",width:a,height:l,paths:i,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:a,height:l,children:i.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...s,...r},a)))}))),Ce=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],Se=a((({className:e,disabled:t,...r})=>n(Z,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...r,children:n($e,{paths:Ce,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),Te={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},De={normal:3,mini:4},je={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Re={normal:380,mini:276},_e={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},Le={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},Ie=a((({className:e="",isDotted:t=!0,text:a,children:l,version:i="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Ve(i)}),n("span",{className:_e[i],children:a||l})]}))),Ve=e=>`rounded-full inline-block mr-3 mt-2 ${Le[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,Ae=a((({title:e,description:t,image:a,items:l,button:i,version:s})=>{const c=function(e,t,n){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||n?.length?"":"text-center"}\n `}(s,t,l);return r("div",{children:[r("div",{children:[a?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-6",image:a})}):null,e?Oe(e,c):null,t?n("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,l?.length?Ge(l,s):null]}),i?.text?Be(i):null]})}));function Be(e){return n(Z,{className:"mt-6 w-full",appendLeft:e.icon&&n(m,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Oe(e,t){return n("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function Ge(e,t){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,r)=>function(e,t,r){return n(Ie,{version:r??"primary",children:n("span",{className:"text-sm",children:e})},String(t))}(e.text,r,t)))})}const Ee=a((({context:e,title:t,description:a,cards:l=[],version:i="normal",activeCardIndex:c})=>r("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),r("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,a?n("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:a}):null]}),n("div",{className:`flex ${l?.length<=De[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*Re[i]}px)`},role:"list",children:l?.map(((t,r)=>function({card:e,version:t},r){return n("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${je[t]} ${Te[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(Ae,{...e})},String(r))}({card:t,version:i,context:e},r)))})]})));const Fe=a((({context:e,cards:t=[],className:a="",version:l="normal",...i})=>{const[s,c]=e.useState(0),o=t?.length>De[l],m=o&&t?.length-s>De[l],d=o&&s>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${a}`,children:[n(Ee,{context:e,cards:t,version:l,activeCardIndex:s,...i}),d&&n(Se,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>c(s-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),m&&n(Se,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>c(s+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),He=a((e=>n(Fe,{...e,version:"mini"}))),Me=a((({className:e="",documents:t})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Pe(t):null})}))),Pe=e=>e.map(((e,t)=>{const{text:r,...a}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...a,children:r||null})},`list_item_${String(t)}`)})),Ze={Headline:u,LinkDocs:T,TextBlock:le,PictureText:D,ProductBlock:re,Tile:xe,ProductTile:ge,Gallery:Ne,MiniGallery:He,LinkList:Me},ze=a((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:e?.length?e.map(We(t)):null}))),We=e=>(t,r)=>{const a=t?.accordionBlockType;if(!a||!(a in Ze))return null;return n("div",{className:"mb-5 last:mb-0 first:mt-2",children:n(Ze[a],{context:e,...t,className:"!p-0"})},`block_${r}`)},Ue=a((({label:e,blocks:t,bordered:a,context:l})=>{const{hasContent:i,icon:s,handleToggle:c}=(({context:e,blocks:t})=>{const[n,r]=e.useState(!1),a=t?.length;return{isActive:n,hasContent:a,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!a)return;r(!n);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:t});return r("li",{className:(a?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0")+" border-solid border-main-divider",children:[r("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${a?"":"py-[14px] px-0"}\n ${i?"group cursor-pointer":""}`,onClick:c,children:[n("span",{className:"text-m-title-xs pr-2.5 font-medium "+(i?"group-hover:text-primary-main":""),children:e}),i?n(m,{name:s,width:"24",height:"24",asSVG:!0}):null]}),i?n(ze,{blocks:t,context:l}):null]})})),Je=a((({title:e,description:t,accordionItems:a,context:l,className:i="",bordered:c})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${i}`,children:[e?n(s,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,a?.length?n("ul",{className:"list-none m-0 p-0",children:a.map(((e,t)=>n(Ue,{...e,context:l,bordered:c},`AccordionItem${t}`)))}):null]}))),Ke=a((({icon:e,image:t,title:a,subtitle:l,isFillGradient:i})=>r("div",{role:"columnheader",scope:"col",children:[e&&n(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n("div",{className:"mb-3.5",children:n(d,{image:t})}),a&&n(s,{headingType:"h4",className:""+(i?"text-white":""),title:a}),l&&n("div",{className:"text-m-sm mb-3.5 "+(i?"text-white":"text-secondary-text/80"),children:l})]}))),Qe=a((({cell:e,rowHeader:t,isFillGradient:r=!1})=>n("div",{className:"box-border flex flex-col",role:"cell",children:n("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Xe(r,t))})}))),Xe=(e,t)=>({label:a,description:l},i)=>r("div",{className:"flex justify-between text-m-sm py-3.5",children:[n("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),r("div",{className:"basis-1/2",children:[a&&n("div",{className:"text-right "+(e?"text-white":""),children:a}),l&&n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:l})]})]},String(i)),Ye=a((({header:e,columnData:t,visibleRowLength:a=0,isFillGradient:l,showRow:i,onToggleColumn:s})=>{const c=t.slice(0,i?t.length:a),o=l?"secondary":"primary";return r("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${l?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[n(Ke,{...e,isFillGradient:l}),c?.length?c.map((({rowHeader:e,cell:t},r)=>n(Qe,{cell:t,rowHeader:e,isFillGradient:l},String(r)))):null,i&&qe({header:e,buttonVersion:o}),et({onToggleColumn:s,isFillGradient:l,showRow:i})]})})),qe=({header:e,buttonVersion:t})=>n(Z,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),et=({onToggleColumn:e,isFillGradient:t,showRow:r})=>n("div",{className:"mt-5",role:"cell",children:n("a",{role:"link",onClick:e,className:"font-medium text-m-sm cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:r?"Скрыть":"Показать описание"})}),tt=a((({className:e,context:t,title:a,rowHeaders:l,columns:i,visibleRowLength:c=0,isColoredFirstColumn:o=!1,useSwiper:m=!1})=>{const d=i?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:l?.[t]?.title})))})))||[],[h,x]=t.useState(new Array(i?.length).fill(!c));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[a&&n(s,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:a}),nt({tableData:d,context:t,visibleRowLength:c,isColoredFirstColumn:o,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],x([...h])},useSwiper:m,setColumnsViewState:x})]})})),nt=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:a,columnsViewState:l,handleToggleColumn:i,useSwiper:s,setColumnsViewState:c})=>n("div",{role:"table",children:t?.length?s?n(v,{context:e,onSlideChange:at(l,c),children:t.map(rt({context:e,visibleRowLength:r,isColoredFirstColumn:a,columnsViewState:l,handleToggleColumn:i}))}):t.map(rt({context:e,visibleRowLength:r,isColoredFirstColumn:a,columnsViewState:l,handleToggleColumn:i})):null}),rt=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:a,handleToggleColumn:l})=>(i,s)=>n(Ye,{context:e,visibleRowLength:t,showRow:a[s],header:i.header,columnData:i.column,isFillGradient:0===s&&r,onToggleColumn:()=>l(s)},String(s)),at=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function lt(){try{const e=await fetch(it);return await e.json()}catch(e){console.error(e)}}const it="/api/v1/exchangerates.json",st=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),ct=e=>e?st.format(e):"",ot="text-left font-normal text-sm text-secondary-text",mt={USD:"DollarIcon",EUR:"EuroIcon"},dt=a((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:ot,children:"Валюта"}),n("th",{className:`${ot} pl-11`,children:"Купить"}),n("th",{className:`${ot} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>ht(e)))})]}))),ht=e=>{const t=e?.currency?.currency;return r("tr",{children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(m,{name:mt[t],width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:ct(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11",children:ct(e.saleExchangeRate)})]},t)},xt=a((({className:e="",address:t,distance:a})=>r("div",{className:`flex text-sm ${e}`,children:[n(m,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-1.5",children:[t?n("p",{className:"m-0",children:t}):null,a?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",a]}):null]})]}))),ut=a((({className:e="",id:t,name:r,type:a="text",placeholder:l})=>n("input",{className:e,id:t,name:r||t,type:a,placeholder:l}))),pt=a((({className:e="",id:t,name:r,children:a})=>n("select",{className:e,id:t,name:r||t,children:a}))),gt=a((({className:e="",value:t,children:r})=>n("option",{className:e,value:`${t}`,children:r}))),bt=a((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[ft("Хочу продать",e),ft("Получу",e),n(Z,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function ft(e,t){return r("div",{className:"flex items-center",children:[n(ut,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?n(pt,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>n(gt,{value:e,children:e},String(t))))}):null]})}const Nt=["USD","EUR"],vt=["RUB","USD","EUR"],yt=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],wt={address:"Москва, ул.Ленина д.28",distance:"6км"},kt=a((({className:e="",context:t,title:a="Курсы обмена валют"})=>{const l=function(e){const{data:t}=e(it,lt);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==Nt.indexOf(e?.currency?.currency||"")))||yt;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:n(Y,{context:t,title:n(s,{headingType:oe(e),title:a,className:"whitespace-pre-wrap mb-3"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-20 pt-3",children:[l?n(dt,{className:"mb-7",exchangeCurrencyItems:l}):null,n(xt,{...wt})]}),l?.length?n(bt,{className:"grow",exchangeCurrencyItems:l,codes:vt}):null]})})})})),$t=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Ct={"bg-white":"text-primary-main",transparent:"text-white"},St={"bg-white":"text-black",transparent:"text-white"},Tt=a((({className:e="",href:t,children:a,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[n($e,{className:`${Ct[i]} w-10 h-[38px]`,viewBox:"0 0 40 45",paths:$t.map((e=>({d:e})))}),!s&&n("span",{className:`${St[i]} text-sm font-medium ml-2.5`,children:a||"Россельхозбанк"})]}))),Dt=a((({className:e,title:t="Мобильное приложение",description:a,href:l="#"})=>n("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light ${e||""}`,children:l?r("div",{className:"flex",children:[n("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:n(Tt,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),r("a",{href:l,target:"_blank",className:"flex flex-col justify-center pl-3",children:[n("div",{className:"text-m-button font-medium mb-[3px]",children:t}),n("div",{className:"text-m-button text-secondary-text",children:a})]})]}):null}))),jt=a((({className:e,items:t,hasButton:a,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(Rt):null,a?n(Z,{version:"primary",className:"mt-0.5 mb-5",...O({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Rt=(e,t)=>{const{type:a,text:l,description:i}=e;return r("div",{className:"mb-3.5",children:[n("div",{children:_t(a,l)}),n("div",{className:"font-sans text-sm text-secondary-text",children:i})]},String(t))},_t=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${Lt(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Lt=e=>e.replaceAll(/\D/g,""),It=a((({title:e,links:t,className:a="",context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return r("div",{className:a,children:[n("span",{className:"text-primary-text font-sans font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Vt,{index:t,...O({router:i,handlerDecorator:s},e)},String(t))))}):null]})})),Vt=a((({className:e="",index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),At=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Bt=a((({href:e})=>{const{icon:t,width:r,height:a,label:l}=At.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:m&&n(m,{name:t,width:r,height:a,asSVG:!0,className:"block",color:"none"})}):null})),Ot=a((({className:e,media:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:l}=r;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(Bt,{...O({router:a,handlerDecorator:l},e)},String(t))))})})),Gt=a((({className:e,links:t,context:a})=>{const l=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>n(Et,{index:t,...O({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Et=a((({className:e,index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),Ft=a((({className:e,context:t})=>{const{term:a,setTerm:l}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[20px] h-[20px]",children:n(m,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-sm text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:a,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input",placeholder:"some search"}),n("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer",onClick:e=>{e.preventDefault(),l("")},children:n(m,{name:"CloseIcon",width:"24",height:"24"})})]})})),Ht=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]})));function Mt(e){const{data:t}=e(Zt(),Pt);return t||{}}async function Pt(){const e=await fetch(Zt());return await e.json()}function Zt(){return`/wcms-resources/${c.SITEMAP||"sitemap"}.json`}const zt=a((({className:e="",documents:t,relatedEnterprises:a,contacts:l,socialMedia:i,context:s,horizontalNavigationTitle:c})=>{const o=Mt(s.useAsyncData),m=o?.dispositions;return r("footer",{className:`px-4 py-[26px] bg-white ${e}`,children:[n(jt,{className:"overflow-hidden",items:l,context:s,hasButton:!0}),n(Je,{context:s,className:"!p-0 mb-4",accordionItems:Ht(o.topItems)}),n("div",{children:m?.map(Wt)}),n(Dt,{context:s,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Ft,{context:s,className:"grow"}),n(Ot,{className:"pb-4",media:i,context:s}),n(It,{title:c,links:a,context:s}),n(Gt,{links:t,context:s})]})})),Wt=(e,t)=>{const{icon:a,href:l,text:i}=e;return r(Z,{version:"link",href:l,className:"flex text-sm mb-4",children:[a?n(m,{className:"pr-1",name:a,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:i})]},`footer-${t}`)},Ut=(e,t,n=((e,t)=>t.startsWith(e)))=>n(_(e),(e=>(e||"").replace(V,""))(_(R(e)?t.href:t.pathname))),Jt=e=>t=>Ut(t.href,e),Kt=e=>t=>t.items?.some(Jt(e))||Ut(t.href,e)||((e,t)=>L(e)===L(t.href))(t.href,e),Qt=e=>t=>e?.href===t?.href,Xt=(e,t)=>{return(r=e,a=t,(r||[]).map((e=>a?.find(Qt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Qt(e))))));var n,r,a},Yt="absolute left-0 -bottom-3 w-full h-[2px]",qt=a((({className:e,text:t,href:a,target:l,active:i,onClick:s,children:c,bgColor:o="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:l,onClick:s,children:[n("span",{className:en(o,i),children:t||c}),i?n("div",{className:tn(o,i)}):null]}))),en=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans font-normal text-sm`},tn=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Yt}`:Yt,nn=a((({context:e,burgerSubMenu:t,onClick:a,defaultLocation:l="",children:i})=>{const[s,c]=e.useGeolocation(l);return r("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[n("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:a,children:n(m,{name:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:c,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(m,{name:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),s]}),i,n("div",{className:"mb-7",children:t?.map(rn)}),n(Ft,{context:e,className:"grow"})]})})),rn=(e,t)=>{const{icon:a,href:l,text:i}=e;return r("a",{href:l,className:"flex text-sm mb-4 hover:text-primary-main",children:[a?n(m,{className:"text-primary-main pr-1",name:a,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:i})]},`headerSubMenu-${t}`)},an=a((({onClick:e,bgColor:t})=>r("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[r("div",{className:"flex items-center",children:[n("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:n(m,{name:"bg-white"===t?"BurgerIcon":"BurgerIconWhite",width:"24",height:"24",asSVG:!0})}),n(Tt,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),ln=a((({className:e="",defaultLocation:t,bgColor:a="bg-white",context:l,topItems:i})=>{const s=l.useRouter(),c=Mt(l.useAsyncData),o=c?.dispositions,{handlerDecorator:m}=l,d=Xt(c.topItems,i).find(Kt(s))?.items,h=(e=>(t=[])=>{const n=t?.filter(Jt(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null})(s)(d),[x,u]=l.useState(!1),p=()=>u(!x);return r("header",{className:`${a} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(an,{onClick:p,bgColor:a}),n("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:n("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:d?.map(((e,t)=>sn({...O({router:s,handlerDecorator:m},e),active:e===h,bgColor:a},t)))})})]}),x?n(nn,{context:l,onClick:p,burgerSubMenu:o,defaultLocation:t,children:n(Je,{context:l,accordionItems:Ht(c.topItems),className:"!p-0 mb-4"})}):null]})})),sn=(e,t)=>n(qt,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t)),cn=a((({block:e,headingType:t,context:r})=>n("section",{className:"flex grow-0 shrink-0 basis-full px-4 pt-6",children:n("div",{className:"flex grow",children:n(te,{context:r,headingType:t||"h2",...e})})}))),on=a((({className:e,context:t,slides:r=[]})=>{const a=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(v,{context:t,children:a.map(((e,r)=>n(cn,{block:e,context:t},String(r))))})})})),mn=a((({className:e,title:t,description:a,steps:l,size:i="normal"})=>r("section",{className:`box-border font-sans text-primary-text bg-white px-4 py-6 flex flex-col ${e||""}`,children:[t&&n(s,{headingType:"h3",className:"text-center",title:t}),a&&n("p",{className:`text-m-md text-center ${t&&"mt-2"}`,children:a}),l?.length?n("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:n("div",{className:"flex flex-col justify-between gap-x-[101px]",children:l.map(((e,t)=>dn({step:e,size:i,i:t,length:l.length})))})}):null]}))),dn=e=>{const{step:t,size:a,i:l,length:i}=e,s=i-1===l,c="normal"===a?"ml-[34px]":"ml-[24px]";return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{children:[hn(t,a,l),!s&&n("div",{className:`min-h-8 h-full w-[2px] bg-secondary-light ${c}`})]}),r("div",{className:"flex flex-col justify-start relative",children:[t.label&&n("div",{className:"font-medium text-m-title-xs m-0 text-left",children:t.label}),t.description&&n("div",{className:"font-normal text-sm text-secondary-text text-left "+(t.label?"mt-1":""),children:t.description})]})]},String(l))},String(l))},hn=(e,t,r)=>{const a="normal"===t?"38":"27";return n("div",{className:`${"normal"===t?"h-[70px] w-[70px] min-w-[70px] min-h-[70px]":"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"} bg-secondary-light rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium text-secondary-text self-center ${"normal"===t?"text-m-title":"text-m-title-xs"}`,children:e.icon&&n(m,{name:e.icon,width:a,height:a})||r+1})})},xn=a((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(s,{headingType:"h3",className:"font-medium",title:e}):null,t?n(m,{className:"ml-auto max-w-6 max-h-6",name:t,width:"24px",height:"24px"}):null]}))),un=a((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(xn,{...e}),t?.length?t.map(pn):null]}))),pn=({label:e,description:t,list:a,image:l,buttons:i},s)=>r("div",{children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?n("div",{className:"text-m-sm m-0",children:e}):null,t?n("div",{className:"text-m-sm text-secondary-text mt-[3px]",children:t}):null,a?.items?.length?n("div",{className:"flex flex-col justify-between items-start",children:n("div",{role:"list",children:a.items.map(((e,t)=>n(Ie,{className:"text-m-sm",text:e,version:"gray",isDotted:a.isDotted??!0},String(t))))})}):null,l&&n(d,{image:{...l,className:"m-0"}}),i?.length?n("div",{children:i.map((({icon:e,rounded:t,...r},a)=>n(Z,{className:`mt-3 ${a>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,rounded:t,appendLeft:e&&n(m,{name:e,width:"24px",height:"24px",asSVG:!0}),...r,"aria-label":e},String(a))))}):null]},String(s)),gn=a((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(un,{...e},String(t))))}))),bn=a((({tiles:e,context:t})=>n(v,{context:t,children:e.map(((e,t)=>n(un,{...e},String(t))))}))),fn=a((({className:e,context:t,title:a,description:l,columns:i,rowHeaders:c,orientation:o="vertical"})=>{const m=vn(i),d=yn(c,m);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text ${e}`,children:[a?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2":"mb-5"),title:a}):null,l?n("div",{className:"mb-5 text-center text-m-md",children:l}):null,d?.length?Nn(o,d,t):null]})}));function Nn(e,t,r){return"vertical"===e?n(gn,{tiles:t}):n(bn,{context:r,tiles:t})}const vn=e=>e?.[0].data?e[0].data:[],yn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),wn={Accordion:Je,ComparisonTable:tt,ExchangeRateTile:kt,Footer:zt,Gallery:Ne,Header:ln,Headline:u,LinkDocs:T,LinkList:Me,MobileAppTile:Dt,ProductBlock:re,ProductGallery:on,StepsBlock:mn,TariffsTable:fn,TextBlock:le},kn=a((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:$n()}))),$n=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Cn=a((({className:e,context:t})=>{const a=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(kn,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(kn,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),Sn=a((({className:e,context:t,title:a,description:l="Блок в разработке..."})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${de(e)} ${me(e)} `,children:r(Y,{context:t,title:a?n(s,{headingType:oe(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?n(W,{className:"mt-4 max-w-[600px]",description:l}):null,n("figure",{className:"m-0 min-w-[600px]",children:Tn()})]})}))),Tn=(e=3)=>jn(100,e).map((e=>Math.floor(e))).map(Dn),Dn=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),jn=(e,t)=>[e].concat(t>0?jn(e/1.618,t-1):[]),Rn=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),_n=a((({className:e,context:t,blocksRegistry:a,data:{style:l,blocks:i,slots:s={},likeControl:c,colorPalette:o="pc"},blockDecorator:m=Rn})=>{const{header:d}=s;return r("section",{className:`relative ${In(l)} ${e||""}`,"data-theme":o,children:[d?.blocks?.length?n("div",{className:`${In(d?.style)}`,children:d.blocks.map(((e,n)=>Ln({block:e,blockDecorator:m,blocksRegistry:a,context:t},n)))}):null,i?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,n)=>Ln({block:e,blockDecorator:m,blocksRegistry:a,context:t},n)))}):null,c&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Cn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function Ln({block:e,blockDecorator:t,blocksRegistry:r,context:a},l){const{type:i}=e;i&&i in r||console.warn(`No block with "${i}" is registered`);const s=r[i||"Placeholder"]||Sn;return t({blockClassName:In(e.style),block:e,render:e=>{const{version:t,content:r}=e.block;return n(s,{className:e.blockClassName,version:t,context:a,...r},`${i}-${l}`)}},`block-${l}`)}function In(e){return e?e.join(" "):""}const Vn=a((({HeadComponent:e,data:t,children:a})=>{const{title:l,main:i,og:s,twitter:c,jsonLd:o}=t,{description:m,keywords:d,canonical:h,robots:x}=i||{};return r(e,{children:[n("title",{children:l}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),m&&n("meta",{name:"description",content:m}),d&&n("meta",{name:"keywords",content:d.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),An(s),Bn(c),h&&n("link",{rel:"canonical",href:h}),o&&n("script",{type:"application/ld+json",children:o}),a]})}));function An(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`og:${e}`,content:t},e))):null}function Bn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function On(e){const{mobile:t,...n}=e;return t?{...n,...t,content:{...n.content,...t.content}}:e}function Gn(e){return e?.filter((e=>(e?.type||e?.mobile?.type||"")in wn&&!e.mobile?.hidden)).map(On)}e.Blocks=wn,e.ContentPage=_n,e.ContentPageHead=Vn,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=ln,e.Icon=m,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:r})}),{likes:l}=await n.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:l}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:l}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:Gn(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:Gn(n[t].blocks)}})),{})}},e.projectSettings=c,e.setup=t,e.url=I,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";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...a}={})=>{const l=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,l,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...a}=t||{},l=n?.slots?.default,i=r||l&&l();return e(Object.assign(a,i&&{children:i}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-m-title",h2:"text-m-title",h3:"text-m-title-md",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},s=a((e=>{const{className:t,headingType:r,title:a}=e;if(!r)return;return n(r,{className:`font-sans font-medium m-0 ${i[r]} ${t||""}`,children:a})})),c=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},o={none:"",primary:"text-primary-main"},m=a((({className:e="",name:t,alt:a=`Icon ${t}`,title:l=a,asSVG:i,color:s="primary",...m})=>{const d=`${c.CDN||""}icons/${t}.svg`;return i?r("svg",{className:`${o[s]} ${e}`,...m,"aria-hidden":"true",children:[l?n("title",{children:l}):null,a?n("desc",{children:a}):null,n("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]}):n("img",{className:e,src:d,alt:a,title:l,...m,"aria-hidden":"true"})})),d=a((({className:e="",image:t,imageClassName:a})=>t?r("picture",{className:e,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:x(t)},`${r}_${e}`))):null,h(t,a)]}):null)),h=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},a=e.title||"",l=e.alt||e.title;return n("img",{src:e.src,className:`m-auto ${t}`,alt:l,title:a,style:r,...e.size})};function x(e){return e?`image/${String(e)}`:void 0}const u={left:"text-left",center:"text-center",right:"text-right"},p={transparent:"bg-transparent",primary:"bg-white",secondary:"bg-primary-main"},g=a((({bgColorHeadline:e="transparent",className:t="",title:a,description:l,image:i,align:c="left"})=>r("section",{className:`px-4 py-6 ${p[e]} ${t}`,children:[a&&n(s,{headingType:"h2",className:`text-primary-text ${u[c]}`,title:a}),l&&n("p",{className:`font-normal text-m-md ${u[c]} ${a?"mt-2.5":""}`,children:l}),i?.src&&n("div",{className:"mt-5 mx-auto flex justify-center",children:n(d,{image:i})})]}))),b=a((({children:e,activeIndex:t,indexFraction:r,showDots:a})=>{const l=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth"})};return a&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,a)=>n("div",{onClick:l(a),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:f(a,t,r),"aria-hidden":!0},String(a))))}):null})),f=(e,t,n)=>{if(e<t||e>t+1)return null;const r=1-n;return e===t?{opacity:""+(.3+.7*r),width:6+16*r+"px"}:{opacity:""+(.3+.7*n),width:6+16*n+"px"}},N=a((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),v=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),y=a((({className:e="",children:t,activeIndex:r,onScroll:a,gap:l=14,padding:i=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...v(i),gap:`${l}px`},role:"list",onScroll:a,children:t?.length?t?.map(((e,t)=>n(N,{style:v(i/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(N,{children:t})}))),w=a((({className:e,context:t,children:a,gap:l=14,padding:i=16,showDots:s=!0,onSlideChange:c})=>{const[o,m]=t.useState(0),[d,h]=t.useState(0),x={activeIndex:o,indexFraction:d,showDots:s,children:a};return r("div",{className:e,children:[n(y,{gap:l,padding:i,activeIndex:o,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:a,children:s}=e.currentTarget,d=s[0].offsetWidth-i/2,x=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:a,itemWidth:l})=>{const i=l+e,s=r-n,c=n-e-t,o=a-2,m=new Array(a).fill(0).map(((e,t)=>0===t||t===o?[t>0?s-c:0,t>0?s:c]:[(t-1)*i+c,t*i+c]));return m[a-1]=[s,r],m})({gap:l,padding:i,clientWidth:n,scrollWidth:a,childElementCount:r,itemWidth:d}),{index:u,fraction:p}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,a]=t[n];return{index:n,fraction:(e-r)/(a-r)}})(t,x);u!==o&&c&&c(),m(u),h(p)},children:a}),n(b,{...x})]})})),k=a((({className:e,iconClassName:t,textClassName:a,suffixClassName:l,doc:i,icon:s})=>{const{text:c,fileSize:o,...d}=i;return r("a",{className:e,role:"link",...d,children:[s?n(m,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,c?r("span",{className:a,children:[c,n("span",{className:l,children:d?.href&&$(C(d.href),o)})]}):null]})})),$=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),C=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},S=a((({className:e="",doc:t,icon:r})=>n(k,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),T=a((({context:e,hasBorder:t=!0,documents:r,icon:a})=>n(w,{context:e,className:"text-m-sm text-primary-main",children:r?.length?r.map(((e,r)=>n(S,{className:t?"rounded-md border-main-stroke border p-4":"",doc:e,icon:a},String(r)))):null}))),D=a((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-m-sm text-primary-main flex flex-col "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,a)=>n("div",{role:"listitem",children:n(S,{className:e?"rounded-md border-main-stroke border p-4":"",doc:t,icon:r})},String(a)))):null}))),j=a((({className:e="",context:t,title:a,subtitle:l,icon:i="DocIconMonoColor",documents:c,listMode:o="vertical",hasBorder:m=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white ${e}`,children:[a?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2":"mb-5"),title:a}):null,l?n("h3",{className:"mt-0 font-normal mb-5 text-center text-m-md",children:l}):null,"vertical"===o?n(D,{hasBorder:m,documents:c,icon:i}):n(T,{context:t,hasBorder:m,documents:c,icon:i})]}))),R=a((({className:e="",title:t,image:a,benefits:l})=>r("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[n(s,{headingType:"h2",className:"text-center",title:t}),r("div",{className:"flex justify-center mt-9",children:[a?.src&&n(d,{className:"mr-6",image:a}),l?.length?n("div",{className:"flex flex-col",children:l.map(_)}):null]})]})));function _(e,t){return r("div",{className:"flex flex-row mb-8",children:[e.icon&&n(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const L=e=>e?.includes("//"),I=e=>(e||"").replace(/\/?\?.*/,""),V=e=>{if(!e||!L(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var A=Object.freeze({__proto__:null,isURL:L,withoutQuery:I,getOrigin:V});const B="/mobile",O=(e,t)=>{if(!e)return e;const n=V(t?.href);return n?e.replace(n,"")||"/":e},G=e=>e;function E({router:e,handlerDecorator:t=G},n){const r=((e,t)=>{if(!e)return e;const n=O(e,t)||"",r=t?.pathname.startsWith(B);return r&&!L(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const a=r&&!L(r),l=!n.target||"_self"===n.target;a&&l&&(t.preventDefault(),e.push(r))}),n)}}const F=a((e=>{const{text:t,aboveText:a,appendLeft:l}=e;return r("div",{className:H(e),children:[l||null,M(e)?r("div",{children:[n("div",{className:"text-m-2xs text-left",children:a}),n("div",{className:"text-m-button font-medium text-left",children:t})]}):null]})})),H=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const a="px-8 gap-2 "+(n?"py-2":"py-3.5");return["flex items-center justify-center",M(e)?a:"h-12 w-12",r?"rounded-full":""].join(" ")},M=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),P={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:"text-primary-main"},Z={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="w-full text-center font-sans select-none",W=a((({className:e,text:t,aboveText:r,appendLeft:a,href:l,target:i,onClick:s,children:c,disabled:o,rounded:m,version:d="primary",ariaLabel:h,...x})=>{const u=c??n(F,{text:t,aboveText:r,appendLeft:a,rounded:m,version:d});return o?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`inline-block ${z} ${Z[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,children:u}):n("a",{className:`${z} inline-block cursor-pointer no-underline ${P[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:i,onClick:s,"aria-label":h,role:l?"link":"button",...x,children:u})})),U=a((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:a}=e,l=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(W,e?{appendLeft:n(m,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(E({router:l,handlerDecorator:a},e),t)))}):null}));const J=a((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),K={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},Q={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},X=a((({className:e="",isDotted:t=!0,children:a,version:l="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Y(l)}),n("span",{className:`text-m-md ${K[l]}`,children:a})]}))),Y=e=>`rounded-full inline-block mr-3 mt-2 ${Q[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,q=a((e=>{const{className:t="",itemClassName:r,isDotted:a,items:l,version:i}=e;return n("section",{className:`${t}`,role:"list",children:l?.length?l.map(((e,t)=>n(X,{className:r,isDotted:a,version:i,children:e},String(t)))):null})})),ee=a((({className:e="",title:t,children:a,buttons:l,image:i})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:a}),l?.length?n("div",{children:l}):null]}),i]})]}))),te={primary:"text-primary-text",secondary:"text-white"},ne={primary:"text-secondary-text",secondary:"text-white"};const re=a((({className:e="",context:t,title:a,headingType:l="h2",description:i,benefits:c,buttons:o,image:d,items:h,version:x="primary"})=>r("div",{className:`w-full text-primary-text ${e}`,children:[n("div",{children:r(ee,{context:t,title:a&&n(s,{headingType:l,title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?n(U,{context:t,buttons:o,className:"flex flex-col mt-5 gap-2.5"}):null,children:[i?n(J,{className:"mt-3 text-m-md",description:i}):null,c?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:c.map(((e,t)=>function(e,t,a){return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon&&n(m,{className:"w-6 h-6 rounded-full box-border",name:e.icon,width:"24",height:"24",asSVG:!0}),n("div",{className:`font-medium text-m-title-xs m-0 ${te[a]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-m-sm ${ne[a]}`,children:e.description})]},String(t))}(e,t,x)))}):null,h?.length?n(q,{className:"mt-3",items:h}):null]})}),ae(d)]})));function ae(e){return e?.src?n("div",{className:"mt-5",children:n(d,{image:{className:"block",...e}})}):null}const le=a((e=>{const{className:t}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${t||""}`,children:n(re,{...e})})})),ie={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"}},se=a((({title:e,description:t,blockVersion:a="primary",iconVersion:l,image:i,className:s="",items:c,isDotted:o=!0})=>{const m=ie[a];return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${m.background} ${s}`,children:["small"===l?ce(m.icon):null,"big"===l?oe(i):null,r("div",{className:"py-0.5",children:[e?n("div",{className:`font-medium text-base mb-1 ${m.title}`,children:e}):null,t?n("div",{className:`text-sm ${m.description}`,children:t}):null,c?.length?n(q,{className:"mt-1",items:c,isDotted:o,version:-1!==a.indexOf("secondary")?"secondary":"gray"}):null]})]})}));function ce(e){return n("div",{className:"mb-3",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function oe(e){return e?.src?n(d,{className:"pb-3 mr-auto",image:e}):null}const me=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function de(e=""){const t=me(e);return t<=4?"h4":t<=8?"h3":"h2"}function he(e=""){const t=me(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function xe(e=""){const t=me(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const ue={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},pe=a((e=>{const{context:t,title:a,description:l,items:i,children:c,buttons:o,image:m,className:h="",version:x="primary",role:u}=e;return n("section",{className:`overflow-hidden font-sans p-9 box-border ${h} ${ue[x]} ${xe(h)} ${he(h)} `,role:u,children:r(ee,{context:t,title:a&&n(s,{headingType:de(h),title:a,className:`whitespace-pre-wrap max-w-[600px] ${a?"mb-3":""}\n ${"primary"===x?"text-primary-text":""}`}),buttons:o?.length?n(U,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,image:m?.src&&n(d,{className:"mt-auto ml-7",image:m}),children:[l&&n(J,{className:"mt-4 max-w-[600px]",description:l}),c,ge(i,x)]})})}));function ge(e,t){return e?.length?n(q,{items:e,version:t}):null}const be={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},fe=a((({context:e,className:t="",title:a,description:l,benefits:i,buttons:c,image:o,version:m="primary"})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${be[m]} ${xe(t)} ${he(t)} `,children:r(ee,{context:e,title:a&&n(s,{headingType:de(t),title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?n(U,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:o?.src&&n(d,{className:"mt-auto ml-7",image:o}),children:[l&&n(J,{className:"mt-4 max-w-[600px]",description:l}),r("div",{className:"flex mt-5 mb-1",children:[i?.length?n("div",{className:"mr-8",children:i.map(Ne)}):null,i?.length?n("div",{className:"pt-1",children:i.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function Ne(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const ve={primary:"bg-white",secondary:"bg-primary-main text-white"},ye=a((({context:e,title:t,description:a,cards:l=[],className:i,isScroll:c=!0})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${i}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(s,{headingType:"h3",className:"text-center "+(a?"mb-2":"mb-5"),title:t}):null,a?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:a}):null]}),we(c,l,e)]})));function we(e,t,r){return e?n(w,{context:r,children:t?.map(ke)}):n("div",{className:"grid gap-[14px]",children:t?.map(ke)})}function ke(e,t){return r("div",{className:`h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col\n ${ve[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-3.5",image:e.image})}):null,e.title?n("h3",{className:"font-medium text-m-title-xs m-0",children:e.title}):null,e.description?$e(e):null,e.items?.length?Ce(e.items,e.version):null]}),e?.button?.text?(a=e.button,n(W,{className:"mt-3",appendLeft:a?.icon&&n(m,{name:a?.icon,width:"24px",height:"24px",asSVG:!0}),...a})):null]},t);var a}function $e(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function Ce(e,t="primary"){return n("section",{className:"mt-3",children:e.map(((e,a)=>r("div",{children:[n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===t?"text-secondary-text":""),children:e.text})]},String(a))))})}const Se=a((({className:e,viewBox:t,fill:r="none",width:a,height:l,paths:i,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:a,height:l,children:i.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...s,...r},a)))}))),Te=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],De=a((({className:e,disabled:t,...r})=>n(W,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...r,children:n(Se,{paths:Te,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),je={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},Re={normal:3,mini:4},_e={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Le={normal:380,mini:276},Ie={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},Ve={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},Ae=a((({className:e="",isDotted:t=!0,text:a,children:l,version:i="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:Be(i)}),n("span",{className:Ie[i],children:a||l})]}))),Be=e=>`rounded-full inline-block mr-3 mt-2 ${Ve[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,Oe=a((({title:e,description:t,image:a,items:l,button:i,version:s})=>{const c=function(e,t,n){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||n?.length?"":"text-center"}\n `}(s,t,l);return r("div",{children:[r("div",{children:[a?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-6",image:a})}):null,e?Ee(e,c):null,t?n("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,l?.length?Fe(l,s):null]}),i?.text?Ge(i):null]})}));function Ge(e){return n(W,{className:"mt-6 w-full",appendLeft:e.icon&&n(m,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Ee(e,t){return n("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function Fe(e,t){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,r)=>function(e,t,r){return n(Ae,{version:r??"primary",children:n("span",{className:"text-sm",children:e})},String(t))}(e.text,r,t)))})}const He=a((({context:e,title:t,description:a,cards:l=[],version:i="normal",activeCardIndex:c})=>r("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),r("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,a?n("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:a}):null]}),n("div",{className:`flex ${l?.length<=Re[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*Le[i]}px)`},role:"list",children:l?.map(((t,r)=>function({card:e,version:t},r){return n("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${_e[t]} ${je[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(Oe,{...e})},String(r))}({card:t,version:i,context:e},r)))})]})));const Me=a((({context:e,cards:t=[],className:a="",version:l="normal",...i})=>{const[s,c]=e.useState(0),o=t?.length>Re[l],m=o&&t?.length-s>Re[l],d=o&&s>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${a}`,children:[n(He,{context:e,cards:t,version:l,activeCardIndex:s,...i}),d&&n(De,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>c(s-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),m&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>c(s+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),Pe=a((e=>n(Me,{...e,version:"mini"}))),Ze=a((({className:e="",documents:t})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?ze(t):null})}))),ze=e=>e.map(((e,t)=>{const{text:r,...a}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...a,children:r||null})},`list_item_${String(t)}`)})),We={Headline:g,LinkDocs:j,TextBlock:se,PictureText:R,ProductBlock:le,Tile:pe,ProductTile:fe,Gallery:ye,MiniGallery:Pe,LinkList:Ze},Ue=a((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:e?.length?e.map(Je(t)):null}))),Je=e=>(t,r)=>{const a=t?.accordionBlockType;if(!a||!(a in We))return null;return n("div",{className:"mb-5 last:mb-0 first:mt-2",children:n(We[a],{context:e,...t,className:"!p-0"})},`block_${r}`)},Ke=a((({label:e,blocks:t,bordered:a,context:l})=>{const{hasContent:i,icon:s,handleToggle:c}=(({context:e,blocks:t})=>{const[n,r]=e.useState(!1),a=t?.length;return{isActive:n,hasContent:a,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!a)return;r(!n);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:t});return r("li",{className:(a?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0")+" border-solid border-main-divider",children:[r("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${a?"":"py-[14px] px-0"}\n ${i?"group cursor-pointer":""}`,onClick:c,children:[n("span",{className:"text-m-title-xs pr-2.5 font-medium "+(i?"group-hover:text-primary-main":""),children:e}),i?n(m,{name:s,width:"24",height:"24",asSVG:!0}):null]}),i?n(Ue,{blocks:t,context:l}):null]})})),Qe=a((({title:e,description:t,accordionItems:a,context:l,className:i="",bordered:c})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${i}`,children:[e?n(s,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,a?.length?n("ul",{className:"list-none m-0 p-0",children:a.map(((e,t)=>n(Ke,{...e,context:l,bordered:c},`AccordionItem${t}`)))}):null]}))),Xe=a((({icon:e,image:t,title:a,subtitle:l,isFillGradient:i})=>r("div",{role:"columnheader",scope:"col",children:[e&&n(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n("div",{className:"mb-3.5",children:n(d,{image:t})}),a&&n(s,{headingType:"h4",className:""+(i?"text-white":""),title:a}),l&&n("div",{className:"text-m-sm mb-3.5 "+(i?"text-white":"text-secondary-text/80"),children:l})]}))),Ye=a((({cell:e,rowHeader:t,isFillGradient:r=!1})=>n("div",{className:"box-border flex flex-col",role:"cell",children:n("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(qe(r,t))})}))),qe=(e,t)=>({label:a,description:l},i)=>r("div",{className:"flex justify-between text-m-sm py-3.5",children:[n("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),r("div",{className:"basis-1/2",children:[a&&n("div",{className:"text-right "+(e?"text-white":""),children:a}),l&&n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:l})]})]},String(i)),et=a((({header:e,columnData:t,visibleRowLength:a=0,isFillGradient:l,showRow:i,onToggleColumn:s})=>{const c=t.slice(0,i?t.length:a),o=l?"secondary":"primary";return r("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${l?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[n(Xe,{...e,isFillGradient:l}),c?.length?c.map((({rowHeader:e,cell:t},r)=>n(Ye,{cell:t,rowHeader:e,isFillGradient:l},String(r)))):null,i&&tt({header:e,buttonVersion:o}),nt({onToggleColumn:s,isFillGradient:l,showRow:i})]})})),tt=({header:e,buttonVersion:t})=>n(W,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),nt=({onToggleColumn:e,isFillGradient:t,showRow:r})=>n("div",{className:"mt-5",role:"cell",children:n("a",{role:"link",onClick:e,className:"font-medium text-m-sm cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:r?"Скрыть":"Показать описание"})}),rt=a((({className:e,context:t,title:a,rowHeaders:l,columns:i,visibleRowLength:c=0,isColoredFirstColumn:o=!1,useSwiper:m=!1})=>{const d=i?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:l?.[t]?.title})))})))||[],[h,x]=t.useState(new Array(i?.length).fill(!c));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[a&&n(s,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:a}),at({tableData:d,context:t,visibleRowLength:c,isColoredFirstColumn:o,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],x([...h])},useSwiper:m,setColumnsViewState:x})]})})),at=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:a,columnsViewState:l,handleToggleColumn:i,useSwiper:s,setColumnsViewState:c})=>n("div",{role:"table",children:t?.length?s?n(w,{context:e,onSlideChange:it(l,c),children:t.map(lt({context:e,visibleRowLength:r,isColoredFirstColumn:a,columnsViewState:l,handleToggleColumn:i}))}):t.map(lt({context:e,visibleRowLength:r,isColoredFirstColumn:a,columnsViewState:l,handleToggleColumn:i})):null}),lt=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:a,handleToggleColumn:l})=>(i,s)=>n(et,{context:e,visibleRowLength:t,showRow:a[s],header:i.header,columnData:i.column,isFillGradient:0===s&&r,onToggleColumn:()=>l(s)},String(s)),it=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function st(){try{const e=await fetch(ct);return await e.json()}catch(e){console.error(e)}}const ct="/api/v1/exchangerates.json",ot=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),mt=e=>e?ot.format(e):"",dt="text-left font-normal text-sm text-secondary-text",ht={USD:"DollarIcon",EUR:"EuroIcon"},xt=a((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:dt,children:"Валюта"}),n("th",{className:`${dt} pl-11`,children:"Купить"}),n("th",{className:`${dt} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>ut(e)))})]}))),ut=e=>{const t=e?.currency?.currency;return r("tr",{children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(m,{name:ht[t],width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:mt(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11",children:mt(e.saleExchangeRate)})]},t)},pt=a((({className:e="",address:t,distance:a})=>r("div",{className:`flex text-sm ${e}`,children:[n(m,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-1.5",children:[t?n("p",{className:"m-0",children:t}):null,a?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",a]}):null]})]}))),gt=a((({className:e="",id:t,name:r,type:a="text",placeholder:l})=>n("input",{className:e,id:t,name:r||t,type:a,placeholder:l}))),bt=a((({className:e="",id:t,name:r,children:a})=>n("select",{className:e,id:t,name:r||t,children:a}))),ft=a((({className:e="",value:t,children:r})=>n("option",{className:e,value:`${t}`,children:r}))),Nt=a((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[vt("Хочу продать",e),vt("Получу",e),n(W,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function vt(e,t){return r("div",{className:"flex items-center",children:[n(gt,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?n(bt,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>n(ft,{value:e,children:e},String(t))))}):null]})}const yt=["USD","EUR"],wt=["RUB","USD","EUR"],kt=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],$t={address:"Москва, ул.Ленина д.28",distance:"6км"},Ct=a((({className:e="",context:t,title:a="Курсы обмена валют"})=>{const l=function(e){const{data:t}=e(ct,st);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==yt.indexOf(e?.currency?.currency||"")))||kt;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:n(ee,{context:t,title:n(s,{headingType:de(e),title:a,className:"whitespace-pre-wrap mb-3"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-20 pt-3",children:[l?n(xt,{className:"mb-7",exchangeCurrencyItems:l}):null,n(pt,{...$t})]}),l?.length?n(Nt,{className:"grow",exchangeCurrencyItems:l,codes:wt}):null]})})})})),St=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Tt={"bg-white":"text-primary-main",transparent:"text-white"},Dt={"bg-white":"text-black",transparent:"text-white"},jt=a((({className:e="",href:t,children:a,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(Se,{className:`${Tt[i]} w-10 h-[38px]`,viewBox:"0 0 40 45",paths:St.map((e=>({d:e})))}),!s&&n("span",{className:`${Dt[i]} text-sm font-medium ml-2.5`,children:a||"Россельхозбанк"})]}))),Rt=a((({className:e,title:t="Мобильное приложение",description:a,href:l="#"})=>n("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light ${e||""}`,children:l?r("div",{className:"flex",children:[n("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:n(jt,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),r("a",{href:l,target:"_blank",className:"flex flex-col justify-center pl-3",children:[n("div",{className:"text-m-button font-medium mb-[3px]",children:t}),n("div",{className:"text-m-button text-secondary-text",children:a})]})]}):null}))),_t=a((({className:e,items:t,hasButton:a,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(Lt):null,a?n(W,{version:"primary",className:"mt-0.5 mb-5",...E({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Lt=(e,t)=>{const{type:a,text:l,description:i}=e;return r("div",{className:"mb-3.5",children:[n("div",{children:It(a,l)}),n("div",{className:"font-sans text-sm text-secondary-text",children:i})]},String(t))},It=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${Vt(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Vt=e=>e.replaceAll(/\D/g,""),At=a((({title:e,links:t,className:a="",context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return r("div",{className:a,children:[n("span",{className:"text-primary-text font-sans font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Bt,{index:t,...E({router:i,handlerDecorator:s},e)},String(t))))}):null]})})),Bt=a((({className:e="",index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),Ot=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Gt=a((({href:e})=>{const{icon:t,width:r,height:a,label:l}=Ot.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:m&&n(m,{name:t,width:r,height:a,asSVG:!0,className:"block",color:"none"})}):null})),Et=a((({className:e,media:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:l}=r;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(Gt,{...E({router:a,handlerDecorator:l},e)},String(t))))})})),Ft=a((({className:e,links:t,context:a})=>{const l=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>n(Ht,{index:t,...E({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Ht=a((({className:e,index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),Mt=a((({className:e,context:t})=>{const{term:a,setTerm:l}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[20px] h-[20px]",children:n(m,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-sm text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:a,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input",placeholder:"some search"}),n("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer",onClick:e=>{e.preventDefault(),l("")},children:n(m,{name:"CloseIcon",width:"24",height:"24"})})]})})),Pt=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]})));function Zt(e){const{data:t}=e(Wt(),zt);return t||{}}async function zt(){const e=await fetch(Wt());return await e.json()}function Wt(){return`/wcms-resources/${c.SITEMAP||"sitemap"}.json`}const Ut=a((({className:e="",documents:t,relatedEnterprises:a,contacts:l,socialMedia:i,context:s,horizontalNavigationTitle:c})=>{const o=Zt(s.useAsyncData),m=o?.dispositions;return r("footer",{className:`px-4 py-[26px] bg-white ${e}`,children:[n(_t,{className:"overflow-hidden",items:l,context:s,hasButton:!0}),n(Qe,{context:s,className:"!p-0 mb-4",accordionItems:Pt(o.topItems)}),n("div",{children:m?.map(Jt)}),n(Rt,{context:s,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Mt,{context:s,className:"grow"}),n(Et,{className:"pb-4",media:i,context:s}),n(At,{title:c,links:a,context:s}),n(Ft,{links:t,context:s})]})})),Jt=(e,t)=>{const{icon:a,href:l,text:i}=e;return r(W,{version:"link",href:l,className:"flex text-sm mb-4",children:[a?n(m,{className:"pr-1",name:a,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:i})]},`footer-${t}`)},Kt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(I(e),(e=>(e||"").replace(B,""))(I(L(e)?t.href:t.pathname))),Qt=e=>t=>Kt(t.href,e),Xt=e=>t=>t.items?.some(Qt(e))||Kt(t.href,e)||((e,t)=>V(e)===V(t.href))(t.href,e),Yt=e=>t=>e?.href===t?.href,qt=(e,t)=>{return(r=e,a=t,(r||[]).map((e=>a?.find(Yt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Yt(e))))));var n,r,a},en="absolute left-0 -bottom-3 w-full h-[2px]",tn=a((({className:e,text:t,href:a,target:l,active:i,onClick:s,children:c,bgColor:o="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:l,onClick:s,children:[n("span",{className:nn(o,i),children:t||c}),i?n("div",{className:rn(o,i)}):null]}))),nn=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans font-normal text-sm`},rn=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${en}`:en,an=a((({context:e,burgerSubMenu:t,onClick:a,defaultLocation:l="",children:i})=>{const[s,c]=e.useGeolocation(l);return r("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[n("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:a,children:n(m,{name:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:c,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(m,{name:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),s]}),i,n("div",{className:"mb-7",children:t?.map(ln)}),n(Mt,{context:e,className:"grow"})]})})),ln=(e,t)=>{const{icon:a,href:l,text:i}=e;return r("a",{href:l,className:"flex text-sm mb-4 hover:text-primary-main",children:[a?n(m,{className:"text-primary-main pr-1",name:a,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:i})]},`headerSubMenu-${t}`)},sn=a((({onClick:e,bgColor:t})=>r("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[r("div",{className:"flex items-center",children:[n("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:n(m,{name:"bg-white"===t?"BurgerIcon":"BurgerIconWhite",width:"24",height:"24",asSVG:!0})}),n(jt,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),cn=a((({className:e="",defaultLocation:t,bgColor:a="bg-white",context:l,topItems:i})=>{const s=l.useRouter(),c=Zt(l.useAsyncData),o=c?.dispositions,{handlerDecorator:m}=l,d=qt(c.topItems,i).find(Xt(s))?.items,h=(e=>(t=[])=>{const n=t?.filter(Qt(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null})(s)(d),[x,u]=l.useState(!1),p=()=>u(!x);return r("header",{className:`${a} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(sn,{onClick:p,bgColor:a}),n("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:n("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:d?.map(((e,t)=>on({...E({router:s,handlerDecorator:m},e),active:e===h,bgColor:a},t)))})})]}),x?n(an,{context:l,onClick:p,burgerSubMenu:o,defaultLocation:t,children:n(Qe,{context:l,accordionItems:Pt(c.topItems),className:"!p-0 mb-4"})}):null]})})),on=(e,t)=>n(tn,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t)),mn=a((({block:e,headingType:t,context:r})=>n("section",{className:"flex grow-0 shrink-0 basis-full px-4 pt-6",children:n("div",{className:"flex grow",children:n(re,{context:r,headingType:t||"h2",...e})})}))),dn=a((({className:e,context:t,slides:r=[]})=>{const a=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(w,{context:t,children:a.map(((e,r)=>n(mn,{block:e,context:t},String(r))))})})})),hn=a((({className:e,title:t,description:a,steps:l,size:i="normal"})=>r("section",{className:`box-border font-sans text-primary-text bg-white px-4 py-6 flex flex-col ${e||""}`,children:[t&&n(s,{headingType:"h3",className:"text-center",title:t}),a&&n("p",{className:`text-m-md text-center ${t&&"mt-2"}`,children:a}),l?.length?n("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:n("div",{className:"flex flex-col justify-between gap-x-[101px]",children:l.map(((e,t)=>xn({step:e,size:i,i:t,length:l.length})))})}):null]}))),xn=e=>{const{step:t,size:a,i:l,length:i}=e,s=i-1===l,c="normal"===a?"ml-[34px]":"ml-[24px]";return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{children:[un(t,a,l),!s&&n("div",{className:`min-h-8 h-full w-[2px] bg-secondary-light ${c}`})]}),r("div",{className:"flex flex-col justify-start relative",children:[t.label&&n("div",{className:"font-medium text-m-title-xs m-0 text-left",children:t.label}),t.description&&n("div",{className:"font-normal text-sm text-secondary-text text-left "+(t.label?"mt-1":""),children:t.description})]})]},String(l))},String(l))},un=(e,t,r)=>{const a="normal"===t?"38":"27";return n("div",{className:`${"normal"===t?"h-[70px] w-[70px] min-w-[70px] min-h-[70px]":"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"} bg-secondary-light rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium text-secondary-text self-center ${"normal"===t?"text-m-title":"text-m-title-xs"}`,children:e.icon&&n(m,{name:e.icon,width:a,height:a})||r+1})})},pn=a((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(s,{headingType:"h3",className:"font-medium",title:e}):null,t?n(m,{className:"ml-auto max-w-6 max-h-6",name:t,width:"24px",height:"24px"}):null]}))),gn=a((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(pn,{...e}),t?.length?t.map(bn):null]}))),bn=({label:e,description:t,list:a,image:l,buttons:i},s)=>r("div",{children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?n("div",{className:"text-m-sm m-0",children:e}):null,t?n("div",{className:"text-m-sm text-secondary-text mt-[3px]",children:t}):null,a?.items?.length?n("div",{className:"flex flex-col justify-between items-start",children:n("div",{role:"list",children:a.items.map(((e,t)=>n(Ae,{className:"text-m-sm",text:e,version:"gray",isDotted:a.isDotted??!0},String(t))))})}):null,l&&n(d,{image:{...l,className:"m-0"}}),i?.length?n("div",{children:i.map((({icon:e,rounded:t,...r},a)=>n(W,{className:`mt-3 ${a>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,rounded:t,appendLeft:e&&n(m,{name:e,width:"24px",height:"24px",asSVG:!0}),...r,"aria-label":e},String(a))))}):null]},String(s)),fn=a((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(gn,{...e},String(t))))}))),Nn=a((({tiles:e,context:t})=>n(w,{context:t,children:e.map(((e,t)=>n(gn,{...e},String(t))))}))),vn=a((({className:e,context:t,title:a,description:l,columns:i,rowHeaders:c,orientation:o="vertical"})=>{const m=wn(i),d=kn(c,m);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text ${e}`,children:[a?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2":"mb-5"),title:a}):null,l?n("div",{className:"mb-5 text-center text-m-md",children:l}):null,d?.length?yn(o,d,t):null]})}));function yn(e,t,r){return"vertical"===e?n(fn,{tiles:t}):n(Nn,{context:r,tiles:t})}const wn=e=>e?.[0].data?e[0].data:[],kn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),$n={Accordion:Qe,ComparisonTable:rt,ExchangeRateTile:Ct,Footer:Ut,Gallery:ye,Header:cn,Headline:g,LinkDocs:j,LinkList:Ze,MobileAppTile:Rt,ProductBlock:le,ProductGallery:dn,StepsBlock:hn,TariffsTable:vn,TextBlock:se},Cn=a((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:Sn()}))),Sn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Tn=a((({className:e,context:t})=>{const a=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(Cn,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(Cn,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),Dn=a((({className:e,context:t,title:a,description:l="Блок в разработке..."})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${xe(e)} ${he(e)} `,children:r(ee,{context:t,title:a?n(s,{headingType:de(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?n(J,{className:"mt-4 max-w-[600px]",description:l}):null,n("figure",{className:"m-0 min-w-[600px]",children:jn()})]})}))),jn=(e=3)=>_n(100,e).map((e=>Math.floor(e))).map(Rn),Rn=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),_n=(e,t)=>[e].concat(t>0?_n(e/1.618,t-1):[]),Ln=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),In=a((({className:e,context:t,blocksRegistry:a,data:{style:l,blocks:i,slots:s={},likeControl:c,colorPalette:o="pc"},blockDecorator:m=Ln})=>{const{header:d}=s;return r("section",{className:`relative ${An(l)} ${e||""}`,"data-theme":o,children:[d?.blocks?.length?n("div",{className:`${An(d?.style)}`,children:d.blocks.map(((e,n)=>Vn({block:e,blockDecorator:m,blocksRegistry:a,context:t},n)))}):null,i?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,n)=>Vn({block:e,blockDecorator:m,blocksRegistry:a,context:t},n)))}):null,c&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Tn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function Vn({block:e,blockDecorator:t,blocksRegistry:r,context:a},l){const{type:i}=e;i&&i in r||console.warn(`No block with "${i}" is registered`);const s=r[i||"Placeholder"]||Dn;return t({blockClassName:An(e.style),block:e,render:e=>{const{version:t,content:r}=e.block;return n(s,{className:e.blockClassName,version:t,context:a,...r},`${i}-${l}`)}},`block-${l}`)}function An(e){return e?e.join(" "):""}const Bn=a((({HeadComponent:e,data:t,children:a})=>{const{title:l,main:i,og:s,twitter:c,jsonLd:o}=t,{description:m,keywords:d,canonical:h,robots:x}=i||{};return r(e,{children:[n("title",{children:l}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),m&&n("meta",{name:"description",content:m}),d&&n("meta",{name:"keywords",content:d.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),On(s),Gn(c),h&&n("link",{rel:"canonical",href:h}),o&&n("script",{type:"application/ld+json",children:o}),a]})}));function On(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function Gn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function En(e){const{mobile:t,...n}=e;return t?{...n,...t,content:{...n.content,...t.content}}:e}function Fn(e){return e?.filter((e=>(e?.type||e?.mobile?.type||"")in $n&&!e.mobile?.hidden)).map(En)}e.Blocks=$n,e.ContentPage=In,e.ContentPageHead=Bn,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=cn,e.Icon=m,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:r})}),{likes:l}=await n.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:l}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:l}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:Fn(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:Fn(n[t].blocks)}})),{})}},e.projectSettings=c,e.setup=t,e.url=A,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -9,7 +9,7 @@ exports.ContentPageHead = (0, uni_jsx_1.JSX)(({ HeadComponent, data, children })
|
|
|
9
9
|
});
|
|
10
10
|
function renderOpenGraph(og) {
|
|
11
11
|
return og
|
|
12
|
-
? Object.entries(og).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", {
|
|
12
|
+
? Object.entries(og).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { property: `og:${key}`, content: value }, key)))
|
|
13
13
|
: null;
|
|
14
14
|
}
|
|
15
15
|
function renderTwitter(twitter) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPageHead.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAChE,OAAO,CACL,wBAAC,aAAa,eACZ,4CAAQ,KAAK,GAAS,EACtB,iCAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACrE,WAAW,IAAI,iCAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,WAAW,GAAI,EAChE,QAAQ,IAAI,iCAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EACjE,MAAM,IAAI,iCAAM,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EAC3D,eAAe,CAAC,EAAE,CAAC,EACnB,aAAa,CAAC,OAAO,CAAC,EACtB,SAAS,IAAI,iCAAM,GAAG,EAAC,WAAW,EAAC,IAAI,EAAE,SAAS,GAAI,EACtD,MAAM,IAAI,mCAAQ,IAAI,EAAC,qBAAqB,YAAE,MAAM,GAAU,EAC9D,QAAQ,IACK,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,EAAsC;IAC7D,OAAO,EAAE;QACP,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,iCAAgB,
|
|
1
|
+
{"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPageHead.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAChE,OAAO,CACL,wBAAC,aAAa,eACZ,4CAAQ,KAAK,GAAS,EACtB,iCAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACrE,WAAW,IAAI,iCAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,WAAW,GAAI,EAChE,QAAQ,IAAI,iCAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EACjE,MAAM,IAAI,iCAAM,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,EAC3D,eAAe,CAAC,EAAE,CAAC,EACnB,aAAa,CAAC,OAAO,CAAC,EACtB,SAAS,IAAI,iCAAM,GAAG,EAAC,WAAW,EAAC,IAAI,EAAE,SAAS,GAAI,EACtD,MAAM,IAAI,mCAAQ,IAAI,EAAC,qBAAqB,YAAE,MAAM,GAAU,EAC9D,QAAQ,IACK,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,EAAsC;IAC7D,OAAO,EAAE;QACP,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,iCAAgB,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA1C,GAAG,CAA2C,CAC1D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,aAAa,CAAC,OAA2C;IAChE,OAAO,OAAO;QACZ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAC5C,iCAAgB,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA3C,GAAG,CAA4C,CAC3D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -4,7 +4,8 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
6
6
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
exports.Headline = (0, uni_jsx_1.JSX)(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: `px-4 py-6 ${constants_1.BACKGROUND_COLOR[bgColorHeadline]} ${className}`, children: [title && ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h2", className: `text-primary-text ${constants_1.ALIGN_TEXT[align]}`, title: title })), description && ((0, jsx_runtime_1.jsx)("p", { className: `font-normal text-m-md ${constants_1.ALIGN_TEXT[align]} ${title ? 'mt-2.5' : ''}`, children: description })), image?.src && ((0, jsx_runtime_1.jsx)("div", { className: "mt-5 mx-auto flex justify-center", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image }) }))] }));
|
|
9
10
|
});
|
|
10
11
|
//# sourceMappingURL=Headline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,0DAAuD;AACvD,8CAA2C;
|
|
1
|
+
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,0DAAuD;AACvD,8CAA2C;AAC3C,2CAA2D;AAK9C,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EACC,eAAe,GAAG,aAAa,EAC/B,SAAS,GAAG,EAAE,EACd,KAAK,EACL,WAAW,EACX,KAAK,EACL,KAAK,GAAG,MAAM,GACf,EAAE,EAAE;IACH,OAAO,CACL,qCAAS,SAAS,EAAE,aAAa,4BAAgB,CAAC,eAAe,CAAC,IAAI,SAAS,EAAE,aAC9E,KAAK,IAAI,CACR,uBAAC,iBAAO,IACN,WAAW,EAAC,IAAI,EAChB,SAAS,EAAE,qBAAqB,sBAAU,CAAC,KAAK,CAAC,EAAE,EACnD,KAAK,EAAE,KAAK,GACZ,CACH,EACA,WAAW,IAAI,CACd,8BAAG,SAAS,EAAE,yBAAyB,sBAAU,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,YAChF,WAAW,GACV,CACL,EACA,KAAK,EAAE,GAAG,IAAI,CACb,gCAAK,SAAS,EAAC,kCAAkC,YAC/C,uBAAC,SAAG,IAAC,KAAK,EAAE,KAAK,GAAI,GACjB,CACP,IACO,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BlockVersionWithTransparent } from '../../model/BlockVersion';
|
|
2
2
|
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
3
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
4
4
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
@@ -8,5 +8,5 @@ import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare type HeadlineContent = HeadingContent & DescriptionContent & ImageContent & {
|
|
10
10
|
align?: AlignType;
|
|
11
|
-
|
|
11
|
+
bgColorHeadline?: BlockVersionWithTransparent;
|
|
12
12
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
2
|
+
import type { BlockVersionWithTransparent } from '../../model/BlockVersion';
|
|
3
|
+
export declare const ALIGN_TEXT: Record<AlignType, string>;
|
|
4
|
+
export declare const BACKGROUND_COLOR: Record<BlockVersionWithTransparent, string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.BACKGROUND_COLOR = exports.ALIGN_TEXT = void 0;
|
|
3
|
+
exports.ALIGN_TEXT = {
|
|
4
|
+
left: 'text-left',
|
|
5
|
+
center: 'text-center',
|
|
6
|
+
right: 'text-right',
|
|
7
|
+
};
|
|
8
|
+
exports.BACKGROUND_COLOR = {
|
|
9
|
+
transparent: 'bg-transparent',
|
|
10
|
+
primary: 'bg-white',
|
|
11
|
+
secondary: 'bg-primary-main',
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Headline/constants.ts"],"names":[],"mappings":";;AAGa,QAAA,UAAU,GAA8B;IACnD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;CACpB,CAAC;AAEW,QAAA,gBAAgB,GAAgD;IAC3E,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,iBAAiB;CAC7B,CAAC"}
|
|
@@ -10,7 +10,7 @@ const List_1 = require("../../ui-kit/List/List");
|
|
|
10
10
|
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
11
11
|
const renderBenefit_1 = require("./renderBenefit");
|
|
12
12
|
exports.ProductBlockInner = (0, uni_jsx_1.JSX)(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `w-full text-primary-text ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(BaseTile_1.BaseTile, { context: context, title: title && ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? ((0, jsx_runtime_1.jsx)(ButtonSection_1.ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? (0, jsx_runtime_1.jsx)(Description_1.Description, { className: "mt-3", description: description }) : null, benefits?.filter((items) => items.label)?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-3", children: benefits.map((_, i) => (0, renderBenefit_1.renderBenefit)(_, i, version)) })) : null, items?.length ? (0, jsx_runtime_1.jsx)(List_1.List, { className: "mt-3", items: items }) : null] }) }), renderImage(image)] }));
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `w-full text-primary-text ${className}`, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(BaseTile_1.BaseTile, { context: context, title: title && ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? ((0, jsx_runtime_1.jsx)(ButtonSection_1.ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? ((0, jsx_runtime_1.jsx)(Description_1.Description, { className: "mt-3 text-m-md", description: description })) : null, benefits?.filter((items) => items.label)?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-3", children: benefits.map((_, i) => (0, renderBenefit_1.renderBenefit)(_, i, version)) })) : null, items?.length ? (0, jsx_runtime_1.jsx)(List_1.List, { className: "mt-3", items: items }) : null] }) }), renderImage(image)] }));
|
|
14
14
|
});
|
|
15
15
|
function renderImage(image) {
|
|
16
16
|
return image?.src ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-5", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { className: 'block', ...image } }) })) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,qEAAkE;AAClE,sEAAmE;AACnE,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAEhD,mDAAgD;AAInC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,OAAO,CACL,iCAAK,SAAS,EAAE,4BAA4B,SAAS,EAAE,aACrD,0CACE,wBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,KAAK,IAAI,CACP,uBAAC,iBAAO,IACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,mCAAmC,GAC7C,CACH,EAEH,OAAO,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,uBAAC,6BAAa,IACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,4BAA4B,GACtC,CACH,CAAC,CAAC,CAAC,IAAI,aAGT,WAAW,CAAC,CAAC,CAAC,uBAAC,yBAAW,IAAC,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,qEAAkE;AAClE,sEAAmE;AACnE,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAEhD,mDAAgD;AAInC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,OAAO,CACL,iCAAK,SAAS,EAAE,4BAA4B,SAAS,EAAE,aACrD,0CACE,wBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,KAAK,IAAI,CACP,uBAAC,iBAAO,IACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,mCAAmC,GAC7C,CACH,EAEH,OAAO,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,uBAAC,6BAAa,IACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,4BAA4B,GACtC,CACH,CAAC,CAAC,CAAC,IAAI,aAGT,WAAW,CAAC,CAAC,CAAC,CACb,uBAAC,yBAAW,IAAC,SAAS,EAAC,gBAAgB,EAAC,WAAW,EAAE,WAAW,GAAI,CACrE,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAClD,gCAAK,SAAS,EAAC,MAAM,YAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,6BAAa,EAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GAAO,CACnF,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,IACtD,GACP,EACL,WAAW,CAAC,KAAK,CAAC,IACf,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,WAAW,CAAC,KAAK;IACxB,OAAO,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAClB,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,SAAG,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAI,GAC5C,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
+
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Recommendation: (props: import("@redneckz/uni-jsx").PropsWithChildren<RecommendationProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.Recommendation = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const ArrowButton_1 = require("../../ui-kit/Button/ArrowButton");
|
|
6
|
+
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
7
|
+
const RecommendationCard_1 = require("./RecommendationCard");
|
|
8
|
+
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
9
|
+
const CARD_FULL_VIEW_COUNT = 2;
|
|
10
|
+
const CARD_SHIFT = 525;
|
|
11
|
+
exports.Recommendation = (0, uni_jsx_1.JSX)(({ context, recommendations = [], className = '', title, version }) => {
|
|
12
|
+
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
13
|
+
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
14
|
+
const cardClassName = version === 'secondary' ? 'border-main-divider' : 'border-main-stroke';
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: `relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`, children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: "mb-8", title: title }) : null, (0, jsx_runtime_1.jsx)("div", { className: "flex duration-1000 gap-4", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
16
|
+
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
17
|
+
: null }), renderNavButtons({
|
|
18
|
+
cardsCount: recommendations.length,
|
|
19
|
+
activeCardIndex,
|
|
20
|
+
setActiveCardIndex,
|
|
21
|
+
}), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
22
|
+
});
|
|
23
|
+
const renderRecommendationCard = ({ context, version, className }) => (card, i) => {
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(RecommendationCard_1.RecommendationCard, { context: context, ...card, version: version, className: className }, String(i)));
|
|
25
|
+
};
|
|
26
|
+
const renderNavButtons = ({ cardsCount, activeCardIndex, setActiveCardIndex, }) => {
|
|
27
|
+
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
28
|
+
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
29
|
+
const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT;
|
|
30
|
+
const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT;
|
|
31
|
+
const showPrevButton = isUseSlider && activeCardIndex > 0;
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [showPrevButton && ((0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && ((0, jsx_runtime_1.jsx)(ArrowButton_1.ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }))] }));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iEAA8D;AAC9D,0DAAuD;AACvD,6DAA0D;AAG1D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,UAAU,GAAG,GAAG,CAAC;AAIV,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,EAAE,OAAO,EAAE,eAAe,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACpE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElE,MAAM,cAAc,GAClB,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,4BAA4B,CAAC;IACxF,MAAM,aAAa,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAE7F,OAAO,CACL,qCACE,SAAS,EAAE,+CAA+C,cAAc,IAAI,SAAS,EAAE,aAEtF,KAAK,CAAC,CAAC,CAAC,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC3E,gCACE,SAAS,EAAC,0BAA0B,EACpC,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,eAAe,GAAG,UAAU,KAAK,EAAE,EACtE,IAAI,EAAC,MAAM,YAEV,eAAe,EAAE,MAAM;oBACtB,CAAC,CAAC,eAAe,CAAC,GAAG,CACjB,wBAAwB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CACzE;oBACH,CAAC,CAAC,IAAI,GACJ,EACL,gBAAgB,CAAC;gBAChB,UAAU,EAAE,eAAe,CAAC,MAAM;gBAClC,eAAe;gBACf,kBAAkB;aACnB,CAAC,EACF,gCACE,SAAS,EAAE,GAAG,kBAAkB,WAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,uBACrD,EAAE,GACF,EACF,gCACE,SAAS,EAAE,GAAG,kBAAkB,YAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBACnD,EAAE,GACF,IACM,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,wBAAwB,GAC5B,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CACpC,CAAC,IAA+B,EAAE,CAAS,EAAE,EAAE;IAC7C,OAAO,CACL,uBAAC,uCAAkB,IAEjB,OAAO,EAAE,OAAO,KACZ,IAAI,EACR,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,IAJf,MAAM,CAAC,CAAC,CAAC,CAKd,CACH,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,gBAAgB,GAAG,CAAC,EACxB,UAAU,EACV,eAAe,EACf,kBAAkB,GAKnB,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,kBAAkB,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;IACtE,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,kBAAkB,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;IACtE,MAAM,WAAW,GAAG,UAAU,GAAG,oBAAoB,CAAC;IACtD,MAAM,cAAc,GAAG,WAAW,IAAI,UAAU,GAAG,eAAe,GAAG,oBAAoB,CAAC;IAC1F,MAAM,cAAc,GAAG,WAAW,IAAI,eAAe,GAAG,CAAC,CAAC;IAE1D,OAAO,CACL,4CACG,cAAc,IAAI,CACjB,uBAAC,yBAAW,IACV,SAAS,EAAC,8CAA8C,EACxD,OAAO,EAAE,eAAe,EACxB,SAAS,EAAC,6FAAkB,GAC5B,CACH,EACA,cAAc,IAAI,CACjB,uBAAC,yBAAW,IACV,SAAS,EAAC,oCAAoC,EAC9C,OAAO,EAAE,eAAe,EACxB,SAAS,EAAC,mGAAmB,GAC7B,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import type { RecommendationCardContent } from './RecommendationContent';
|
|
4
|
+
export interface RecommendationCardProps extends RecommendationCardContent, UniBlockProps {
|
|
5
|
+
version?: BlockVersion;
|
|
6
|
+
}
|
|
7
|
+
export declare const RecommendationCard: (props: import("@redneckz/uni-jsx").PropsWithChildren<RecommendationCardProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.RecommendationCard = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const Description_1 = require("../../ui-kit/Description/Description");
|
|
6
|
+
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
7
|
+
const Img_1 = require("../../ui-kit/Img/Img");
|
|
8
|
+
const List_1 = require("../../ui-kit/List/List");
|
|
9
|
+
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
10
|
+
exports.RecommendationCard = (0, uni_jsx_1.JSX)(({ context, className = '', title, description, items, image, version }) => {
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)("section", { className: `border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: (0, jsx_runtime_1.jsxs)(BaseTile_1.BaseTile, { context: context, title: title && (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h4", title: title, className: "mb-4" }), image: image?.src && (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-auto ml-7", image: image }), children: [description ? (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description }) : null, items?.length ? (0, jsx_runtime_1.jsx)(List_1.List, { items: items, version: version }) : null] }) }));
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,sEAAmE;AACnE,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAOnC,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACzE,OAAO,CACL,oCACE,SAAS,EAAE,6EAA6E,SAAS,EAAE,EACnG,IAAI,EAAC,UAAU,YAEf,wBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,IAAI,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,EAC3E,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,aAElE,WAAW,CAAC,CAAC,CAAC,uBAAC,yBAAW,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EAC9D,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,IACvD,GACH,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
|
+
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
4
|
+
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
5
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
6
|
+
export declare type RecommendationCardContent = HeadingContent & DescriptionContent & ListContent & ImageContent;
|
|
7
|
+
/**
|
|
8
|
+
* @title Рекомендации
|
|
9
|
+
*/
|
|
10
|
+
export interface RecommendationContent extends HeadingContent {
|
|
11
|
+
/** @title Карточки */
|
|
12
|
+
recommendations?: RecommendationCardContent[];
|
|
13
|
+
version?: BlockVersion;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendationContent.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationContent.ts"],"names":[],"mappings":""}
|