(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3778],{75347:function(){},31777:function(){},34017:function(){},59905:function(){},13472:function(e,t,n){"use strict";Object.defineProperty(t,"$",{enumerable:!0,get:function(){return a}});let r=n(15355);function a(e){let{createServerReference:t}=n(6671);return t(e,r.callServer)}},66281:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var r,a,i,o=n(57437),c=n(52116),l=n(99623),s=n(18818),u=n(20564),d=n(2265),f=n(40195),v=n.n(f);function p(e){let{html:t,as:n="div",suppressHydrationWarning:r=!1,...a}=e,i=(0,d.useRef)(null),o=(0,d.useRef)(!0);return(0,d.useEffect)(()=>{if(!t||!o.current||!i.current)return;o.current=!1;let e=v()(t,{allowedAttributes:!1,allowedTags:!1}),n=document.createRange().createContextualFragment(e);i.current.appendChild(n)},[t]),t?(0,d.createElement)(n,{...a,ref:i,suppressHydrationWarning:r}):null}var g=n(14073),m=n(21822),_=n(508);let h=e=>(0,_.p)(e);var S=n(16243);let y=(e,t)=>{let n=h(e);if(n&&n.aggregator_id){let e={...n,create_date:new Date().toISOString()},a={payload:[]};try{var r;a=JSON.parse((null===(r=(0,m.$1)())||void 0===r?void 0:r.cpa_click)||"{}")}catch(e){return}a.payload||(a.payload=[]),a.payload.push(e);let i={event:"data-event",eventCategory:String(n.aggregator_id),eventAction:"CPA_click",eventLabel:window.location.pathname,eventValue:String(n.utm_term||n.click_id),utm_source:String(n.utm_source),utm_campaign:String(n.utm_campaign),utm_medium:String(n.utm_medium)};t[String(n.aggregator_id)]&&((0,m.LM)("cpa_click",a,30),(0,S.lQ)(i))}};var E=n(13107),C=n(54983);let A=(0,u.OB)("NEXT_PUBLIC_ASSETS_BASE_URL");function L(){return(0,o.jsx)(C.default,{crossOrigin:"use-credentials",type:"module",src:"".concat(A,"/mp-assets/widgets/support/index-D2xclPDV.js")})}var U=n(36816),b=n(49079);let k=null!==(r=b.env.NEXT_PUBLIC_REACT_HEADER)&&void 0!==r?r:(0,u.OB)("NEXT_PUBLIC_REACT_HEADER"),B=null!==(a=b.env.NEXT_PUBLIC_BASE_URL)&&void 0!==a?a:(0,u.OB)("NEXT_PUBLIC_BASE_URL"),w=null!==(i=b.env.NEXT_PUBLIC_ASSETS_BASE_URL)&&void 0!==i?i:(0,u.OB)("NEXT_PUBLIC_ASSETS_BASE_URL"),x="".concat(w,"/mp-assets");function I(e){let{children:t,aggregatorIds:n,headerSrc:r,headerData:a,footerData:i,ssr:u=!0}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R,{aggregatorIds:n}),u?(0,o.jsxs)(o.Fragment,{children:[r&&!k&&(0,o.jsx)("div",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r}}),a&&k&&(0,o.jsx)(s.h4,{data:a,showcaseUrl:B,minioUrl:x,lkUrl:g.LK}),t,i&&(0,o.jsx)(l.$,{data:i,showcaseUrl:B,minioUrl:x})]}):(0,o.jsxs)(o.Fragment,{children:[!k&&(0,o.jsx)(p,{html:r,suppressHydrationWarning:!0}),a&&k&&(0,o.jsx)(s.h4,{data:a,showcaseUrl:B,minioUrl:x,lkUrl:g.LK}),t,i&&(0,o.jsx)(l.$,{data:i,showcaseUrl:B,minioUrl:x})]}),(0,o.jsxs)(U.h,{children:[(0,o.jsx)(c.z,{}),!k&&(0,o.jsx)(L,{})]})]})}function R(e){return!function(e){let{asPath:t}=(0,E.P)();(0,d.useEffect)(()=>{(0,S.yr)(t),y(t,e)},[e,t])}(e.aggregatorIds),null}},74059:function(e,t,n){"use strict";n.d(t,{t:function(){return c}});var r=n(57437),a=n(34734),i=n(96765),o=n.n(i);let c=e=>{let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,a.Z)(o().mainContainer,n),children:t})};c.displayName="MainContainer"},36816:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(2265),a=n(54887);let i=e=>{let{children:t}=e,[n,i]=(0,r.useState)(null);return(0,r.useEffect)(()=>{var e;let t=null===(e=document)||void 0===e?void 0:e.getElementById("portal-root");t&&i(t)},[]),n&&(0,a.createPortal)(t,n)}},14073:function(e,t,n){"use strict";n.d(t,{HA:function(){return i},LK:function(){return a},_n:function(){return r}});let r=n(49079).env.NEXT_PUBLIC_BASE_URL||"https://finuslugi.ru",a="https://lk.finuslugi.ru/registration/",i=["sberbank","vtb","sovcombank","rosselhozbank","gazprombank","alfabank","promsvyazbank","tbank","mkb","pochta_bank"]},21822:function(e,t,n){"use strict";n.d(t,{$1:function(){return u},LM:function(){return d}});var r=n(20564);let a=e=>/^https:\/\//gi.test(e),i=e=>["",...e.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join("."),o=()=>window.location.host.indexOf("localhost")>=0,c=e=>('"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)),l=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),s=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[(]/g,"%28").replace(/[)]/g,"%29"),u=()=>{if("undefined"!=typeof document&&document.cookie)return Object.fromEntries(document.cookie.split("; ").map(e=>e.split("=")).map(e=>e.map(e=>c(e))))},d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,c=(0,r.OB)("NEXT_PUBLIC_BASE_URL");if(!c)throw Error("Не определена переменная окружения NEXT_PUBLIC_BASE_URL");let u=o()?"":"; domain=".concat(i(c)),d=new Date(new Date().getTime()+864e5*n).toUTCString();document.cookie="".concat(s(e),"=").concat(l("string"==typeof t?t:JSON.stringify(t)),"; SameSite=Strict").concat(a(c)?"; Secure":"").concat(u,"; expires=").concat(d,"; path=/;")}},508:function(e,t,n){"use strict";n.d(t,{p:function(){return r}});let r=function(e){var t,n,r,a;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"?",o=null!==(a=null===(r=e.split(i))||void 0===r?void 0:null===(n=r[1])||void 0===n?void 0:null===(t=n.split("?"===i?"#":"?")[0])||void 0===t?void 0:t.split("&"))&&void 0!==a?a:[],c={};return o.forEach(e=>{let[t,n]=e.split("="),r=null!=n?n:"";if(t in c){let e=c[t];if(Array.isArray(e)){c[t]=[...e,r];return}if(!Array.isArray(e)&&e){c[t]=[e,r];return}}c[t]=r}),c}},16243:function(e,t,n){"use strict";n.d(t,{lQ:function(){return i},yr:function(){return o}});var r=n(60915);let a=[{path:"banki",category:"service_bank"},{path:"strahovanie_kompanija",category:"service_sk"},{path:"adresa_sk",category:"service_sk"},{path:"adresa_mfo",category:"service_mfo"},{path:"adresa",category:"service_bank"},{path:"mfo",category:"service_mfo"},{path:"navigator",category:"service_navigator"},{path:"stat_",category:"service_navigator"}],i=(e,t)=>{let n=sessionStorage.getItem("pushedEvents"),a=n?JSON.parse(n):[];e.event=e.event?e.event:"data-event",e.eventValue=e.eventValue?e.eventValue:null,e.eventAction=e.eventAction&&"string"==typeof e.eventAction?e.eventAction.toLowerCase().replaceAll(/[ \xa0]/g,"_"):"",e.eventLabel=e.eventLabel&&"string"==typeof e.eventLabel?e.eventLabel.toLowerCase().replaceAll(/[ \xa0]/g,"_"):"";let i=a.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!i){if(t){let t={...e};t.url=window.location.pathname,a.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(a))}(0,r.AB)(e)}},o=e=>{for(let t of a)if(e.indexOf(t.path)>=0){let n=e.match(/str_(\d+)/),r=Array.isArray(n)&&n[1]?Number(n[1]):1;setTimeout(()=>{i({event:"data-event",eventCategory:t.category,eventAction:"stay_15_seconds",eventLabel:e,eventValue:r})},15e3);return}}},13107:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(47907),a=n(2265),i=n(508);function o(){let e=(0,r.usePathname)(),t=(0,r.useSearchParams)(),[n,o]=(0,a.useState)("");(0,a.useEffect)(()=>{o(location.hash)},[]);let c=(0,a.useMemo)(()=>{if(!e)return"";let r=null==t?void 0:t.toString();return(null==r?void 0:r.length)?e+"?"+r+n:e+n},[n,t,e]),l=(0,a.useMemo)(()=>(0,i.p)(c,"?"),[c]),s=(0,a.useMemo)(()=>(0,i.p)(c,"#"),[c]),u=(0,a.useCallback)(e=>{history.pushState({url:e},"",e)},[]),d=(0,a.useCallback)(e=>{history.replaceState({url:e},"",e)},[]);return(0,a.useMemo)(()=>({asPath:c,query:l,hash:s,push:u,replace:d}),[s,c,u,l,d])}},96615:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(2265);n(15355);var a=(0,n(13472).$)("edcfe1999a77c8cb1e1508cd0ef81ed1a01abfae");function i(){let[e,t]=(0,r.useState)({}),[n,i]=(0,r.useState)({});return(0,r.useEffect)(()=>{(async()=>{let{layout:e,aggregatorIds:n}=await a();t(e),i(n)})()},[]),{layout:e,aggregatorIds:n}}},96765:function(e){e.exports={mainContainer:"MainContainer_mainContainer__i0H2X"}}}]);