@redneckz/wildless-cms-uni-blocks 0.4.0 → 0.4.1
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/bundle.umd.js +42 -44
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/ProjectSettings.d.ts +2 -3
- package/dist/ProjectSettings.js +2 -2
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/api/LikeAPI.d.ts +1 -1
- package/dist/api/LikeAPI.js +6 -5
- package/dist/api/LikeAPI.js.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/hooks/useLikeService.js +1 -3
- package/dist/hooks/useLikeService.js.map +1 -1
- package/lib/ProjectSettings.d.ts +2 -3
- package/lib/ProjectSettings.js +2 -2
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/api/LikeAPI.d.ts +1 -1
- package/lib/api/LikeAPI.js +6 -5
- package/lib/api/LikeAPI.js.map +1 -1
- package/lib/components/Accordion/Accordion.js +1 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/hooks/useLikeService.js +1 -3
- package/lib/hooks/useLikeService.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +37 -39
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/ProjectSettings.d.ts +2 -3
- package/mobile/dist/ProjectSettings.js +2 -2
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/api/LikeAPI.d.ts +1 -1
- package/mobile/dist/api/LikeAPI.js +6 -5
- package/mobile/dist/api/LikeAPI.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/hooks/useLikeService.js +1 -3
- package/mobile/dist/hooks/useLikeService.js.map +1 -1
- package/mobile/lib/ProjectSettings.d.ts +2 -3
- package/mobile/lib/ProjectSettings.js +2 -2
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/api/LikeAPI.d.ts +1 -1
- package/mobile/lib/api/LikeAPI.js +6 -5
- package/mobile/lib/api/LikeAPI.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/hooks/useLikeService.js +1 -3
- package/mobile/lib/hooks/useLikeService.js.map +1 -1
- package/mobile/src/ProjectSettings.ts +3 -4
- package/mobile/src/api/LikeAPI.ts +21 -16
- package/mobile/src/components/ProductTile/ProductTile.tsx +2 -1
- package/mobile/src/components/PromoTile/PromoTile.tsx +3 -2
- package/mobile/src/components/Tile/Tile.tsx +2 -2
- package/mobile/src/hooks/useLikeService.ts +1 -4
- package/package.json +1 -1
- package/src/ProjectSettings.ts +3 -4
- package/src/api/LikeAPI.ts +21 -16
- package/src/components/Accordion/Accordion.tsx +1 -0
- package/src/components/LinkDocs/LinkDocs.tsx +1 -0
- package/src/components/ProductTile/ProductTile.tsx +2 -1
- package/src/components/PromoTile/PromoTile.tsx +3 -2
- package/src/components/Tile/Tile.tsx +2 -2
- package/src/hooks/useLikeService.ts +1 -4
|
@@ -52,17 +52,48 @@
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
const projectSettings = new (class {
|
|
56
|
+
_ = {
|
|
57
|
+
PROD_BRANCH: 'master',
|
|
58
|
+
FORCED_DRAFT_FLOW: false,
|
|
59
|
+
};
|
|
60
|
+
setup(_) {
|
|
61
|
+
this._ = _;
|
|
62
|
+
}
|
|
63
|
+
get TEST_BRANCH() {
|
|
64
|
+
return this._.TEST_BRANCH;
|
|
65
|
+
}
|
|
66
|
+
get RC_BRANCH() {
|
|
67
|
+
return this._.RC_BRANCH;
|
|
68
|
+
}
|
|
69
|
+
get PROD_BRANCH() {
|
|
70
|
+
return this._.PROD_BRANCH;
|
|
71
|
+
}
|
|
72
|
+
get FORCED_DRAFT_FLOW() {
|
|
73
|
+
return this._.FORCED_DRAFT_FLOW;
|
|
74
|
+
}
|
|
75
|
+
get ASSIST_PROJECT_ID() {
|
|
76
|
+
return this._.ASSIST_PROJECT_ID;
|
|
77
|
+
}
|
|
78
|
+
get SITEMAP() {
|
|
79
|
+
return this._.SITEMAP;
|
|
80
|
+
}
|
|
81
|
+
get CDN() {
|
|
82
|
+
return this._.CDN;
|
|
83
|
+
}
|
|
84
|
+
})();
|
|
85
|
+
|
|
55
86
|
const AUTH_PREFIX = 'guest';
|
|
56
87
|
const STORAGE_KEY = 'likesToken';
|
|
57
88
|
// eslint-disable-next-line max-lines-per-function
|
|
58
|
-
function LikeAPI(
|
|
89
|
+
function LikeAPI() {
|
|
59
90
|
async function getLikeCount(...nodeIds) {
|
|
60
91
|
if (!nodeIds.length) {
|
|
61
92
|
return [];
|
|
62
93
|
}
|
|
63
94
|
const { token: Authorization } = await auth();
|
|
64
95
|
try {
|
|
65
|
-
const response = await fetch(
|
|
96
|
+
const response = await fetch(`/assist/v1/public/projects/${projectSettings.ASSIST_PROJECT_ID}/nodes/likes`, {
|
|
66
97
|
method: 'POST',
|
|
67
98
|
mode: 'cors',
|
|
68
99
|
headers: { 'Content-Type': 'application/json', Authorization },
|
|
@@ -84,7 +115,7 @@
|
|
|
84
115
|
}
|
|
85
116
|
const { token: Authorization, name } = await auth();
|
|
86
117
|
try {
|
|
87
|
-
const response = await fetch(
|
|
118
|
+
const response = await fetch(`/assist/v1/public/projects/${projectSettings.ASSIST_PROJECT_ID}/nodes/like`, {
|
|
88
119
|
method: 'POST',
|
|
89
120
|
mode: 'cors',
|
|
90
121
|
headers: {
|
|
@@ -111,7 +142,7 @@
|
|
|
111
142
|
}
|
|
112
143
|
const { token: Authorization, name } = await auth();
|
|
113
144
|
try {
|
|
114
|
-
const response = await fetch(
|
|
145
|
+
const response = await fetch(`/assist/v1/public/projects/${projectSettings.ASSIST_PROJECT_ID}/nodes/unlike`, {
|
|
115
146
|
method: 'POST',
|
|
116
147
|
mode: 'cors',
|
|
117
148
|
headers: {
|
|
@@ -143,7 +174,7 @@
|
|
|
143
174
|
// do nothing
|
|
144
175
|
}
|
|
145
176
|
try {
|
|
146
|
-
const response = await fetch(
|
|
177
|
+
const response = await fetch(`/assist/v1/public/auth`, {
|
|
147
178
|
method: 'POST',
|
|
148
179
|
mode: 'cors',
|
|
149
180
|
headers: {
|
|
@@ -377,37 +408,6 @@
|
|
|
377
408
|
IconTitleMap["WateringCan"] = "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u043E\u0434\u0443\u043A\u0442";
|
|
378
409
|
})(IconTitleMap || (IconTitleMap = {}));
|
|
379
410
|
|
|
380
|
-
const projectSettings = new (class {
|
|
381
|
-
_ = {
|
|
382
|
-
PROD_BRANCH: 'master',
|
|
383
|
-
FORCED_DRAFT_FLOW: false,
|
|
384
|
-
};
|
|
385
|
-
setup(_) {
|
|
386
|
-
this._ = _;
|
|
387
|
-
}
|
|
388
|
-
get TEST_BRANCH() {
|
|
389
|
-
return this._.TEST_BRANCH;
|
|
390
|
-
}
|
|
391
|
-
get RC_BRANCH() {
|
|
392
|
-
return this._.RC_BRANCH;
|
|
393
|
-
}
|
|
394
|
-
get PROD_BRANCH() {
|
|
395
|
-
return this._.PROD_BRANCH;
|
|
396
|
-
}
|
|
397
|
-
get FORCED_DRAFT_FLOW() {
|
|
398
|
-
return this._.FORCED_DRAFT_FLOW;
|
|
399
|
-
}
|
|
400
|
-
get ENABLE_ASSIST() {
|
|
401
|
-
return this._.ENABLE_ASSIST;
|
|
402
|
-
}
|
|
403
|
-
get SITEMAP() {
|
|
404
|
-
return this._.SITEMAP;
|
|
405
|
-
}
|
|
406
|
-
get CDN() {
|
|
407
|
-
return this._.CDN;
|
|
408
|
-
}
|
|
409
|
-
})();
|
|
410
|
-
|
|
411
411
|
const svgUseStyleMap = {
|
|
412
412
|
normal: 'text-primary-main',
|
|
413
413
|
black: 'text-black',
|
|
@@ -1824,9 +1824,7 @@
|
|
|
1824
1824
|
Placeholder,
|
|
1825
1825
|
};
|
|
1826
1826
|
|
|
1827
|
-
const
|
|
1828
|
-
const PROJECT_ID = process.env.NEXT_PUBLIC_PROJECT_ID || '';
|
|
1829
|
-
const api = LikeAPI(PROJECT_ID, ASSIST_BASE_URL);
|
|
1827
|
+
const api = LikeAPI();
|
|
1830
1828
|
function useLikeService(pagePath) {
|
|
1831
1829
|
const [likeCount, setLikeCount] = useState(0);
|
|
1832
1830
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),r=n("useState"),l=n("useEffect"),a=n("useCallback"),i=n("useMemo");function o(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}}const s="likesToken";function c(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(s)||"");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(s,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:l}=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:l},body:JSON.stringify({node_ids:r})}),{likes:a}=await n.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:l,name:a}=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:l,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{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:l,name:a}=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:l,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}}}}const d=(...e)=>globalThis._uni._jsx(...e),m=(...e)=>globalThis._uni._jsxs(...e),h=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:u(e)),t._tmpl},u=e=>{function t(t,n){const{children:r,...l}=t||{},a=n?.slots?.default,i=r||a&&a();return e(Object.assign(l,i&&{children:i}),n)}return t.inheritAttrs=!1,t},p={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},x=h((e=>{const{className:t,headingType:n="h3",title:r,as:l="h3"}=e;return d(l,{className:`font-sans font-medium m-0 ${p[n]} ${t||""}`,children:r})}));var g,b;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AirPlane="AirPlane",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.CarIcon="CarIcon",e.ChartSquareIcon="ChartSquareIcon",e.CinemaIcon="CinemaIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocsIcon="DocsIcon",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.DoneIcon="DoneIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.Logo="Logo",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PackA4="PackA4",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.PowerIcon="PowerIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.PumpkinIcon="PumpkinIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.SoundIcon="SoundIcon",e.StateMortgageIcon="StateMortgageIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon",e.WateringCan="WateringCan"}(g||(g={})),function(e){e.ActualBalanceIcon="Деньги",e.AirPlane="Самолет",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowUpIcon="Стрелка вверх",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.CarIcon="Машина",e.ChartSquareIcon="Деньги внутри кошелька",e.CinemaIcon="Кино",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocsIcon="Документы",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.DoneIcon="Зелёная 'галочка'",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.Logo="Logo",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PackA4="PackA4",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.PowerIcon="Щит",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.PumpkinIcon="Тыква",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.SoundIcon="Звук",e.StateMortgageIcon="StateMortgageIcon",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами",e.WateringCan="Добавить продукт"}(b||(b={}));const f=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}},y={normal:"text-primary-main",black:"text-black",white:"text-black invert"},N=h((({className:e="",imageClassName:t="",name:n="",alt:r=`Иконка ${b[n]||n}`,title:l=r,iconVersion:a="normal",asSVG:i,...o})=>{const s=`${f.CDN||""}icons/${n}.svg`;return i?m("svg",{className:e,...o,"aria-hidden":"true",children:[l?d("title",{children:l}):null,r?d("desc",{children:r}):null,d("use",{className:`${y[a]} ${t}`,href:`${s}#icon`,xlinkHref:`${s}#icon`})]}):d("img",{className:e,src:s,alt:r,title:l,...o,"aria-hidden":"true"})}));function v(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const I=(e,t)=>e.media&&t.media?e.media-t.media:0,w=h((({className:e="",image:t,imageClassName:n="",isMobile:r=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return m("picture",{className:`${r?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(I).map((({src:e,format:t,media:n,size:r},l)=>d("source",{srcSet:e,type:C(t),media:n?`(max-width: ${n}px)`:"",...r},`${l}_${e}`))):null,k(t,n,r)]})})),k=(e,t="",n=!1)=>{const r=e.title||"",l=e.alt||e.title,a=n?"m-auto":"m-0";return d("img",{src:e.src,className:`${a} ${t}`,alt:l,title:r,...e.size})};function C(e){return e?`image/${String(e)}`:void 0}const S=h((({className:e="",image:t,imageClassName:n="",isMobile:r,...l})=>{if(!t)return null;const a="string"==typeof t?t:t.icon;return a||""===a?a.length?d(N,{className:e,imageClassName:n,iconVersion:v(t),name:a,...l}):null:d(w,{className:e,imageClassName:n,image:t,isMobile:r})})),$=h((({className:e="",image:t,imageClassName:n,...r})=>d(S,{className:e,image:t,imageClassName:n,...r,isMobile:!0})));function T(e){return e?e.filter(Boolean).join(" "):""}const D={left:"text-left",center:"text-center",right:"text-right"},R={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},_=h((({bgColorHeadline:e="transparent",className:t="",title:n,description:r,image:l,align:a="left"})=>{const i=R[e];return m("section",{className:`px-4 py-6 flex flex-col gap-2.5 ${i.background} ${t}`,children:[n?d(x,{headingType:"h2",className:`${i.text} ${D[a]}`,title:n}):null,r?d("p",{className:`text-m ${i.description} ${D[a]}`,children:r}):null,l?.src&&d("div",{className:"mt-2.5 mx-auto flex justify-center",children:d($,{image:l})})]})})),B=h((({children:e,activeIndex:t,indexFraction:n,showDots:r})=>{const l=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})};return r&&e?.length?d("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,r)=>d("div",{onClick:l(r),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:P(r,t,n),"aria-hidden":!0},String(r))))}):null})),P=(e,t,n)=>{if(e<t||e>t+1)return;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"}},A=h((({className:e="",children:t,...n})=>d("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...n,children:t}))),M=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),L=h((({className:e="",children:t,activeIndex:n,onScroll:r,gap:l=14,padding:a=16})=>d("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...M(a),gap:`${l}px`},role:"list",onScroll:r,children:t?.length?t?.map(((e,t)=>d(A,{style:M(a/4),"aria-current":Boolean(n===t),children:e},String(t)))):d(A,{children:t})}))),V=h((({className:e,children:t,gap:n=14,padding:l=16,showDots:a=!0,onSlideChange:i})=>{const[o,s]=r(0),[c,h]=r(0),u={activeIndex:o,indexFraction:c,showDots:a,children:t};return m("div",{className:e,children:[d(L,{gap:n,padding:l,activeIndex:o,onScroll:e=>{const{scrollLeft:t,clientWidth:r,childElementCount:a,scrollWidth:c,children:d}=e?.currentTarget,m=d[0].offsetWidth-l/2,u=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:l,itemWidth:a})=>{const i=r-n;if(2===l)return[[0,i],[i,r]];const o=a+e,s=n-e-t,c=l-2,d=new Array(l).fill(0).map(((e,t)=>0===t||t===c?[t>0?i-s:0,t>0?i:s]:[(t-1)*o+s,t*o+s]));return d[l-1]=[i,r],d})({gap:n,padding:l,clientWidth:r,scrollWidth:c,childElementCount:a,itemWidth:m}),{index:p,fraction:x}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,l]=t[n];return{index:n,fraction:(e-r)/(l-r)}})(t,u);p!==o&&i&&i(),s(p),h(x)},children:t}),d(B,{...u})]})})),j=h((({className:e,iconClassName:t,textClassName:n,suffixClassName:r,doc:l,icon:a})=>{const{text:i,fileSize:o,...s}=l;return m("a",{className:e,role:"link",...s,children:[a?d($,{className:t,image:a,width:"24px",height:"24px",asSVG:!0}):null,i?m("span",{className:n,children:[i,d("span",{className:r,children:s?.href&&G(U(s.href),o)})]}):null]})})),G=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),U=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},W=h((({className:e="",doc:t,icon:n})=>d(j,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),E=h((({context:e,hasBorder:t=!0,documents:n,icon:r})=>d(V,{context:e,className:"text-s text-primary-main mt-5",children:n?.length?n.map(((e,n)=>d(W,{className:t?"rounded-md border-main-stroke border border-solid p-4":"",doc:e,icon:r},String(n)))):null}))),O=h((({hasBorder:e=!0,documents:t,icon:n})=>d("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,r)=>d("div",{role:"listitem",children:d(W,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:n})},String(r)))):null}))),F=h((({className:e="",context:t,title:n,description:r,icon:l={icon:"DocIconMonoColor"},documents:a,orientation:i="vertical",hasBorder:o=!0})=>m("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[d(_,{className:"!p-0 "+(r?"gap-2":"gap-5"),title:n,description:r,context:t,align:"center"}),"vertical"===i?d(O,{hasBorder:o,documents:a,icon:l}):d(E,{context:t,hasBorder:o,documents:a,icon:l})]}))),H=e=>e?.includes("//"),z=e=>(e||"").replace(/\/?\?.*/,""),J=e=>{if(!e||!H(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var q=Object.freeze({__proto__:null,isURL:H,withoutQuery:z,getOrigin:J,getHash:e=>{if(!e||!H(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:e=>e?.startsWith("#")});const K="/mobile",X=(e,t)=>{if(!e)return e;const n=J(t?.href);return n?e.replace(n,"")||"/":e},Q=e=>e;function Y({router:e,handlerDecorator:t=Q},n){const r=((e,t)=>{if(!e)return e;const n=X(e,t)||"",r=t?.pathname.startsWith(K);return r&&!H(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const l=r&&!H(r),a=!n.target||"_self"===n.target;l&&a&&(t?.preventDefault(),e.push(r))}),n)}}const Z=h((e=>{const{text:t,aboveText:n,appendLeft:r,appendRight:l}=e;return m("div",{className:ee(e),children:[r||null,te(e)?m("div",{children:[d("div",{className:"text-xs-light text-left",children:n}),d("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,l||null]})})),ee=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const l="gap-2 "+(n?"py-2.5 px-7":"py-4 px-9");return["flex items-center justify-center",te(e)?l:"h-12 w-12",r?"rounded-full":""].join(" ")},te=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ne={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",link:"text-primary-main"},re={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},le="w-full text-center font-sans select-none",ae=h((({className:e,text:t,aboveText:n,appendLeft:r,href:l,target:a,onClick:i,children:o,disabled:s,rounded:c,version:m="primary",ariaLabel:h,...u})=>{const p=o??d(Z,{text:t,aboveText:n,appendLeft:r,rounded:c,version:m});return s?d("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:-1,className:`inline-block ${le} ${re[m]||""} ${c?"rounded-full":"rounded-md"} ${e||""}`,children:p}):d("a",{className:`${le} inline-block cursor-pointer no-underline focus:border focus:border-primary-focus ${ne[m]||""} ${c?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:a,onClick:i,"aria-label":h,role:l?"link":"button",...u,children:p})})),ie=h((({context:e,className:t="",buttons:n})=>{const{handlerDecorator:r}=e,l=e.useRouter();return n&&n?.length?d("div",{className:t,children:n.map(((e,t)=>function({icon:e,iconRight:t,...n},r){if(!n?.text)return null;return d(ae,e?{appendLeft:d($,{image:e,width:"24",height:"24",asSVG:!0}),appendRight:d($,{image:t,width:"24",height:"24",asSVG:!0}),...n}:{...n},String(r))}(Y({router:l,handlerDecorator:r},e),t)))}):null}));const oe={primary:"rounded-full inline-block mr-3 mt-2",secondary:"rounded-full inline-block mr-3 mt-2",gray:"rounded-full inline-block mr-3 mt-2",tile:"rounded-full inline-block mr-4 mt-3","tile-white":"rounded-full inline-block mr-4 mt-3"},se={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},ce=h((({className:e="",isDotted:t=!0,children:n,version:r="primary"})=>m("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t?d("div",{className:de(r)}):null,d("span",{children:n})]}))),de=e=>`${oe[e]} ${se[e]} ${{primary:"w-2 h-2 min-w-2 min-h-2",secondary:"w-2 h-2 min-w-2 min-h-2",gray:"w-1.5 h-1.5 min-w-1.5 min-h-1.5",tile:"w-[7px] h-[7px] min-w-[7px] min-h-[7px]","tile-white":"w-[7px] h-[7px] min-w-[7px] min-h-[7px]"}[e]}`,me={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},he=h((e=>{const{className:t="",itemClassName:n,isDotted:r,items:l,version:a="primary"}=e;return d("section",{className:`${me[a]} ${t}`,role:"list",children:l?.length?l.map(((e,t)=>d(ce,{className:n,isDotted:r,version:a,children:e},String(t)))):null})})),ue=h((({className:e="",title:t="",children:n,buttons:r,image:l})=>m("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,m("div",{className:"flex grow w-full justify-between",children:[m("div",{className:"flex flex-col justify-between w-full",children:[d("div",{children:n}),r?d("div",{children:r}):null]}),l]})]}))),pe={primary:"text-primary-text",secondary:"text-white"},xe={primary:"text-secondary-text",secondary:"text-white"};function ge(e){let t="text-primary-main";return"secondary"===e&&(t="text-black"),`w-6 h-6 rounded-full box-border ${t}`}const be=h((({className:e="",context:t,title:n,headlineVersion:r="L",description:l,benefits:a,benefitsVersion:i="normal",buttons:o,image:s,items:c,version:h="primary",isDotted:u=!0,label:p})=>m("div",{className:`w-full ${e}`,children:[m("div",{children:[p?Ne(p,h):null,d(_,{context:t,className:"!p-0 max-w-[600px]",title:n,description:l,bgColorHeadline:h,headlineVersion:r}),m(ue,{context:t,buttons:o?.length?d(ie,{context:t,buttons:o,className:"flex flex-col mt-5 gap-2.5"}):null,children:[a?.filter((e=>e.label))?.length?d("div",{className:"mt-3",children:a.map(((e,t)=>function({benefit:e,version:t="primary"},n){const r="secondary"===t;return m("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon?d($,{className:ge(t),image:{...e?.icon,iconVersion:r?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,d("div",{className:`text-l m-0 ${pe[t]}`,children:e.label}),e.description&&d("div",{className:`text-s ${xe[t]}`,children:e.description})]},String(n))}({benefit:e,version:h,benefitsVersion:i},t)))}):null,c?.length?d(he,{className:"mt-3 text-m",items:c,version:h,isDotted:u}):null]})]}),fe(s)]})));function fe(e){return e?.src?d($,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const ye={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},Ne=(e,t)=>d("div",{className:`px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${ye[t]}`,children:e}),ve={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Ie=h((e=>{const{className:t="",version:n="primary"}=e;return d("section",{className:`font-sans bg-white px-4 py-6 ${ve[n]} ${t}`,children:d(be,{...e})})})),we={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"}},ke=h((({title:e,description:t,blockVersion:n="primary",iconVersion:r,image:l,className:a="",items:i,isDotted:o=!0})=>{const s=we[n],c="secondary"===n?"secondary":"gray";return m("section",{className:`font-sans px-4 py-[18px] flex flex-col ${s.background} ${a}`,children:["small"===r?Ce(s.icon):null,"big"===r?Se(l):null,m("div",{className:"py-0.5",children:[e?d("div",{className:`text-l font-medium mb-1 ${s.title}`,children:e}):null,t?d("div",{className:`text-s ${s.description}`,children:t}):null,i?.length?d(he,{className:"mt-1 text-m",items:i,isDotted:o,version:c}):null]})]})}));function Ce(e){return d("div",{className:"mb-3",children:d("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Se(e){return e?.src?d($,{className:"pb-3 mr-auto",image:e}):null}const $e={primary:"bg-white",secondary:"bg-primary-main text-white"},Te=h((({context:e,title:t,description:n,cards:r=[],className:l,orientation:a="horizontal"})=>m("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${l}`,children:[m("div",{className:"flex flex-col items-center mb-5",children:[t?d(x,{headingType:"h3",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?d("div",{className:"text-m max-w-[600px] text-center mb-5",children:n}):null]}),De(a,r,e)]})));function De(e,t,n){return"horizontal"===e?d(V,{context:n,children:t?.map(Re)}):d("div",{className:"grid gap-[14px]",children:t?.map(Re)})}function Re(e,t){return m("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 ${$e[e.version??"primary"]}`,children:[m("div",{children:[e.image?.src?d("div",{className:"flex justify-center",children:d($,{className:"mb-3.5",image:e.image})}):null,e.title?d("h3",{className:"text-m-title-xs font-medium m-0",children:e.title}):null,e.description?_e(e):null,e.items?.length?Be(e.items,e.isDotted,e.version):null]}),e?.button?.text?(n=e.button,d(ae,{className:"mt-3",appendLeft:n?.icon&&d($,{image:n?.icon,width:"24px",height:"24px",asSVG:!0}),...n})):null]},t);var n}function _e(e){return d("div",{className:"text-secondary-text mt-1 text-s "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function Be(e,t,n="primary"){return d("section",{className:"mt-3",children:e.map(((e,r)=>m("div",{children:[t?d("div",{className:de(n)}):null,d("span",{className:"text-m font-medium",children:e.title}),d("span",{className:"text-s pl-2 "+("primary"===n?"text-secondary-text":""),children:e.text})]},String(r))))})}class Pe{static inst=new Pe;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]||=[],this.subscribers[e]?.push(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){this.subjectsStateMap[e]=t,this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const Ae=e=>{if(!e.length)return;const[t]=e;t.isIntersecting},Me=h((({anchor:e,className:t,context:n,children:a,tag:i="section",labels:o})=>{const s=i,{IntersectionObserverTag:c}=n,[m,h]=r(!0);return l((()=>Pe.inst.subscribe("tab",(e=>{h(!o?.length||!e.label||o.includes(e.label))}))),[o]),m?e?d(c,{tag:i,className:t,observerCallback:Ae,observerOptions:{threshold:1},anchor:e,children:a}):d(s,{className:t,children:a}):null})),Le=h((({className:e="",documents:t,...n})=>d(Me,{className:`font-sans bg-white mt-[10px] ${e}`,...n,children:d("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?Ve(t):null})}))),Ve=e=>e.map(((e,t)=>{const{text:n,...r}=e;return d("li",{className:"mb-4 list-none",children:d("a",{className:"hover:text-primary-main",role:"link",...r,children:n||null})},`list_item_${String(t)}`)})),je={Headline:_,LinkDocs:F,TextBlock:ke,ProductBlock:Ie,Gallery:Te,LinkList:Le},Ge=({blocks:e,context:t,className:n=""})=>e?.length?e.map(Ue({context:t,className:n})):null,Ue=({context:e,className:t})=>(n,r)=>{if(!n)return null;const{style:l,blockListType:a,...i}=n;if(!a||!(a in je))return null;const o=T(l);return d(je[a],{className:`${t} ${o}`,context:e,...i},`block_${r}`)},We=h((({blocks:e,context:t})=>d("div",{className:"flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Ge({context:t,blocks:e,className:"!px-0"})}))),Ee=h((({label:e,labelIcon:t,blocks:n,bordered:l,context:a})=>{const{hasContent:i,icon:o,handleToggle:s}=(({blocks:e,initialState:t=!1})=>{const[n,l]=r(t),a=e?.length;return{isActive:n,hasContent:a,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{const t=e.currentTarget;if(!t)return;l(!n);const r=t.nextSibling;r.style.maxHeight=r.style.maxHeight?"":`${r.scrollHeight}px`}}})({blocks:n});return m("li",{className:`${Oe(l)} border-solid border-main-divider`,children:[m("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${l?"":"py-[14px] px-0"}\n ${i?"group cursor-pointer":""}`,onClick:s,children:[m("span",{className:"text-m-title-xs font-medium pr-2.5 flex "+(i?"group-hover:text-primary-main":""),children:[t?d($,{image:t,width:"24",height:"24",asSVG:!0,className:"mr-3"}):null,e]}),i?d($,{className:"w-6",image:o,width:"24",height:"24",asSVG:!0}):null]}),i?d(We,{blocks:n,context:a}):null]})}));function Oe(e){return e?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"}const Fe=h((({title:e,description:t,accordionItems:n,context:r,className:l="",bordered:a})=>m("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${l}`,children:[e?d(x,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?d("div",{className:"mb-5 text-m-light text-center",children:t}):null,n?.length?d("ul",{className:"list-none m-0 p-0",children:n.map(((e,t)=>d(Ee,{...e,context:r,bordered:a},`AccordionItem_${t}`)))}):null]}))),He=(e=!1)=>e?"text-white":"",ze=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Je=h((({icon:e,image:t,title:n,subtitle:r,isFillGradient:l})=>m("div",{role:"columnheader",children:[e?d($,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&d("div",{className:"mb-3.5",children:d($,{image:t})}),n?d(x,{headingType:"h4",className:He(l),title:n}):null,r?d("div",{className:ze(l),children:r}):null]}))),qe=h((({cell:e,rowHeader:t,isFillGradient:n=!1})=>d("div",{className:"box-border flex flex-col",role:"cell",children:d("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Ke(n,t))})}))),Ke=(e,t)=>({label:n,description:r},l)=>m("div",{className:"flex justify-between text-s py-3.5",children:[d("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),m("div",{className:"basis-1/2",children:[n?d("div",{className:"text-right "+(e?"text-white":""),children:n}):null,r?d("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:r}):null]})]},String(l)),Xe=h((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:r,showRow:l,onToggleColumn:a})=>{const i=t?.slice(0,l?t.length:n),o=r?"secondary":"primary";return m("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${r?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[d(Je,{...e,isFillGradient:r}),i?.length?i.map((({rowHeader:e,cell:t},n)=>d(qe,{cell:t,rowHeader:e,isFillGradient:r},String(n)))):null,l&&Qe({header:e,buttonVersion:o}),Ye({onToggleColumn:a,isFillGradient:r,showRow:l})]})})),Qe=({header:e,buttonVersion:t})=>d(ae,{href:e.link.href,target:e.link.target,version:t,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}),Ye=({onToggleColumn:e,isFillGradient:t,showRow:n})=>d("div",{className:"mt-5",role:"cell",children:d("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),Ze=h((({className:e,context:t,title:n,rowHeaders:l,columns:a,visibleRowLength:i=0,isColoredFirstColumn:o=!1,orientation:s="vertical"})=>{const c=a?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:l?.[t]?.title})))})))||[],[h,u]=r(new Array(a?.length||0).fill(!i));return m("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[n?d(x,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,et({tableData:c,context:t,visibleRowLength:i,isColoredFirstColumn:o,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],u([...h])},orientation:s,setColumnsViewState:u})]})})),et=({context:e,tableData:t,visibleRowLength:n,isColoredFirstColumn:r,columnsViewState:l,handleToggleColumn:a,orientation:i="horizontal",setColumnsViewState:o})=>d("div",{role:"table",children:t?.length?tt({orientation:i,context:e,columnsViewState:l,setColumnsViewState:o,tableData:t,visibleRowLength:n,isColoredFirstColumn:r,handleToggleColumn:a}):null}),tt=({orientation:e,context:t,columnsViewState:n,setColumnsViewState:r,tableData:l,visibleRowLength:a,isColoredFirstColumn:i,handleToggleColumn:o})=>"horizontal"===e?d(V,{context:t,onSlideChange:rt(n,r),children:l.map(nt({context:t,visibleRowLength:a,isColoredFirstColumn:i,columnsViewState:n,handleToggleColumn:o}))}):l.map(nt({context:t,visibleRowLength:a,isColoredFirstColumn:i,columnsViewState:n,handleToggleColumn:o})),nt=({context:e,visibleRowLength:t,isColoredFirstColumn:n,columnsViewState:r,handleToggleColumn:l})=>(a,i)=>d(Xe,{context:e,visibleRowLength:t,showRow:r[i],header:a.header,columnData:a.column,isFillGradient:0===i&&n,onToggleColumn:()=>l(i)},String(i)),rt=(e,t)=>()=>{t(new Array(e.length).fill(!1))},lt=new Map;function at(e){return e?Array.isArray(e)?e:e instanceof Function?at(e()):[e]:[e]}let it=function(e,t){const n=i((()=>at(e)),[e]),[a,o]=r(),[s,c]=r();return l((()=>{if(!n.every((e=>null===e)))try{const e=t(...n);"then"in e?(e=>{e.then((e=>lt.get(n)||e)).then(o).catch(c)})(e):o(e)}catch(e){c(e)}}),[t,...n]),{data:a,error:s,mutate:()=>Promise.resolve(void 0),isValidating:!1}};const ot=(e,t)=>it(e,t);async function st(){try{const e=await fetch(ct,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(dt)});return await e.json()}catch(e){return console.error(e),Promise.resolve()}}const ct="https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000",dt={query:{bool:{must:[{term:{russian_region_code:"77"}},{term:{from_volume:"0"}},{terms:{currency_pair:["USD/RUB","EUR/RUB"]}}]}}},mt=e=>e.reduce(((e,t)=>{const n=t.currency_first?.code;return e.some((e=>e.code===n))||e.push({code:n,buy:ht(Number(t.rate_buy)),sell:ht(Number(t.rate_sell))}),e}),[]),ht=e=>Math.round(1e3*e)/1e3;var ut;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(ut||(ut={}));const pt=new Intl.NumberFormat("ru",{style:"currency",currency:ut.RUB}),xt=e=>e?pt.format(e):"",gt="text-left text-m-light text-secondary-text",bt={USD:"DollarIcon",EUR:"EuroIcon"},ft=h((({className:e,exchangeCurrencyItems:t})=>m("table",{className:`h-fit w-fit ${e}`,children:[d("thead",{children:m("tr",{children:[d("th",{className:gt,children:"Валюта"}),d("th",{className:`${gt} pl-11`,children:"Купить"}),d("th",{className:`${gt} pl-11`,children:"Продать"})]})}),d("tbody",{children:t.map((e=>yt(e)))})]}))),yt=e=>{const t=e?.code;return m("tr",{className:"pb-1 text-h6",children:[d("td",{className:"pt-4",children:m("div",{className:"flex items-center",children:[t?d($,{image:{icon:bt[t]},width:"24",height:"24"}):null,d("span",{className:"ml-2",children:t})]})}),d("td",{className:"pt-4 pl-11",children:xt(e?.sell)}),d("td",{className:"pt-4 pl-11",children:xt(e?.buy)})]},t)},Nt=h((({className:e="",address:t,distance:n})=>m("div",{className:`flex ${e}`,children:[d($,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),m("div",{className:"ml-3",children:[t?d("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,n?m("p",{className:"text-secondary-text m-0 text-m",children:["Курс указан для ближайшего офиса - ",n]}):null]})]}))),vt=(e,t,n)=>{const r=Number(It(e))*Math.pow(t,n?-1:1);return Number.isInteger(r)?r:((e,t=2)=>{const n=Math.pow(10,t);return Math.round(parseFloat(String(e))*n)/n})(r)},It=e=>e.replace(/[^\d.,]/g,"").replace(",","."),wt=e=>{return(t=[[e=>e.value!==ut.RUB&&e.oppositeValue!==ut.RUB,()=>e.handleConvert(e.value,ut.RUB)],[e=>e.value===ut.RUB&&e.oppositeValue===ut.RUB,()=>e.handleConvert(e.value,ut.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t},kt=h((({className:e="",id:t,name:n,type:r="text",placeholder:l,pattern:a,value:i,onChange:o})=>d("input",{className:e,id:t,name:n||t,type:r,pattern:a,placeholder:l,value:i,onChange:e=>{const t=e.target.validity.valid?e.target.value:i;o(t)}}))),Ct={background:"url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%"},St=h((({className:e="",id:t,name:n,children:r,value:l,onChange:a})=>d("select",{className:`appearance-none ${e}`,style:Ct,id:t,name:n||t,value:l,onChange:e=>a(e.target.value),children:r}))),$t=h((({className:e="",value:t,selected:n,children:r})=>d("option",{className:e,value:`${t}`,selected:n,children:r})));function Tt(e){const{placeholder:t,rates:n,selected:r,value:l,setValue:a,setSelected:i}=e;return m("div",{className:"relative flex items-center",children:[d(kt,{className:"shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12",placeholder:t,type:"text",value:l,onChange:a}),n.length?d(St,{className:"shrink-0 w-20 h-9 -translate-x-8 bg-transparent",value:r,onChange:e=>i(e),children:n.map(((e,t)=>d($t,{value:e.code,children:e.code},String(t))))}):null]})}const Dt=h((({context:e,className:t="",currencyRatesBuy:n,currencyRatesSell:l,button:a})=>{const{useRouter:i,handlerDecorator:o}=e,s=i(),[c,h]=r({inputSell:"",inputBuy:"",selectSell:n?.[0]?.code||ut.RUB,selectBuy:l?.[0]?.code||ut.USD}),u=e=>{h((t=>({...t,...e})))};return m("div",{className:`grid gap-[18px] pt-2 ${t}`,children:[Tt({placeholder:"Хочу продать",rates:l,selected:c.selectSell,setSelected:Rt(c,u,l),value:c.inputSell,setValue:e=>Bt(u,l)(e,c.selectSell,c.selectBuy)}),Tt({placeholder:"Получу",rates:n,selected:c.selectBuy,setSelected:_t(c,u,n),value:c.inputBuy,setValue:e=>Pt(u,n)(e,c.selectBuy,c.selectSell)}),a?.text?d(ae,{className:"py-4 mr-1",version:a?.version,...Y({router:s,handlerDecorator:o},a),children:a.text}):null]})})),Rt=(e,t,n)=>r=>{t({selectSell:r}),wt({value:r,oppositeValue:e.selectBuy,handleConvert:(r=e.selectSell,l=e.selectBuy)=>{Bt(t,n)(e.inputSell,r,l)}})},_t=(e,t,n)=>r=>{t({selectBuy:r}),wt({value:r,oppositeValue:e.selectSell,handleConvert:(r=e.selectBuy,l=e.selectSell)=>Pt(t,n)(e.inputBuy,r,l)})},Bt=(e,t)=>(n,r,l)=>{e({inputSell:It(n),selectBuy:l});const a=t.find((e=>e.code===l))?.buy||t.find((e=>e.code===r))?.sell;a&&e({inputBuy:String(vt(n,a,r===ut.RUB)||"")})},Pt=(e,t)=>(n,r,l)=>{e({inputBuy:It(n),selectSell:l});const a=t.find((e=>e.code===l))?.sell||t.find((e=>e.code===r))?.buy;a&&e({inputSell:String(vt(n,a,r===ut.RUB)||"")})},At={address:"Москва, ул.Ленина д.28",distance:"6км"},Mt=h((({className:e="",context:t,title:n="Курсы обмена валют",button:r,...l})=>{const a=function(){const{data:e}=ot(ct,st),t=e?.hits?.hits?.map((e=>e._source))||[];return t.length?mt(t):t}(),i=a.filter((e=>e.buy));i.unshift({code:ut.RUB});const o=a.filter((e=>e.sell));return o.push({code:ut.RUB}),d(Me,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,...l,children:d(ue,{context:t,title:d(x,{headingType:"h4",title:n,className:"whitespace-pre-wrap text-h4"}),children:m("div",{className:"flex",children:[m("div",{className:"mr-14 pt-4",children:[a?d(ft,{className:"mb-[30px]",exchangeCurrencyItems:a}):null,d(Nt,{...At})]}),a.length&&i.length&&o.length?d(Dt,{className:"grow",context:t,currencyRatesBuy:i,currencyRatesSell:o,button:r}):null]})})})})),Lt={"bg-white":"text-primary-main",transparent:"text-white"},Vt={"bg-white":"text-black",transparent:"text-white"},jt=h((({className:e="",href:t,children:n,targetBlank:r,bgColor:l="bg-white",hideTitle:a})=>m("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":"Россельхозбанк",children:[d($,{image:{icon:"Logo"},className:`${Lt[l]} w-10 h-[38px]`,asSVG:!0}),a?null:d("span",{className:`${Vt[l]} text-s font-medium ml-2.5`,children:n||"Россельхозбанк"})]}))),Gt=h((({className:e="",title:t="Мобильное приложение",description:n,href:r="#"})=>d("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:r?m("div",{className:"flex",children:[d("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:d(jt,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),m("a",{href:r,target:"_blank",className:"flex flex-col justify-center pl-3",children:[d("div",{className:"text-s font-medium mb-[3px]",children:t}),d("div",{className:"text-s text-secondary-text",children:n})]})]}):null}))),Ut=h((({className:e="",items:t,hasButton:n,context:r})=>{const l=r.useRouter(),{handlerDecorator:a}=r;return m("div",{className:e,children:[t?.length?t.map(Wt):null,n?d(ae,{version:"primary",className:"mb-6 w-full",...Y({router:l,handlerDecorator:a},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Wt=(e,t)=>{const{type:n,text:r,description:l}=e;return m("div",{className:"mb-4",children:[d("div",{children:Et(n,r)}),d("div",{className:"mt-1 text-s-light text-secondary-text",children:l})]},String(t))},Et=(e,t="")=>{switch(e){case"tel":return d("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Ot(t)}`,children:t});case"email":return d("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return d("span",{children:t})}},Ot=e=>e.replaceAll(/\D/g,""),Ft=h((({className:e="",index:t,text:n,href:r,target:l,onClick:a})=>d("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:r,target:l,onClick:a,children:n||`Документ ${t}`}))),Ht=h((({title:e,links:t,className:n="",context:r})=>{const l=r.useRouter(),{handlerDecorator:a}=r;return m("div",{className:n,children:[d("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?d("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>d(Ft,{index:t,className:"text-s",...Y({router:l,handlerDecorator:a},e)},String(t))))}):null]})})),zt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],Jt=h((({href:e,version:t="primary"})=>{const{icon:n,label:r}=zt.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!n)return null;return d("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===t?"bg-secondary-light hover:bg-secondary-hover":"border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===t?"hover:text-black":""}`,href:e,"aria-label":r,target:"_blank",rel:"noopener noreferrer",children:n?d($,{image:n,imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),qt=h((({className:e,media:t,version:n,context:r})=>{const l=r.useRouter(),{handlerDecorator:a}=r;return d("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>d(Jt,{version:n,...Y({router:l,handlerDecorator:a},e)},String(t))))})})),Kt=h((({className:e="",index:t,text:n,href:r,target:l,onClick:a})=>d("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:a,children:n||`Документ ${t}`}))),Xt=h((({className:e,links:t,context:n})=>{const r=n.useRouter(),{handlerDecorator:l}=n;return m("div",{className:`${e||""}`,children:[d("div",{className:"py-6",children:d("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?d("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>d(Kt,{index:t,className:"",...Y({router:r,handlerDecorator:l},e)},String(t))))}):null]})}));function Qt(){const{data:e}=ot(Zt(),Yt);return e||{}}async function Yt(){const e=await fetch(Zt());return await e.json()}function Zt(){return`/wcms-resources/${f.SITEMAP||"sitemap"}.json`}const en=h((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:l}=(()=>{const[e,t]=r("");return{term:e,setTerm:e=>t(e)}})(),a=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",o=t?"some search":void 0;return m("form",{className:`font-sans relative ${e}`,children:[m("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[d("div",{className:t?"w-[20px] h-[20px]":"w-[24px] h-[24px]",children:d($,{image:"LoupeIcon",width:"24",height:"24"})}),n?null:d("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${a}`,children:"Поиск по сайту"})]}),d("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-main-divider focus:border-primary-text ${i}`,value:n,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input",placeholder:o}),t?d("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),l("")},children:d($,{image:"CloseIcon",width:"24",height:"24"})}):d(ae,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:d("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),tn=h((({className:e=""})=>d(en,{className:e,isMobile:!0}))),nn=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),rn=h((({className:e="",documents:t,relatedEnterprises:n,contacts:r,socialMedia:l,context:a,horizontalNavigationTitle:i})=>{const o=Qt(),s=o?.dispositions;return m("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[d(Ut,{className:"overflow-hidden",items:r,context:a,hasButton:!0}),d(Fe,{context:a,className:"!p-0 mb-4",accordionItems:nn(o.topItems)}),d("div",{children:s?.map(ln)}),d(Gt,{context:a,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),d(tn,{context:a,className:"grow"}),d(qt,{className:"pb-4",media:l,context:a}),d(Ht,{title:i,links:n,context:a}),d(Xt,{links:t,context:a})]})})),ln=(e,t)=>{const{icon:n,href:r,text:l}=e;return m(ae,{version:"link",href:r,className:"flex text-s mb-4 w-6",children:[n?d($,{className:"pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,d("span",{className:"pl-2.5 font-medium text-primary-text",children:l})]},`footer-${t}`)},an=(e,t,n=((e,t)=>t.startsWith(e)))=>n(z(e),(e=>(e||"").replace(K,""))(z(H(e)?t.href:t.pathname))),on=e=>t=>an(t.href,e),sn=e=>t=>t.items?.some(on(e))||an(t.href,e)||((e,t)=>J(e)===J(t.href))(t.href,e),cn=e=>t=>e?.href===t?.href,dn=(e,t)=>{return(r=e,l=t,(r||[]).map((e=>l?.find(cn(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(cn(e))))));var n,r,l},mn="absolute left-0 -bottom-3 w-full h-[2px]",hn=h((({className:e="",text:t,href:n,target:r,active:l,onClick:a,children:i,bgColor:o="bg-white"})=>m("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:n,target:r,onClick:a,children:[d("span",{className:un(o,l),children:t||i}),l?d("div",{className:pn(o,l)}):null]}))),un=(e,t=!1)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans text-s`},pn=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${mn}`:mn,xn=o("https://10.80.4.9");const gn=h((({context:e,burgerSubMenu:t,onClick:n,defaultLocation:i="",children:o})=>{const[s,c]=function(e){const[t,n]=r(e);return l((()=>{n(globalThis?.localStorage.getItem("location")||e)}),[e]),[t,a((()=>{xn.getFetcherAddress().then((t=>{const r=t||e;globalThis?.localStorage.setItem("location",r),n(r)}))}),[e])]}(i);return m("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[d("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:n,children:d($,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),m("button",{onClick:c,className:"flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[d($,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),s]}),o,d("div",{className:"mb-7",children:t?.map(bn)}),d(tn,{context:e,className:"grow"})]})})),bn=(e,t)=>{const{icon:n,href:r,text:l}=e;return m("a",{href:r,className:"flex text-s mb-4 hover:text-primary-main",children:[n?d($,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,d("span",{className:"font-medium pl-0.5",children:l})]},`headerSubMenu-${t}`)},fn=h((({onClick:e,bgColor:t})=>m("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[m("div",{className:"flex items-center",children:[d("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:d($,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),d(jt,{className:"mr-8",bgColor:t})]}),d("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-s border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),yn=h((({className:e="",defaultLocation:t,bgColor:n="bg-white",context:l,topItems:a})=>{const i=l.useRouter(),o=Qt(),s=o?.dispositions,{handlerDecorator:c}=l,h=dn(o.topItems,a).find(sn(i))?.items,u=(e=>(t=[])=>{const n=t?.filter(on(e));return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):void 0;var r})(i)(h),[p,x]=r(!1),g=()=>x(!p);return m("header",{className:`${n} ${e}`,children:[m("div",{className:"container px-4 py-0 box-border",children:[d(fn,{onClick:g,bgColor:n}),d("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:d("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:h?.map(((e,t)=>Nn({...Y({router:i,handlerDecorator:c},e),active:e===u,bgColor:n},t)))})})]}),p?d(gn,{context:l,onClick:g,burgerSubMenu:s,defaultLocation:t,children:d(Fe,{context:l,accordionItems:nn(o.topItems),className:"!p-0 mb-4"})}):null]})})),Nn=(e,t)=>d(hn,{className:"mr-8 whitespace-nowrap text-s",...e},String(t)),vn=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function In(e=""){const t=vn(e);return t<=4?"S":t<=8?"M":"L"}function wn(e=""){const t=vn(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function kn(e=""){const t=vn(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Cn=h((({className:e,context:t,title:n,description:r="Блок в разработке...",...l})=>m(Me,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${kn(e)} ${wn(e)} `,...l,children:[d(_,{context:t,className:"!p-0 max-w-[600px]",title:n,description:r,headlineVersion:In(e)}),d("figure",{className:"m-0 min-w-[80%]",children:Sn()})]}))),Sn=(e=3)=>Tn(100,e).map((e=>Math.floor(e))).map($n),$n=(e,t)=>d("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Tn=(e,t)=>[e].concat(t>0?Tn(e/1.618,t-1):[]),Dn={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Rn=h((({block:e,context:t,className:n=""})=>d("section",{className:`flex grow-0 shrink-0 basis-full px-4 pt-6 ${Dn[e?.version??"primary"]} ${n}`,role:"listitem",children:d("div",{className:"flex grow",children:d(be,{context:t,...e})})}))),_n=h((({className:e,context:t,slides:n=[]})=>{const r=n.map((e=>e.productBlock));return d("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:d(V,{context:t,children:r.map(((e,n)=>d(Rn,{block:e,context:t},String(n))))})})})),Bn={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white"}},Pn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"},An={normal:"min-h-[70px]",small:"min-h-[50px]"},Mn=h((({className:e,title:t,description:n,showLines:r=!0,steps:l,size:a="normal",version:i="primary"})=>{const o=Bn[i];return m("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${o.background} ${o.title} ${e||""}`,children:[t?d(x,{headingType:"h3",className:`text-center ${o.title}`,title:t}):null,n?d("p",{className:`text-m-light text-center ${o.description} ${t?"mt-2":""}`,children:n}):null,l?.length?d("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:d("div",{className:"flex flex-col justify-between gap-x-[101px]",children:l.map(Ln(a,i,r))})}):null]})})),Ln=(e,t,n)=>(r,l,a)=>{const i=a.length-1===l,o="normal"===e?"ml-[34px]":"ml-6",s=Bn[t];return d("div",{children:m("div",{className:"flex flex-row text-center relative",children:[m("div",{className:"overflow-hidden",children:[Vn(e,t)(r,l),i?null:d("div",{className:`min-h-8 h-full w-[2px] ${n?s.iconConnector:""} ${o}`})]}),m("div",{className:`flex flex-col justify-center h-fit ${An[e]}`,children:[r.label?d("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:r.label}):null,r.description?d("div",{className:`text-s ${s.description} text-left`,children:r.description}):null]})]})},String(l))},Vn=(e,t)=>(n,r)=>{const l=Bn[t],a="normal"===e?"38":"27",i="normal"===e?"text-m-title":"text-m-title-xs";return d("div",{className:`${Pn[e]} ${l.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:d("span",{className:`font-medium flex self-center ${l.title} ${i}`,children:(o=n?.icon,Boolean(o?.icon||o?.src)?d($,{image:n.icon,width:a,height:a,asSVG:!0}):d("span",{children:r+1}))})});var o},jn=h((({title:e,icon:t})=>m("div",{className:"flex gap-2.5 mb-2",children:[e?d(x,{headingType:"h3",className:"font-medium",title:e}):null,t?d($,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Gn=e=>e?.alt||e?.title||b[e?.icon?e.icon:""],Un=h((({header:e,data:t})=>m("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[d(jn,{...e}),t?.length?t.map(Wn):null]}))),Wn=({label:e,description:t,list:n,image:r,buttons:l},a)=>m("div",{children:[a>0&&d("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?d("div",{className:"text-s m-0",children:e}):null,t?d("div",{className:"text-s text-secondary-text mt-[3px]",children:t}):null,n?.items?.length?En(n):null,r?d($,{image:{...r,className:"m-0"}}):null,l?.length?On(l):null]},String(a)),En=e=>d(he,{className:"flex flex-col justify-between items-start text-s",version:"gray",items:e.items,isDotted:e.isDotted??!0}),On=e=>d("div",{children:e.map((({icon:e,rounded:t,...n},r)=>d(ae,{className:`mt-3 ${r>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,ariaLabel:Gn(e),rounded:t,appendLeft:e?d($,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...n,"aria-label":e},String(r))))}),Fn=h((({tiles:e,context:t})=>d(V,{context:t,children:e.map(((e,t)=>d(Un,{...e},String(t))))}))),Hn=h((({tiles:e})=>d("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>d(Un,{...e},String(t))))}))),zn=h((({className:e,context:t,title:n,description:r,columns:l,rowHeaders:a,orientation:i="vertical"})=>{const o=qn(l),s=Kn(a,o);return m("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[n?d(x,{headingType:"h2",className:`text-center ${r?"mb-2":"mb-5"}`,title:n}):null,r?d("div",{className:"mb-5 text-center text-m",children:r}):null,s?.length?Jn(i,s,t):null]})}));function Jn(e,t,n){return"vertical"===e?d(Hn,{tiles:t}):d(Fn,{context:n,tiles:t})}const qn=e=>e?.[0].data?e[0].data:[],Kn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Xn={Accordion:Fe,ComparisonTable:Ze,ExchangeRateTile:Mt,Footer:rn,Gallery:Te,Header:yn,Headline:_,LinkDocs:F,LinkList:Le,MobileAppTile:Gt,ProductBlock:Ie,ProductGallery:_n,StepsBlock:Mn,TariffsTable:zn,TextBlock:ke,Placeholder:Cn},Qn=process.env.NEXT_PUBLIC_ASSIST_BASE_URL||"",Yn=c(process.env.NEXT_PUBLIC_PROJECT_ID||"",Qn);const Zn=h((({className:e,onClick:t,ariaLabel:n})=>d("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:er()}))),er=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return m("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[d("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"}),d("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"})]})},tr=h((({className:e,context:t,...n})=>{const{useRouter:i,handlerDecorator:o=Q}=t,s=function(e){const[t,n]=r(0);return l((()=>{(async()=>{const[t]=await Yn.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:a((async()=>{n(await Yn.like(e))}),[e]),dislike:a((async()=>{n(await Yn.dislike(e))}),[e])}}(i().pathname);return m(Me,{tag:"div",context:t,className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,...n,children:[d(Zn,{onClick:o(s.like),ariaLabel:"Поставить отметку «лайк»"}),d(Zn,{onClick:o(s.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),d("span",{className:"select-none",children:s.likeCount})]})})),nr=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),rr=h((({className:e="",context:t,blocksRegistry:n,data:r={},blockDecorator:l=nr})=>{const{style:a,blocks:i,slots:o={},likeControl:s,colorPalette:c="pc"}=r,{header:h}=o;return m("section",{className:`relative ${T(a)} ${e}`,"data-theme":c,children:[h?.blocks?.length?d("div",{className:`${T(h?.style)}`,children:h.blocks.map(((e,a)=>lr({block:e,page:r,blockDecorator:l,blocksRegistry:n,context:t},a)))}):null,i?.length?d("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,a)=>lr({block:e,blockDecorator:l,blocksRegistry:n,context:t,page:r},a)))}):null,s?d("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:d(tr,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")}):null]})}));function lr({block:e,blockDecorator:t,blocksRegistry:n,context:r,page:l},a){const{type:i}=e;i&&i in n||console.warn(`No block with "${i}" is registered`);const o=n[i||"Placeholder"]||Cn;return t({blockClassName:`scroll-mt-12 ${T(e.style)}`,block:e,render:e=>{const{version:t,content:n,anchor:s,labels:c}=e.block;return d(o,{className:e.blockClassName,version:t,context:r,page:l,anchor:s,labels:c,...n},`${i}-${a}`)}},`block-${a}`)}e.Blocks=Xn,e.ContentPage=rr,e.DaDataAPI=o,e.LikeAPI=c,e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.projectSettings=f,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=q,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),r=n("useState"),l=n("useEffect"),a=n("useCallback"),i=n("useMemo");function o(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}}const s=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage.getItem(c)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage.setItem(c,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${s.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:r}=await e.json();return r||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:r}=await e();try{const e=await fetch(`/assist/v1/public/projects/${s.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:r},body:JSON.stringify({node_id:t,user_name:r})}),{likes:l}=await e.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:r}=await e();try{const e=await fetch(`/assist/v1/public/projects/${s.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:r},body:JSON.stringify({node_id:t,user_name:r})}),{likes:l}=await e.json();return l||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,n){const{children:r,...l}=t||{},a=n?.slots?.default,i=r||a&&a();return e(Object.assign(l,i&&{children:i}),n)}return t.inheritAttrs=!1,t},x={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},g=u((e=>{const{className:t,headingType:n="h3",title:r,as:l="h3"}=e;return m(l,{className:`font-sans font-medium m-0 ${x[n]} ${t||""}`,children:r})}));var b,f;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AirPlane="AirPlane",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.CarIcon="CarIcon",e.ChartSquareIcon="ChartSquareIcon",e.CinemaIcon="CinemaIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocsIcon="DocsIcon",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.DoneIcon="DoneIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.Logo="Logo",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PackA4="PackA4",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.PowerIcon="PowerIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.PumpkinIcon="PumpkinIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.SoundIcon="SoundIcon",e.StateMortgageIcon="StateMortgageIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon",e.WateringCan="WateringCan"}(b||(b={})),function(e){e.ActualBalanceIcon="Деньги",e.AirPlane="Самолет",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowUpIcon="Стрелка вверх",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.CarIcon="Машина",e.ChartSquareIcon="Деньги внутри кошелька",e.CinemaIcon="Кино",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocsIcon="Документы",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.DoneIcon="Зелёная 'галочка'",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.Logo="Logo",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PackA4="PackA4",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.PowerIcon="Щит",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.PumpkinIcon="Тыква",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.SoundIcon="Звук",e.StateMortgageIcon="StateMortgageIcon",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами",e.WateringCan="Добавить продукт"}(f||(f={}));const y={normal:"text-primary-main",black:"text-black",white:"text-black invert"},N=u((({className:e="",imageClassName:t="",name:n="",alt:r=`Иконка ${f[n]||n}`,title:l=r,iconVersion:a="normal",asSVG:i,...o})=>{const c=`${s.CDN||""}icons/${n}.svg`;return i?h("svg",{className:e,...o,"aria-hidden":"true",children:[l?m("title",{children:l}):null,r?m("desc",{children:r}):null,m("use",{className:`${y[a]} ${t}`,href:`${c}#icon`,xlinkHref:`${c}#icon`})]}):m("img",{className:e,src:c,alt:r,title:l,...o,"aria-hidden":"true"})}));function I(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const v=(e,t)=>e.media&&t.media?e.media-t.media:0,w=u((({className:e="",image:t,imageClassName:n="",isMobile:r=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${r?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(v).map((({src:e,format:t,media:n,size:r},l)=>m("source",{srcSet:e,type:k(t),media:n?`(max-width: ${n}px)`:"",...r},`${l}_${e}`))):null,C(t,n,r)]})})),C=(e,t="",n=!1)=>{const r=e.title||"",l=e.alt||e.title,a=n?"m-auto":"m-0";return m("img",{src:e.src,className:`${a} ${t}`,alt:l,title:r,...e.size})};function k(e){return e?`image/${String(e)}`:void 0}const S=u((({className:e="",image:t,imageClassName:n="",isMobile:r,...l})=>{if(!t)return null;const a="string"==typeof t?t:t.icon;return a||""===a?a.length?m(N,{className:e,imageClassName:n,iconVersion:I(t),name:a,...l}):null:m(w,{className:e,imageClassName:n,image:t,isMobile:r})})),$=u((({className:e="",image:t,imageClassName:n,...r})=>m(S,{className:e,image:t,imageClassName:n,...r,isMobile:!0})));function T(e){return e?e.filter(Boolean).join(" "):""}const D={left:"text-left",center:"text-center",right:"text-right"},R={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},_=u((({bgColorHeadline:e="transparent",className:t="",title:n,description:r,image:l,align:a="left"})=>{const i=R[e];return h("section",{className:`px-4 py-6 flex flex-col gap-2.5 ${i.background} ${t}`,children:[n?m(g,{headingType:"h2",className:`${i.text} ${D[a]}`,title:n}):null,r?m("p",{className:`text-m ${i.description} ${D[a]}`,children:r}):null,l?.src&&m("div",{className:"mt-2.5 mx-auto flex justify-center",children:m($,{image:l})})]})})),P=u((({children:e,activeIndex:t,indexFraction:n,showDots:r})=>{const l=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})};return r&&e?.length?m("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,r)=>m("div",{onClick:l(r),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:B(r,t,n),"aria-hidden":!0},String(r))))}):null})),B=(e,t,n)=>{if(e<t||e>t+1)return;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"}},A=u((({className:e="",children:t,...n})=>m("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...n,children:t}))),M=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),L=u((({className:e="",children:t,activeIndex:n,onScroll:r,gap:l=14,padding:a=16})=>m("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...M(a),gap:`${l}px`},role:"list",onScroll:r,children:t?.length?t?.map(((e,t)=>m(A,{style:M(a/4),"aria-current":Boolean(n===t),children:e},String(t)))):m(A,{children:t})}))),V=u((({className:e,children:t,gap:n=14,padding:l=16,showDots:a=!0,onSlideChange:i})=>{const[o,s]=r(0),[c,d]=r(0),u={activeIndex:o,indexFraction:c,showDots:a,children:t};return h("div",{className:e,children:[m(L,{gap:n,padding:l,activeIndex:o,onScroll:e=>{const{scrollLeft:t,clientWidth:r,childElementCount:a,scrollWidth:c,children:m}=e?.currentTarget,h=m[0].offsetWidth-l/2,u=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:l,itemWidth:a})=>{const i=r-n;if(2===l)return[[0,i],[i,r]];const o=a+e,s=n-e-t,c=l-2,d=new Array(l).fill(0).map(((e,t)=>0===t||t===c?[t>0?i-s:0,t>0?i:s]:[(t-1)*o+s,t*o+s]));return d[l-1]=[i,r],d})({gap:n,padding:l,clientWidth:r,scrollWidth:c,childElementCount:a,itemWidth:h}),{index:p,fraction:x}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,l]=t[n];return{index:n,fraction:(e-r)/(l-r)}})(t,u);p!==o&&i&&i(),s(p),d(x)},children:t}),m(P,{...u})]})})),j=u((({className:e,iconClassName:t,textClassName:n,suffixClassName:r,doc:l,icon:a})=>{const{text:i,fileSize:o,...s}=l;return h("a",{className:e,role:"link",...s,children:[a?m($,{className:t,image:a,width:"24px",height:"24px",asSVG:!0}):null,i?h("span",{className:n,children:[i,m("span",{className:r,children:s?.href&&G(O(s.href),o)})]}):null]})})),G=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),O=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},W=u((({className:e="",doc:t,icon:n})=>m(j,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:n}))),U=u((({context:e,hasBorder:t=!0,documents:n,icon:r})=>m(V,{context:e,className:"text-s text-primary-main mt-5",children:n?.length?n.map(((e,n)=>m(W,{className:t?"rounded-md border-main-stroke border border-solid p-4":"",doc:e,icon:r},String(n)))):null}))),E=u((({hasBorder:e=!0,documents:t,icon:n})=>m("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,r)=>m("div",{role:"listitem",children:m(W,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:n})},String(r)))):null}))),F=u((({className:e="",context:t,title:n,description:r,icon:l={icon:"DocIconMonoColor"},documents:a,orientation:i="vertical",hasBorder:o=!0})=>h("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[m(_,{className:"!p-0 "+(r?"gap-2":"gap-5"),title:n,description:r,context:t,align:"center"}),"vertical"===i?m(E,{hasBorder:o,documents:a,icon:l}):m(U,{context:t,hasBorder:o,documents:a,icon:l})]}))),H=e=>e?.includes("//"),z=e=>(e||"").replace(/\/?\?.*/,""),J=e=>{if(!e||!H(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var q=Object.freeze({__proto__:null,isURL:H,withoutQuery:z,getOrigin:J,getHash:e=>{if(!e||!H(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:e=>e?.startsWith("#")});const K="/mobile",Q=(e,t)=>{if(!e)return e;const n=J(t?.href);return n?e.replace(n,"")||"/":e},Y=e=>e;function Z({router:e,handlerDecorator:t=Y},n){const r=((e,t)=>{if(!e)return e;const n=Q(e,t)||"",r=t?.pathname.startsWith(K);return r&&!H(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const l=r&&!H(r),a=!n.target||"_self"===n.target;l&&a&&(t?.preventDefault(),e.push(r))}),n)}}const X=u((e=>{const{text:t,aboveText:n,appendLeft:r,appendRight:l}=e;return h("div",{className:ee(e),children:[r||null,te(e)?h("div",{children:[m("div",{className:"text-xs-light text-left",children:n}),m("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,l||null]})})),ee=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const l="gap-2 "+(n?"py-2.5 px-7":"py-4 px-9");return["flex items-center justify-center",te(e)?l:"h-12 w-12",r?"rounded-full":""].join(" ")},te=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ne={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",link:"text-primary-main"},re={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},le="w-full text-center font-sans select-none",ae=u((({className:e,text:t,aboveText:n,appendLeft:r,href:l,target:a,onClick:i,children:o,disabled:s,rounded:c,version:d="primary",ariaLabel:h,...u})=>{const p=o??m(X,{text:t,aboveText:n,appendLeft:r,rounded:c,version:d});return s?m("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:-1,className:`inline-block ${le} ${re[d]||""} ${c?"rounded-full":"rounded-md"} ${e||""}`,children:p}):m("a",{className:`${le} inline-block cursor-pointer no-underline focus:border focus:border-primary-focus ${ne[d]||""} ${c?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:a,onClick:i,"aria-label":h,role:l?"link":"button",...u,children:p})})),ie=u((({context:e,className:t="",buttons:n})=>{const{handlerDecorator:r}=e,l=e.useRouter();return n&&n?.length?m("div",{className:t,children:n.map(((e,t)=>function({icon:e,iconRight:t,...n},r){if(!n?.text)return null;return m(ae,e?{appendLeft:m($,{image:e,width:"24",height:"24",asSVG:!0}),appendRight:m($,{image:t,width:"24",height:"24",asSVG:!0}),...n}:{...n},String(r))}(Z({router:l,handlerDecorator:r},e),t)))}):null}));const oe={primary:"rounded-full inline-block mr-3 mt-2",secondary:"rounded-full inline-block mr-3 mt-2",gray:"rounded-full inline-block mr-3 mt-2",tile:"rounded-full inline-block mr-4 mt-3","tile-white":"rounded-full inline-block mr-4 mt-3"},se={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},ce=u((({className:e="",isDotted:t=!0,children:n,version:r="primary"})=>h("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t?m("div",{className:de(r)}):null,m("span",{children:n})]}))),de=e=>`${oe[e]} ${se[e]} ${{primary:"w-2 h-2 min-w-2 min-h-2",secondary:"w-2 h-2 min-w-2 min-h-2",gray:"w-1.5 h-1.5 min-w-1.5 min-h-1.5",tile:"w-[7px] h-[7px] min-w-[7px] min-h-[7px]","tile-white":"w-[7px] h-[7px] min-w-[7px] min-h-[7px]"}[e]}`,me={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},he=u((e=>{const{className:t="",itemClassName:n,isDotted:r,items:l,version:a="primary"}=e;return m("section",{className:`${me[a]} ${t}`,role:"list",children:l?.length?l.map(((e,t)=>m(ce,{className:n,isDotted:r,version:a,children:e},String(t)))):null})})),ue=u((({className:e="",title:t="",children:n,buttons:r,image:l})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{children:n}),r?m("div",{children:r}):null]}),l]})]}))),pe={primary:"text-primary-text",secondary:"text-white"},xe={primary:"text-secondary-text",secondary:"text-white"};function ge(e){let t="text-primary-main";return"secondary"===e&&(t="text-black"),`w-6 h-6 rounded-full box-border ${t}`}const be=u((({className:e="",context:t,title:n,headlineVersion:r="L",description:l,benefits:a,benefitsVersion:i="normal",buttons:o,image:s,items:c,version:d="primary",isDotted:u=!0,label:p})=>h("div",{className:`w-full ${e}`,children:[h("div",{children:[p?Ne(p,d):null,m(_,{context:t,className:"!p-0 max-w-[600px]",title:n,description:l,bgColorHeadline:d,headlineVersion:r}),h(ue,{context:t,buttons:o?.length?m(ie,{context:t,buttons:o,className:"flex flex-col mt-5 gap-2.5"}):null,children:[a?.filter((e=>e.label))?.length?m("div",{className:"mt-3",children:a.map(((e,t)=>function({benefit:e,version:t="primary"},n){const r="secondary"===t;return h("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon?m($,{className:ge(t),image:{...e?.icon,iconVersion:r?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,m("div",{className:`text-l m-0 ${pe[t]}`,children:e.label}),e.description&&m("div",{className:`text-s ${xe[t]}`,children:e.description})]},String(n))}({benefit:e,version:d,benefitsVersion:i},t)))}):null,c?.length?m(he,{className:"mt-3 text-m",items:c,version:d,isDotted:u}):null]})]}),fe(s)]})));function fe(e){return e?.src?m($,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const ye={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},Ne=(e,t)=>m("div",{className:`px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${ye[t]}`,children:e}),Ie={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ve=u((e=>{const{className:t="",version:n="primary"}=e;return m("section",{className:`font-sans bg-white px-4 py-6 ${Ie[n]} ${t}`,children:m(be,{...e})})})),we={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"}},Ce=u((({title:e,description:t,blockVersion:n="primary",iconVersion:r,image:l,className:a="",items:i,isDotted:o=!0})=>{const s=we[n],c="secondary"===n?"secondary":"gray";return h("section",{className:`font-sans px-4 py-[18px] flex flex-col ${s.background} ${a}`,children:["small"===r?ke(s.icon):null,"big"===r?Se(l):null,h("div",{className:"py-0.5",children:[e?m("div",{className:`text-l font-medium mb-1 ${s.title}`,children:e}):null,t?m("div",{className:`text-s ${s.description}`,children:t}):null,i?.length?m(he,{className:"mt-1 text-m",items:i,isDotted:o,version:c}):null]})]})}));function ke(e){return m("div",{className:"mb-3",children:m("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Se(e){return e?.src?m($,{className:"pb-3 mr-auto",image:e}):null}const $e={primary:"bg-white",secondary:"bg-primary-main text-white"},Te=u((({context:e,title:t,description:n,cards:r=[],className:l,orientation:a="horizontal"})=>h("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${l}`,children:[h("div",{className:"flex flex-col items-center mb-5",children:[t?m(g,{headingType:"h3",className:`text-center ${n?"mb-2":"mb-5"}`,title:t}):null,n?m("div",{className:"text-m max-w-[600px] text-center mb-5",children:n}):null]}),De(a,r,e)]})));function De(e,t,n){return"horizontal"===e?m(V,{context:n,children:t?.map(Re)}):m("div",{className:"grid gap-[14px]",children:t?.map(Re)})}function Re(e,t){return h("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 ${$e[e.version??"primary"]}`,children:[h("div",{children:[e.image?.src?m("div",{className:"flex justify-center",children:m($,{className:"mb-3.5",image:e.image})}):null,e.title?m("h3",{className:"text-m-title-xs font-medium m-0",children:e.title}):null,e.description?_e(e):null,e.items?.length?Pe(e.items,e.isDotted,e.version):null]}),e?.button?.text?(n=e.button,m(ae,{className:"mt-3",appendLeft:n?.icon&&m($,{image:n?.icon,width:"24px",height:"24px",asSVG:!0}),...n})):null]},t);var n}function _e(e){return m("div",{className:"text-secondary-text mt-1 text-s "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function Pe(e,t,n="primary"){return m("section",{className:"mt-3",children:e.map(((e,r)=>h("div",{children:[t?m("div",{className:de(n)}):null,m("span",{className:"text-m font-medium",children:e.title}),m("span",{className:"text-s pl-2 "+("primary"===n?"text-secondary-text":""),children:e.text})]},String(r))))})}class Be{static inst=new Be;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]||=[],this.subscribers[e]?.push(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){this.subjectsStateMap[e]=t,this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const Ae=e=>{if(!e.length)return;const[t]=e;t.isIntersecting},Me=u((({anchor:e,className:t,context:n,children:a,tag:i="section",labels:o})=>{const s=i,{IntersectionObserverTag:c}=n,[d,h]=r(!0);return l((()=>Be.inst.subscribe("tab",(e=>{h(!o?.length||!e.label||o.includes(e.label))}))),[o]),d?e?m(c,{tag:i,className:t,observerCallback:Ae,observerOptions:{threshold:1},anchor:e,children:a}):m(s,{className:t,children:a}):null})),Le=u((({className:e="",documents:t,...n})=>m(Me,{className:`font-sans bg-white mt-[10px] ${e}`,...n,children:m("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?Ve(t):null})}))),Ve=e=>e.map(((e,t)=>{const{text:n,...r}=e;return m("li",{className:"mb-4 list-none",children:m("a",{className:"hover:text-primary-main",role:"link",...r,children:n||null})},`list_item_${String(t)}`)})),je={Headline:_,LinkDocs:F,TextBlock:Ce,ProductBlock:ve,Gallery:Te,LinkList:Le},Ge=({blocks:e,context:t,className:n=""})=>e?.length?e.map(Oe({context:t,className:n})):null,Oe=({context:e,className:t})=>(n,r)=>{if(!n)return null;const{style:l,blockListType:a,...i}=n;if(!a||!(a in je))return null;const o=T(l);return m(je[a],{className:`${t} ${o}`,context:e,...i},`block_${r}`)},We=u((({blocks:e,context:t})=>m("div",{className:"flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Ge({context:t,blocks:e,className:"!px-0"})}))),Ue=u((({label:e,labelIcon:t,blocks:n,bordered:l,context:a})=>{const{hasContent:i,icon:o,handleToggle:s}=(({blocks:e,initialState:t=!1})=>{const[n,l]=r(t),a=e?.length;return{isActive:n,hasContent:a,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{const t=e.currentTarget;if(!t)return;l(!n);const r=t.nextSibling;r.style.maxHeight=r.style.maxHeight?"":`${r.scrollHeight}px`}}})({blocks:n});return h("li",{className:`${Ee(l)} border-solid border-main-divider`,children:[h("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${l?"":"py-[14px] px-0"}\n ${i?"group cursor-pointer":""}`,onClick:s,children:[h("span",{className:"text-m-title-xs font-medium pr-2.5 flex "+(i?"group-hover:text-primary-main":""),children:[t?m($,{image:t,width:"24",height:"24",asSVG:!0,className:"mr-3"}):null,e]}),i?m($,{className:"w-6",image:o,width:"24",height:"24",asSVG:!0}):null]}),i?m(We,{blocks:n,context:a}):null]})}));function Ee(e){return e?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"}const Fe=u((({title:e,description:t,accordionItems:n,context:r,className:l="",bordered:a})=>h("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${l}`,children:[e?m(g,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?m("div",{className:"mb-5 text-m-light text-center",children:t}):null,n?.length?m("ul",{className:"list-none m-0 p-0",children:n.map(((e,t)=>m(Ue,{...e,context:r,bordered:a},`AccordionItem_${t}`)))}):null]}))),He=(e=!1)=>e?"text-white":"",ze=(e=!1)=>"text-s mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Je=u((({icon:e,image:t,title:n,subtitle:r,isFillGradient:l})=>h("div",{role:"columnheader",children:[e?m($,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&m("div",{className:"mb-3.5",children:m($,{image:t})}),n?m(g,{headingType:"h4",className:He(l),title:n}):null,r?m("div",{className:ze(l),children:r}):null]}))),qe=u((({cell:e,rowHeader:t,isFillGradient:n=!1})=>m("div",{className:"box-border flex flex-col",role:"cell",children:m("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Ke(n,t))})}))),Ke=(e,t)=>({label:n,description:r},l)=>h("div",{className:"flex justify-between text-s py-3.5",children:[m("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),h("div",{className:"basis-1/2",children:[n?m("div",{className:"text-right "+(e?"text-white":""),children:n}):null,r?m("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:r}):null]})]},String(l)),Qe=u((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:r,showRow:l,onToggleColumn:a})=>{const i=t?.slice(0,l?t.length:n),o=r?"secondary":"primary";return h("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${r?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[m(Je,{...e,isFillGradient:r}),i?.length?i.map((({rowHeader:e,cell:t},n)=>m(qe,{cell:t,rowHeader:e,isFillGradient:r},String(n)))):null,l&&Ye({header:e,buttonVersion:o}),Ze({onToggleColumn:a,isFillGradient:r,showRow:l})]})})),Ye=({header:e,buttonVersion:t})=>m(ae,{href:e.link.href,target:e.link.target,version:t,className:"text-s font-medium mt-4 py-[11px]",children:e.link.text}),Ze=({onToggleColumn:e,isFillGradient:t,showRow:n})=>m("div",{className:"mt-5",role:"cell",children:m("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),Xe=u((({className:e,context:t,title:n,rowHeaders:l,columns:a,visibleRowLength:i=0,isColoredFirstColumn:o=!1,orientation:s="vertical"})=>{const c=a?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:l?.[t]?.title})))})))||[],[d,u]=r(new Array(a?.length||0).fill(!i));return h("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[n?m(g,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:n}):null,et({tableData:c,context:t,visibleRowLength:i,isColoredFirstColumn:o,columnsViewState:d,handleToggleColumn:e=>{d[e]=!d[e],u([...d])},orientation:s,setColumnsViewState:u})]})})),et=({context:e,tableData:t,visibleRowLength:n,isColoredFirstColumn:r,columnsViewState:l,handleToggleColumn:a,orientation:i="horizontal",setColumnsViewState:o})=>m("div",{role:"table",children:t?.length?tt({orientation:i,context:e,columnsViewState:l,setColumnsViewState:o,tableData:t,visibleRowLength:n,isColoredFirstColumn:r,handleToggleColumn:a}):null}),tt=({orientation:e,context:t,columnsViewState:n,setColumnsViewState:r,tableData:l,visibleRowLength:a,isColoredFirstColumn:i,handleToggleColumn:o})=>"horizontal"===e?m(V,{context:t,onSlideChange:rt(n,r),children:l.map(nt({context:t,visibleRowLength:a,isColoredFirstColumn:i,columnsViewState:n,handleToggleColumn:o}))}):l.map(nt({context:t,visibleRowLength:a,isColoredFirstColumn:i,columnsViewState:n,handleToggleColumn:o})),nt=({context:e,visibleRowLength:t,isColoredFirstColumn:n,columnsViewState:r,handleToggleColumn:l})=>(a,i)=>m(Qe,{context:e,visibleRowLength:t,showRow:r[i],header:a.header,columnData:a.column,isFillGradient:0===i&&n,onToggleColumn:()=>l(i)},String(i)),rt=(e,t)=>()=>{t(new Array(e.length).fill(!1))},lt=new Map;function at(e){return e?Array.isArray(e)?e:e instanceof Function?at(e()):[e]:[e]}let it=function(e,t){const n=i((()=>at(e)),[e]),[a,o]=r(),[s,c]=r();return l((()=>{if(!n.every((e=>null===e)))try{const e=t(...n);"then"in e?(e=>{e.then((e=>lt.get(n)||e)).then(o).catch(c)})(e):o(e)}catch(e){c(e)}}),[t,...n]),{data:a,error:s,mutate:()=>Promise.resolve(void 0),isValidating:!1}};const ot=(e,t)=>it(e,t);async function st(){try{const e=await fetch(ct,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(dt)});return await e.json()}catch(e){return console.error(e),Promise.resolve()}}const ct="https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000",dt={query:{bool:{must:[{term:{russian_region_code:"77"}},{term:{from_volume:"0"}},{terms:{currency_pair:["USD/RUB","EUR/RUB"]}}]}}},mt=e=>e.reduce(((e,t)=>{const n=t.currency_first?.code;return e.some((e=>e.code===n))||e.push({code:n,buy:ht(Number(t.rate_buy)),sell:ht(Number(t.rate_sell))}),e}),[]),ht=e=>Math.round(1e3*e)/1e3;var ut;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(ut||(ut={}));const pt=new Intl.NumberFormat("ru",{style:"currency",currency:ut.RUB}),xt=e=>e?pt.format(e):"",gt="text-left text-m-light text-secondary-text",bt={USD:"DollarIcon",EUR:"EuroIcon"},ft=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:gt,children:"Валюта"}),m("th",{className:`${gt} pl-11`,children:"Купить"}),m("th",{className:`${gt} pl-11`,children:"Продать"})]})}),m("tbody",{children:t.map((e=>yt(e)))})]}))),yt=e=>{const t=e?.code;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m($,{image:{icon:bt[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:xt(e?.sell)}),m("td",{className:"pt-4 pl-11",children:xt(e?.buy)})]},t)},Nt=u((({className:e="",address:t,distance:n})=>h("div",{className:`flex ${e}`,children:[m($,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,n?h("p",{className:"text-secondary-text m-0 text-m",children:["Курс указан для ближайшего офиса - ",n]}):null]})]}))),It=(e,t,n)=>{const r=Number(vt(e))*Math.pow(t,n?-1:1);return Number.isInteger(r)?r:((e,t=2)=>{const n=Math.pow(10,t);return Math.round(parseFloat(String(e))*n)/n})(r)},vt=e=>e.replace(/[^\d.,]/g,"").replace(",","."),wt=e=>{return(t=[[e=>e.value!==ut.RUB&&e.oppositeValue!==ut.RUB,()=>e.handleConvert(e.value,ut.RUB)],[e=>e.value===ut.RUB&&e.oppositeValue===ut.RUB,()=>e.handleConvert(e.value,ut.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t},Ct=u((({className:e="",id:t,name:n,type:r="text",placeholder:l,pattern:a,value:i,onChange:o})=>m("input",{className:e,id:t,name:n||t,type:r,pattern:a,placeholder:l,value:i,onChange:e=>{const t=e.target.validity.valid?e.target.value:i;o(t)}}))),kt={background:"url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%"},St=u((({className:e="",id:t,name:n,children:r,value:l,onChange:a})=>m("select",{className:`appearance-none ${e}`,style:kt,id:t,name:n||t,value:l,onChange:e=>a(e.target.value),children:r}))),$t=u((({className:e="",value:t,selected:n,children:r})=>m("option",{className:e,value:`${t}`,selected:n,children:r})));function Tt(e){const{placeholder:t,rates:n,selected:r,value:l,setValue:a,setSelected:i}=e;return h("div",{className:"relative flex items-center",children:[m(Ct,{className:"shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12",placeholder:t,type:"text",value:l,onChange:a}),n.length?m(St,{className:"shrink-0 w-20 h-9 -translate-x-8 bg-transparent",value:r,onChange:e=>i(e),children:n.map(((e,t)=>m($t,{value:e.code,children:e.code},String(t))))}):null]})}const Dt=u((({context:e,className:t="",currencyRatesBuy:n,currencyRatesSell:l,button:a})=>{const{useRouter:i,handlerDecorator:o}=e,s=i(),[c,d]=r({inputSell:"",inputBuy:"",selectSell:n?.[0]?.code||ut.RUB,selectBuy:l?.[0]?.code||ut.USD}),u=e=>{d((t=>({...t,...e})))};return h("div",{className:`grid gap-[18px] pt-2 ${t}`,children:[Tt({placeholder:"Хочу продать",rates:l,selected:c.selectSell,setSelected:Rt(c,u,l),value:c.inputSell,setValue:e=>Pt(u,l)(e,c.selectSell,c.selectBuy)}),Tt({placeholder:"Получу",rates:n,selected:c.selectBuy,setSelected:_t(c,u,n),value:c.inputBuy,setValue:e=>Bt(u,n)(e,c.selectBuy,c.selectSell)}),a?.text?m(ae,{className:"py-4 mr-1",version:a?.version,...Z({router:s,handlerDecorator:o},a),children:a.text}):null]})})),Rt=(e,t,n)=>r=>{t({selectSell:r}),wt({value:r,oppositeValue:e.selectBuy,handleConvert:(r=e.selectSell,l=e.selectBuy)=>{Pt(t,n)(e.inputSell,r,l)}})},_t=(e,t,n)=>r=>{t({selectBuy:r}),wt({value:r,oppositeValue:e.selectSell,handleConvert:(r=e.selectBuy,l=e.selectSell)=>Bt(t,n)(e.inputBuy,r,l)})},Pt=(e,t)=>(n,r,l)=>{e({inputSell:vt(n),selectBuy:l});const a=t.find((e=>e.code===l))?.buy||t.find((e=>e.code===r))?.sell;a&&e({inputBuy:String(It(n,a,r===ut.RUB)||"")})},Bt=(e,t)=>(n,r,l)=>{e({inputBuy:vt(n),selectSell:l});const a=t.find((e=>e.code===l))?.sell||t.find((e=>e.code===r))?.buy;a&&e({inputSell:String(It(n,a,r===ut.RUB)||"")})},At={address:"Москва, ул.Ленина д.28",distance:"6км"},Mt=u((({className:e="",context:t,title:n="Курсы обмена валют",button:r,...l})=>{const a=function(){const{data:e}=ot(ct,st),t=e?.hits?.hits?.map((e=>e._source))||[];return t.length?mt(t):t}(),i=a.filter((e=>e.buy));i.unshift({code:ut.RUB});const o=a.filter((e=>e.sell));return o.push({code:ut.RUB}),m(Me,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,...l,children:m(ue,{context:t,title:m(g,{headingType:"h4",title:n,className:"whitespace-pre-wrap text-h4"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[a?m(ft,{className:"mb-[30px]",exchangeCurrencyItems:a}):null,m(Nt,{...At})]}),a.length&&i.length&&o.length?m(Dt,{className:"grow",context:t,currencyRatesBuy:i,currencyRatesSell:o,button:r}):null]})})})})),Lt={"bg-white":"text-primary-main",transparent:"text-white"},Vt={"bg-white":"text-black",transparent:"text-white"},jt=u((({className:e="",href:t,children:n,targetBlank:r,bgColor:l="bg-white",hideTitle:a})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":"Россельхозбанк",children:[m($,{image:{icon:"Logo"},className:`${Lt[l]} w-10 h-[38px]`,asSVG:!0}),a?null:m("span",{className:`${Vt[l]} text-s font-medium ml-2.5`,children:n||"Россельхозбанк"})]}))),Gt=u((({className:e="",title:t="Мобильное приложение",description:n,href:r="#"})=>m("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${e}`,children:r?h("div",{className:"flex",children:[m("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:m(jt,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),h("a",{href:r,target:"_blank",className:"flex flex-col justify-center pl-3",children:[m("div",{className:"text-s font-medium mb-[3px]",children:t}),m("div",{className:"text-s text-secondary-text",children:n})]})]}):null}))),Ot=u((({className:e="",items:t,hasButton:n,context:r})=>{const l=r.useRouter(),{handlerDecorator:a}=r;return h("div",{className:e,children:[t?.length?t.map(Wt):null,n?m(ae,{version:"primary",className:"mb-6 w-full",...Z({router:l,handlerDecorator:a},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Wt=(e,t)=>{const{type:n,text:r,description:l}=e;return h("div",{className:"mb-4",children:[m("div",{children:Ut(n,r)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:l})]},String(t))},Ut=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Et(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},Et=e=>e.replaceAll(/\D/g,""),Ft=u((({className:e="",index:t,text:n,href:r,target:l,onClick:a})=>m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:r,target:l,onClick:a,children:n||`Документ ${t}`}))),Ht=u((({title:e,links:t,className:n="",context:r})=>{const l=r.useRouter(),{handlerDecorator:a}=r;return h("div",{className:n,children:[m("span",{className:"text-primary-text text-s font-medium",children:e}),t?.length?m("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>m(Ft,{index:t,className:"text-s",...Z({router:l,handlerDecorator:a},e)},String(t))))}):null]})})),zt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],Jt=u((({href:e,version:t="primary"})=>{const{icon:n,label:r}=zt.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!n)return null;return m("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===t?"bg-secondary-light hover:bg-secondary-hover":"border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===t?"hover:text-black":""}`,href:e,"aria-label":r,target:"_blank",rel:"noopener noreferrer",children:n?m($,{image:n,imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),qt=u((({className:e,media:t,version:n,context:r})=>{const l=r.useRouter(),{handlerDecorator:a}=r;return m("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>m(Jt,{version:n,...Z({router:l,handlerDecorator:a},e)},String(t))))})})),Kt=u((({className:e="",index:t,text:n,href:r,target:l,onClick:a})=>m("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:a,children:n||`Документ ${t}`}))),Qt=u((({className:e,links:t,context:n})=>{const r=n.useRouter(),{handlerDecorator:l}=n;return h("div",{className:`${e||""}`,children:[m("div",{className:"py-6",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex flex-col justify-start items-start gap-2",children:t.map(((e,t)=>m(Kt,{index:t,className:"",...Z({router:r,handlerDecorator:l},e)},String(t))))}):null]})}));function Yt(){const{data:e}=ot(Xt(),Zt);return e||{}}async function Zt(){const e=await fetch(Xt());return await e.json()}function Xt(){return`/wcms-resources/${s.SITEMAP||"sitemap"}.json`}const en=u((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:l}=(()=>{const[e,t]=r("");return{term:e,setTerm:e=>t(e)}})(),a=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",o=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-[20px] h-[20px]":"w-[24px] h-[24px]",children:m($,{image:"LoupeIcon",width:"24",height:"24"})}),n?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${a}`,children:"Поиск по сайту"})]}),m("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-main-divider focus:border-primary-text ${i}`,value:n,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input",placeholder:o}),t?m("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),l("")},children:m($,{image:"CloseIcon",width:"24",height:"24"})}):m(ae,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),tn=u((({className:e=""})=>m(en,{className:e,isMobile:!0}))),nn=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),rn=u((({className:e="",documents:t,relatedEnterprises:n,contacts:r,socialMedia:l,context:a,horizontalNavigationTitle:i})=>{const o=Yt(),s=o?.dispositions;return h("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[m(Ot,{className:"overflow-hidden",items:r,context:a,hasButton:!0}),m(Fe,{context:a,className:"!p-0 mb-4",accordionItems:nn(o.topItems)}),m("div",{children:s?.map(ln)}),m(Gt,{context:a,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),m(tn,{context:a,className:"grow"}),m(qt,{className:"pb-4",media:l,context:a}),m(Ht,{title:i,links:n,context:a}),m(Qt,{links:t,context:a})]})})),ln=(e,t)=>{const{icon:n,href:r,text:l}=e;return h(ae,{version:"link",href:r,className:"flex text-s mb-4 w-6",children:[n?m($,{className:"pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,m("span",{className:"pl-2.5 font-medium text-primary-text",children:l})]},`footer-${t}`)},an=(e,t,n=((e,t)=>t.startsWith(e)))=>n(z(e),(e=>(e||"").replace(K,""))(z(H(e)?t.href:t.pathname))),on=e=>t=>an(t.href,e),sn=e=>t=>t.items?.some(on(e))||an(t.href,e)||((e,t)=>J(e)===J(t.href))(t.href,e),cn=e=>t=>e?.href===t?.href,dn=(e,t)=>{return(r=e,l=t,(r||[]).map((e=>l?.find(cn(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(cn(e))))));var n,r,l},mn="absolute left-0 -bottom-3 w-full h-[2px]",hn=u((({className:e="",text:t,href:n,target:r,active:l,onClick:a,children:i,bgColor:o="bg-white"})=>h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:n,target:r,onClick:a,children:[m("span",{className:un(o,l),children:t||i}),l?m("div",{className:pn(o,l)}):null]}))),un=(e,t=!1)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans text-s`},pn=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${mn}`:mn,xn=o("https://10.80.4.9");const gn=u((({context:e,burgerSubMenu:t,onClick:n,defaultLocation:i="",children:o})=>{const[s,c]=function(e){const[t,n]=r(e);return l((()=>{n(globalThis?.localStorage.getItem("location")||e)}),[e]),[t,a((()=>{xn.getFetcherAddress().then((t=>{const r=t||e;globalThis?.localStorage.setItem("location",r),n(r)}))}),[e])]}(i);return h("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[m("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:n,children:m($,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),h("button",{onClick:c,className:"flex items-center text-s text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[m($,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),s]}),o,m("div",{className:"mb-7",children:t?.map(bn)}),m(tn,{context:e,className:"grow"})]})})),bn=(e,t)=>{const{icon:n,href:r,text:l}=e;return h("a",{href:r,className:"flex text-s mb-4 hover:text-primary-main",children:[n?m($,{className:"text-primary-main pr-1",image:n,width:"24",height:"24",asSVG:!0}):null,m("span",{className:"font-medium pl-0.5",children:l})]},`headerSubMenu-${t}`)},fn=u((({onClick:e,bgColor:t})=>h("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[h("div",{className:"flex items-center",children:[m("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:m($,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text w-6 h-6",width:"24",height:"24",asSVG:!0})}),m(jt,{className:"mr-8",bgColor:t})]}),m("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-s border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),yn=u((({className:e="",defaultLocation:t,bgColor:n="bg-white",context:l,topItems:a})=>{const i=l.useRouter(),o=Yt(),s=o?.dispositions,{handlerDecorator:c}=l,d=dn(o.topItems,a).find(sn(i))?.items,u=(e=>(t=[])=>{const n=t?.filter(on(e));return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):void 0;var r})(i)(d),[p,x]=r(!1),g=()=>x(!p);return h("header",{className:`${n} ${e}`,children:[h("div",{className:"container px-4 py-0 box-border",children:[m(fn,{onClick:g,bgColor:n}),m("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:m("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:d?.map(((e,t)=>Nn({...Z({router:i,handlerDecorator:c},e),active:e===u,bgColor:n},t)))})})]}),p?m(gn,{context:l,onClick:g,burgerSubMenu:s,defaultLocation:t,children:m(Fe,{context:l,accordionItems:nn(o.topItems),className:"!p-0 mb-4"})}):null]})})),Nn=(e,t)=>m(hn,{className:"mr-8 whitespace-nowrap text-s",...e},String(t)),In=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function vn(e=""){const t=In(e);return t<=4?"S":t<=8?"M":"L"}function wn(e=""){const t=In(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function Cn(e=""){const t=In(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const kn=u((({className:e,context:t,title:n,description:r="Блок в разработке...",...l})=>h(Me,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Cn(e)} ${wn(e)} `,...l,children:[m(_,{context:t,className:"!p-0 max-w-[600px]",title:n,description:r,headlineVersion:vn(e)}),m("figure",{className:"m-0 min-w-[80%]",children:Sn()})]}))),Sn=(e=3)=>Tn(100,e).map((e=>Math.floor(e))).map($n),$n=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Tn=(e,t)=>[e].concat(t>0?Tn(e/1.618,t-1):[]),Dn={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Rn=u((({block:e,context:t,className:n=""})=>m("section",{className:`flex grow-0 shrink-0 basis-full px-4 pt-6 ${Dn[e?.version??"primary"]} ${n}`,role:"listitem",children:m("div",{className:"flex grow",children:m(be,{context:t,...e})})}))),_n=u((({className:e,context:t,slides:n=[]})=>{const r=n.map((e=>e.productBlock));return m("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:m(V,{context:t,children:r.map(((e,n)=>m(Rn,{block:e,context:t},String(n))))})})})),Pn={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white"}},Bn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"},An={normal:"min-h-[70px]",small:"min-h-[50px]"},Mn=u((({className:e,title:t,description:n,showLines:r=!0,steps:l,size:a="normal",version:i="primary"})=>{const o=Pn[i];return h("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${o.background} ${o.title} ${e||""}`,children:[t?m(g,{headingType:"h3",className:`text-center ${o.title}`,title:t}):null,n?m("p",{className:`text-m-light text-center ${o.description} ${t?"mt-2":""}`,children:n}):null,l?.length?m("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:m("div",{className:"flex flex-col justify-between gap-x-[101px]",children:l.map(Ln(a,i,r))})}):null]})})),Ln=(e,t,n)=>(r,l,a)=>{const i=a.length-1===l,o="normal"===e?"ml-[34px]":"ml-6",s=Pn[t];return m("div",{children:h("div",{className:"flex flex-row text-center relative",children:[h("div",{className:"overflow-hidden",children:[Vn(e,t)(r,l),i?null:m("div",{className:`min-h-8 h-full w-[2px] ${n?s.iconConnector:""} ${o}`})]}),h("div",{className:`flex flex-col justify-center h-fit ${An[e]}`,children:[r.label?m("div",{className:"text-m-title-xs font-medium m-0 text-left mb-1",children:r.label}):null,r.description?m("div",{className:`text-s ${s.description} text-left`,children:r.description}):null]})]})},String(l))},Vn=(e,t)=>(n,r)=>{const l=Pn[t],a="normal"===e?"38":"27",i="normal"===e?"text-m-title":"text-m-title-xs";return m("div",{className:`${Bn[e]} ${l.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:m("span",{className:`font-medium flex self-center ${l.title} ${i}`,children:(o=n?.icon,Boolean(o?.icon||o?.src)?m($,{image:n.icon,width:a,height:a,asSVG:!0}):m("span",{children:r+1}))})});var o},jn=u((({title:e,icon:t})=>h("div",{className:"flex gap-2.5 mb-2",children:[e?m(g,{headingType:"h3",className:"font-medium",title:e}):null,t?m($,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Gn=e=>e?.alt||e?.title||f[e?.icon?e.icon:""],On=u((({header:e,data:t})=>h("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[m(jn,{...e}),t?.length?t.map(Wn):null]}))),Wn=({label:e,description:t,list:n,image:r,buttons:l},a)=>h("div",{children:[a>0&&m("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?m("div",{className:"text-s m-0",children:e}):null,t?m("div",{className:"text-s text-secondary-text mt-[3px]",children:t}):null,n?.items?.length?Un(n):null,r?m($,{image:{...r,className:"m-0"}}):null,l?.length?En(l):null]},String(a)),Un=e=>m(he,{className:"flex flex-col justify-between items-start text-s",version:"gray",items:e.items,isDotted:e.isDotted??!0}),En=e=>m("div",{children:e.map((({icon:e,rounded:t,...n},r)=>m(ae,{className:`mt-3 ${r>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,ariaLabel:Gn(e),rounded:t,appendLeft:e?m($,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...n,"aria-label":e},String(r))))}),Fn=u((({tiles:e,context:t})=>m(V,{context:t,children:e.map(((e,t)=>m(On,{...e},String(t))))}))),Hn=u((({tiles:e})=>m("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>m(On,{...e},String(t))))}))),zn=u((({className:e,context:t,title:n,description:r,columns:l,rowHeaders:a,orientation:i="vertical"})=>{const o=qn(l),s=Kn(a,o);return h("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[n?m(g,{headingType:"h2",className:`text-center ${r?"mb-2":"mb-5"}`,title:n}):null,r?m("div",{className:"mb-5 text-center text-m",children:r}):null,s?.length?Jn(i,s,t):null]})}));function Jn(e,t,n){return"vertical"===e?m(Hn,{tiles:t}):m(Fn,{context:n,tiles:t})}const qn=e=>e?.[0].data?e[0].data:[],Kn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Qn={Accordion:Fe,ComparisonTable:Xe,ExchangeRateTile:Mt,Footer:rn,Gallery:Te,Header:yn,Headline:_,LinkDocs:F,LinkList:Le,MobileAppTile:Gt,ProductBlock:ve,ProductGallery:_n,StepsBlock:Mn,TariffsTable:zn,TextBlock:Ce,Placeholder:kn},Yn=d();const Zn=u((({className:e,onClick:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:Xn()}))),Xn=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),m("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},er=u((({className:e,context:t,...n})=>{const{useRouter:i,handlerDecorator:o=Y}=t,s=function(e){const[t,n]=r(0);return l((()=>{(async()=>{const[t]=await Yn.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:a((async()=>{n(await Yn.like(e))}),[e]),dislike:a((async()=>{n(await Yn.dislike(e))}),[e])}}(i().pathname);return h(Me,{tag:"div",context:t,className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,...n,children:[m(Zn,{onClick:o(s.like),ariaLabel:"Поставить отметку «лайк»"}),m(Zn,{onClick:o(s.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:s.likeCount})]})})),tr=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),nr=u((({className:e="",context:t,blocksRegistry:n,data:r={},blockDecorator:l=tr})=>{const{style:a,blocks:i,slots:o={},likeControl:s,colorPalette:c="pc"}=r,{header:d}=o;return h("section",{className:`relative ${T(a)} ${e}`,"data-theme":c,children:[d?.blocks?.length?m("div",{className:`${T(d?.style)}`,children:d.blocks.map(((e,a)=>rr({block:e,page:r,blockDecorator:l,blocksRegistry:n,context:t},a)))}):null,i?.length?m("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,a)=>rr({block:e,blockDecorator:l,blocksRegistry:n,context:t,page:r},a)))}):null,s?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(er,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")}):null]})}));function rr({block:e,blockDecorator:t,blocksRegistry:n,context:r,page:l},a){const{type:i}=e;i&&i in n||console.warn(`No block with "${i}" is registered`);const o=n[i||"Placeholder"]||kn;return t({blockClassName:`scroll-mt-12 ${T(e.style)}`,block:e,render:e=>{const{version:t,content:n,anchor:s,labels:c}=e.block;return m(o,{className:e.blockClassName,version:t,context:r,page:l,anchor:s,labels:c,...n},`${i}-${a}`)}},`block-${a}`)}e.Blocks=Qn,e.ContentPage=nr,e.DaDataAPI=o,e.LikeAPI=d,e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.projectSettings=s,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=q,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -3,10 +3,9 @@ export interface ProjectSettings {
|
|
|
3
3
|
RC_BRANCH?: string;
|
|
4
4
|
PROD_BRANCH: string;
|
|
5
5
|
FORCED_DRAFT_FLOW: boolean;
|
|
6
|
-
|
|
6
|
+
ASSIST_PROJECT_ID?: string;
|
|
7
7
|
SITEMAP?: string;
|
|
8
8
|
CDN?: string;
|
|
9
|
-
CREDIT_CALCULATOR?: string;
|
|
10
9
|
}
|
|
11
10
|
export declare const projectSettings: {
|
|
12
11
|
_: ProjectSettings;
|
|
@@ -15,7 +14,7 @@ export declare const projectSettings: {
|
|
|
15
14
|
readonly RC_BRANCH: string | undefined;
|
|
16
15
|
readonly PROD_BRANCH: string;
|
|
17
16
|
readonly FORCED_DRAFT_FLOW: boolean;
|
|
18
|
-
readonly
|
|
17
|
+
readonly ASSIST_PROJECT_ID: string | undefined;
|
|
19
18
|
readonly SITEMAP: string | undefined;
|
|
20
19
|
readonly CDN: string | undefined;
|
|
21
20
|
};
|
|
@@ -20,8 +20,8 @@ exports.projectSettings = new (class {
|
|
|
20
20
|
get FORCED_DRAFT_FLOW() {
|
|
21
21
|
return this._.FORCED_DRAFT_FLOW;
|
|
22
22
|
}
|
|
23
|
-
get
|
|
24
|
-
return this._.
|
|
23
|
+
get ASSIST_PROJECT_ID() {
|
|
24
|
+
return this._.ASSIST_PROJECT_ID;
|
|
25
25
|
}
|
|
26
26
|
get SITEMAP() {
|
|
27
27
|
return this._.SITEMAP;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSettings.js","sourceRoot":"","sources":["../src/ProjectSettings.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ProjectSettings.js","sourceRoot":"","sources":["../src/ProjectSettings.ts"],"names":[],"mappings":";;AAUa,QAAA,eAAe,GAAG,IAAI,CAAC;IAClC,CAAC,GAAoB;QACnB,WAAW,EAAE,QAAQ;QACrB,iBAAiB,EAAE,KAAK;KACzB,CAAC;IAEF,KAAK,CAAC,CAAkB;QACtB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1B,CAAC;IACD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IACxB,CAAC;IACD,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;IACpB,CAAC;CACF,CAAC,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ export interface LikeData {
|
|
|
2
2
|
node_id: string;
|
|
3
3
|
value: number;
|
|
4
4
|
}
|
|
5
|
-
export declare function LikeAPI(
|
|
5
|
+
export declare function LikeAPI(): {
|
|
6
6
|
getLikeCount: (...nodeIds: string[]) => Promise<LikeData[]>;
|
|
7
7
|
like: (nodeId: string) => Promise<number>;
|
|
8
8
|
dislike: (nodeId: string) => Promise<number>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.LikeAPI = void 0;
|
|
3
|
+
const ProjectSettings_1 = require("../ProjectSettings");
|
|
3
4
|
const AUTH_PREFIX = 'guest';
|
|
4
5
|
const STORAGE_KEY = 'likesToken';
|
|
5
6
|
// eslint-disable-next-line max-lines-per-function
|
|
6
|
-
function LikeAPI(
|
|
7
|
+
function LikeAPI() {
|
|
7
8
|
async function getLikeCount(...nodeIds) {
|
|
8
9
|
if (!nodeIds.length) {
|
|
9
10
|
return [];
|
|
10
11
|
}
|
|
11
12
|
const { token: Authorization } = await auth();
|
|
12
13
|
try {
|
|
13
|
-
const response = await fetch(
|
|
14
|
+
const response = await fetch(`/assist/v1/public/projects/${ProjectSettings_1.projectSettings.ASSIST_PROJECT_ID}/nodes/likes`, {
|
|
14
15
|
method: 'POST',
|
|
15
16
|
mode: 'cors',
|
|
16
17
|
headers: { 'Content-Type': 'application/json', Authorization },
|
|
@@ -32,7 +33,7 @@ function LikeAPI(projectId, baseURL = '') {
|
|
|
32
33
|
}
|
|
33
34
|
const { token: Authorization, name } = await auth();
|
|
34
35
|
try {
|
|
35
|
-
const response = await fetch(
|
|
36
|
+
const response = await fetch(`/assist/v1/public/projects/${ProjectSettings_1.projectSettings.ASSIST_PROJECT_ID}/nodes/like`, {
|
|
36
37
|
method: 'POST',
|
|
37
38
|
mode: 'cors',
|
|
38
39
|
headers: {
|
|
@@ -59,7 +60,7 @@ function LikeAPI(projectId, baseURL = '') {
|
|
|
59
60
|
}
|
|
60
61
|
const { token: Authorization, name } = await auth();
|
|
61
62
|
try {
|
|
62
|
-
const response = await fetch(
|
|
63
|
+
const response = await fetch(`/assist/v1/public/projects/${ProjectSettings_1.projectSettings.ASSIST_PROJECT_ID}/nodes/unlike`, {
|
|
63
64
|
method: 'POST',
|
|
64
65
|
mode: 'cors',
|
|
65
66
|
headers: {
|
|
@@ -91,7 +92,7 @@ function LikeAPI(projectId, baseURL = '') {
|
|
|
91
92
|
// do nothing
|
|
92
93
|
}
|
|
93
94
|
try {
|
|
94
|
-
const response = await fetch(
|
|
95
|
+
const response = await fetch(`/assist/v1/public/auth`, {
|
|
95
96
|
method: 'POST',
|
|
96
97
|
mode: 'cors',
|
|
97
98
|
headers: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LikeAPI.js","sourceRoot":"","sources":["../../src/api/LikeAPI.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"LikeAPI.js","sourceRoot":"","sources":["../../src/api/LikeAPI.ts"],"names":[],"mappings":";;AAAA,wDAAqD;AAWrD,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,WAAW,GAAG,YAAY,CAAC;AAEjC,kDAAkD;AAClD,SAAgB,OAAO;IACrB,KAAK,UAAU,YAAY,CAAC,GAAG,OAAiB;QAC9C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,EAAE,CAAC;SACX;QAED,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAE9C,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,8BAA8B,iCAAe,CAAC,iBAAiB,cAAc,EAC7E;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE;gBAC9D,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,QAAQ,EAAE,OAAO;iBAClB,CAAC;aACH,CACF,CAAC;YAEF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAExC,OAAO,KAAK,IAAI,EAAE,CAAC;SACpB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjB,OAAO,EAAE,CAAC;SACX;IACH,CAAC;IAED,KAAK,UAAU,IAAI,CAAC,MAAc;QAChC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,CAAC,CAAC;SACV;QAED,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAEpD,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,8BAA8B,iCAAe,CAAC,iBAAiB,aAAa,EAC5E;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa;oBACb,MAAM,EAAE,IAAI;iBACb;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,OAAO,EAAE,MAAM;oBACf,SAAS,EAAE,IAAI;iBAChB,CAAC;aACH,CACF,CAAC;YACF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAExC,OAAO,KAAK,IAAI,CAAC,CAAC;SACnB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjB,OAAO,CAAC,CAAC;SACV;IACH,CAAC;IAED,KAAK,UAAU,OAAO,CAAC,MAAc;QACnC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,CAAC,CAAC;SACV;QAED,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAEpD,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,8BAA8B,iCAAe,CAAC,iBAAiB,eAAe,EAC9E;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa;oBACb,MAAM,EAAE,IAAI;iBACb;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,OAAO,EAAE,MAAM;oBACf,SAAS,EAAE,IAAI;iBAChB,CAAC;aACH,CACF,CAAC;YACF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAExC,OAAO,KAAK,IAAI,CAAC,CAAC;SACnB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjB,OAAO,CAAC,CAAC;SACV;IACH,CAAC;IAED,KAAK,UAAU,IAAI;QACjB,IAAI;YACF,MAAM,QAAQ,GAAa,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1F,IAAI,QAAQ,EAAE,KAAK,EAAE;gBACnB,OAAO,QAAQ,CAAC;aACjB;SACF;QAAC,OAAO,CAAC,EAAE;YACV,aAAa;SACd;QAED,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,wBAAwB,EAAE;gBACrD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,MAAM,EAAE,WAAW;iBACpB,CAAC;aACH,CAAC,CAAC;YAEH,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAE9C,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAE9E,OAAO,EAAE,KAAK,EAAE,IAAI,EAAc,CAAC;SACpC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjB,OAAO,EAAc,CAAC;SACvB;IACH,CAAC;IAED,OAAO;QACL,YAAY;QACZ,IAAI;QACJ,OAAO;KACR,CAAC;AACJ,CAAC;AA1ID,0BA0IC"}
|
|
@@ -13,7 +13,7 @@ const productTileStyleMap = {
|
|
|
13
13
|
secondary: 'bg-primary-main text-white',
|
|
14
14
|
};
|
|
15
15
|
exports.ProductTile = (0, uni_jsx_1.JSX)(({ context, className = '', title, headlineVersion = 'S', description, additionalDescription, benefits, buttons, image, version = 'primary', ...rest }) => {
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { context: context, className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border min-h-[364px] relative justify-between grid ${className} ${productTileStyleMap[version]} ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${(0, getTileMinHeight_1.getTileMinHeight)(className)} `, ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "z-[1]", children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits(benefits || [], version), additionalDescription
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { context: context, className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border min-h-[364px] relative justify-between grid ${className} ${productTileStyleMap[version]} ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${(0, getTileMinHeight_1.getTileMinHeight)(className)} `, ...rest, children: [(0, jsx_runtime_1.jsxs)("div", { className: "z-[1]", children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, className: "!p-0", as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left" }), renderBenefits(benefits || [], version), additionalDescription
|
|
17
17
|
? renderAdditionalDescription(additionalDescription, version)
|
|
18
18
|
: null] }), buttons?.length ? ((0, jsx_runtime_1.jsx)(ButtonSection_1.ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-[1] text-l" })) : null, image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,qEAAkE;AAClE,8CAA2C;AAC3C,mEAAgE;AAChE,yEAAsE;
|
|
1
|
+
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,qEAAkE;AAClE,8CAA2C;AAC3C,mEAAgE;AAChE,yEAAsE;AACtE,mDAAgD;AAKhD,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EACC,OAAO,EACP,SAAS,GAAG,EAAE,EACd,KAAK,EACL,eAAe,GAAG,GAAG,EACrB,WAAW,EACX,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,wBAAC,2BAAY,IACX,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,mHAAmH,SAAS,IACrI,mBAAmB,CAAC,OAAO,CAC7B,IAAI,IAAA,yCAAmB,EAAC,SAAS,CAAC,IAAI,IAAA,mCAAgB,EAAC,SAAS,CAAC,GAAG,KAChE,IAAI,aAER,iCAAK,SAAS,EAAC,OAAO,aACpB,uBAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,MAAM,EAChB,EAAE,EAAC,IAAI,EACP,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,OAAO,EACxB,KAAK,EAAC,MAAM,GACZ,EACD,cAAc,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,EACvC,qBAAqB;wBACpB,CAAC,CAAC,2BAA2B,CAAC,qBAAqB,EAAE,OAAO,CAAC;wBAC7D,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,uBAAC,6BAAa,IACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,uCAAuC,GACjD,CACH,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,SAAS,EAAC,2BAA2B,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,IACnE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,cAAc,CAAC,QAAuB,EAAE,OAAqB;IACpE,OAAO,CACL,iCAAK,SAAS,EAAC,WAAW,aACvB,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CACjB,gCAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAAO,CAC/E,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CACjB,gCAAK,SAAS,EAAC,aAAa,YACzB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GAC5D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAoB,EAAE,CAAS;IACzD,OAAO,CACL,gCAAqB,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,YACnD,OAAO,CAAC,KAAK,IADN,MAAM,CAAC,CAAC,CAAC,CAEb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAoB,EAAE,CAAS,EAAE,OAAO,GAAG,SAAS;IACpF,MAAM,aAAa,GAAiC;QAClD,OAAO,EAAE,qBAAqB;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC;IAEF,OAAO,CACL,gCAAqB,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,YACxF,OAAO,CAAC,WAAW,IADZ,MAAM,CAAC,CAAC,CAAC,CAEb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B,CAAC,qBAA6B,EAAE,OAAO,GAAG,SAAS;IACrF,MAAM,YAAY,GAAiC;QACjD,OAAO,EAAE,qBAAqB;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC;IAEF,OAAO,CACL,gCAAK,SAAS,EAAE,uBAAuB,YAAY,CAAC,OAAO,CAAC,EAAE,YAAG,qBAAqB,GAAO,CAC9F,CAAC;AACJ,CAAC"}
|
|
@@ -14,7 +14,7 @@ const promoTileStyleMap = {
|
|
|
14
14
|
secondary: 'bg-primary-main text-white',
|
|
15
15
|
};
|
|
16
16
|
exports.PromoTile = (0, uni_jsx_1.JSX)(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => {
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${(0, getTileMinHeight_1.getTileMinHeight)(className)} `, ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { context: context, title: title ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: (0, getTileHeadingType_1.getTileHeadingType)(className), bgColorHeadline: version, align: "left" }) })) : null, buttons: buttons?.length ? ((0, jsx_runtime_1.jsx)(ButtonSection_1.ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: (0, jsx_runtime_1.jsxs)("div", { className: "mt-1.5", children: [date ? (0, jsx_runtime_1.jsx)("div", { className: "text-s mb-2", children: formatDate(date) }) : null, (0, jsx_runtime_1.jsx)("div", { className: "text-l", children: description })] }) }) }));
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${(0, getTileMinHeight_1.getTileMinHeight)(className)} `, ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { context: context, title: title ? ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: (0, getTileHeadingType_1.getTileHeadingType)(className), bgColorHeadline: version, align: "left", as: "h2" }) })) : null, buttons: buttons?.length ? ((0, jsx_runtime_1.jsx)(ButtonSection_1.ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: (0, jsx_runtime_1.jsxs)("div", { className: "mt-1.5", children: [date ? (0, jsx_runtime_1.jsx)("div", { className: "text-s mb-2", children: formatDate(date) }) : null, (0, jsx_runtime_1.jsx)("div", { className: "text-l", children: description })] }) }) }));
|
|
18
18
|
});
|
|
19
19
|
function formatDate(date) {
|
|
20
20
|
const dateObj = new Date(date);
|