(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{18728:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Layout:()=>y});var a=r(95155),n=r(12115),s=r(67127),i=r.n(s),o=r(20063),l=r(68321),c=r(12609),u=r(55948),d=r(2821);let v={promobizness:!0,guruleads:!0,leadssu:!0,admitad:!0,agents:!0};var p=r(97090);let m=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,a=(0,p.p)("NEXT_PUBLIC_BASE_URL")||"",n=window.location.host.indexOf("localhost")>=0?"":"; domain=".concat(["",...a.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join(".")),s=new Date(new Date().getTime()+24*r*36e5).toUTCString();document.cookie="".concat(e,"=").concat(JSON.stringify(t),"; SameSite=Strict").concat(/^https:\/\//gi.test(a)?"; Secure":"").concat(n,"; expires=").concat(s,"; path=/;")};var h=r(43169);let _=["/bpif","/otkryt-brokerskiy-schet"],g=["/kupit-aktsii"];var f=r(55891),b=r.n(f);let y=e=>{let{children:t,data:r}=e,s=(0,o.usePathname)(),f=_.includes(s)||g.some(e=>s.startsWith(e)),y=(0,n.useMemo)(()=>1===s.length?"/brokers":"/brokers".concat(s),[s]);return(0,n.useEffect)(()=>{window&&((0,h.FT)(y),(e=>{let t=((e,t)=>{var r;let a="hash"===t?null==e||null==(r=e.split("#")[1])?void 0:r.split("?")[0]:null==e?void 0:e.split("?")[1];return(a?a.split("&"):[]).reduce((e,t)=>{let[r,a]=t.split("=");return r&&a?{...e,[r]:a}:e},{})})(e,"search");if(t&&t.aggregator_id){let e,a={...t,create_date:new Date().toISOString()};try{var r;e=JSON.parse((null==(r=(()=>{if(document.cookie)return Object.fromEntries(document.cookie.split("; ").map(e=>e.split("=")))})())?void 0:r.cpa_click)||"{}")}catch(e){return}e=a;let n={event:"data-event",eventCategory:t.aggregator_id,eventAction:"CPA_click",eventLabel:window.location.pathname,eventValue:t.utm_term||t.click_id,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:"affiliate"};v[t.aggregator_id]&&(m("cpa_click",e,30),(0,h.oA)(n))}})(y))},[y]),(0,a.jsxs)("div",{className:(0,d.A)(b().layout),children:[(0,a.jsx)(a.Fragment,{children:t}),f&&(null==r?void 0:r.support)&&(0,a.jsx)(u.E,{appCard:r.support.value.appCard,phoneCard:r.support.value.phoneCard,s3Assets:(0,p.p)("NEXT_PUBLIC_S3_ASSETS_URL")}),(null==r?void 0:r.footer)&&(0,a.jsx)(c.F,{data:r.footer.value,showcaseUrl:(0,p.p)("NEXT_PUBLIC_BASE_URL"),minioUrl:(0,p.p)("NEXT_PUBLIC_S3_ASSETS")}),(0,a.jsx)(i(),{children:(0,a.jsx)("link",{rel:"stylesheet",crossOrigin:"use-credentials",href:"https://assets.finuslugi.ru/mp-assets/widgets/support/index-BuAapbJQ.css"})}),(0,a.jsx)(l.default,{type:"module",crossOrigin:"use-credentials",src:"https://assets.finuslugi.ru/mp-assets/widgets/support/index-D2xclPDV.js"})]})}},33546:(e,t,r)=>{Promise.resolve().then(r.bind(r,25156)),Promise.resolve().then(r.t.bind(r,57272,23)),Promise.resolve().then(r.t.bind(r,23574,23)),Promise.resolve().then(r.t.bind(r,60173,23)),Promise.resolve().then(r.t.bind(r,75839,23)),Promise.resolve().then(r.bind(r,22191)),Promise.resolve().then(r.bind(r,75870)),Promise.resolve().then(r.bind(r,87015)),Promise.resolve().then(r.bind(r,49155)),Promise.resolve().then(r.t.bind(r,41402,23)),Promise.resolve().then(r.t.bind(r,58113,23)),Promise.resolve().then(r.bind(r,18728)),Promise.resolve().then(r.bind(r,61804)),Promise.resolve().then(r.bind(r,86277))},43169:(e,t,r)=>{"use strict";r.d(t,{FT:()=>i,oA:()=>s});var a=r(10320);let n=[{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"}],s=(e,t)=>{if(void 0!==window.dataLayer){let r=sessionStorage.getItem("pushedEvents"),n=r?JSON.parse(r):[],s=n.find(r=>r.eventCategory===e.eventCategory&&r.eventAction===e.eventAction&&r.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===r.url));if(!t||!s){if(t){let t={...e};t.url=window.location.pathname,n.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(n))}(0,a.Fj)(e)}}},i=e=>{for(let t of n)if(e.indexOf(t.path)>=0){let r=e.match(/str_(\d+)/),a=Array.isArray(r)&&r[1]?Number(r[1]):1;setTimeout(()=>{s({event:"data-event",eventCategory:t.category,eventAction:"stay_15_seconds",eventLabel:e,eventValue:"".concat(a)})},15e3);return}}},55891:e=>{e.exports={layout:"Layout_layout__AU2d9"}},58113:()=>{},61804:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Portal:()=>i});var a=r(95155),n=r(12115),s=r(47650);let i=e=>{let{children:t,id:r="portal-root"}=e,[i,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{var e;let t=null==(e=document)?void 0:e.getElementById(r);if(t)return o(t);let a=document.createElement("div");return a.id=r,document.body.appendChild(a),o(a),()=>{document.body.removeChild(a)}},[r]),(0,a.jsx)(a.Fragment,{children:i&&t&&(0,s.createPortal)(t,i)})}},86277:(e,t,r)=>{"use strict";r.r(t),r.d(t,{useIntervalOnFn:()=>n});var a=r(12115);let n=e=>{let{refreshFn:t,interval:r=1e4,immediate:n=!0,onError:s}=e,i=(0,a.useRef)(!0),o=(0,a.useRef)(null),l=(0,a.useRef)(!1),c=(0,a.useCallback)(async()=>{if(!l.current){l.current=!0;try{await t()}catch(e){s&&s(e),console.error("Refresh failed:",e)}finally{l.current=!1}}},[t,s]),u=(0,a.useCallback)(()=>{o.current&&(clearInterval(o.current),o.current=null),n&&c(),o.current=window.setInterval(()=>{i.current&&c()},r)},[c,r,n]),d=(0,a.useCallback)(()=>{o.current&&(clearInterval(o.current),o.current=null)},[]),v=(0,a.useCallback)(async()=>{i.current&&await c()},[c]);return(0,a.useEffect)(()=>(i.current=!0,u(),()=>{i.current=!1,d()}),[u,d]),{refreshNow:v,stopInterval:d,startInterval:u}}},97090:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var a=r(61126);function n(e){return(0,a.env)(e)}}},e=>{e.O(0,[6167,8362,5856,7811,4653,7098,5188,4725,8441,1255,7358],()=>e(e.s=33546)),_N_E=e.O()}]);