(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8995],{68327:function(e,t,n){Promise.resolve().then(n.bind(n,82778)),Promise.resolve().then(n.bind(n,92404))},67455:function(e,t,n){"use strict";n.d(t,{t:function(){return c}});var s=n(53083),i=n(46295);n(40257);let a={REVALIDATE_REQUEST_VALUE:"300",NEXT_PUBLIC_GTM_ID:"GTM-KPFSBHT",NEXT_PUBLIC_MTM_URL:"https://wa.finuslugi.ru",NEXT_PUBLIC_MTM_ID:"ivMbIHf9",NEXT_PUBLIC_CRAML_DIRTY_FEEDBACK:"http://craml-dirty-feedback.craml-rc.mpddev.moex.com",NEXT_PUBLIC_BASE_URL:"http://dev-rc.beta.moex.com",NEXT_PUBLIC_API_URL:"http://dev-rc.beta.moex.com",NEXT_PUBLIC_BFF_API_URL:"http://dev-rc.beta.moex.com/sc",NODE_ENV:"production",NEXT_PUBLIC_MP_SC_API:"http://mp-sc-api.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_S3_ASSETS:"https://dev-minio.beta.moex.com",NEXT_PUBLIC_PAGECONTENT_API:"http://mp-sc-api-page-content.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_MP_SC_REDIRECTS_API:"http://mp-sc-redirects.mp-rc.mpddev.moex.com"},o=()=>!1,l=()=>o()?{...(0,i.S)(),...a}:(0,i.S)(),r=(e,t)=>{let{isBFF:n,isMpScApi:s,isPageContent:i,isMpScRedirects:a}=t;return s?"".concat(e.NEXT_PUBLIC_BASE_URL,"/sc"):e.NEXT_PUBLIC_BASE_URL},c=async e=>{let{url:t,options:n={},config:i}=e,a=l(),o=r(a,n);if(!o)return console.error("Ошибка запроса: API endpoint не задан",t),{data:null,error:"API endpoint is not configured"};let c=0;try{c=performance.now();let e=await (0,s.Wg)(t,{baseURL:o,method:(null==i?void 0:i.method)||"GET",headers:{...null==i?void 0:i.headers},...i,timeout:3e3,retry:0,next:{revalidate:Number(a.REVALIDATE_REQUEST_VALUE)||300}}),n=performance.now()-c;return console.warn("Запрос ".concat(o).concat(t," занял ").concat(n.toFixed(2)," ms")),{data:e,error:null}}catch(e){var d;return null!==(d=e.status)&&void 0!==d||e.statusCode,console.error("Ошибка запроса","".concat(e,": ").concat(o).concat(t)),{data:null,error:e||"Unknown error"}}finally{}}},44197:function(e,t,n){"use strict";n.d(t,{j:function(){return d}});var s=n(57437),i=n(2265),a=n(80684),o=n(54365),l=n(51479),r=n(1900),c=n.n(r);let d=(0,i.memo)(e=>{let{onClick:t,text:n,href:r,target:d,iconColor:_="light",mainPageUrl:u,offPadding:p,widthMaxContent:m,className:g,icon:h}=e,x=(0,i.useCallback)(e=>r?(0,s.jsx)("a",{onClick:e.onClick,href:r,target:d,...e}):(0,s.jsx)("button",{onClick:e.onClick,...e}),[r,d]),v=h||a.IconFdsArrowUpRightSmallO;return(0,s.jsx)("div",{className:(0,o.Z)(c().linkWrapper,{[c().padding]:!p,[c().width]:m},g),onClick:()=>{(0,l.D)({eventCategory:u,eventActionType:l.i.link,eventActionText:n,eventLabel:r})},children:(0,s.jsxs)(x,{onClick:t,className:c().link,children:[n,(0,s.jsx)(v,{size:22,className:(0,o.Z)(c().icon,c()[_])})]})})});d.displayName="CheckFullInfoLink"},92404:function(e,t,n){"use strict";n.d(t,{Bonus:function(){return F}});var s=n(57437),i=n(2265),a=n(80684),o=n(35563),l=n(75461),r=n(31865),c=n(54365),d=n(67455);let _=async e=>{let{page:t,productTypeId:n,sort:s}=e;return(await (0,d.t)({url:"/api/v1/bonuses/active?page=".concat(t,"&rowsPerPage=6&isShownLk=true").concat(n?"&productTypeId=".concat(n):"").concat("&sortDirection=".concat(s||"DESC")),options:{isMpScApi:!0}})).data||{}},u=async function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"DESC";return(null===(e=(await (0,d.t)({url:"/api/v1/bonuses/grouped?limit=6&isShownLk=true&sortDirection=".concat(t),options:{isMpScApi:!0}})).data)||void 0===e?void 0:e.filter(e=>Array.isArray(e.data)&&e.data.length>0))||[]},p=async e=>(await (0,d.t)({url:"/api/v1/bonuses/promocodes?page=0&rowsPerPage=10",options:{isMpScApi:!0},config:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({promotionId:e,isShownLk:!0})}})).data||{promocodes:[]};var m=n(44197),g=n(2373),h=n(51479),x=n(71938),v=n(19392),f=n.n(v);let C=e=>{let{data:t,onClick:n,loading:i,loadingBtn:a}=e,o=(0,x.p)(t.endDate);return(0,s.jsxs)("div",{className:(0,c.Z)(f().wrapper,{[f().loading]:i}),onClick:n,children:[(0,s.jsx)("div",{className:f().imageWrapper,children:t.image&&(0,s.jsx)("img",{src:t.image.src,srcSet:"".concat(t.image.src,", ").concat(t.image.x2," 2x"),alt:"bg"})}),(0,s.jsx)("div",{className:f().chips,children:t.endDate&&(0,s.jsx)("label",{children:"до ".concat(o)})}),(0,s.jsxs)("div",{className:f().text,children:[(0,s.jsx)("div",{className:f().title,children:t.title}),t.importantConditions&&(0,s.jsx)("div",{className:f().description,children:t.importantConditions})]}),(0,s.jsx)(l.zx,{className:f().button,label:"Подробнее",size:"s",pending:i||a})]})};var b=n(33145),j=n(46295),B={src:"/service-main/_next/static/media/percent.c854cbab.svg",height:141,width:109,blurWidth:0,blurHeight:0},S=n(13466),N=n(53120),I=n(49689),y=n(42953),k=n(72361),T=n.n(k);let M=e=>{let[t,n]=(0,i.useState)(!1),o=(0,g.G)("lg");(0,i.useEffect)(()=>{n(!1)},[e.isOpen]);let r=e.data;if(!r)return null;let d=(0,x.p)(r.endDate),_=Array(o?11:10).fill("");return(0,s.jsxs)("div",{className:T().body,onKeyDown:t=>{"Enter"===t.key&&e.onClose()},children:[(0,s.jsx)("div",{className:T().imageWrapper,children:r.image&&(0,s.jsx)("img",{src:r.image.src,srcSet:"".concat(r.image.src,", ").concat(r.image.x2," 2x"),alt:"bg"})}),(0,s.jsx)("div",{className:T().chips,children:r.endDate&&(0,s.jsx)("label",{children:"до ".concat(d)})}),(0,s.jsx)("div",{className:T().title,children:r.title}),(0,s.jsx)("div",{className:T().info,dangerouslySetInnerHTML:{__html:r.importantConditions||""}}),r.rulesUrl&&(0,s.jsxs)("a",{className:T().file,href:"".concat(e.assetsUrl,"/mp-assets/").concat(r.rulesUrl),onClick:()=>{(0,h.D)({eventCategory:"skachat_pdf_fayl_iz_popup",eventActionType:h.i.link,eventActionText:"skachat_pdf_fayl",eventLabel:"".concat(e.assetsUrl,"/mp-assets/").concat(r.rulesUrl)})},children:[(0,s.jsx)(a.IconPdf,{}),"Подробности акции.PDF"]}),r.code&&(0,s.jsxs)("div",{className:(0,c.Z)(T().promocode,{[T().copied]:t}),children:[(0,s.jsx)("div",{className:T().leftShape}),(0,s.jsx)("div",{className:T().dots,children:_.map((e,t)=>(0,s.jsx)("div",{},t))}),(0,s.jsxs)("div",{className:T().rightShape,children:[(0,s.jsx)("div",{className:T().code,children:r.code}),(0,s.jsxs)("div",{className:T().codeButton,onClick:()=>((0,h.D)({eventCategory:"",eventActionType:h.i.button,eventActionText:"copi_promokod",eventLabel:"номер промокода ".concat(r.code)}),n(!0),navigator.clipboard.writeText(r.code||""),!1),children:[t?(0,s.jsx)(a.IconFdsCheckCircleO,{}):(0,s.jsx)(a.IconFdsCopyO,{}),t?"Скопировано":"Скопировать промокод"]})]}),(0,s.jsx)(b.default,{src:B,alt:"%"})]}),(0,s.jsx)("div",{className:T().buttonActions,children:(0,s.jsx)(l.zx,{as:"a",href:y.LK,size:"m",className:T().button,label:"Зарегистрироваться на Финуслугах",onClick:()=>{(0,h.D)({eventCategory:"aktsii_spetspredlozheniya_popup",eventActionType:h.i.button,eventActionText:"Зарегистрироваться на Финуслугах",eventLabel:"perekhod_na_/registration"})}})})]})},A=e=>{let t=(0,j.S)(),n=(0,g.G)("lg");return(0,s.jsxs)(S.h,{children:[!n&&(0,s.jsx)(N.d,{rowTitle:!0,titleAlign:"center",contentClassName:T().content,isOpen:e.isOpen,onClose:e.onClose,width:"628px",children:(0,s.jsx)(M,{...e,assetsUrl:t.NEXT_PUBLIC_S3_ASSETS})}),n&&(0,s.jsx)(I.j,{className:(0,c.Z)(T().mobilePopup),contentClassName:T().content,isOpen:e.isOpen,onClose:e.onClose,children:(0,s.jsx)(M,{...e,assetsUrl:t.NEXT_PUBLIC_S3_ASSETS})})]})},L=["App","Bonus","Enshurence","Finuslugi","fruit_box","Girl_calculate","Identification","Money_save","Money_transfer_2","Money","Signature","Success"],E=e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)},w=e=>{let t=(0,j.S)(),n=L.map(e=>({src:"".concat(t.NEXT_PUBLIC_S3_ASSETS,"/mp-assets/images/bonus/").concat(e,".png"),x2:"".concat(t.NEXT_PUBLIC_S3_ASSETS,"/mp-assets/images/bonus/").concat(e,"2.png")})),s=[],i=[];for(let t of e){s.length||s.push(...n);let e=E(t.title)%s.length,a=s[e];i.push({...t,image:a}),s.splice(e,1)}return i};var D=n(17599),P=n.n(D);let U="Акции и спецпредложения",W=e=>{let{isIncreaseSort:t,setIsIncreaseSort:n}=e;return(0,s.jsxs)("button",{type:"button",className:(0,c.Z)(P().sortButton),onClick:()=>n(!t),children:[t?(0,s.jsx)(a.IconFdsSortDescendingO,{size:22}):(0,s.jsx)(a.IconFdsSortAscendingO,{size:22}),(0,s.jsx)("span",{children:"По дате"})]})},F=e=>{let{tagsData:t}=e,n=(0,g.G)("lg"),[a,d]=(0,i.useState)(null),[x,v]=(0,i.useState)(t),[f,b]=(0,i.useState)([]),[j,B]=(0,i.useState)(!1),S=x.findIndex(e=>{let{id:t}=e;return t===a})||0,N=S>-1?S:0,I=f.length&&j?f:x,y=f.length&&j?b:v,k=I[N],T=(null==k?void 0:k.data)||[],[M,L]=(0,i.useState)(null),[E,D]=(0,i.useState)(!1),[F,R]=(0,i.useState)(!1),[z,O]=(0,i.useState)(null),X=w(T),K=e=>()=>{(0,h.D)({eventCategory:"popup_aktsii",eventActionType:h.i.offer,eventActionText:e.title}),O(e.id),p(e.id).then(t=>{var n;let{promocodes:s}=t,i=new Date,a=s.filter(e=>{let{appliesFrom:t,appliesTo:n}=e;return new Date(t)<=i&&i<=new Date(n)});L({...e,code:(null===(n=a[0])||void 0===n?void 0:n.code)||""})}).finally(()=>O(null))},Z=e=>{(0,h.D)({eventCategory:"click_top_element",eventActionType:h.i.button,eventActionText:e?"element_po_ubyvaniyu":"element_po_vozrastaniyu",eventLabel:"По дате"}),f.length||(R(!0),u("ASC").then(e=>{b((null==e?void 0:e.map(e=>({...e,hasMore:e.data.length>=6,page:0})))||[]),R(!1)})),B(e)},G=(e,t)=>()=>{(0,h.D)({eventCategory:"click_top",eventActionType:h.i.chip,eventActionText:t||"",eventLabel:t}),d(e||null)};return(0,s.jsxs)("main",{className:P().page,children:[(0,s.jsxs)(o.W2,{children:[(0,s.jsx)(l.Oo,{style:{padding:"16px 0"},items:[{href:"/",label:"Главная"},{label:U}]}),(0,s.jsx)("h1",{className:P().title,children:U}),X.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:P().filters,children:[(0,s.jsxs)(o.W2,{className:P().chips,children:[n&&(0,s.jsx)(W,{isIncreaseSort:j,setIsIncreaseSort:Z}),x.map((e,t)=>{let{id:n,name:i}=e;return(0,s.jsx)("div",{className:(0,c.Z)({[P().selected]:t===N}),onClick:G(n,i),children:i},n||i)})]}),!n&&(0,s.jsx)(W,{isIncreaseSort:j,setIsIncreaseSort:Z})]}),(0,s.jsx)("div",{className:P().grid,children:X.map((e,t)=>(0,s.jsx)(C,{data:e,onClick:K(e),loading:F,loadingBtn:e.id===z},t))}),(null==k?void 0:k.hasMore)&&(0,s.jsx)("div",{className:P().pagination,children:(0,s.jsx)(l.zx,{label:"Показать еще",variant:"secondary",onClick:()=>{(0,h.D)({eventCategory:"aktsii_spetspredlozheniya",eventActionType:h.i.button,eventActionText:"Показать еще"}),D(!0),_({page:k.page+1,productTypeId:a,sort:j?"ASC":"DESC"}).then(e=>{let t=e.promotions||[],n=e.pagination||{};y(e=>{let s=[...e],i={...k,data:[...k.data,...t],hasMore:k.page+2<(n.totalPages||0),page:k.page+1};return s[N]=i,s}),D(!1)})},pending:E})})]}):(0,s.jsx)(r.ErrorPageWidget,{title:"Сейчас нет активных акций — но вы не потеряете выгоду",subtitle:"Переходите к лучшим предложениям на маркетплейсе",buttonText:"Перейти",className:P().emptyListWidget}),(0,s.jsx)(m.j,{className:P().fullInfoLink,mainPageUrl:"aktsii_spetspredlozheniya",href:"https://finuslugi.ru/disclosure?anchor=documents",target:"_self",text:"Завершенные акции"})]}),(0,s.jsx)(A,{data:M,isOpen:!!M,onClose:()=>L(null)})]})}},42953:function(e,t,n){"use strict";n.d(t,{C:function(){return i},LK:function(){return s}});let s="https://lk.finuslugi.ru/registration/",i="https://assets.finuslugi.ru/mp-assets/docs/main-documents/regulation_review_procedure/regulation_review_procedure.pdf"},71938:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var s=n(40044),i=n(86532);function a(e,t){let{format:n="dd.MM.yyyy"}=null!=t?t:{};try{let t="string"==typeof e?new Date(e):e;return(0,s.WU)(t,n,{locale:i.ru})}catch(t){return"string"==typeof e?e:e.toString()}}},1900:function(e){e.exports={linkWrapper:"CheckFullInfoLink_linkWrapper__MewQV",width:"CheckFullInfoLink_width__wZeUL",padding:"CheckFullInfoLink_padding__Lh4bJ",link:"CheckFullInfoLink_link__7whuk",icon:"CheckFullInfoLink_icon__fQD9U",light:"CheckFullInfoLink_light__lJeRc",white:"CheckFullInfoLink_white__MzFzv"}},17599:function(e){e.exports={title:"Bonus_title__burQb",page:"Bonus_page__mIpwn",filters:"Bonus_filters__dsGlw",chips:"Bonus_chips__47fDo",sortChip:"Bonus_sortChip__wHIwv",selected:"Bonus_selected__VqAVC",sort:"Bonus_sort__qfnJa",grid:"Bonus_grid__6hvY2",pagination:"Bonus_pagination__OZ1_9",emptyListWidget:"Bonus_emptyListWidget__4azBT",sortButton:"Bonus_sortButton__jmAcg",fullInfoLink:"Bonus_fullInfoLink___rFln"}},19392:function(e){e.exports={wrapper:"BonusCard_wrapper__maKLU",loading:"BonusCard_loading__jTpML",imageWrapper:"BonusCard_imageWrapper__5ASsX",text:"BonusCard_text__9G6R2",chips:"BonusCard_chips__KASKR",bgImg:"BonusCard_bgImg__FP__a",bgImgM:"BonusCard_bgImgM___cDSd",img:"BonusCard_img__gmTQV",imgM:"BonusCard_imgM__8nK9b",gradient:"BonusCard_gradient__yuPMG",title:"BonusCard_title__Hc0Uh",description:"BonusCard_description__0lWCI",button:"BonusCard_button__ndixu"}},72361:function(e){e.exports={content:"BonusDetailModal_content__ZK4uH",buttonActions:"BonusDetailModal_buttonActions__Uqy9m",button:"BonusDetailModal_button__dQ7ho",mobilePopup:"BonusDetailModal_mobilePopup__RMlmv",body:"BonusDetailModal_body__2Dx_j",imageWrapper:"BonusDetailModal_imageWrapper__z2Nv_",bgImg:"BonusDetailModal_bgImg__YBbTU",bgImgM:"BonusDetailModal_bgImgM__CEAmL",img:"BonusDetailModal_img__xqlRm",imgM:"BonusDetailModal_imgM__P7j9e",gradient:"BonusDetailModal_gradient__daMJE",chips:"BonusDetailModal_chips__K0LKN",title:"BonusDetailModal_title__W0pYn",info:"BonusDetailModal_info__AaeMF",file:"BonusDetailModal_file__bgsKu",promocode:"BonusDetailModal_promocode__vGFCJ",leftShape:"BonusDetailModal_leftShape__rJkgZ",dots:"BonusDetailModal_dots__0RRq8",rightShape:"BonusDetailModal_rightShape__ZEWcA",code:"BonusDetailModal_code__4u0IF",codeButton:"BonusDetailModal_codeButton__7CeEk",copied:"BonusDetailModal_copied__iyOtr"}},31865:function(e,t,n){"use strict";n.d(t,{ErrorPageWidget:function(){return c}});var s=n(57437),i=n(35563),a=n(75461),o=n(54365);let l=(0,n(52074).g)("error-page-widget","sc"),r=Object.freeze({errorPageWidget:"".concat(l),wrapper:"".concat(l,"__wrapper"),main:"".concat(l,"__main"),picture:"".concat(l,"__picture"),img:"".concat(l,"__img"),text:"".concat(l,"__text"),button:"".concat(l,"__button"),buttonMobile:"".concat(l,"__button-mobile")}),c=e=>{let{variant:t="404",showcaseUrl:n="https://finuslugi.ru",minioUrl:l="https://assets.finuslugi.ru/mp-assets",className:c,isHomePage:d,title:_,subtitle:u,buttonText:p}=e,m="404"===t,g=d?"Обновить":"На Главную",h=()=>{d?window.location.reload():window.open("".concat(n,"/"),"_self")};return(0,s.jsx)("div",{className:(0,o.Z)(r.errorPageWidget,c),children:(0,s.jsx)(i.W2,{children:(0,s.jsxs)("div",{className:r.wrapper,children:[(0,s.jsxs)("div",{className:r.main,children:[(0,s.jsxs)("div",{className:r.text,children:[(0,s.jsx)("h1",{dangerouslySetInnerHTML:{__html:null!=_?_:m?"Страница не найдена":"Сервис временно<br>недоступен"}}),(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:null!=u?u:m?"Похоже, ссылка устарела или содержит ошибку":"Мы уже исправляем проблему  – попробуйте зайти через несколько минут или обновить страницу "}})]}),(0,s.jsx)(a.zx,{className:r.button,label:null!=p?p:g,onClick:h,size:"s"})]}),(0,s.jsxs)("picture",{className:r.picture,children:[(0,s.jsx)("source",{srcSet:"".concat(l,"/widgets/ErrorPageWidget/cat_error_d.png"),media:"(min-width: 1024px)",width:696,height:452}),(0,s.jsx)("source",{srcSet:"".concat(l,"/widgets/ErrorPageWidget/cat_error_m.png"),media:"(max-width: 1023px)",width:311,height:200}),(0,s.jsx)("img",{src:"".concat(l,"/widgets/ErrorPageWidget/cat_error_m.png"),alt:"Что-то не работает",className:r.img,loading:"eager"})]}),(0,s.jsx)(a.zx,{className:r.buttonMobile,label:null!=p?p:g,onClick:h,size:"s"})]})})})}}},function(e){e.O(0,[3859,2889,3544,5501,207,6810,3317,5878,1835,6559,3201,2971,2117,1744],function(){return e(e.s=68327)}),_N_E=e.O()}]);