(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2186],{849:function(e,t,n){"use strict";n.d(t,{vM:function(){return c},iB:function(){return p},Wb:function(){return h},il:function(){return f},f6:function(){return u},CV:function(){return _}});var a=n(59306);function o(e,t){return(null==e?void 0:e.status)==="fulfilled"?e.value:t}var r=n(32478),l=n(56471),i=n(6326);let s=async(e,t)=>{var n,o,r;let l=t?null:await (0,a.t)({url:"/money_data/NavigatorDetailNocache.json?url=".concat(e)}),i=await (0,a.t)({url:"/money_data/NavigatorDetail.json?".concat(t?"others=".concat(t,"&"):"","url=").concat(e)}),s=(null==l?void 0:null===(n=l.data)||void 0===n?void 0:n.polls_statistics)||null,c=(null==l?void 0:null===(o=l.data)||void 0===o?void 0:o.comments)||null,d={...(null===(r=i.data)||void 0===r?void 0:r.article)||{},polls:s,comments:c};return{...i,data:{...i.data,article:d}}},c=async(e,t,n)=>{var r;if((0,l.W)(e))return s(t,n);let[c,d]=await Promise.allSettled([(0,a.t)({url:"/api/v2/posts/by-full-url?fullUrl=".concat(t,"&draft=false&showPlanned=false"),options:{isHeadlessCMS:!0}}),n?Promise.resolve(null):(0,a.t)({url:"/money_data/NavigatorDetailNocache.json?url=".concat(t)})]),u=o(c,null),m=o(d,null),_=(null==m?void 0:null===(r=m.data)||void 0===r?void 0:r.comments)||null;return{data:{article:{...(0,i.I)(null==u?void 0:u.data)||{},comments:_},tags:[],ctgs:[],actual_news:[],news_tags:[],towns_info:[],others:[]}}},d=async(e,t)=>{let n=null,o=(0,a.L)(e,{});try{let e=t.includes("/news/"),a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,view:1,secret:"g4$3in4d"})},r=e?await fetch("".concat(o,"/money_data/NewsDetailNocache.json?url=").concat(t,"&secret=g4$3in4d&view=1")):await fetch("".concat(o,"/money_data/NavigatorDetailNocache.json"),a);if(!r.ok)throw Error("Error: ".concat(r.statusText));n=await r.json()}catch(e){console.error("Error:",e)}return null==n?void 0:n.views},u=async(e,t)=>{if((0,l.W)(e))return d(e,t);let n=null,o=(0,a.L)(e,{isHeadlessCMS:!0}),i=(0,r.O)(t);try{let e=await fetch("".concat(o,"/api/v1/counter/view/").concat(i),{method:"PUT"});if(!e.ok)throw Error("Error: ".concat(e.statusText));n=await e.json()}catch(e){console.error("Error:",e)}return null==n?void 0:n.views},m=async(e,t,n,o)=>{let r=(0,a.L)(e,{});try{let e=await fetch("".concat(r,"/money_data/NavigatorPolls.json"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({post_id:t,user_id:2,poll_key:n,variant_key:o,secret:"g4$3in4d"})});if(!e.ok)throw Error("Error: ".concat(e.statusText))}catch(e){console.error("Error:",e)}},_=async(e,t,n,o)=>{var r;if((0,l.W)(e))return m(e,t,n,o);let{data:s}=await (0,a.t)({url:"/api/v1/polls/votes",options:{isHeadlessCMS:!0},config:{method:"POST",body:JSON.stringify({contentUrl:t,pollKey:n,variantKey:o}),headers:{"Content-Type":"application/json"}}});return(0,i.u)(null==s?void 0:null===(r=s.result)||void 0===r?void 0:r.answers)},p=async(e,t)=>{let{data:n}=await (0,a.t)({url:"/api/v1/polls/results?contentUrl=".concat(e,"&pollKey=").concat(t),options:{isHeadlessCMS:!0}});return(0,i.u)(null==n?void 0:n.answers)},h=async(e,t,n,o,r,i)=>{let s=null,c=(0,a.L)(e,{}),d=(0,l.W)(e)?"post_id":"url";try{let e=await fetch("".concat(c,"/money_data/NavigatorComments.json"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[d]:t,user_name:o,user_id:n,comment:r,secret:"g4$3in4d",type:i})});if(!e.ok)throw Error("Error: ".concat(e.statusText));s=await e.json()}catch(e){console.error("Error:",e)}return!!(null==s?void 0:s.success)},v=async(e,t)=>{let n=null,o=(0,a.L)(e,{});try{let e=await fetch("".concat(o,"/money_data/NavigatorDetailNocache.json?url=").concat(t,"&like"));if(n=await e.json(),!e.ok||!(null==n?void 0:n.success))throw Error("Error: ".concat((null==n?void 0:n.error)||e.statusText))}catch(e){console.error("Error:",e)}return null==n?void 0:n.success},f=async(e,t)=>{if((0,l.W)(e))return v(e,t);let n=null,o=(0,a.L)(e,{isHeadlessCMS:!0}),i=(0,r.O)(t);try{let e=await fetch("".concat(o,"/api/v1/counter/like/INCREMENT/").concat(i),{method:"POST"});if(n=await e.json(),!e.ok||!(null==n?void 0:n.likes))throw Error("Error: ".concat(e.statusText))}catch(e){console.error("Error:",e)}return!!(null==n?void 0:n.likes)}},52266:function(e,t,n){"use strict";var a,o,r,l;n.d(t,{z:function(){return o}}),(r=a||(a={})).Company="company",r.CompanyInsurance="company_insurance",r.Finuslugi="finuslugi",r.Industry="industry",r.IndustryInsurance="industry_insurance",(l=o||(o={})).Annotation="annotation",l.HTML="html",l.Header="header",l.Keynote="keynote",l.SubHeader="sub_header",l.DocumentFile="document-file"},28045:function(e,t,n){"use strict";n.d(t,{y:function(){return d}});let a="authorization_code",o={access_token:"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxbDFyMEhYU0U4VFo1VkRsZFhKZ1JfdHBiaEtJclJWTTdtSnJVQnVCWm5rIn0.eyJleHAiOjE3NjQ3NTg0MzksImlhdCI6MTc2NDc1ODEzOSwiYXV0aF90aW1lIjoxNzY0NzU4MTM3LCJqdGkiOiJiMDdkNWVmZS03Y2U3LTQyZGItODlmYy04MjcxNTJiZDBkM2QiLCJpc3MiOiJodHRwczovL3Nzby1zdGFibGUuYmV0YS5tb2V4LmNvbS9hdXRoL3JlYWxtcy9jcmFtbC11bml2ZXJzYWwiLCJhdWQiOlsiZGZhX29pcyIsInRvdWNoY3JhbWxfcHVibGljIiwiYWNjb3VudCJdLCJzdWIiOiIzNjU1Nzg4Zi1hMjExLTQyNjYtODIxZS00M2FmZDE4N2JlZjciLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJ0b3VjaGNyYW1sX3B1YmxpYyIsIm5vbmNlIjoiVUFiakhyUXZiMnNsOHpQUHFLdnVXIiwic2lkIjoiMTNjNWY5ZGMtZjAzOC00NGM5LWI1ZmUtZDk0ZWZmNzYzOGMwIiwiYWxsb3dlZC1vcmlnaW5zIjpbIiIsImh0dHBzOi8vZGV2LXJjLWxrLmJldGEubW9leC5jb20vKiIsIioiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtY3JhbWwtdW5pdmVyc2FsIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGJhY2t3YXJkc19jb21wYXRpYmxlIGVtYWlsIHVuaXZlcnNhbF9jcmFtbF9wcmVmZXJyZWQgYXV0aHpfYXR0cnMgc3ViX2NyYW1sX2lkIHByb2ZpbGUgYXV0aF9wcm92aWRlciBhdXRoX2Zsb3ciLCJhdXRoel9hdHRycyI6eyJzdGF0dXMiOiJBQ1RJVkUiLCJpZGVudF9sdmwiOiJOT1RfSURFTlRJRklFRCIsImF1dGhfcHJvdmlkZXIiOiJwaG9uZSIsImF1dGhfZmxvdyI6InNpbXBsZSJ9LCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImF1dGhfZmxvdyI6InNpbXBsZSIsInByZWZlcnJlZF91c2VybmFtZSI6Ijc0ODliNzQwLTViYTAtNGMzMS1hYWVmLTIxMDIyZDQxMWVhZSIsInNlc3Npb25fc3RhdGUiOiIxM2M1ZjlkYy1mMDM4LTQ0YzktYjVmZS1kOTRlZmY3NjM4YzAiLCJjdXN0b21lcl9pZCI6Ijc0ODliNzQwLTViYTAtNGMzMS1hYWVmLTIxMDIyZDQxMWVhZSIsImF1dGhfcHJvdmlkZXIiOiJwaG9uZSJ9.R3s8pdLr1eam9SuZAQ_kAMGZh7J8I1-WApZ287zip3Rxd1VFDhY3IblH-itDvBxS0cyTuSVi5f_B-YJztv05bDlRvRAYJ3bEKwdSQjk_8izolOZLvEWkQqohRHPXKfYg8vHmQ27BZcFe9CikANAH9w_tTkbBdOMEbiI4dznXvL92YGlzlyxsdMUvpeSYibjWA5dlIeWx4lj8FdEDBUSqBf6JdoOi9iclWb9qw9DCwlXlMAIy_Lbfdb2yMy9ZXybNL5uHN-32r3_klwyYRsy2LhXKebKyJIJaIgvdcrHMn9A_BeyEYfdPWsF_uKFoADi2Hcx2f7Bo_6mnJXXZ3Eld-A",expires_in:300,refresh_expires_in:1800,refresh_token:"eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJiODA5MTdmZi00OGIzLTRjMmMtYTc5YS1lOTkzODE4ZDZkNjYifQ.eyJleHAiOjE3NjQ3NTk5MzksImlhdCI6MTc2NDc1ODEzOSwianRpIjoiMmVhNTk2ZjgtNmJiMi00YWE4LTgwNWYtNzUwZDUwMjI3ZGExIiwiaXNzIjoiaHR0cHM6Ly9zc28tc3RhYmxlLmJldGEubW9leC5jb20vYXV0aC9yZWFsbXMvY3JhbWwtdW5pdmVyc2FsIiwiYXVkIjoiaHR0cHM6Ly9zc28tc3RhYmxlLmJldGEubW9leC5jb20vYXV0aC9yZWFsbXMvY3JhbWwtdW5pdmVyc2FsIiwic3ViIjoiMzY1NTc4OGYtYTIxMS00MjY2LTgyMWUtNDNhZmQxODdiZWY3IiwidHlwIjoiUmVmcmVzaCIsImF6cCI6InRvdWNoY3JhbWxfcHVibGljIiwibm9uY2UiOiJVQWJqSHJRdmIyc2w4elBQcUt2dVciLCJzaWQiOiIxM2M1ZjlkYy1mMDM4LTQ0YzktYjVmZS1kOTRlZmY3NjM4YzAiLCJzY29wZSI6Im9wZW5pZCBiYXNpYyBiYWNrd2FyZHNfY29tcGF0aWJsZSBlbWFpbCBjb25maWdfcmVxdWlyZV9ydW5fY3VzdG9tZXJfdmVyaWZpY2F0aW9ucyBjdXN0b21lcl9yZWNvcmRfc3RhdGUgYnJva2VyYWdlX2tleXNfd2ViIGVzaWFfb2lkIHVuaXZlcnNhbF9jcmFtbF9wcmVmZXJyZWQgYXV0aHpfYXR0cnMgcm9sZXMgc3ViX2NyYW1sX2lkIHByb2ZpbGUgd2ViLW9yaWdpbnMgYXV0aF9wcm92aWRlciBhdXRoX2Zsb3cifQ.mtkm-1NMff6Mzp5GHoSOXv2muBgTrl20f6vCPoa9PZLN2i35DEB4QrAG5SRR_qD3KCe6Df1yUOnGwoygG0vcZA",token_type:"Bearer",id_token:"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxbDFyMEhYU0U4VFo1VkRsZFhKZ1JfdHBiaEtJclJWTTdtSnJVQnVCWm5rIn0.eyJleHAiOjE3NjQ3NTg0MzksImlhdCI6MTc2NDc1ODEzOSwiYXV0aF90aW1lIjoxNzY0NzU4MTM3LCJqdGkiOiJiNzZiNDU0Yy0yNDdmLTRmNWEtYjMyOC1lZGExNDQwN2Y5YjMiLCJpc3MiOiJodHRwczovL3Nzby1zdGFibGUuYmV0YS5tb2V4LmNvbS9hdXRoL3JlYWxtcy9jcmFtbC11bml2ZXJzYWwiLCJhdWQiOiJ0b3VjaGNyYW1sX3B1YmxpYyIsInN1YiI6IjM2NTU3ODhmLWEyMTEtNDI2Ni04MjFlLTQzYWZkMTg3YmVmNyIsInR5cCI6IklEIiwiYXpwIjoidG91Y2hjcmFtbF9wdWJsaWMiLCJub25jZSI6IlVBYmpIclF2YjJzbDh6UFBxS3Z1VyIsInNpZCI6IjEzYzVmOWRjLWYwMzgtNDRjOS1iNWZlLWQ5NGVmZjc2MzhjMCIsImF0X2hhc2giOiJxOWdHVEc1UUNFakRRM2d6UWpCX1hRIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiI3NDg5Yjc0MC01YmEwLTRjMzEtYWFlZi0yMTAyMmQ0MTFlYWUiLCJzZXNzaW9uX3N0YXRlIjoiMTNjNWY5ZGMtZjAzOC00NGM5LWI1ZmUtZDk0ZWZmNzYzOGMwIn0.UQBUtA7F3MBo1ax2IMZ2ok5ZjGo_Yp7F20vucJOhEldK7WCHfauHv96eYD7eKU6L0lmhbmFqF92MLIwN58b2ksd6Xy08RN3PmiMasIhblDiOx8Cd6W9VrbdnR5Uuf2Ff01m3zRhLK11K1rfM16nbW2mltnsCCacUBBpRKUONjUEw7NLWXzyxtcTHs6ZSPkgVFb8qLiaN2l3yCmkq-tDeRQt9N74SBIgGFeU91gK6Y9JKS2nV4QZ0AbISeR_PUoH96JH0_teCQnSRR704-ca9MdycWpNB5Yt6eo9IMKCpdXl6aBPLtlNlOXloAeqf3nrMsOXWxL5DjH8ySgHQ5S-xxg","not-before-policy":0,session_state:"13c5f9dc-f038-44c9-b5fe-d94eff7638c0",scope:"openid auth_provider auth_flow",customer_record_state:"created"},r=e=>"object"==typeof e&&null!==e,l=e=>!!r(e)&&"string"==typeof e.access_token&&"number"==typeof e.expires_in&&"number"==typeof e.refresh_expires_in&&"string"==typeof e.refresh_token&&"string"==typeof e.token_type,i=()=>"authDebug"===new URLSearchParams(window.location.search).get("mode"),s=async e=>{let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch(e){return t}},c=e=>{let{code:t,refreshToken:n,codeVerifier:o,grantType:r=a,redirectUri:l}=e,i=new URLSearchParams;return t&&i.set("code",t),n&&i.set("refresh_token",n),r===a&&o&&i.set("code_verifier",o),i.set("response_type","code"),i.set("grant_type",r),i.set("client_id","journal"),i.set("redirect_uri",l),i},d=async e=>{let{tokenUrl:t}=e;if(i())return{ok:!0,status:200,data:o};let n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c(e)}),a=await s(n);return n.ok&&l(a)?{ok:!0,status:n.status,data:a}:{ok:!1,status:n.status,data:a}}},11095:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(57437),o=n(2265),r=n(54365),l=n(4028),i=n(49286),s=n.n(i);let c=e=>{let{params:t,children:n,className:i,config:c}=e,[d,u]=(0,o.useState)(!1),[m,_]=(0,o.useState)(""),p=(0,o.useRef)(null),h=(0,o.useRef)("");return(0,o.useEffect)(()=>{h.current&&(null==c?void 0:c.yaContextCb)&&(null==c?void 0:c.Ya)&&c.yaContextCb.push(()=>{c.Ya.adfoxCode.destroy(h.current)}),_((0,l.R)())},[null==c?void 0:c.Ya,null==c?void 0:c.yaContextCb,t.pp]),(0,o.useEffect)(()=>{if(h.current===m)return;if(!c){u(!0);return}let e=()=>{var e,t;let n=null===(e=p.current)||void 0===e?void 0:e.querySelector("iframe");n?n.style.height="".concat(null===(t=n.contentWindow)||void 0===t?void 0:t.document.body.scrollHeight,"px"):console.warn("ads blocked"),u(!n)};c.yaContextCb&&c.yaContextCb.push(()=>{c.Ya.adfoxCode.create({ownerId:c.ownerId,containerId:"adfox_".concat(m),params:t,onRender:e})}),setTimeout(e,5e3),h.current=m},[m,c,t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,r.Z)(d&&s().hide,i),ref:p,id:"adfox_".concat(m)},m),d&&n]})}},86031:function(e,t,n){"use strict";n.d(t,{e:function(){return c},v:function(){return d}});var a=n(57437),o=n(20660),r=n(46295),l=n(83583),i=n(4969),s=n.n(i);let c=e=>{let{tab:t,category:n}=e,i={...t,banner:void 0},c=(0,r.S)(),d=["best-offers",i.productType];return n&&d.push(n),(0,a.jsx)("div",{className:s().bestOffersWrapper,children:(0,a.jsx)(o.MJ,{tabs:[i],baseUrl:c.NEXT_PUBLIC_BASE_URL,s3Assets:c.NEXT_PUBLIC_S3_ASSETS,dataLayerPush:l.l,singleProduct:!0,eventCategory:d.join("_"),theme:"gray"})})},d=(e,t)=>{if(Array.isArray(e))return e.find(e=>e.productType===t)}},73104:function(e,t,n){"use strict";n.d(t,{E:function(){return o},z:function(){return l}});var a=n(6326);let o=e=>Array.isArray(e)?e:Array.isArray(null==e?void 0:e.articles)&&"fullUrl"in((null==e?void 0:e.articles[0])||{})?e.articles.map(e=>(0,a.I)(e)):[],r={BUTTON:"withButton",FORM:"withForm"},l=e=>e&&"createdAt"in e?{...e,image_mobile:e.imageMobile,type:r[e.type],button_text:e.buttonText}:e},2041:function(e,t,n){"use strict";n.d(t,{L:function(){return t0}});var a=n(57437),o=n(2265),r=n(33145),l=n(27648),i=n(80684),s=n(76306),c=n(54365),d=n(849),u=n(70526),m=n(14322),_=n.n(m);let p=e=>{let{quote:t,name:n,position:o,img:r}=e;return t?(0,a.jsxs)("div",{className:(0,c.Z)(_().wrapper,"disableContentBlocksStyles"),children:[n&&(0,a.jsxs)("div",{className:_().author,children:[r&&(0,a.jsx)("div",{className:_().image,children:(0,a.jsx)("img",{src:r,alt:"portrait"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:_().name,children:n}),(0,a.jsx)("div",{className:_().position,children:o})]})]}),(0,a.jsx)("div",{className:_().quote,children:t})]}):null};var h=n(35563),v=n(75461),f=n(62178),g=n(4028);let b=()=>{let e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),r=String(e.getMinutes()).padStart(2,"0"),l=String(e.getSeconds()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(a," ").concat(o,":").concat(r,":").concat(l)};var y=n(85769),x=n(38856),A=n(27669);let C=e=>{let t=new Date(e),n=t.getDate().toString(),a=(t.getMonth()+1).toString().padStart(2,"0"),o=t.getFullYear(),r=t.getHours().toString().padStart(2,"0"),l=t.getMinutes().toString().padStart(2,"0");return"".concat(n,".").concat(a,".").concat(o,", ").concat(r,":").concat(l)},j=["#5bce95","#ff696b","#c8df77","#ffb74d","#81d4fa","#aed581","#f06292","#4db6ac","#9575cd","#7986cb","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#81c784","#dce775","#fff176","#ffd54f","#ffb74d","#ff8a65"],I=e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t},k=e=>{let t=Math.abs(I(e))%j.length;return j[t]},w="unsent_comments",N="comments_should_send_after_auth",S=(e,t)=>{let n=L();n[String(e)]=t,x.A.setItem(w,JSON.stringify(n))},T=e=>{let t=L();delete t[String(e)],x.A.setItem(w,JSON.stringify(t))},L=()=>x.A.getItem(w)||{},E=e=>{let t=x.A.getItem(N)||{};t[String(e)]=!0,x.A.setItem(N,JSON.stringify(t))},M=e=>!0===(x.A.getItem(N)||{})[String(e)],B=e=>{let t=x.A.getItem(N)||{};delete t[String(e)],x.A.setItem(N,JSON.stringify(t))};var O=n(77337),W=n(7753);let R={theme:"light",view:"phone",linkTarget:"_self",primaryAuthProviders:["PHONE"],additionalAuthProviders:["TINKOFF","ALFA","SBER","MTS","SOVCOM","VTB"],primaryTextOverride:"Войти"},Z={title:"Войдите по номеру телефона",description:"Чтобы оставить комментарий",availableAuthProviders:["PHONE","TINKOFF","ALFA","SBER","MTS","SOVCOM","VTB"],consents:[{key:"isPlatformRulesAccepted",title:{text:"Принимаете правила платформы",links:[]},value:!0,required:!0,hidden:!1},{key:"isProcessingPersonalDataAllowed",title:{text:"Подтверждаете актуальность персональных данных и соглашаетесь на их обработку в соответствии с политикой конфиденциальности",links:[]},value:!0,required:!0,hidden:!1},{key:"isPromotionSendAllowed",title:{text:"Соглашаетесь получать маркетинговую рассылку",links:[]},value:!0,required:!1,hidden:!1}]},F={endpoint:"https://sso-stable.beta.moex.com/auth/realms/craml-universal/protocol/openid-connect/auth",protocol:"oauth2",response_type:"code",response_mode:"query",client_id:"journal",scope:"openid+email+profile",code_challenge:"nsFRX3OPOyJ-YwsNJll07k1_xbGD5ByKGJA-Sl3ju1Q",code_challenge_method:"S256",nonce:"VXOi0Dxv.up2.uSbL9PCjeVtv9dYJhCg",state:{simple:!0,stateId:"Q_SOFRRbmY6qAhvO87JJa",fingerprintHash:"b7080a7c721d8d76781d64ba309e6521",phoneVerify:"true",cramlURL:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v5/customers",cramlProvidersURL:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v6/providers",cramlCustomersURL:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v5/customers",cramlPhoneVerificationUrl:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v6/phone-verifications/run",cramlConfirmOtpUrl:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v6/customers/create-or-find-provider-customer-by-otp",otpURL:"http://mp-sys-notifier.mp-rc.mpddev.moex.com/api/v0/notifications"}},U=e=>{let t=new TextEncoder().encode(e),n="";return t.forEach(e=>{n+=String.fromCharCode(e)}),btoa(n)},Y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=x.A.getItemRaw("browserId"),o=x.a.getItemRaw("browserSessionId"),r={...F.state,...e,browserId:a,browserSessionId:o};return t?r.phone=n:(delete r.phone,delete r.phoneVerify),U(JSON.stringify(r))},V=(e,t,n)=>{let a=(0,O.Oh)(n),o=e.includes("?")?"&":"?";return"".concat(e).concat(o,"scope=").concat(t,"&").concat(a)},J=async e=>{let{data:t={},endpoint:n,redirect_uri:a,phone:o="",scope:r,includePhoneInState:l,includeResponseMode:i=!0}=e,{codeChallenge:s,codeVerifier:c}=await (0,W.Sn)(),d=t||{},u=Y(d.state||{},l,o);(0,W.Xp)(c);let{endpoint:m,scope:_,...p}={...F,...d,endpoint:n||d.endpoint||F.endpoint,redirect_uri:a,state:u,code_challenge:s,scope:r||d.scope||F.scope};return i?V(m,_,p):V(m,_,{client_id:p.client_id,redirect_uri:p.redirect_uri,response_mode:"fragment",response_type:p.response_type,prompt:"none",code_challenge:p.code_challenge,code_challenge_method:p.code_challenge_method})},D=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return J({data:e,redirect_uri:t,phone:n,includePhoneInState:!0})},z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return J({data:e,endpoint:t,redirect_uri:n,scope:"openid",includePhoneInState:!1,includeResponseMode:!1})};var H=n(59306);let X={getLayoutData:async e=>(await (0,H.t)({url:"/api/v1/layout/".concat(e),options:{isHeadlessCMS:!0}})).data||null,async getPageData(e,t){let n=new URLSearchParams({scLayoutName:e,scPageUrl:t}).toString();return(await (0,H.t)({url:"/api/v1/data/page-data?".concat(n),options:{isHeadlessCMS:!0}})).data||null},getPage:async e=>(await (0,H.t)({url:"/api/v1/sc-page/".concat(e),options:{isHeadlessCMS:!0}})).data||null},P=async()=>{try{let e=await X.getLayoutData("LoginWidget");return(null==e?void 0:e.custom)||null}catch(e){return null}},G=e=>{let{enabled:t,endpoint:n,redirectUri:a}=e,r=(0,o.useRef)(null),l=(0,o.useRef)(null),i=(0,o.useCallback)(()=>{var e;l.current&&(window.clearTimeout(l.current),l.current=null),null===(e=r.current)||void 0===e||e.remove(),r.current=null},[]),s=(0,o.useCallback)(e=>{null!=e&&e.target&&e.target!==r.current||(l.current&&window.clearTimeout(l.current),l.current=window.setTimeout(i,15e3))},[i]),c=(0,o.useCallback)(async()=>{if(t&&n&&a&&"undefined"!=typeof document&&document.body)try{let e=await P(),t=await z(e,n,a),o=document.createElement("iframe");i(),o.hidden=!0,o.tabIndex=-1,o.setAttribute("aria-hidden","true"),o.style.display="none",o.style.width="0",o.style.height="0",o.style.border="0",o.addEventListener("load",s),o.addEventListener("error",s),r.current=o,o.src=t,document.body.appendChild(o)}catch(e){i()}},[t,n,a,i,s]);return(0,o.useEffect)(()=>i,[i]),c};var Q=n(13466),q=n(96350),K=n(2373),$=n(42953),ee=n(43430),et=n.n(ee);let en="Войдите, чтобы отправить комментарий",ea=e=>{let{isOpen:t,onClose:n,postId:o}=e,r=(0,K.G)("lg"),l=(0,window.location.href).split("#")[0],i="".concat($.LK,"?returnTo=").concat(l,"#comments").concat(o);return!r&&t?(0,a.jsx)("div",{className:"disableContentBlocksStyles",children:(0,a.jsx)("div",{className:et().wrapper,children:(0,a.jsxs)("div",{className:et().tooltip,children:[(0,a.jsx)("div",{children:en}),(0,a.jsx)(v.zx,{as:"a",label:"Войти",href:i,target:"_self",onClick:()=>{(0,y.I)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventActionType:y.i.button,eventActionText:(0,A.b)("войти"),eventLabel:""})}})]})})}):(0,a.jsx)(Q.h,{children:(0,a.jsx)("div",{className:"disableContentBlocksStyles",children:(0,a.jsxs)(q.j,{className:et().mobilePopup,isOpen:t,onClose:n,hasCloseButton:!1,children:[(0,a.jsx)("div",{className:et().text,children:en}),(0,a.jsx)(v.zx,{as:"a",label:"Войти",href:i,target:"_self"})]})})})};var eo=n(67356),er=n(16468),el=n(83583);let ei=e=>e.replace(/\D/g,""),es=()=>{let e=Array.from(document.querySelectorAll("input")).find(e=>ei(e.value).length>=11);return e?ei(e.value):""};var ec=n(56423),ed=n.n(ec);let eu="navigator-comments",em="authDebug",e_=e=>{let t=new URL(e);return t.searchParams.set("mode",em),t.searchParams.set("code","Qq12345"),t.toString()},ep=e=>{let{env:t,isOpen:n,onClose:r,postId:l}=e,i=(0,v.aF)("m"),[s,c]=(0,o.useState)(null),[d,u]=(0,o.useState)(null),[m,_]=(0,o.useState)(""),p="false"!==String(t.NEXT_PUBLIC_COMMENTS_AUTH_WIDGET_SSO_IFRAME_ENABLED),h="false"!==String(t.NEXT_PUBLIC_CALLBACK_PAGE_ENABLED),f=new URLSearchParams(window.location.search).get("mode")===em,g=t.NEXT_PUBLIC_AUTH_WIDGET_CONFIG_KEY||"journal",b=t.NEXT_PUBLIC_AUTH_WIDGET_BASE_URL||"https://lk.finuslugi.ru",y=(0,window.location.href).split("#")[0],x="".concat(window.location.origin,"/callback"),A="".concat(y,"#comments").concat(l),{title:C,description:j,...I}=((null==s?void 0:s.title)?s:Z)||{},k={requiredIdentLevel:"REMOTELY_IDENTIFIED",targetUri:A,fallbackUri:A},{getHref:w}=(0,er.K)({serverConfig:I,baseUrl:b,apiBaseUrl:t.NEXT_PUBLIC_AUTH_WIDGET_API_URL||"",entryPointId:eu,configKey:g,scenarioParams:k,config:R,isSilent:!0,autoFetch:!1}),N=(0,o.useCallback)(async()=>{if(!t.NEXT_PUBLIC_AUTH_WIDGET_API_URL){c(null);return}try{let e=await (0,eo.g)(t.NEXT_PUBLIC_AUTH_WIDGET_API_URL,g);c(e)}catch(e){c(null)}},[g,t.NEXT_PUBLIC_AUTH_WIDGET_API_URL]),S=(0,o.useCallback)(async()=>{try{let e=await X.getLayoutData("LoginWidget"),t=null==e?void 0:e.custom;u(t||null)}catch(e){u(null)}},[]);(0,o.useEffect)(()=>{if(!n){_("");return}N(),S()},[n,N,S]);let T=async e=>{if("PHONE"===e){let e=es();if(f){_(e_(x));return}let t=await D(d,h?x:A,e);if(!p){window.open(t,"_self");return}_(t);return}let t=w(e,{phone:es()});window.open(t,R.linkTarget||"_self")},L=(0,a.jsx)("div",{className:ed().body,children:m?(0,a.jsx)("iframe",{className:ed().ssoFrame,src:m,title:C||"Авторизация"}):(0,a.jsx)(er.U,{className:ed().widget,serverConfig:I,baseUrl:b,s3AssetsUrl:"".concat(t.NEXT_PUBLIC_S3_ASSETS,"/mp-assets"),entryPointId:eu,configKey:g,scenarioParams:k,config:R,onAnalyticsEvent:el.l,isSilent:!0,overrideLoginAction:T})});return(0,a.jsx)(Q.h,{children:i?(0,a.jsx)(q.j,{isOpen:n,onClose:r,title:C||"",subtitle:j||void 0,children:L}):(0,a.jsx)(v.u_,{open:n,onClose:r,size:"s",header:{title:C||"",subtitle:j||""},children:L})})};var eh=n(56005),ev=n.n(eh);let ef=[{label:"По дате",value:"date"},{label:"По популярности",value:"likes",shortLabel:"По лайкам"}],eg=e=>{let{onChangeSort:t,isIncreaseSort:n}=e;return(0,a.jsxs)("div",{className:(0,c.Z)(ev().sortTypeHead),children:[(0,a.jsx)("button",{style:{marginLeft:"0px",marginRight:"8px"},className:(0,c.Z)(ev().sortTypeButton),onClick:t,children:n?(0,a.jsx)(i.IconFdsSortDescendingO,{size:22}):(0,a.jsx)(i.IconFdsSortAscendingO,{size:22})}),"Сортировать"]})},eb=e=>{let{isIncreaseSort:t,setIsIncreaseSort:n,sortType:r,setSortType:l,chipView:s,className:d}=e,u=ef.find(e=>e.value===r),m=(0,o.useCallback)(()=>{n(e=>(x.A.setItem("comments_sort",JSON.stringify(!e)),!e))},[n]),_=(0,o.useCallback)(e=>{let t=ef.find(t=>t.value===e);t&&(x.A.setItem("comments_sort_type",JSON.stringify(t.value)),l(t.value))},[l]);return(0,a.jsxs)("div",{className:(0,c.Z)(ev().wrapper,d,{[ev().chip]:s}),children:[(0,a.jsx)("button",{className:(0,c.Z)(ev().icon,ev().iconButton),onClick:s?()=>null:m,children:t?(0,a.jsx)(i.IconFdsSortDescendingO,{size:24}):(0,a.jsx)(i.IconFdsSortAscendingO,{size:24})}),(0,a.jsxs)(v.Lt,{children:[(0,a.jsx)(v.WA,{children:(0,a.jsx)("div",{role:"button",className:(0,c.Z)(ev().text,ev().actionButton),"data-qa":r,children:(null==u?void 0:u.shortLabel)||(null==u?void 0:u.label)||"Сортировка"})}),(0,a.jsxs)(v.Nv,{children:[(0,a.jsx)(eg,{onChangeSort:m,isIncreaseSort:t}),(0,a.jsx)(v.YV,{}),ef.map(e=>(0,a.jsx)("div",{"data-qa":"".concat(e.value,"_radio"),className:ev().sortType,children:(0,a.jsx)(v.XZ,{onChange:()=>{_(e.value)},value:e.value===r,label:e.label})},e.value))]})]})]})};var ey=n(38626),ex=n.n(ey);let eA="Гость",eC=()=>x.A.getItemRaw("partialAuth")||(0,f.jz)(),ej=async e=>{let{isCallbackPageEnabled:t,ignoreCustomerIdCookie:n,tokenUrl:a,redirectUri:o}=e;return await (0,f.vY)(t,a,o,{ignoreCustomerIdCookie:n})||(t?null:eC())},eI=e=>{let{env:t,postId:n,comments:r,inputRef:l}=e,s=Array.isArray(r)?r:[],[u,m]=(0,o.useState)(""),[_,p]=(0,o.useState)([]),[j,I]=(0,o.useState)(3),[w,N]=(0,o.useState)(!1),[O,W]=(0,o.useState)(null),[R,Z]=(0,o.useState)(!1),[F,U]=(0,o.useState)(!1),[Y,V]=(0,o.useState)(!1),[J,D]=(0,o.useState)(!1),[z,H]=(0,o.useState)(!1),X=(0,o.useRef)(!1),[P,Q]=(0,o.useState)(!1),[q,K]=(0,o.useState)("date"),$="false"!==String(t.NEXT_PUBLIC_COMMENTS_AUTH_WIDGET_ENABLED),ee="false"!==String(t.NEXT_PUBLIC_CALLBACK_PAGE_ENABLED),et="false"!==String(t.NEXT_PUBLIC_COMMENTS_AUTH_HIDDEN_IFRAME_ENABLED),en="".concat(t.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL,"/token"),eo="".concat(window.location.origin,"/callback"),er=G({enabled:et,endpoint:"".concat(t.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL,"/auth"),redirectUri:eo});(0,o.useEffect)(()=>{let e=L()[String(n)]||"",t=M(n);m(e),D(t),Q(!0===x.A.getItem("comments_sort")),K(x.A.getItem("comments_sort_type")||"date"),ej({isCallbackPageEnabled:ee,ignoreCustomerIdCookie:et,tokenUrl:en,redirectUri:eo}).then(e=>{W(e)})},[eo,en,ee,et,n]);let el=[...s].sort((e,t)=>P&&"likes"===q?new Date(t.date_created).getTime()-new Date(e.date_created).getTime():P||"likes"===q?new Date(e.date_created).getTime()-new Date(t.date_created).getTime():new Date(t.date_created).getTime()-new Date(e.date_created).getTime()),ei=el.length-j,es=(0,h._6)(ei,"комментарий","комментария","комментариев"),ec=(0,o.useCallback)(()=>{B(n),D(!1)},[n]),ed=(0,o.useCallback)(()=>{E(n),D(!0)},[n]),eu=(0,o.useCallback)(async()=>{let e=await ej({isCallbackPageEnabled:ee,ignoreCustomerIdCookie:et,tokenUrl:en,redirectUri:eo});e&&(W(e),U(!1),V(!1),D(M(n)))},[eo,en,ee,et,n]),em=(0,o.useCallback)(async e=>{if(!u||!await (0,d.Wb)(t,n,e,eA,u,"send"))return!1;let a={id:(0,g.R)(),comment:u,date_created:b(),user_name:eA,post_id:String(n),user_id:e};return p(e=>[...e,a]),m(""),T(n),ec(),!0},[ec,t,u,n]),e_=(0,o.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;if(e&&u&&!X.current){X.current=!0,H(!0);try{if(await (0,d.Wb)(t,n,e,eA,u,"validate")){let t=await em(e);N(!t),t||ec();return}N(!0),ec()}catch(e){return}finally{X.current=!1,H(!1)}}},[ec,O,t,em,u,n]),eh=()=>{ed(),V(!1),$?U(!0):Z(!0),(0,y.I)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventActionType:y.i.button,eventActionText:(0,A.b)("войти"),eventLabel:""})},ev=(0,o.useCallback)(()=>{U(!1),ec()},[ec]),ef=(0,o.useCallback)(()=>!!x.A.getItemRaw("comments_auth_callback_token_failed")&&(x.A.removeItem("comments_auth_callback_token_failed"),ev(),V(!0),!0),[ev]);(0,o.useEffect)(()=>{ef()||eu();let e=()=>{ef()||eu()},t=()=>{"visible"===document.visibilityState&&e()},n=(0,f.rq)(e);return window.addEventListener("focus",e),window.addEventListener("storage",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",e),window.removeEventListener("storage",e),document.removeEventListener("visibilitychange",t),n()}},[ef,eu]),(0,o.useEffect)(()=>{if(J&&O&&!X.current){if(!M(n)){D(!1);return}if(!u){ec();return}e_(O)}},[ec,O,e_,u,n,J]);let eg=async()=>{if(!u)return;let e=await ej({isCallbackPageEnabled:ee,ignoreCustomerIdCookie:et,tokenUrl:en,redirectUri:eo});if(W(e),!e){er(),eh();return}await e_(e)};return(0,a.jsxs)("div",{id:"comments".concat(n),className:ex().wrapper,children:[(0,a.jsxs)("div",{className:ex().header,children:[(0,a.jsxs)("div",{className:ex().title,children:[(0,a.jsx)("label",{children:"Комментарии"}),(0,a.jsx)("span",{children:el.length})]}),(0,a.jsx)(eb,{isIncreaseSort:P,setIsIncreaseSort:Q,sortType:q,setSortType:K})]}),(0,a.jsxs)("div",{className:ex().formBlock,children:[(0,a.jsxs)("div",{className:ex().form,children:[(0,a.jsx)(v.MA,{ref:l,size:"l",className:ex().input,label:"Написать комментарий",value:u,onClick:()=>{(0,y.I)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventActionType:y.i.click_field,eventActionText:(0,A.b)("написать комментарий"),eventLabel:""})},onChange:e=>{m(e),w&&e&&N(!1),Y&&V(!1),S(n,e)}}),(0,a.jsx)(v.zx,{className:ex().submitBtn,size:"s",disabled:!u||z||!$&&R,onClick:eg,shape:"circle-icon",iconLeft:(0,a.jsx)(i.IconFdsArrowUpSmallO,{size:36})}),!$&&(0,a.jsx)(ea,{isOpen:R,onClose:()=>Z(!1),postId:n})]}),w&&(0,a.jsxs)("div",{className:ex().caption,children:["Не допускается использование ненормативной лексики. ",(0,a.jsx)("br",{}),"Отредактируйте комментарий и попробуйте снова."]}),!w&&Y&&(0,a.jsx)("div",{className:ex().caption,children:"Авторизация не удалась."}),!!_.length&&!w&&!Y&&(0,a.jsxs)("div",{className:ex().caption,children:["Спасибо, что оставили комментарий. ",(0,a.jsx)("br",{}),"После модерации вы сможете увидеть его на странице"]})]}),!!el.length&&(0,a.jsx)("div",{className:ex().comments,children:el.slice(0,j).map(e=>{let t="1"===e.user_id?eA:e.user_id;return(0,a.jsxs)("div",{className:ex().comment,children:[(0,a.jsx)("div",{className:ex().letter,style:{background:k(String(t))},children:eA.slice(0,1)}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:ex().commentHeaderText,children:[(0,a.jsx)("div",{className:ex().author,children:eA}),(0,a.jsx)("div",{className:ex().date,children:C(e.date_created)})]}),(0,a.jsx)("div",{className:ex().commentBody,children:e.comment}),(0,a.jsxs)("div",{className:ex().commentControls,children:[(0,a.jsxs)("div",{className:ex().unit,children:[(0,a.jsx)(i.IconFdsThumbUpO,{}),(0,a.jsx)("span",{children:"23"})]}),(0,a.jsxs)("div",{className:(0,c.Z)(ex().unit,ex().dislike),children:[(0,a.jsx)(i.IconFdsThumbDownO,{}),(0,a.jsx)("span",{children:"23"})]}),(0,a.jsx)("div",{className:(0,c.Z)(ex().unit,ex().replyBtn),children:"Ответить"})]})]})]},e.id)})}),j<el.length&&(0,a.jsxs)("div",{className:ex().more,onClick:()=>I(e=>e+ei),children:["Еще ".concat(ei," ").concat(es),(0,a.jsx)("span",{children:(0,a.jsx)(i.IconFdsChevronDownSmallO,{size:24})})]}),$&&(0,a.jsx)(ep,{env:t,isOpen:F,onClose:ev,postId:n,onAuthSuccess:e=>{e&&(W(e),U(!1),V(!1),D(M(n)))}})]})};var ek=n(1123),ew=n(62637),eN=n.n(ew);let eS=e=>{let{env:t,imageFile:n,imageData:r,imageCaption:l,className:i,disableZoom:s,imageClassName:d}=e,u=(0,K.G)("lg"),[m,_]=(0,o.useState)(!1),p=t.NEXT_PUBLIC_BASE_URL,h=r||"".concat(p,"/img/posts_content/large/").concat(n),v=()=>r?{mobile:r,desktop:r}:{mobile:"".concat(p,"/img/posts_content/small/").concat(n),desktop:"".concat(p,"/img/posts_content/large/").concat(n)};return n||r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,c.Z)(eN()["content-image"],i),onClick:()=>{!s&&u&&_(!0)},children:(0,a.jsx)(ek.t,{captionClassName:eN().caption,srcDesktop:v().desktop,srcMobile:v().mobile,caption:l,imageClassName:(0,c.Z)(eN().detailImage,d),className:eN().detailImageWrapper})}),(0,a.jsx)(Q.h,{children:m&&u&&(0,a.jsx)(eT,{src:h,onClose:()=>_(!1)})})]}):null},eT=e=>{let{src:t,onClose:n}=e,[l,s]=(0,o.useState)(1),[c,d]=(0,o.useState)(1),[u,m]=(0,o.useState)({x:0,y:0}),[_,p]=(0,o.useState)({x:0,y:0}),h=(0,o.useRef)(null),v=(0,o.useRef)(null),f=(0,o.useRef)(1),g=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=e=>{e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),()=>{document.body.style.overflow="",document.body.style.height="",document.removeEventListener("touchmove",e)}},[]),(0,o.useEffect)(()=>{if(g.current){var e;g.current=!1;let t=document.getElementById("imageModalContainerId");if(!t)return;let n=t.getBoundingClientRect(),a=n.x||0,o=n.height||0,r=-((n.y||0)/l*1)+window.innerHeight/l/2-o/l/2;m({x:-(a/l*1),y:r});let i=document.getElementById("imageModalCloseId");if(!i)return;let s=window.innerWidth/(null===(e=document.documentElement.getBoundingClientRect())||void 0===e?void 0:e.width),c=i.getBoundingClientRect(),u=c.width*s||0,_=c.x||0,h=c.y||0,v=-(_/s*1)+window.innerWidth/s-u/s-16/s;d(s),p({x:v,y:-(h/s*1)+58})}},[l]);let b=e=>{let[t,n]=[e[0],e[1]],a=t.clientX-n.clientX,o=t.clientY-n.clientY;return Math.sqrt(a*a+o*o)};return(0,a.jsxs)("div",{className:eN().imageModal,onTouchStart:e=>{if(e.preventDefault(),2===e.touches.length){let t=b(e.touches);h.current=t}1===e.touches.length&&(v.current={x:e.touches[0].clientX/l-u.x,y:e.touches[0].clientY/l-u.y})},onTouchMove:e=>{if(e.preventDefault(),2===e.touches.length&&null!==h.current){let t=l+(b(e.touches)-h.current)*5e-5;t<f.current?t=f.current:t>3&&(t=3),s(t)}1===e.touches.length&&null!==v.current&&m({x:e.touches[0].clientX/l-v.current.x,y:e.touches[0].clientY/l-v.current.y})},onTouchEnd:()=>{h.current=null,v.current=null},children:[(0,a.jsx)("div",{id:"imageModalCloseId",className:eN().close,onClick:n,style:{transform:"scale(".concat(c,") translate(").concat(_.x,"px, ").concat(_.y,"px)")},children:(0,a.jsx)(i.IconFdsCloseO,{size:22})}),(0,a.jsx)("div",{id:"imageModalContainerId",className:eN().imgContainer,style:{transform:"scale(".concat(l,") translate(").concat(u.x,"px, ").concat(u.y,"px)")},children:(0,a.jsx)(r.default,{src:t,width:0,height:0,alt:"detail image",unoptimized:!0,onLoadingComplete:()=>{let e=window.innerWidth,t=document.getElementById("imageModalContainerId");if(!t)return;let n=t.getBoundingClientRect().width||0,a=n>0?e/n:1;f.current=a,s(a),g.current=!0,document.body.style.overflow="hidden",document.body.style.height="100vh"}})})]})};var eL=n(91870),eE=n.n(eL);let eM=e=>{let{env:t,data:n={}}=e,r=(0,o.useRef)(null),l=(()=>{let e=[];for(let[t,a]of Object.entries(n))t.indexOf("imageFile_")>=0&&"string"==typeof a&&e.push(a);return e})();return(0,a.jsx)("div",{ref:r,className:(0,c.Z)(eE().wrapper,"disableContentBlocksStyles"),children:(0,a.jsx)(v.iR,{options:{spaceBetween:8},pagination:!0,className:(0,c.Z)(eE().slider),children:l.map((e,o)=>(0,a.jsx)(v.wI,{className:eE().slide,children:(0,a.jsx)("div",{className:eE().sliderItem,children:(0,a.jsx)(eS,{env:t,imageFile:e,imageCaption:n.imageCaption,disableZoom:!0})})},o))})})};var eB=n(66074),eO=n.n(eB);let eW=e=>{let t=e.match(/^https?:\/\/(?:www\.)?vkvideo\.ru\/video-(-?\d+)_(\d+)/);if(t){let e=t[1],n=t[2];return"https://vkvideo.ru/video_ext.php?oid=-".concat(e,"&id=").concat(n,"&hd=2")}let n=e.match(/^https?:\/\/(?:www\.)?rutube\.ru\/video\/([a-zA-Z0-9]+)/);if(n){let e=n[1];return"https://rutube.ru/play/embed/".concat(e)}return e},eR=e=>{let{url:t,text:n}=e;return t?(0,a.jsxs)("div",{className:eO().wrapper,children:[(0,a.jsx)("iframe",{loading:"lazy",src:eW(t),title:n,allowFullScreen:!0}),(0,a.jsx)("div",{className:eO().subtitle,children:n})]}):null};var eZ=n(31019),eF=n(65843),eU=n(89980),eY=n(674),eV=n(62368),eJ=n(71938),eD=n(11197),ez=n(13745),eH=n(85900),eX=n.n(eH);let eP=e=>{let{env:t,articles:n}=e;return n.length?(0,a.jsxs)("div",{className:(0,c.Z)(eX().wrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h2",{className:eX().blockTitle,children:"Читайте также"}),n.map(e=>(0,a.jsx)(eG,{env:t,data:e},e.id))]}):null},eG=e=>{var t,n;let{env:o,data:l}=e,i=(0,eV.n)(null==l?void 0:l.url,null==l?void 0:l.likes);return(0,a.jsxs)("a",{className:eX().card,href:"/".concat(null==l?void 0:l.url),target:"_self",children:[(0,a.jsx)("div",{className:eX().imageWrapper,children:(0,a.jsx)("div",{className:eX().image,style:(null==l?void 0:null===(t=l.image)||void 0===t?void 0:t.file)?{backgroundImage:"url(".concat((0,eD.J)(null==l?void 0:null===(n=l.image)||void 0===n?void 0:n.file,"small",o.NEXT_PUBLIC_BASE_URL),")")}:{}})}),(0,a.jsxs)("div",{className:eX().container,children:[(0,a.jsx)("div",{className:eX().title,children:null==l?void 0:l.title}),(0,a.jsxs)("div",{className:eX().icons,children:[!!i&&(0,a.jsxs)("div",{className:eX().unit,children:[(0,a.jsx)(r.default,{src:eY.Z,alt:"likes",unoptimized:!0}),i]}),(0,a.jsxs)("div",{className:eX().unit,children:[(0,a.jsx)(r.default,{src:eU.Z,alt:"views",unoptimized:!0}),(0,a.jsx)("span",{suppressHydrationWarning:!0,children:(0,ez.V)((null==l?void 0:l.url)||"",(null==l?void 0:l.views)||0,0)})]}),(0,a.jsx)("div",{className:eX().unit,children:(0,a.jsx)("span",{children:(0,eJ.p6)(String((null==l?void 0:l.public_date)||(null==l?void 0:l.update_time)||(null==l?void 0:l.publ_time)),!0)})})]})]})]})};var eQ=n(11095),eq=n(87918);let eK=(e,t)=>(0,H.t)({url:"/money_data/Credits.json?".concat(e),config:{signal:t}}),e$=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e),e0=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e=e$(e,t),new Intl.NumberFormat("ru-RU").format(e)},e1=function(){let{type:e="text",unit:t,format:n,defaultValue:a="",maxLength:r=-1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[l,i]=(0,o.useState)(a),s=(0,o.useRef)(l),[c,d]=(0,o.useState)(!1),u=(0,o.useCallback)((t,n)=>{"function"==typeof t&&(t=t(s.current));let a=String(t);if(!(r>-1)||!(a.length>r)){if(["int","float"].includes(e)){if(isNaN(+t)||"int"===e&&a.includes(".")||a.includes(" "))return;a=String(""===t?"":+t)}s.current=a,i(a),null==n||n(a)}},[r,e]),m=(0,o.useMemo)(()=>({onChange:e=>{u(e)},onFocus:()=>d(!0),onBlur:()=>d(!1)}),[u]),_=(0,o.useMemo)(()=>{let a=l,o=null;switch("currency"===n&&["int","float"].includes(e)&&""!==l&&(a=e0(+l)),t){case"year":o=""===a?"":(0,h._6)(+l,"год","года","лет");break;case"day":o=""===a?"":(0,h._6)(+l,"день","дня","дней");break;default:o=""!==a&&t?t:""}return o&&["int","float"].includes(e)?"".concat(a," ").concat(o):a},[n,e,t,l]);return(0,o.useMemo)(()=>({events:m,value:l,formattedValue:_,isFocused:c,handleChange:u}),[m,_,u,c,l])},e2=e=>(0,H.t)({url:"/money_data/Fk.json".concat(e?"?bic="+e:"")}),e3=e=>{let{children:t,observerEvent:n,hideEvent:r,threshold:l,...i}=e,s=(0,o.useRef)(null);return(0,o.useEffect)(()=>{n&&s.current&&e6(s.current,n,r,l)},[]),(0,a.jsx)("div",{...i,ref:s,children:t})},e6=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e&&new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?t&&t():n&&n()})},{threshold:a}).observe(e)},e5=async(e,t,n)=>{let a=x.A.getItem("cached_requests")||{},o=a[e],r=Number(null==o?void 0:o.timestamp);if(!o||Date.now()-r>2592e6){let o=await t(...n);return a[e]={timestamp:String(Date.now()),data:o},x.A.setItem("cached_requests",JSON.stringify(a)),o}return o.data},e9=["sberbank","vtb","gazprombank","alfabank","mkb","rosselhozbank","sovcombank","rossijskij_kapital","rosbank","yandeks_bank"],e4=e=>{let{url:t}=e;return e9.includes(t)},e7=e=>{let{url:t,logo_mob:n,logo:a,name:o}=e,r=n||a;return(null==r?void 0:r.includes("http"))?{id:t,src:r,name:o}:null},e8=e=>{let t=[],n=[];return[...e].sort(()=>.5-Math.random()).forEach(e=>{let a=e7(e);if(!a)return;let o=e4(e);o&&t.length<4&&t.push(a),!o&&n.length<6&&n.push(a)}),n=n.slice(0,6-t.length),[...t,...n].sort(()=>.5-Math.random())};var te=n(88189),tt=n.n(te);let tn=(0,o.memo)(e=>{let{className:t}=e,n=(0,K.G)("lg"),r=(0,o.useRef)(!1),[l,i]=(0,o.useState)([]),s=e8(l),d=n?s.slice(0,3):s;return(0,a.jsxs)(e3,{className:(0,c.Z)(tt().container,t),observerEvent:()=>{r.current||(r.current=!0,e5("/money_data/Fk.json",e2,[]).then(e=>{var t;return i((null===(t=e.data)||void 0===t?void 0:t.banks)||[])}))},children:[d.map(e=>(0,a.jsx)("picture",{className:tt().item,children:(0,a.jsx)("img",{className:tt().img,src:e.src,alt:e.name,width:48,height:48})},e.id)),(0,a.jsxs)("div",{className:(0,c.Z)(tt().item,tt().itemNum),children:["+",l.length-s.length]})]})});tn.displayName="LogosList";var ta=n(23296),to=n.n(ta);let tr=e=>{let{children:t,className:n}=e;return(0,a.jsxs)("div",{className:(0,c.Z)(to().offersWrapper,n),children:[t,(0,a.jsx)(tn,{className:to().logos})]})},tl=[{value:1,label:"1 месяц"},{value:2,label:"2 месяца"},{value:3,label:"3 месяца"},{value:4,label:"4 месяца"},{value:5,label:"5 месяцев"},{value:6,label:"6 месяцев"},{value:9,label:"9 месяцев"},{value:12,label:"1 год"},{value:18,label:"1,5 года"},{value:24,label:"2 года"},{value:36,label:"3 года"},{value:48,label:"4 года"},{value:60,label:"5 лет"}],ti=[{value:"travels",label:"Путешествия"},{value:"refuellings",label:"Заправки"},{value:"trade_networks",label:"Торговые сети"},{value:"charity",label:"Благотворительность"},{value:"discount_program",label:"Дисконтная программа"},{value:"custom",label:"Другое"}],ts=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=null;return n=>{t&&clearInterval(t),t=setTimeout(n,e)}};var tc=n(8980),td=n(53042),tu=n.n(td);let tm=ts(750),t_=(e,t,n)=>()=>{(0,tc.D)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"credits_calculator_top_offers",eventValue:n})},tp=e=>{let{content:t={}}=e,[n,r]=(0,o.useState)(null),l=e1({defaultValue:()=>String(t.amount||3e5),format:"currency",type:"int",maxLength:20,unit:"₽"}),[i,s]=(0,o.useState)(t.term||3),d=(0,o.useRef)("");(0,o.useEffect)(()=>{l.handleChange(t.amount||3e5)},[t.amount]),(0,o.useEffect)(()=>{s(t.term||3)},[t.term]);let u=(()=>{let e=[],t=String(l.value||"").replace(/ /g,"");return t&&e.push("amount=".concat(t)),i&&e.push("period=".concat(i)),e.length?e.join("&"):""})(),m=e=>{eK("limit=1&currency=1".concat(e.length?"&"+e:"")).then(e=>{var t;r((null===(t=e.data)||void 0===t?void 0:t.credits_count)||null)})};(0,o.useEffect)(()=>{u!==d.current&&(tm(()=>m(u)),d.current=u)},[u]);let _="".concat($._n,"/potrebitelskie_kredity")+(u.length?"?"+u:"")+"#creditsList",p="".concat(n||0," ").concat((0,h._6)(n||0,"предложение","предложения","предложений"));return(0,a.jsxs)(tr,{className:(0,c.Z)(tu().creditsOffersWrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h4",{children:"Кредиты"}),(0,a.jsxs)("div",{className:tu().inputs,children:[(0,a.jsx)(v.MA,{label:"Сумма",value:l.isFocused?l.value:l.formattedValue,variant:"secondary",...l.events}),(0,a.jsx)(v.Ph,{label:"Срок",options:tl,value:tl.find(e=>e.value===i)||tl[0],onChange:e=>s(+e.value),variant:"secondary"})]}),(0,a.jsx)(v.zx,{as:"a",className:tu().button,label:"Смотреть ".concat(p),variant:"primary",size:"s",href:_,onClick:t_(tc.i.button,"смотреть")})]})},th=e=>(0,H.t)({url:"/money_data/CardData.json",config:{signal:e}}),tv=e=>(0,H.t)({url:"/money_data/DebitCards.json?".concat(e)}),tf=()=>(0,H.t)({url:"/money_data/Root.json"}),tg={id:0,name:"Вся Россия"},tb=[{id:1095,main:1,name:"Москва",name_p:"Москве",name_r:"Москвы",parentId:76,url:"moskva"},{id:1096,main:1,name:"Санкт-Петербург",name_p:"Санкт-Петербурге",name_r:"Санкт-Петербурга",parentId:77,url:"sankt-peterburg"},{id:720,main:1,name:"Новосибирск",name_p:"Новосибирске",name_r:"Новосибирска",parentId:53,url:"novosibirsk"},{id:894,main:1,name:"Екатеринбург",name_p:"Екатеринбурге",name_r:"Екатеринбурга",parentId:65,url:"ekaterinburg"},{id:691,main:1,name:"Нижний Новгород",name_p:"Нижнем Новгороде",name_r:"Нижнего Новгорода",parentId:51,url:"nizhniy_novgorod"}],ty=e=>{let[t,n]=(0,o.useState)(null),[a,r]=(0,o.useState)(null),l=x.A.getItem("user_town"),i=x.A.getItem("user_region"),s=x.A.getItem("auto_region"),c=x.A.getItem("auto_town"),d=(0,o.useMemo)(()=>{var e,t,n,a;let o=(null!==(t=null!==(e=l||i)&&void 0!==e?e:c||s)&&void 0!==t?t:tg).id,r=(null!==(a=null!==(n=l||i)&&void 0!==n?n:c||s)&&void 0!==a?a:tg).name;return{value:r+o,label:r}},[]),[u,m]=(0,o.useState)(d),_=(0,o.useMemo)(()=>e.map(e=>({...e,towns:e.towns.map(t=>({...t,parentId:e.id}))})),[e]),p=(0,o.useMemo)(()=>{let e=_.map(e=>{let{towns:t}=e;return t}).reduce((e,t)=>[...e,...t],[]).filter(e=>!tb.find(t=>t.name===e.name));return[...tb,...e]},[_]);return{regionValue:u,regionOptions:(0,o.useMemo)(()=>[tg,...p,..._].map(e=>({value:e.name+e.id,label:e.name,url:e.id})),[_,p]),handleRegionChange:(0,o.useCallback)(e=>{if(!e)return;m(e[0]);let t=null,a=null;if(tg.name!==e[0].label){var o,l,i;a=(t=null!==(o=p.find(t=>t.name===e[0].label))&&void 0!==o?o:null)?null!==(l=_.find(e=>e.id===Number(null==t?void 0:t.parentId)))&&void 0!==l?l:null:null!==(i=_.find(t=>t.name===e[0].label))&&void 0!==i?i:null}n(a),r(t)},[_,p]),selectedRegion:t,selectedTown:a}},tx=(e,t)=>{var n;let a=null!==(n=null==t?void 0:t.map(e=>+e))&&void 0!==n?n:[];return[...e].sort((e,t)=>{let n=a.includes(Number(e.id)),o=a.includes(Number(t.id));return!n&&o?1:n&&!o?-1:0}).map(e=>({value:e.id,label:e.name}))};var tA=n(87330),tC=n.n(tA);let tj=ts(750),tI=(e,t,n)=>()=>{(0,tc.D)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"debit_cards_calculator_top_offers",eventValue:n})},tk=()=>{let[e,t]=(0,o.useState)(null),[n,r]=(0,o.useState)(["trade_networks"]),[l,i]=(0,o.useState)(["21"]),[s,d]=(0,o.useState)([]),[u,m]=(0,o.useState)([]),{regionOptions:_,handleRegionChange:p,selectedRegion:f,selectedTown:g}=ty(u),[b,y]=(0,o.useState)([]),[x,A]=(0,o.useState)([]),[C,j]=(0,o.useState)(""),I=(0,o.useRef)(""),k=(()=>{let e=[];return n&&n.length&&e.push("discounts=".concat(n.join(","))),l&&l.length&&e.push("card_type=".concat(l.join(","))),s&&s.length&&e.push("bank=".concat(s.join(","))),f&&e.push("region=".concat(f.url)),g&&e.push("town=".concat(g.url)),e.length?e.join("&"):""})(),w=e=>{tv("limit=1".concat(e.length?"&"+e:"")).then(e=>{var n;t((null===(n=e.data)||void 0===n?void 0:n.debitCards_count)||null)})};(0,o.useEffect)(()=>{k!==I.current&&(tj(()=>w(k)),I.current=k)},[k]),(0,o.useEffect)(()=>{tf().then(e=>{var t,n;m((null===(t=e.data)||void 0===t?void 0:t.regions)||[]),y((null===(n=e.data)||void 0===n?void 0:n.companies)||[])}),th().then(e=>{var t;A((null===(t=e.data)||void 0===t?void 0:t.card_types)||[])})},[]);let N="".concat($._n,"/debetovye_karty")+(k.length?"?"+k:""),S="".concat(e||0," ").concat((0,h._6)(e||0,"предложение","предложения","предложений")),T=tx(b,s),L=[...x.map(e=>({value:String(e.id),label:e.title})),{value:"custom",label:"Другое"}];return(0,a.jsxs)(tr,{className:(0,c.Z)(tC().debitCardsOffersWrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h4",{children:"Дебетовые карты"}),(0,a.jsxs)("div",{className:tC().inputs,children:[(0,a.jsx)(v.Ph,{value:ti.filter(e=>n.includes(e.value)),multiple:!0,onChange:e=>r((null==e?void 0:e.map(e=>{let{value:t}=e;return String(t)}))||[]),label:"Скидки и бонусы",options:ti,variant:"secondary"}),(0,a.jsx)(v.Ph,{value:L.filter(e=>l.includes(e.value)),multiple:!0,onChange:e=>i((null==e?void 0:e.map(e=>String(e.value)))||[]),label:"Тип карты",options:L,variant:"secondary"}),(0,a.jsx)(v.Ph,{value:T.filter(e=>s.includes(Number(e.value))),multiple:!0,onChange:e=>d((null==e?void 0:e.map(e=>Number(e.value)))||[]),label:"Банки",options:T,variant:"secondary"}),(0,a.jsx)(v.kn,{variant:"secondary",label:"Мое местоположение",value:C,options:_.filter(e=>e.label.includes(C)),onChange:j,onSelect:e=>e?p([e]):null})]}),(0,a.jsx)(v.zx,{as:"a",className:tC().button,label:"Смотреть ".concat(S),variant:"primary",size:"s",href:N,onClick:tI(tc.i.button,"смотреть")})]})};var tw=n(55),tN=n.n(tw);let tS=e=>String(e||"").replace(/ /g,""),tT=(e,t,n)=>()=>{(0,tc.D)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventAction:e,eventActionText:(0,A.b)(t),eventLabel:"",eventValue:n})},tL=e=>{let{content:t={},savings:n,premium:r}=e,l=e1({defaultValue:()=>String(t.amount||(r?3e6:3e5)),format:"currency",type:"int",maxLength:20,unit:"₽"}),[i,s]=(0,o.useState)(t.term||3),[d,u]=(0,o.useState)("");(0,o.useEffect)(()=>{l.handleChange(t.amount||(r?3e6:3e5))},[t.amount,r]),(0,o.useEffect)(()=>{s(t.term||3)},[t.term]),(0,o.useEffect)(()=>{if(r){let e=+l.value;if(e<3e6){u("Минимальная сумма - 3 000 000 ₽");return}if(e>15e6){u("Минимальная сумма - Максимальная сумма - 15 000 000 ₽");return}u("")}},[l.value,r]);let m=n?"/teg_nakopitelnye":r?"/teg_premium":"",_=(()=>{let e=[],t=tS(+l.value);t&&e.push("amount=".concat(t)),i&&e.push("period=".concat(i));let n=e.length?"?"+e.join("&"):"";return"".concat($._n,"/vklady").concat(m).concat(n)+"#depositsList"})();return(0,a.jsxs)(tr,{className:(0,c.Z)(tN().depositsOffersWrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h4",{children:r?"VIP Вклады":n?"Накопительные счета":"Вклады"}),(0,a.jsxs)("div",{className:tN().inputs,children:[(0,a.jsx)(v.MA,{label:"Сумма",value:l.isFocused?l.value:l.formattedValue,variant:"secondary",state:d?"error":void 0,caption:d,onClick:()=>{(0,tc.D)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventAction:tc.i.input_field,eventActionText:(0,A.b)("сумма вклады"),eventLabel:""})},...l.events}),(0,a.jsx)(v.Ph,{label:"Срок",options:tl,value:tl.find(e=>e.value===i)||tl[0],onChange:e=>{s(Number(e.value)),(0,tc.D)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventAction:tc.i.field,eventActionText:(0,A.b)("срок вклады"),eventLabel:""})},variant:"secondary"})]}),(0,a.jsx)(v.zx,{as:"a",className:tN().button,label:"Смотреть",variant:"primary",size:"s",disabled:!!d,href:_,onClick:tT(tc.i.button,"смотреть вклады")})]})};var tE=n(14672),tM=n(78090),tB=n.n(tM);let tO={auto:{src:"/service-navigator/_next/static/media/auto_bg.62092cf2.png",height:176,width:308,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAWlBMVEXt9vTk+vm95Ovz/PphepVzqMT7/PbU8/g/U3X6+vKzPlrU3d7SpayFqMHlvbaHTmjs//+AETQpLlTC0tehW3OqGjZgG0JRXHmfNVJDQV15KUzFFC+Ww9rXiZeTxCHTAAAACnRSTlP+/////s7//f7UkTL2gAAAAAlwSFlzAAALEwAACxMBAJqcGAAAADVJREFUeJxjYGNjY2BjYOZkYBRgZBJmYmdm4ObjEZHgkmVn4BfkEhOVlpJh4GURF5Lk4GAFACGeAeVPXusUAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:5},auto_m:{src:"/service-navigator/_next/static/media/auto_m_bg.fb85de91.png",height:120,width:295,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAOVBMVEXx+fnT7O/Iq7JnPV50KUXj8fLx/v2DxN15bop1rMrB8fvY9PnGnayWyOC2OFOYTGdVJknMjplgYIPjhY66AAAACnRSTlPx/////vb/7v7zSgL2CAAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxjYGBjY2NkZGNg4GZkEuTn4+Fi4OTlYBZgEWIHAAfxALsDa3SrAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},moto:{src:"/service-navigator/_next/static/media/moto_bg.81aba95e.png",height:176,width:308,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAUVBMVEU0R1/c5Ojw+vu94+7k7vDo9PbQ6/HF4uhMXndNg5h7JEC7tLqgJDl9V2KTW2TTuMBFfZFyqcCixtRHRltCWnVJaIBuGTHShI1zZHhNRlyTQFhfPRBEAAAACnRSTlP+////1P//+/7OUqvELgAAAAlwSFlzAAALEwAACxMBAJqcGAAAADRJREFUeJwFwYsCgBAQBMA97BF5Vor//9BmYGhESAdKfXeiQlM556ceNsd4rWHRw/0A7fgBH0EBnH6L3HAAAAAASUVORK5CYII=",blurWidth:8,blurHeight:5},moto_m:{src:"/service-navigator/_next/static/media/moto_m_bg.8d9fa85e.png",height:120,width:295,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAANlBMVEWr2up8dYfc9Ph7FC7Y5+vm9PZGSWHOzdTs9PaBtMRlM07h1Ne+ipe4uL3K5+yHtcSkRlPR8vigtK75AAAACnRSTlP5////7v///vPunZ1n8gAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBl5eZhZ2VhYGLiFWBmFORjYGBg5GJj4+cEAAkQAK3soqmKAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3}},tW=(e,t,n)=>{(0,tc.D)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"osago_calculator_top_offers",eventValue:n})},tR=[{value:"auto",label:"Автомобиль"},{value:"moto",label:"Мотоцикл"}],tZ=e=>{let{kasko:t,small:n}=e,l=(0,K.G)("lg"),[i,s]=(0,o.useState)(!1),[d,u]=(0,o.useState)(""),m=(0,o.useRef)(null),_=e=>{tW(tc.i.button,e?"мото":"авто"),s(e),u(""),m.current&&m.current.focus()},p=e=>{e&&e.preventDefault();let n="".concat($.x9,"/step-car"),a="".concat($.qt,"/vehicle"),o=[];d&&o.push("license="+d.replaceAll(" ","")),i&&!t&&o.push("type=moto");let r=o.length?"".concat(o.join("&")):"";if(t)window.open("".concat(a,"?").concat(r),"_self");else{let e=(0,g.R)();tW(tc.i.button,"рассчитать",e),window.open("".concat(n,"?").concat(r),"_self")}};return(0,a.jsx)("div",{className:(0,c.Z)(tB().osagoOffersWrapper,"disableContentBlocksStyles",{[tB().small]:n}),children:(0,a.jsxs)("div",{className:tB().container,children:[(0,a.jsx)(r.default,{className:tB().img,src:tO["".concat(i?"moto":"auto").concat(l?"_m":"")],alt:"фото",unoptimized:!0}),(0,a.jsxs)("div",{className:tB().content,children:[(0,a.jsxs)("div",{className:tB().title,children:["Онлайн калькулятор ",l?"":t?"КАСКО":"ОСАГО"]}),(0,a.jsxs)("div",{className:tB().inputs,children:[!t&&(0,a.jsx)(v.Ph,{className:tB().select,size:"m",label:"Тип транспорта",options:tR,value:i?tR[1]:tR[0],onChange:e=>_("moto"===e.value),variant:"secondary"}),(0,a.jsx)("form",{className:tB().form,onSubmit:p,children:(0,a.jsx)(v.An,{label:"Госномер",size:"m",variant:"secondary",maskOpts:{mask:i?"0000 aa 00":"a 000 aa 00"},maskPlaceholder:i?"0000 aa 00":"a 000 aa 00",value:d||"",onChange:e=>u(e)})}),(0,a.jsxs)("p",{className:tB().noLicense,children:["У меня ",(0,a.jsx)("a",{onClick:e=>{e&&e.preventDefault(),tW(tc.i.link,"нет номера"),p()},children:"нет номера"})]})]}),(0,a.jsx)(v.zx,{className:tB().button,label:"Рассчитать",variant:"primary",size:"s",onClick:()=>{tW(tc.i.button,"рассчитать"),p()}})]})]})})};var tF=n(48667),tU=n(89267),tY=n.n(tU);let tV=e=>{let{id:t}=e;return(0,a.jsxs)("div",{className:tY().wrapper,children:[(0,a.jsx)("div",{id:"frame-calculator_wrap_".concat(t),"data-draft-first-screen":"extended","data-bg":"#fff","data-id-frame":"75534965-d320-485f-ab98-e625d00a84fe","data-adv-p-id":"50fe7e8417230d96f318b7d5b3fba670"}),(0,a.jsx)(tF.default,{id:String(t),type:"text/javascript",strategy:"afterInteractive",src:"https://finuslugi.ru/osago/partners/main/iframe.bundle.iife.js?id=".concat(t)})]})};var tJ=n(56471),tD=n(77002),tz=n.n(tD);let tH=e=>{var t;let{env:n,data:r,postId:l,stats:s}=e,[u,m]=(0,o.useState)(0),[_,p]=(0,o.useState)(null),[h,f]=(0,o.useState)(!1),[g,b]=(0,o.useState)(s),C=(0,tJ.W)(n)?u:0,j=Object.values(g||{}).reduce((e,t)=>e+(t.count||0),C);(0,o.useEffect)(()=>{let e=x.A.getItem("surveyVotes")||{},t=r.key?e[r.key]:null;t&&g&&p(t);let n=x.A.getItem("surveyVotesCount")||{};Number(r.key?n[r.key]:null)>=j&&t&&m(1),t&&!g&&r.key&&(0,d.iB)(l,r.key).then(e=>{b(e),p(t)})},[r.key]);let I=e=>{var t;(0,y.I)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventActionType:y.i.list,eventActionText:(0,A.b)(null!==(t=r.title)&&void 0!==t?t:""),eventLabel:""});let a=e.currentTarget.getAttribute("data-id");if(!a||_||!r.key)return;(0,d.CV)(n,l,r.key,a).then(e=>{!g&&e&&b(e),p(a)});let o=x.A.getItem("surveyVotes")||{};o[r.key]=a,x.A.setItem("surveyVotes",JSON.stringify(o));let i=x.A.getItem("surveyVotesCount")||{};i[r.key]=j,x.A.setItem("surveyVotesCount",JSON.stringify(i)),m(1),g&&p(a)};return(0,a.jsxs)("div",{id:r.key,className:(0,c.Z)(tz().survey,"disableContentBlocksStyles"),children:[(0,a.jsxs)("div",{className:tz().left,children:[(0,a.jsxs)("div",{className:tz().text,children:[(0,a.jsx)("div",{className:tz().question,children:r.title}),(0,a.jsx)("label",{children:r.subtitle||"Проголосуйте"})]}),(0,a.jsxs)("div",{className:tz().buttonWrapper,onClick:()=>{let e=window.location.href.split("#")[0];navigator.clipboard.writeText("".concat(e,"#").concat(r.key)),f(!0),setTimeout(()=>f(!1),2e3)},children:[(0,a.jsx)(v.zx,{className:tz().buttonWrapperIcon,shape:"circle-icon",size:"s",iconLeft:(0,a.jsx)(i.IconFdsCopyO,{})}),h&&(0,a.jsx)("div",{className:tz().tooltip,children:"Ссылка скопирована"})]})]}),(0,a.jsx)("div",{className:(0,c.Z)(tz().options,{[tz().voted]:!!_}),children:null===(t=r.answers)||void 0===t?void 0:t.map(e=>{var t;let n=e.key===_,o=((null==g?void 0:null===(t=g[e.key])||void 0===t?void 0:t.count)||0)+(n?C:0),r=_?Math.round(o/j*100):0;return(0,a.jsxs)("div",{className:(0,c.Z)(tz().option,{[tz().selected]:n}),"data-id":e.key,onClick:I,children:[(0,a.jsxs)("div",{children:[!!e.icon&&(0,a.jsx)("span",{children:e.icon}),(0,a.jsxs)("p",{children:[e.text,""]})]}),!!_&&(0,a.jsxs)("label",{children:[r,"%"]}),(0,a.jsx)("div",{className:tz().fill,style:{width:"".concat(r,"%")}})]},e.key)})}),!!_&&!1]})};var tX=n(67704),tP=n(32478),tG=n(89163),tQ=n(73104),tq=n(34669),tK=n.n(tq),t$={src:"/service-navigator/_next/static/media/adv-apps.5ef11a39.png",height:132,width:210,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAP1BMVEX08vq0v+n/+/+2mrDK3PXm7Pnl3u9MaXHj5/zx+f+coKiSzL3ExttwdIKH1e7Pr7/K5t+vyfmdu/icvPj////+rJWWAAAAFXRSTlM3bx6lQxRWAC49hMqnwXxwaoGizwNh61ZuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMElEQVR4nAXBhwHAIAwEsQMMb5NCSfafFQnVNOxbP8p3cc8JCWyyUQ3eqzmKp0dzOxvZATbJf2l8AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:5};let t0=e=>{var t;let{env:n,className:m,data:_,params:h,post:v,tags:f}=e,g=(0,eq.I)(),{NEXT_PUBLIC_S3_ASSETS:b,NEXT_PUBLIC_BASE_URL:x}=n,C=(0,o.useRef)(null),j=(0,o.useRef)(null),I=()=>{var e;return null===(e=C.current)||void 0===e?void 0:e.focus()},k=(null==v?void 0:null===(t=v.filter_ids)||void 0===t?void 0:t[0])||null,w=e=>{e.target&&"innerText"in e.target&&"string"==typeof e.target.innerText&&(0,y.I)({eventCategory:"".concat((0,A.b)("журнал"),"_").concat(location.pathname),eventActionType:y.i.link,eventActionText:(0,A.b)("".concat(e.target.innerText," text_novost")),eventLabel:""})};if((0,o.useEffect)(()=>{let e=j.current;if(!e)return;e.querySelectorAll("a").forEach(e=>{e.classList.contains("button")||/button/i.test(e.className)||e.addEventListener("mousedown",w)});let t=j.current;return()=>{null==t||t.querySelectorAll("a").forEach(e=>{e.removeEventListener("mousedown",w)})}},[]),!Array.isArray(_))return null;let N=()=>{(0,d.il)(n,(null==v?void 0:v.url)||"")},S=(()=>{var e,t,c,d;let m;let y=[],A=1,j=0,w=0,S=t1[(null===(e=_[_.length-1])||void 0===e?void 0:e.type)||""],T=!1;if(_.forEach((e,t)=>{var n,a,o,r;"header"===e.type&&(3==++j&&((null===(o=_[t-1])||void 0===o?void 0:o.type)==="banner"&&(m=_.splice(t-1,1)),(null===(r=_[t+1])||void 0===r?void 0:r.type)==="banner"&&(m=_.splice(t+1,1))),m&&4===j&&_.splice(t,0,m[0])),"info_bl"===e.type&&(null===(a=e.data)||void 0===a?void 0:null===(n=a.block)||void 0===n?void 0:n.title)&&w++,"widget_osago"===e.type&&(T=!0)}),_.forEach((e,t)=>{var c,d,m,_,f,C,j,I,k,w,N,S,L,E,M,B;switch(e.type){case"banner":h&&y.push((0,a.jsx)(eQ.Z,{config:g,params:h},t));break;case"header":(null===(c=e.data)||void 0===c?void 0:c.text)&&y.push((0,a.jsx)("h2",{id:"".concat(null==v?void 0:v.id,"_content_header_").concat(A),dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}},t)),A++;break;case"sub_header":(null===(d=e.data)||void 0===d?void 0:d.text)&&y.push((0,a.jsx)("h3",{dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}},t));break;case"paragraph":(null===(m=e.data)||void 0===m?void 0:m.text)&&y.push((0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}},t));break;case"link":(null===(_=e.data)||void 0===_?void 0:_.text)&&y.push((0,a.jsx)("div",{className:tK()["block-link"],children:(0,a.jsxs)("a",{target:"_blank",href:e.data.url,rel:"noreferrer",children:[e.data.text,(0,a.jsx)(i.IconFdsArrowUpRightSmallO,{size:20})]})},t));break;case"dossier":(null===(f=e.data)||void 0===f?void 0:f.text)&&y.push((0,a.jsxs)("div",{className:tK()["dossier-date-item"],children:[(0,a.jsx)("span",{className:tK().date,children:e.data.year}),(0,a.jsx)("div",{className:tK().text,dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}})]},t));break;case"html":(null===(C=e.data)||void 0===C?void 0:C.html)&&y.push((0,a.jsx)("div",{className:tK()["html-block"],dangerouslySetInnerHTML:{__html:(0,tG.$)((0,tX.I)(e.data.html))}},t));break;case"annotation":(null===(j=e.data)||void 0===j?void 0:j.text)&&y.push((0,a.jsx)("div",{className:tK().annotation,dangerouslySetInnerHTML:{__html:(0,tG.$)((0,tX.I)(e.data.text))}},t));break;case"company-annotation":(null===(I=e.data)||void 0===I?void 0:I.text)&&y.push((0,a.jsx)("div",{className:tK()["company-annotation"],dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}},t));break;case"keynote":(null===(k=e.data)||void 0===k?void 0:k.text)&&y.push((0,a.jsx)("div",{className:tK()["keynote-wrapper"],children:(0,a.jsx)("p",{className:tK().keynote,dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}})},t));break;case"document-file":y.push((0,a.jsxs)(l.default,{className:tK()["doc-file"],href:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?e.startsWith("http")?e:"".concat(t,"/doc/post_docs/").concat(e):""}(null==e?void 0:null===(w=e.data)||void 0===w?void 0:w.file),target:"_blank",children:[(0,a.jsx)(i.IconFile,{size:22}),(0,a.jsx)("label",{className:tK()["doc-title"],children:null==e?void 0:null===(N=e.data)||void 0===N?void 0:N.title}),(0,a.jsx)(i.IconFdsChevronRightO,{size:22})]},t));break;case"table":e.data&&y.push((0,a.jsxs)("div",{className:tK()["content-table-wrapper"],children:[e.data.title?(0,a.jsx)("h4",{children:e.data.title}):"",(0,a.jsx)("div",{className:tK()["content-table-content"],dangerouslySetInnerHTML:{__html:(0,tG.$)(e.data.html||"")}})]},t));break;case"image":e.data&&y.push((0,a.jsx)(eS,{env:n,imageFile:e.data.imageFile,imageCaption:e.data.imageCaption,imageData:e.data.imageData,className:tK()["content-image"],imageClassName:tK()["content-image-element"]},t));break;case"info_bl":y.push((0,a.jsx)(tE.U,{block:e.data.block},t));break;case"incoming-tax-calculator":y.push((0,a.jsx)(s.$,{className:"disableContentBlocksStyles",assets:{desktop:"".concat(b,"/mp-assets/widgets/IncomeTaxCalculator/bannerWidget.png"),mobile:"".concat(b,"/mp-assets/widgets/IncomeTaxCalculator/bannerWidget.png")},bannerButtonUrl:null!==(S=e.data.url)&&void 0!==S?S:""},t));break;case"osago":y.push((0,a.jsx)(tZ,{small:!0},t));break;case"widget_osago":(null==v?void 0:v.id)&&y.push((0,a.jsx)(tV,{id:v.id},t));break;case"deposits":y.push((0,a.jsx)(tL,{},t));break;case"savings":y.push((0,a.jsx)(tL,{savings:!0},t));break;case"premium":y.push((0,a.jsx)(tL,{premium:!0},t));break;case"credits":y.push((0,a.jsx)(tp,{},t));break;case"debit_cards":y.push((0,a.jsx)(tk,{},t));break;case"post_quote":(null===(L=e.data)||void 0===L?void 0:L.quote)&&y.push((0,a.jsx)(p,{name:e.data.auth,position:e.data.position,img:e.data.imageData,quote:(0,tX.I)(e.data.quote)},t));break;case"post_offer":e.data&&y.push((0,a.jsxs)(o.Fragment,{children:[(1===e.data.type||12===e.data.type||13===e.data.type)&&(0,a.jsx)(tL,{content:{amount:e.data.amount,term:e.data.term},savings:12===e.data.type,premium:13===e.data.type},"depositsOffers"),2===e.data.type&&(0,a.jsx)(tp,{content:{amount:e.data.amount,term:e.data.term}},"creditsOffers"),11===e.data.type&&(0,a.jsx)(tk,{},"debitCardsOffers"),9===e.data.type&&!T&&(0,a.jsx)(tZ,{small:!0},"osagoOffers")]},t));break;case"post_author":(null===(E=e.data)||void 0===E?void 0:E.name)&&y.push((0,a.jsxs)("a",{className:tK().postAuthor,href:"/navigator/author/".concat(e.data.url),target:"_self",children:[e.data.imageData&&(0,a.jsx)(r.default,{src:(0,eD.J)(e.data.imageData,"original",x),alt:"portrait",width:48,height:48,unoptimized:!0}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{children:e.data.name}),(0,a.jsx)("span",{children:e.data.position})]})]},t));break;case"warning":(null===(M=e.data)||void 0===M?void 0:M.title)&&y.push((0,a.jsxs)("div",{className:tK().warning,children:[(0,a.jsx)(i.IconFdsExclamationTriangleO,{size:22}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{children:e.data.title}),(0,a.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,tX.I)(e.data.text)}})]})]},t));break;case"mobile_app_banner":y.push((0,a.jsx)(eF.P,{className:tK().qrAd,QrImage:e=>{let{className:t}=e;return(0,a.jsx)(r.default,{alt:"qr",unoptimized:!0,src:u.Z,className:t})},BgImage:e=>{let{className:t}=e;return(0,a.jsx)(r.default,{alt:"qr",unoptimized:!0,src:t$,className:t})}},t));break;case"poll":{let o=(0,tJ.W)(n)?(null==v?void 0:v.id)||"":(0,tP.O)(null==v?void 0:v.url);e.data&&y.push((0,a.jsx)(tH,{env:n,data:e.data,postId:o,stats:null==v?void 0:null===(B=v.polls)||void 0===B?void 0:B[e.data.key||""]},t));break}case"read_more":y.push((0,a.jsx)(eP,{env:n,articles:(0,tQ.E)(e.data)},t));break;case"slider":y.push((0,a.jsx)(eM,{env:n,data:e.data},t));break;case"video":y.push((0,a.jsx)(eR,{url:e.data.url,text:e.data.text},t))}}),((null==v?void 0:v.ads_banner)||0===w&&k)&&y.push((0,a.jsx)(tE.U,{env:n,block:null==v?void 0:v.ads_banner,categoryId:k},"add-extra-banner")),v&&y.push((0,a.jsx)(eZ.t,{socProps:{title:v.title,url:"/".concat(v.url)},comments:String((null===(t=v.comments)||void 0===t?void 0:t.length)||0),focusCommentsInput:I,likes:String(v.likes||0),submitLike:N},"author")),null==v?void 0:v.comments){let e=(0,tJ.W)(n)?v.id:v.url;y.push((0,a.jsx)(eI,{env:n,postId:e,comments:v.comments,inputRef:C},"comments"))}let L=null==v?void 0:null===(c=v.tag_ids)||void 0===c?void 0:c[0],E=null==f?void 0:null===(d=f.find(e=>e.id===L))||void 0===d?void 0:d.url;return S||T||"navigator/zastrahovat"!==E||y.push((0,a.jsx)(tZ,{small:!0},"osago")),S||"navigator/nakopit-i-sohranit"!==E&&"navigator/analitika"!==E||y.push((0,a.jsx)(tL,{},"deposits")),S||"navigator/kredity"!==E||y.push((0,a.jsx)(tp,{},"credits")),S||"6"!==E||y.push((0,a.jsx)(tk,{},"debit cards")),y})();return(0,a.jsx)("div",{ref:j,className:(0,c.Z)(tK()["content-blocks"],"content-blocks",m),children:S})},t1={info_bl:!0,osago:!0,deposits:!0,savings:!0,premium:!0,credits:!0,debit_cards:!0,post_offer:!0}},65843:function(e,t,n){"use strict";n.d(t,{P:function(){return c}});var a=n(57437),o=n(2265),r=n(54365);let l=e=>(0,a.jsx)("a",{...e});var i=n(16109),s=n.n(i);let c=(0,o.memo)(e=>{let{Link:t=l,text:n="Управляйте финансами через приложение Финуслуг",className:o,BgImage:i,QrImage:c,isSmall:d,href:u="https://promo.finuslugi.ru/mobapp/",hideButtons:m}=e;return(0,a.jsxs)(t,{className:(0,r.Z)(s().container,o),target:"_blank",href:u,children:[(0,a.jsx)("div",{className:(0,r.Z)(s().title,d&&s().titleSmall),dangerouslySetInnerHTML:{__html:n}}),(0,a.jsxs)("div",{className:s().right,children:[c&&(0,a.jsx)("div",{className:s().qrContainer,children:(0,a.jsx)(c,{className:s().qr})}),!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:s().button,children:"Отсканируйте QR"}),(0,a.jsx)("div",{className:(0,r.Z)(s().button,s().buttonMobile),children:"Подробнее"})]}),i&&(0,a.jsx)(i,{className:s().bgImage})]})]})});c.displayName="UiQrAd"},87918:function(e,t,n){"use strict";n.d(t,{I:function(){return o}});var a=n(2265);let o=()=>{let[e,t]=(0,a.useState)();return(0,a.useEffect)(()=>{window&&window.Ya&&window.yaContextCb&&t({ownerId:406293,Ya:window.Ya,yaContextCb:window.yaContextCb})},[]),e}},2373:function(e,t,n){"use strict";n.d(t,{G:function(){return r}});var a=n(2265);let o={xl:"screen and (max-width: 1440px)",lg:"screen and (max-width: 1200px)",md:"screen and (max-width: 900px)",sm:"screen and (max-width: 600px)"},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lg",t=(0,a.useRef)(null),[n,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{var n,a;!t.current&&window&&(t.current=null===(a=window)||void 0===a?void 0:a.matchMedia(o[e]||e));let l=()=>{r(!!t.current&&t.current.matches)};return l(),null===(n=t.current)||void 0===n||n.addEventListener("change",l),()=>{var e;return null===(e=t.current)||void 0===e?void 0:e.removeEventListener("change",l)}},[e]),n}},95257:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var a=n(57437),o=n(2265),r=n(13466),l=n(96350),i=n(2373),s=n(27702),c=n.n(s);let d=/<([^>]+)>$/,u=e=>{let t=e.getAttribute("href");if(!t)return null;let n=decodeURIComponent(t).match(d);return(null==n?void 0:n[1])||null},m=e=>{let t=u(e);return t?(e.dataset.pseudoContent=t,e.classList.add(c().footnoteAnchor),t):(delete e.dataset.pseudoContent,e.classList.remove(c().footnoteAnchor),e.classList.remove(c().footnoteTop),null)},_=(e,t)=>{if(!t||!(e instanceof Element))return null;let n=e.closest("a[href]");if(!(n instanceof HTMLAnchorElement)||!t.contains(n))return null;let a=m(n);return a?{anchorElement:n,text:a}:null},p=e=>{let{articleRef:t}=e,n=(0,i.G)("lg"),[s,d]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{e.querySelectorAll("a[href]").forEach(m)},a=t=>{let n=_(t.target,e);if(!n)return;let a=n.anchorElement.getBoundingClientRect();n.anchorElement.classList.toggle(c().footnoteTop,a.bottom>window.innerHeight/2)},o=t=>{let n=_(t.target,e);n&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),d(n.text))};n();let r=new MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]}),e.addEventListener("mouseover",a),e.addEventListener("click",o,!0),()=>{r.disconnect(),e.removeEventListener("mouseover",a),e.removeEventListener("click",o,!0)}},[]),(0,a.jsx)(r.h,{children:(0,a.jsx)(l.j,{className:c().popup,isOpen:n&&!!s,onClose:()=>d(null),children:s})})}},14672:function(e,t,n){"use strict";n.d(t,{U:function(){return b}});var a=n(57437),o=n(2265),r=n(75461),l=n(54365),i=n(59306),s=n(73104),c=n(56471);let d=(e,t,n)=>(0,i.t)({url:"/money_data/InfoBlocks.json?category=".concat(e).concat(t?"&post_id=".concat(t):"").concat(n?"&block_id=".concat(n):"")}),u=async(e,t,n,a)=>{var o,r;if((0,c.W)(e))return d(t,n,a);let l=await (0,i.t)({url:"/api/v1/product-banners?page=0&limit=100&categoryNavigator=".concat(t),options:{isHeadlessCMS:!0}});return{data:{blocks:(null==l?void 0:null===(r=l.data)||void 0===r?void 0:null===(o=r.banners)||void 0===o?void 0:o.map(s.z))||[]}}};var m=n(76093),_=n(42953),p=n(67704),h=n(85769),v=n(27669),f=n(37071),g=n.n(f);let b=e=>{let{env:t,block:n,categoryId:i,isOutside:c}=e,d=(0,s.z)(n),[f,b]=(0,o.useState)(d),{asPath:y}=(0,m.t)();if((0,o.useEffect)(()=>{t&&!d&&i&&u(t,i).then(e=>{var t;if((null===(t=e.data)||void 0===t?void 0:t.blocks)&&e.data.blocks.length>0){let t=Math.floor(Math.random()*e.data.blocks.length);b(e.data.blocks[t])}})},[t,d,i]),!f||!f.title)return null;let{button_text:x,image:A,text:C,title:j,url:I,background:k}=f,{textColor:w,buttonColor:N}=f,S=k?{background:k}:void 0,T=w?{color:w}:S?{color:"var(--color-white)"}:void 0;return(0,a.jsxs)("div",{style:S,className:(0,l.Z)(g().component,{[g().isOutside]:c},"disableContentBlocksStyles"),children:[(0,a.jsx)("picture",{className:g().image,children:A&&(0,a.jsx)("img",{loading:"lazy",src:A,alt:j})}),(0,a.jsxs)("div",{className:g().body,children:[j&&(0,a.jsx)("h4",{style:T,className:g().title,dangerouslySetInnerHTML:{__html:j}}),C&&(0,a.jsx)("div",{style:T,className:g().description,dangerouslySetInnerHTML:{__html:(0,p.I)(C)}}),(0,a.jsx)(r.zx,{target:"_blank",className:(0,l.Z)(g().button,"info-block-id-".concat(f.id)),variant:N||(S?"white":"primary"),as:"a",size:"s",onClick:e=>{e.preventDefault(),(0,h.I)({eventCategory:"".concat((0,v.b)("журнал"),"__").concat("".concat(_._n).concat(y)),eventActionType:h.i.button,eventActionText:j||"",eventLabel:x||""}),window.open(I,"_blank")},href:I,children:x})]})]})}},1123:function(e,t,n){"use strict";n.d(t,{t:function(){return c}});var a=n(57437),o=n(54365),r=n(65449),l=n.n(r);let i=/%25([0-9A-Fa-f]{2})/g,s=e=>e.replace(i,"%$1"),c=e=>{let{srcDesktop:t,srcMobile:n,alt:r,caption:i,className:c,pictureClassName:d,captionClassName:u,imageClassName:m,isLazy:_=!0}=e,p=s(t),h=s(n);return(0,a.jsxs)("figure",{className:(0,o.Z)(l().figureWrapper,c),children:[(0,a.jsxs)("picture",{className:(0,o.Z)(l().pictureWrapper,d),children:[(0,a.jsx)("source",{media:"(max-width: 1279px)",srcSet:h}),(0,a.jsx)("img",{loading:_?"lazy":void 0,className:(0,o.Z)(l().image,m),src:p,fetchPriority:_?void 0:"high",decoding:_?void 0:"async",alt:null!=r?r:"detail image"})]}),!!i&&(0,a.jsx)("figcaption",{className:(0,o.Z)(l().caption,u),dangerouslySetInnerHTML:{__html:i}})]})}},67704:function(e,t,n){"use strict";n.d(t,{I:function(){return o}});let a=["а-ля","без","безо","в","вне","во","для","до","за","и","из","из-за","из-под","изо","к","ко","меж","на","над","не","ниже","о","об","обо","от","ото","по","под","пред","предо","при","про","ради","с","со","у"],o=e=>{if("string"!=typeof e)return"";let t=e.replace(/\s\s+/g," ");return a.forEach(e=>{let n=RegExp("\\s".concat(e,"\\s"),"g");t=t.replace(n," ".concat(e,"\xa0"))}),t=t.replace(/\s-\s/g," — ")}},62178:function(e,t,n){"use strict";n.d(t,{jz:function(){return u},rq:function(){return h},vY:function(){return p}});var a=n(28045),o=n(54823),r=n(88098);let l=new Map,i=e=>"auth.gtm_customer_id"===e||"access_token"===e||"refresh_token"===e,s=()=>window.cookieStore||null,c=e=>{let t=[...e.changed||[],...e.deleted||[]];return!t.length||t.some(e=>i(e.name))},d=e=>{if(!e)return null;let t=e.includes("state=")?"true":null,{hash:n,search:a}=new URL(e,"https://www.finuslugi.ru"),o=new URLSearchParams(a).get("state");if(o)return o;let r=n.indexOf("?"),l=r>=0?n.slice(r+1):n.slice(1);return l&&new URLSearchParams(l).get("state")||t},u=()=>{var e;let t=(null===(e=window.location.href)||void 0===e?void 0:e.includes("state="))?"true":null;return d(window.location.href)||t},m=(e,t,n)=>[e,t,n].join("\n"),_=async(e,t,n)=>{let i=m(e,t,n),s=l.get(i);if(s)return s;let c=(0,a.y)({tokenUrl:e,refreshToken:t,redirectUri:n,grantType:"refresh_token"}).then(e=>e.ok?((0,o.m)(e.data),e.data.access_token):(r.v.removeItem("refresh_token"),null)).catch(()=>(r.v.removeItem("refresh_token"),null)).finally(()=>{l.delete(i)});return l.set(i,c),c},p=async function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{ignoreCustomerIdCookie:o=!1}=a,l=o?null:r.v.getItem("auth.gtm_customer_id");if(l)return l;if(!e)return null;let i=r.v.getItem("access_token");if(i)return i;let s=r.v.getItem("refresh_token");return s&&t&&n?_(t,s,n):null},h=e=>{let t=s();if(!t)return()=>void 0;let n=t=>{c(t)&&e()};return t.addEventListener("change",n),()=>{t.removeEventListener("change",n)}}},54823:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var a=n(88098);let o=e=>{let t={expires:new Date(Date.now()+1e3*e),sameSite:"Strict"};return"https:"!==window.location.protocol?t:{...t,secure:!0}},r=e=>{let{access_token:t,expires_in:n,refresh_expires_in:r,refresh_token:l}=e;a.v.setItem("access_token",t,o(n)),a.v.setItem("refresh_token",l,o(r))}},88098:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});let a={getItem:e=>{var t;let n=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return n&&null!==(t=n.split("=")[1])&&void 0!==t?t:null},setItem:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let a=encodeURIComponent(e)+"="+encodeURIComponent(t);for(let e in n){if(!n.hasOwnProperty(e))continue;a+="; "+e;let t=n[e];!0!==t&&(a+="="+t)}document.cookie=a},removeItem:e=>{a.setItem(e,"",{"max-age":-1})}}},4028:function(e,t,n){"use strict";n.d(t,{R:function(){return a}});let a=()=>{let e="";for(let t=0;t<36;t++)(8===t||13===t||18===t||23===t)&&(e+="-"),e+="0123456789abcdef"[Math.floor(16*Math.random())];return e}},32478:function(e,t,n){"use strict";n.d(t,{O:function(){return a}});let a=e=>{var t;if("string"!=typeof e)return"";let n=(null==e?void 0:null===(t=e.split("/"))||void 0===t?void 0:t.pop())||"";return(null==n?void 0:n.startsWith("stat_"))?null==n?void 0:n.replace("stat_",""):n}},89163:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var a=["finuslugi.ru","inguru.dev","moex.com"];let o=e=>e.includes("//")&&!a.find(t=>e&&e.indexOf(t)>=0),r=e=>e?e=e.replace(/href="(.*?)"/gi,(e,t)=>"".concat(e).concat(o(t)?' rel="nofollow"':"")):""},7753:function(e,t,n){"use strict";n.d(t,{$f:function(){return m},Sn:function(){return d},Xp:function(){return u},tC:function(){return _}});var a=n(38856);let o="code_verifier",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",l=()=>{var e;if(!(null===(e=globalThis.crypto)||void 0===e?void 0:e.subtle))throw Error("PKCE is not supported in this browser");return globalThis.crypto},i=e=>{let t="";return e.forEach(e=>{t+=String.fromCharCode(e)}),btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")},s=()=>{let e=new Uint8Array(96);l().getRandomValues(e);let t="";return e.forEach(e=>{t+=r.charAt(e%r.length)}),t},c=async e=>i(new Uint8Array(await l().subtle.digest("SHA-256",new TextEncoder().encode(e)))),d=async()=>{let e=s();return{codeChallenge:await c(e),codeVerifier:e}},u=e=>{a.a.setItem(o,e)},m=()=>a.a.getItemRaw(o),_=()=>{a.a.removeItem(o)}},22384:function(e,t,n){"use strict";n.d(t,{Q:function(){return o},n:function(){return a}});let a=e=>{let t=0;do t+=e.offsetTop;while(e=e.offsetParent);return t},o=(e,t)=>{let n=document.documentElement.scrollTop||document.body.scrollTop;t&&(n=t.scrollTop);let a=e-(t?0:110),o=a>n?a-n:n-a,r=0!==Math.round(o/25)?Math.round(o/25):1,l=a>n?n+r:n-r,i=0;if(a===n){setTimeout("window.scrollTo(0, "+a+")",10);return}if(a>n){for(let e=n;e<a;e+=r)t?setTimeout(function(){t.scrollTop+=r},10*i):setTimeout("window.scrollTo(0, "+l+")",10*i),(l+=r)>a&&(l=a),i++;return}for(let e=n;e>a;e-=r)t?setTimeout(function(){t.scrollTop-=r},10*i):setTimeout("window.scrollTo(0, "+l+")",10*i),(l-=r)<a&&(l=a),i++}},49286:function(e){e.exports={hide:"YaAdFoxBanner_hide__EEjEP",shine:"YaAdFoxBanner_shine__iTlkT"}},14322:function(e){e.exports={wrapper:"AuthorQuote_wrapper__SLBrO",author:"AuthorQuote_author__AGH8F",image:"AuthorQuote_image__EjA9T",name:"AuthorQuote_name__BvjVi",position:"AuthorQuote_position__7rxqU",quote:"AuthorQuote_quote__zZfVI",shine:"AuthorQuote_shine__OlPgH"}},4969:function(e){e.exports={bestOffersWrapper:"BestOffersSection_bestOffersWrapper__kCtNX",shine:"BestOffersSection_shine__pZs9p"}},43430:function(e){e.exports={mobilePopup:"AuthTooltip_mobilePopup__hFD__",text:"AuthTooltip_text__pR0vd",wrapper:"AuthTooltip_wrapper__h_ZtX",tooltip:"AuthTooltip_tooltip__DDsd8",fade:"AuthTooltip_fade__1Z2QQ",shine:"AuthTooltip_shine__4Vo5D"}},56423:function(e){e.exports={body:"AuthWidgetModal_body__CqSh6",message:"AuthWidgetModal_message__2O1ZS",error:"AuthWidgetModal_error__Vnr9n",errorBlock:"AuthWidgetModal_errorBlock__KdY6K",widget:"AuthWidgetModal_widget__nQYE3",ssoFrame:"AuthWidgetModal_ssoFrame__bikC3",shine:"AuthWidgetModal_shine__teWkO"}},38626:function(e){e.exports={header:"Comments_header__gN7GI",title:"Comments_title__uNAzb",wrapper:"Comments_wrapper__A4vgZ",form:"Comments_form__Ln6a6",submitBtn:"Comments_submitBtn__dlFBl",submitBtnArrow:"Comments_submitBtnArrow__ioDbB",input:"Comments_input__Tbpr7",caption:"Comments_caption__5A_1N",comments:"Comments_comments__lzYQp",comment:"Comments_comment__bQCOB",letter:"Comments_letter__xvxMA",commentHeaderText:"Comments_commentHeaderText__6T6MB",author:"Comments_author__mOR9V",date:"Comments_date__dA1OC",commentBody:"Comments_commentBody__Fs7vM",commentControls:"Comments_commentControls__i_EJ_",unit:"Comments_unit__7rivG",dislike:"Comments_dislike__JKkOa",replyBtn:"Comments_replyBtn__dbCtr",more:"Comments_more__5lJoz",shine:"Comments_shine__QkK99"}},56005:function(e){e.exports={actionButton:"Sort_actionButton__mA_YC",wrapper:"Sort_wrapper__fMwBU",text:"Sort_text__i1CZE",iconButton:"Sort_iconButton__fNt71",icon:"Sort_icon__tt2FF",iconInverted:"Sort_iconInverted__NcUGj",sortTypeDesktop:"Sort_sortTypeDesktop__xSWcV",modal:"Sort_modal__k6hw_",newSortRadioModal:"Sort_newSortRadioModal__3PqAC",modalButton:"Sort_modalButton__LX_aN",sortType:"Sort_sortType__L6A_Y",sortTypeRadio:"Sort_sortTypeRadio__bGZLF",sortTypeTooltip:"Sort_sortTypeTooltip__MBMuo",sortTypeTrigger:"Sort_sortTypeTrigger__GgLBr",sortTypeHead:"Sort_sortTypeHead__PLbkS",sortTypeButton:"Sort_sortTypeButton__z8Xwl",shine:"Sort_shine__g5_Ej"}},34669:function(e){e.exports={"content-blocks":"ContentBlocks_content-blocks__UHPWt","block-link":"ContentBlocks_block-link__FmhrM",postAuthor:"ContentBlocks_postAuthor__DYOwq",annotation:"ContentBlocks_annotation__BaHgh",short:"ContentBlocks_short__WSCor","main-p":"ContentBlocks_main-p__xvc18","content-slider-pager":"ContentBlocks_content-slider-pager__0Urm0","feedback-widget":"ContentBlocks_feedback-widget__TrGv4","credit-widget":"ContentBlocks_credit-widget__MF5oU","content-table-wrapper":"ContentBlocks_content-table-wrapper__n2ziJ","keynote-wrapper":"ContentBlocks_keynote-wrapper__iXmjB",keynote:"ContentBlocks_keynote__TEf7n","block-link-old":"ContentBlocks_block-link-old__jy8lK","i-chain":"ContentBlocks_i-chain__MoAPj","i-arrow-right":"ContentBlocks_i-arrow-right__Ewobt","doc-file":"ContentBlocks_doc-file__rrdSQ",notice:"ContentBlocks_notice__ZV_f9","brain-banner":"ContentBlocks_brain-banner__3IJGg","card-banner":"ContentBlocks_card-banner__TpV9C","adfox-banner":"ContentBlocks_adfox-banner__e8zy6","investor-banner":"ContentBlocks_investor-banner__VA0l_","content-image-element":"ContentBlocks_content-image-element__qb4r0","dossier-date-item":"ContentBlocks_dossier-date-item__2WNG6",date:"ContentBlocks_date__DJFOU",warning:"ContentBlocks_warning__1_0AC",qrAd:"ContentBlocks_qrAd__CNn_4",disableContentBlocksStyles:"ContentBlocks_disableContentBlocksStyles___ftB_","text-styles":"ContentBlocks_text-styles___ef64","list-with-counter":"ContentBlocks_list-with-counter__Y_bDN","text-styles__small":"ContentBlocks_text-styles__small__qn3OI","doc-files":"ContentBlocks_doc-files__iousF","image-opened":"ContentBlocks_image-opened__Xrfm_","blog-slider":"ContentBlocks_blog-slider__mmerK","content-slider-wrapper":"ContentBlocks_content-slider-wrapper__AXYsT","content-slider-list":"ContentBlocks_content-slider-list__6eTQD","slider-item":"ContentBlocks_slider-item__E1i_7","content-image":"ContentBlocks_content-image__hHQj0",controls:"ContentBlocks_controls__IjfUN",arrow:"ContentBlocks_arrow__fxY8d","arrow-left":"ContentBlocks_arrow-left__I4SIn","arrow-right":"ContentBlocks_arrow-right__gE4vH","content-slider-counter":"ContentBlocks_content-slider-counter__PNcmA",infoBlock:"ContentBlocks_infoBlock__W7TGe",shine:"ContentBlocks_shine__o_I30"}},91870:function(e){e.exports={wrapper:"NavigatorContentSlider_wrapper__hMB0j",slider:"NavigatorContentSlider_slider__J1Qbh",slide:"NavigatorContentSlider_slide__d7QFu",sliderItem:"NavigatorContentSlider_sliderItem__m8gH_",shine:"NavigatorContentSlider_shine__Aq15e"}},66074:function(e){e.exports={wrapper:"NavigatorVideo_wrapper__opzRH",subtitle:"NavigatorVideo_subtitle__vt6wU",shine:"NavigatorVideo_shine__o8IAA"}},16109:function(e){e.exports={container:"QrAd_container__g3Oa3",title:"QrAd_title__PFHpc",titleSmall:"QrAd_titleSmall__Zm4MT",right:"QrAd_right__iRaN5",qrContainer:"QrAd_qrContainer__LUtxs",qr:"QrAd_qr__RVXq6",button:"QrAd_button__9JaQt",buttonMobile:"QrAd_buttonMobile__ShMNU",bgImage:"QrAd_bgImage___2fWk",shine:"QrAd_shine__MdgE8"}},85900:function(e){e.exports={wrapper:"ReadMore_wrapper___V7KP",blockTitle:"ReadMore_blockTitle__Q3Ln8",card:"ReadMore_card__Vk446",image:"ReadMore_image__8SFlr",title:"ReadMore_title__ULVhH",imageWrapper:"ReadMore_imageWrapper__GV0EP",container:"ReadMore_container__1CFnm",icons:"ReadMore_icons__f5NTQ",unit:"ReadMore_unit__WhOXj",shine:"ReadMore_shine__YXqys"}},62637:function(e){e.exports={detailImageWrapper:"ContentImage_detailImageWrapper__osdk_",detailImage:"ContentImage_detailImage__2NEod",caption:"ContentImage_caption__uxGmQ",imageModal:"ContentImage_imageModal__ZbGpC",imgContainer:"ContentImage_imgContainer__On4J9",close:"ContentImage_close__A_tJ2",debug:"ContentImage_debug__SHXre",shine:"ContentImage_shine__Mm_bQ"}},53042:function(e){e.exports={inputs:"CreditsOffers_inputs__YAX4W",shine:"CreditsOffers_shine__7Q_Tf"}},87330:function(e){e.exports={inputs:"DebitCardsOffers_inputs__2D95k",shine:"DebitCardsOffers_shine__LwpkA"}},55:function(e){e.exports={inputs:"DepositsOffers_inputs__C11Pn",shine:"DepositsOffers_shine__Xmngp"}},27702:function(e){e.exports={footnoteAnchor:"Footnote_footnoteAnchor__tpida",footnoteTop:"Footnote_footnoteTop__uXhPB",popup:"Footnote_popup__LL896",shine:"Footnote_shine___HLYZ"}},37071:function(e){e.exports={component:"InfoBlock_component___FxHg",isOutside:"InfoBlock_isOutside__zZTnv",body:"InfoBlock_body__bjj_j",title:"InfoBlock_title__eoTH0",description:"InfoBlock_description__zlE3O",button:"InfoBlock_button__fySnQ",image:"InfoBlock_image__xQNU9",shine:"InfoBlock_shine__Eco9K"}},88189:function(e){e.exports={container:"LogosList_container__sRYPf",item:"LogosList_item__SJd2s",itemNum:"LogosList_itemNum__2HgpN",img:"LogosList_img__i_C92",shine:"LogosList_shine__NQIfD"}},23296:function(e){e.exports={offersWrapper:"OffersWrapper_offersWrapper__4CnQH",logos:"OffersWrapper_logos__SDMLV",shine:"OffersWrapper_shine__VV9XV"}},78090:function(e){e.exports={osagoOffersWrapper:"OsagoOffers_osagoOffersWrapper__Z2Pg0",container:"OsagoOffers_container__IhyF7",img:"OsagoOffers_img__RACxh",content:"OsagoOffers_content__VKRZ5",title:"OsagoOffers_title__ZrRsM",inputs:"OsagoOffers_inputs__LVqKN",select:"OsagoOffers_select__ArUky",form:"OsagoOffers_form__o6uSf",noLicense:"OsagoOffers_noLicense__7_dya",button:"OsagoOffers_button__ItOje",small:"OsagoOffers_small__bZ_aE",shine:"OsagoOffers_shine__bPk56"}},89267:function(e){e.exports={wrapper:"OsagoWidget_wrapper__uNsni",shine:"OsagoWidget_shine__sKG3H"}},65449:function(e){e.exports={pictureWrapper:"ResponsiveImage_pictureWrapper__Ito3k",figureWrapper:"ResponsiveImage_figureWrapper__smDJG",image:"ResponsiveImage_image__2HemD",caption:"ResponsiveImage_caption__SPzIK",shine:"ResponsiveImage_shine__2pd4V"}},77002:function(e){e.exports={question:"Survey_question__CFf04",survey:"Survey_survey__y4bSv",left:"Survey_left__0oisd",text:"Survey_text__r9eV6",buttonWrapper:"Survey_buttonWrapper__tIeSY",buttonWrapperIcon:"Survey_buttonWrapperIcon__I8ksT",tooltip:"Survey_tooltip__VTvYM",options:"Survey_options__VZrfg",voted:"Survey_voted__Nsfug",option:"Survey_option__w9_nz",fill:"Survey_fill__7fW16",selected:"Survey_selected__4xnra",allVotes:"Survey_allVotes__FY2S_",shine:"Survey_shine__y6tC6"}},70526:function(e,t){"use strict";t.Z={src:"/service-navigator/_next/static/media/app-qr.d8a71790.svg",height:256,width:256,blurWidth:0,blurHeight:0}}}]);