(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[683],{1570:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});var s=n(5893);n(7294);var c=n(448),i=n.n(c);function a(e){let{title:t,subtitle:n,dark:c,align:a}=e;return(0,s.jsx)("div",{className:"".concat(i().blockHeader," ").concat(c?i().isDark:""),children:(0,s.jsxs)("div",{className:i().blockHeaderContainer,children:[(0,s.jsx)("div",{className:i().title,style:{textAlign:a||"center"},children:t}),n&&(0,s.jsx)("div",{className:i().subtitle,children:n})]})})}},6110:function(e,t,n){"use strict";n.d(t,{Y:function(){return u}});var s=n(5893),c=n(5675),i=n.n(c),a=n(1570),o=n(6545),r={src:"/_next/static/media/stock_call_manager.14c68542.jpg",height:3840,width:5760,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoKCgoKCgsMDAsPEA4QDxYUExMUFiIYGhgaGCIzICUgICUgMy03LCksNy1RQDg4QFFeT0pPXnFlZXGPiI+7u/sBCgoKCgoKCwwMCw8QDhAPFhQTExQWIhgaGBoYIjMgJSAgJSAzLTcsKSw3LVFAODhAUV5PSk9ecWVlcY+Ij7u7+//CABEIAAUACAMBIgACEQEDEQH/xAAoAAEBAAAAAAAAAAAAAAAAAAAABgEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAALQV/8QAHhAAAQMEAwAAAAAAAAAAAAAAAwEEEgACBREUMTP/2gAIAQEAAT8AybtWQhFjNeSIHevW+G6//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPwB//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwB//9k=",blurWidth:8,blurHeight:5},l=n(2617),d=n.n(l);function u(e){let{currentCity:t,title:n,subtitle:c,greyBackground:l}=e;return(0,s.jsxs)("div",{className:"".concat(d().callBlock," ").concat(l?d().greyBackground:""),children:[(0,s.jsx)(a.t,{title:"Позвоните нам, чтобы бесплатно проконсультироваться",subtitle:"или вызвать специалиста для оценки стоимости работ"}),(0,s.jsxs)("div",{className:d().callContainer,children:[(0,s.jsx)("div",{className:d().column,children:(0,s.jsx)(i(),{src:r,alt:"call manager",width:500,height:300})}),(0,s.jsx)("div",{className:d().column,children:(0,s.jsx)(o.y,{slug:"",currentCity:t})})]})]})}},6545:function(e,t,n){"use strict";n.d(t,{y:function(){return h}});var s=n(5893),c=n(7294),i=n(4651),a=n(9200),o=n(3013),r=n.n(o),l=n(6725),d=n(1163),u=n(1987);function h(e){let{slug:t,choosenService:n,worktypeName:o,currentCity:h}=e,{handleNameChange:m,handlePhoneChange:v,isFormSent:x,checked:p,sendFormHandler:f,pending:j,setChecked:g,name:A,phone:N}=function(e){let t;let{slug:n,worktypeName:s,choosenService:i}=e,[a,o]=(0,c.useState)(""),[r,h]=(0,c.useState)(""),[_,m]=(0,c.useState)(!0),[v,x]=(0,c.useState)(!1),[p,f]=(0,c.useState)(!1),[j,g]=(0,c.useState)(null),A=(0,d.useRouter)(),N=A.asPath,{query:k}=(0,u.parse)(N,!0),{utm_source:y,utm_term:B,utm_campaign:L,utm_content:C,utm_medium:M}=k;return(0,c.useEffect)(()=>{let e={};Object.keys(k).filter(e=>e.includes("utm")).forEach(t=>{e={...e,[t]:k[t]}}),(y||B||L||C||M)&&g(e)},[]),{name:a,phone:r,checked:_,isFormSent:v,pending:p,handlePhoneChange:function(e){return e.startsWith("+7 (8")?h("+7 ("):e.startsWith("+7 (7")?h("+7 ("):h(e)},handleNameChange:function(e){clearTimeout(t),t=setTimeout(()=>{o(e)},200)},sendFormHandler:function(){f(!0),fetch("https://".concat(l._,"/api/sendForm"),{method:"POST",body:JSON.stringify({name:a,phone:r,client:n,worktype:s,service:i?i.name:"",utms:{utm_source:j?j.utm_source:"",utm_campaign:j?j.utm_campaign:"",utm_term:j?j.utm_term:"",utm_content:j?j.utm_content:"",utm_medium:j?j.utm_medium:"",...j}}),headers:{"Content-Type":"application/json"}}).then(e=>{x(!0),f(!1)}).catch(e=>{console.error("Error:",e)})},setChecked:m}}({slug:t,worktypeName:o,choosenService:n}),[k,y]=(0,c.useState)(!1),B=()=>y(!k);return(0,s.jsxs)("div",{id:"form",className:r().form,children:[(0,s.jsx)("div",{className:r().formItem,children:n?(0,s.jsxs)("div",{className:r().choosenService,children:[(0,s.jsx)("div",{className:r().choosenServiceTitle,children:"Выбранная услуга:"}),(0,s.jsxs)("div",{className:r().info,children:[(0,s.jsx)("div",{className:r().choosenServiceName,children:n.name}),(0,s.jsx)("div",{className:r().separator}),(0,s.jsxs)("div",{className:r().choosenServicePrice,children:[n.prices[0].price," ₽"]})]})]}):null}),(0,s.jsxs)("div",{className:r().formItem,children:[(0,s.jsx)(a.__,{for:"name",children:"Имя"}),(0,s.jsx)(a.II,{id:"name",name:"name",placeholder:"Напишите ваше имя",type:"text",onChange:e=>m(e.target.value)})]}),(0,s.jsxs)("div",{className:r().formItem,children:[(0,s.jsx)(a.__,{for:"phone",children:"Телефон"}),(0,s.jsx)(i.v,{id:"phone",placeholder:"+7 (___) ___-__-__",name:"phone",onChange:e=>v(e.target.value),mask:"+7 (___) ___-__-__",replacement:{_:/\d/},className:"form-control",value:N})]}),(0,s.jsx)("div",{className:r().formItem,children:x?(0,s.jsx)(a.zx,{disabled:!0,children:"Спасибо за заявку!"}):(0,s.jsx)(a.zx,{disabled:!(p&&N.length>0&&A.length>0),onClick:f,type:"submit",children:j?(0,s.jsx)(a.$j,{color:"light",children:"Loading..."}):"Отправить заявку"})}),(0,s.jsxs)("div",{className:r().checkboxItem,children:[(0,s.jsx)(a.II,{onClick:()=>g(!p),onChange:()=>g(!p),checked:!!p&&p,type:"checkbox"})," ",(0,s.jsxs)(a.__,{onClick:()=>g(!p),check:!0,children:["Даю согласие на обработку данных в соответствии с"," ",(0,s.jsx)("span",{className:r().link,onClick:B,children:"политикой конфедициальности"})]}),(0,s.jsx)(_,{isOpen:k,toggle:B,text:null==h?void 0:h.city.userAgreement})]})]})}function _(e){let{isOpen:t,toggle:n,text:c}=e;return(0,s.jsxs)(a.u_,{isOpen:t,toggle:n,className:r().caseModal,children:[(0,s.jsx)(a.xB,{close:(0,s.jsx)(m,{modalAction:n})}),(0,s.jsx)(a.fe,{children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:c}})})]})}function m(e){return(0,s.jsx)("div",{className:r().closeButton,onClick:e.modalAction})}},6655:function(e,t,n){"use strict";n.d(t,{a:function(){return o}});var s=n(5893),c=n(9200),i=n(2450),a=n.n(i);function o(){return(0,s.jsx)("div",{className:a().loader,children:(0,s.jsx)(c.$j,{})})}},5674:function(e,t,n){"use strict";n.d(t,{$:function(){return m}});var s=n(5893),c=n(1664),i=n.n(c),a=n(7294),o=n(9200),r=n(4233),l=n(9420),d={src:"/_next/static/media/ok_icon.4c1f9d69.svg",height:2175,width:1258,blurWidth:0,blurHeight:0},u=n(549),h=n.n(u),_={src:"/_next/static/media/vk_icon.a038fd3d.svg",height:40,width:40,blurWidth:0,blurHeight:0};function m(e){let{currentCity:t}=e;if(!t)return(0,s.jsx)(s.Fragment,{children:"..."});let n=(0,r.BF)(t);return(0,s.jsxs)("div",{className:h().footer,children:[(0,s.jsxs)("div",{className:h().footerContainer,children:[(0,s.jsxs)("div",{className:"".concat(h().about," ").concat(h().footerItem),children:[(0,s.jsx)("div",{className:h().footerTitle,children:"О компании"}),(0,s.jsxs)("div",{className:h().footerLinks,children:[(0,s.jsx)("a",{href:"/about",children:"О компании"}),(0,s.jsx)("a",{href:"#",children:"Новости"}),(0,s.jsx)("a",{href:"#",children:"Отзывы"}),(0,s.jsx)("a",{href:"https://work.alpateks.ru",children:"Вакансии"}),(0,s.jsx)("a",{href:"#",children:"Контакты"})]})]}),(0,s.jsxs)("div",{className:"".concat(h().clients," ").concat(h().footerItem),children:[(0,s.jsx)("div",{className:h().footerTitle,children:"Клиентам"}),(0,s.jsx)("div",{className:h().footerLinks,children:n.map((e,t)=>(0,s.jsx)(i(),{href:e.link,children:e.item},t))})]}),(0,s.jsxs)("div",{className:"".concat(h().services," ").concat(h().footerItem),children:[(0,s.jsx)("div",{className:h().footerTitle,children:"Услуги"}),(0,s.jsx)("div",{className:h().footerLinks,children:null==t?void 0:t.city.worktype.map((e,t)=>(0,s.jsx)(v,{workType:e,i:t},t))})]}),(0,s.jsxs)("div",{className:"".concat(h().contacts," ").concat(h().footerItem),children:[(0,s.jsx)("div",{className:h().footerTitle,children:"Контакты"}),(0,s.jsxs)("div",{className:h().footerContacts,children:[(0,s.jsx)("div",{className:h().address,children:null==t?void 0:t.city.address}),(0,s.jsxs)("div",{className:h().phone,children:[(0,s.jsx)("a",{href:"tel:".concat(null==t?void 0:t.city.phone),children:null==t?void 0:t.city.phone}),(0,s.jsxs)("div",{className:h().workingTime,children:[null==t?void 0:t.city.time_from," - ",null==t?void 0:t.city.time_to]})]}),(null==t?void 0:t.city.extra_phone)&&(null==t?void 0:t.city.extra_phone_description)&&(0,s.jsxs)("div",{className:h().extra_phone,children:[(0,s.jsx)("div",{className:h().extra_phone_description,children:null==t?void 0:t.city.extra_phone_description}),(0,s.jsx)("a",{href:"tel:".concat(null==t?void 0:t.city.extra_phone),children:null==t?void 0:t.city.extra_phone})]}),(0,s.jsx)("div",{className:h().email,children:(0,s.jsx)("a",{href:"mailto:".concat(null==t?void 0:t.city.email),children:null==t?void 0:t.city.email})}),(null==t?void 0:t.city.credentials)&&(0,s.jsx)("div",{className:h().credentials,children:null==t?void 0:t.city.credentials}),(0,s.jsxs)("div",{className:h().social,children:[(0,s.jsx)("a",{className:"".concat(h().socilaButton," ").concat(h().vk),href:"https://vk.com/alpateks_industrial_alpinism",target:"_blank",children:(0,s.jsx)("img",{src:_.src,alt:"vk icon"})}),(0,s.jsx)("a",{href:"https://ok.ru/group/70000002878831",className:"".concat(h().socilaButton," ").concat(h().ok),children:(0,s.jsx)("img",{src:d.src,alt:"ok icon"})})]})]})]})]}),(0,s.jsx)("div",{className:h().copywrite,children:(0,s.jsxs)("span",{children:["\xa9 2015 - ",new Date().getFullYear()," ООО \xabАльпатекс\xbb "]})})]})}function v(e){let{workType:t,i:n}=e,[c,r]=a.useState(!1);return(0,s.jsxs)(i(),{id:"tooltip_".concat(n),href:"/".concat(t.slug),children:[(0,s.jsx)("span",{children:(0,l.t)(t.name,14)}),t.name.length>14?(0,s.jsx)(o.u,{isOpen:c,target:"tooltip_".concat(n),toggle:()=>r(!c),children:t.name}):null]})}},6246:function(e,t,n){"use strict";n.d(t,{k:function(){return l}});var s=n(5893);n(7294);var c=n(480),i=n.n(c),a=n(6725),o=n(1664),r=n.n(o);function l(e){let{filteredServices:t,openSearchBar:n,isMain:c,host:o,slug:l}=e,d=e=>{let t=c?e.slug:"http://".concat(l,".").concat(o).concat(e.slug);return t};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:i().searchBarItemList,children:t?t.map((e,t)=>(0,s.jsxs)(r(),{className:i().serviceItem,href:d(e),onClick:n,children:[(0,s.jsx)("img",{src:"http://".concat(a._).concat(e.image),alt:e.name,className:i().serviceImage}),(0,s.jsx)("div",{className:i().serviceName,children:e.name})]},t)):null})})}},4233:function(e,t,n){"use strict";n.d(t,{BF:function(){return i},zh:function(){return a}}),n(7294);var s=n(5660);let c=[{item:"Частным клиентам",link:"/clients",id:"private_clients"},{item:"ТСЖ и УК",link:"/tszh-and-uk",id:"tszh"},{item:"Промпредприятиям",link:"/prompredpriyatiya",id:"industrial_company"},{item:"Муниципальным учреждениям",link:"/municipal",id:"municipal_organization"},{item:"Торги",link:"/223fz",id:"auction"},{item:"О компании",link:"/about",id:"about"}];function i(e,t){if(!e&&!t)return[];let n=[],i=(0,s.r)("current_client")||t;return c.map(t=>(t.link==="/".concat(i)?t.isActive=!0:t.isActive=!1,(null==e?void 0:e.city.clients[t.id])&&n.push(t),"about"===t.id&&n.push(t),null)),n}function a(e,t){let n=(0,s.r)("current_client");return e==="/".concat(n)}},9093:function(e,t,n){"use strict";n.d(t,{h:function(){return er}});var s=n(5893),c=n(7294),i=n(2133),a=n(9622),o=n(9200),r=n(4233),l=n(5675),d=n.n(l),u=n(6965),h=n.n(u),_=n(6725),m=n(1664),v=n.n(m);let x=(e,t)=>(null==e?void 0:e.includes(t))?e:"".concat(t,".").concat(e);function p(e){let{serviceItems:t,host:n,slug:i}=e,[a,r]=(0,c.useState)(!1),l=()=>r(!a);return(0,s.jsxs)("div",{className:h().AllServicesList,children:[(0,s.jsx)("div",{onClick:l,className:h().AllServicesListButton,children:"Показать все"}),(0,s.jsxs)(o.u_,{className:h().modal,isOpen:a,toggle:l,children:[(0,s.jsx)(o.xB,{toggle:l,children:"Все виды работ в этом городе"}),(0,s.jsx)(o.fe,{children:(0,s.jsx)("div",{className:h().services,children:t.map((e,t)=>(0,s.jsxs)(v(),{className:h().serviceItem,onClick:l,href:"http://".concat(x(n,i),"/").concat(e.slug),children:[(0,s.jsx)("div",{className:h().servieImage,children:(0,s.jsx)(d(),{src:"http://".concat(_._,"/").concat(e.icon),alt:e.name,width:30,height:30})}),(0,s.jsx)("div",{className:h().name,children:e.name})]},t))})})]})]})}var f={src:"/_next/static/media/map-pin.beb3fa05.svg",height:32,width:32,blurWidth:0,blurHeight:0},j=n(6154);async function g(){let e=await j.Z.get("http://localhost/api/cities/all");return e}let A={coords:{latitude:56.0267295,longitude:92.8657339}};function N(e){return e*(Math.PI/180)}function k(){let[e,t]=(0,c.useState)([]),[n,s]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{let e=g();e.then(e=>{t(e.data),s(!1)})},[t]),{cities:e,isLoading:n}}var y=n(4616),B=n.n(y);function L(){let{nearestCity:e}=function(){let{location:e}=function(){let[e,t]=(0,c.useState)(),n=(0,c.useCallback)(e=>{let n=e.coords.latitude,s=e.coords.longitude;t({coords:{latitude:n,longitude:s}})},[t]);return(0,c.useEffect)(()=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(n):(console.log("Geolocation is not supported by this browser."),t(A))},[n]),{location:e}}(),{cities:t}=k(),n=(0,c.useMemo)(()=>(function(e,t,n){let s,c;if(t&&n){for(let i of e){let e=parseFloat(i.lat),a=parseFloat(i.lon),o=N(e-n),r=N(a-t),l=Math.sin(o/2)*Math.sin(o/2)+Math.cos(N(n))*Math.cos(N(e))*Math.sin(r/2)*Math.sin(r/2),d=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),u=6371*d;if(0===u)return s=u,i;(!s||s>u)&&(s=u,c=i)}return c}})(t,null==e?void 0:e.coords.latitude,null==e?void 0:e.coords.longitude),[t,e]);return{nearestCity:n}}(),{cityFromURL:t}=function(){let e=window.location.host.split("."),t=k(),n=(0,c.useMemo)(()=>{if(e.length>1){for(let n of t.cities)if(n.slug===e[0])return n}},[t,e]);return{cityFromURL:n}}();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:B().popoverContainer,children:[(0,s.jsxs)("div",{className:B().popoverTitle,children:["Ваш город ",(0,s.jsx)("strong",{children:t?t.name:null==e?void 0:e.name}),"?"]}),(0,s.jsxs)("div",{className:B().popoverControl,children:[(0,s.jsx)("div",{className:"".concat(B().popoverLink," ").concat(B().popoverSuccessLink),children:"Да, верно"}),(0,s.jsx)("div",{className:B().popoverLink,children:"Нет, выбрать другой город"})]})]})})}var C=n(7426),M=n.n(C),I=n(754);function b(e){let{cities:t,toggle:n,isOpen:c,host:i}=e;window.location.host.split(".");let a=null==t?void 0:t.map(e=>e.name.slice(0,1)),r=new Set(a),l=Array.from(r).sort(),d=Array.from(l).map((e,n)=>t.filter(t=>t.name.slice(0,1)===e)),u=d.map((e,t)=>({letter:l[t],cities:e})),h=(0,I.q)(u,u.length/4),m=(null==i?void 0:i.includes("localhost"))?"localhost":_._;return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(o.u_,{className:M().modal,backdrop:!0,isOpen:c,toggle:n,children:[(0,s.jsx)(o.xB,{toggle:n,children:"Выберите город"}),(0,s.jsx)(o.fe,{children:(0,s.jsx)("div",{className:M().citiesList,children:h.map((e,t)=>(0,s.jsx)("div",{className:M().citiesColumn,children:e.map((e,t)=>(0,s.jsxs)("div",{className:M().sortedCities,children:[(0,s.jsx)("div",{className:M().cityListModalLetter,children:e.letter},t),e.cities.map((e,t)=>(0,s.jsx)("div",{className:M().cityListModalItem,children:(0,s.jsx)(v(),{href:"http://".concat(e.slug,".").concat(m),children:e.name})},t))]},t))},t))})})]})})}var S=n(2221),w=n.n(S);function T(e){let{currentCity:t,cities:n,host:i}=e,[a,o]=(0,c.useState)(!1),r=()=>o(!a);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:w().chooseCityModalButton,onClick:r,children:[(0,s.jsx)("img",{src:f.src,alt:"Map pin",className:w().mapPin}),(0,s.jsx)("div",{className:w().citiName,children:(null==t?void 0:t.city.name)?null==t?void 0:t.city.name:null})]}),t?null:(0,s.jsx)(L,{}),(0,s.jsx)(b,{isOpen:a,toggle:r,cities:n,host:i})]})}var E=n(9420),F=n(9908),H=n.n(F),P=n(5660);function D(e){let{item:t,index:n,name:i,isMain:a,host:r,slug:l,isMobile:u,noLimitName:h}=e,[m,p]=(0,c.useState)(!1),[f,j]=(0,c.useState)(null);return((0,c.useEffect)(()=>{j((0,P.r)("current_client"))},[]),r&&l)?(0,s.jsx)("div",{className:u?H().mobileCustomHeaderLink:"",children:(0,s.jsxs)(v(),{href:"http://".concat(x(r,l),"/").concat(t.slug),className:H().secondLevelMenuItem,id:"header_link_".concat(n),children:[(0,s.jsx)("div",{className:H().secondLevelMenuIconContainer,children:(0,s.jsx)(d(),{className:H().secondLevelMenuIcon,src:"http://".concat(_._).concat(t.icon),alt:t.name,width:30,height:30})}),u?(0,s.jsx)("span",{className:H().secondLevelMenuItemText,children:t.name}):(0,s.jsxs)("span",{className:H().secondLevelMenuItemText,children:[h?t.name:(0,E.t)(t.name,20),h?null:(0,s.jsx)(s.Fragment,{children:t.name.length>20?(0,s.jsx)(o.u,{isOpen:m,target:"header_link_".concat(n),toggle:()=>p(!m),children:t.name}):null})]})]})}):null}var W={src:"/_next/static/media/logo.ab5fdb3e.svg",height:226,width:1248,blurWidth:0,blurHeight:0},Z=n(8063),Q=n(9446),O=n.n(Q);function z(e){let{currentCity:t,name:n,worktypes:l,cities:u,isMain:h,slug:m,host:x}=e,f=(0,r.BF)(t),[j,g]=(0,c.useState)(!1),A=()=>g(e=>!e);return m&&x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:O().navbarControl,children:[(0,s.jsx)("div",{className:O().navButton,onClick:A,children:(0,s.jsx)(i.Z,{})}),(0,s.jsx)(v(),{className:O().logoLink,href:"/",children:(0,s.jsx)(d(),{className:O().logo,src:"http://".concat(_._).concat(W.src),alt:"ALPATEKS.RU",width:100,height:100})}),(0,s.jsx)("a",{className:O().navButton,href:"tel:".concat(null==t?void 0:t.city.phone),children:(0,s.jsx)(a.Z,{})})]}),(0,s.jsxs)(o.TB,{fade:!0,isOpen:j,toggle:A,children:[(0,s.jsx)(o.Us,{toggle:A,children:(0,s.jsx)(T,{currentCity:t,cities:u,host:x})}),(0,s.jsx)(o.UT,{children:(0,s.jsxs)("div",{className:"".concat(O().firstMenu," ").concat(O().mobileMenu),children:[(0,s.jsx)(Z.Z,{className:"".concat(O().firstLevelMenu," flex-column"),children:l&&(0,s.jsx)(s.Fragment,{children:f.map((e,t)=>(0,s.jsx)(Z.Z.Item,{children:(0,s.jsx)(v(),{className:(0,r.zh)(e.link,n)?"active":"",href:h?"http://".concat(x).concat(e.link):e.link,onClick:()=>(0,P.s)({key:"current_client",value:e.link.replace("/","")}),children:e.item})},t))})}),(0,s.jsx)("div",{className:O().divider}),(0,s.jsx)("br",{}),(0,s.jsxs)("div",{className:O().servicesContainer,children:[(0,s.jsx)("h6",{children:"Услуги"}),t&&(0,s.jsx)(p,{host:x,slug:m,serviceItems:t.city.worktype})]}),(0,s.jsx)(Z.Z,{className:"".concat(O().secondLevelMenu),children:l&&(0,s.jsx)(s.Fragment,{children:l.map((e,t)=>(0,s.jsx)(Z.Z.Item,{className:"",children:(0,s.jsx)(D,{name:n,item:e,index:t,slug:m,host:x,isMain:h,isMobile:!0})},t))})})]})})]})]}):null}var q=n(4808),U={src:"/_next/static/media/search.cd7eceaa.svg",height:24,width:24,blurWidth:0,blurHeight:0},R={src:"/_next/static/media/cross.121b5cf3.svg",height:64,width:64,blurWidth:0,blurHeight:0},Y=n(1673),J=n(3619),K=n.n(J),V=n(6246);function G(e){let{serviceItems:t,isMain:n,host:i,slug:a}=e,{isOpen:r,openSearchBar:l,searchServiceHandler:d,filteredServices:u}=function(e){let{serviceItems:t,slug:n}=e,[s,i]=(0,c.useState)(!1),[a,o]=(0,c.useState)([]),[r,l]=(0,c.useState)(""),d=null;return(0,c.useEffect)(()=>{null!==r&&(0,Y._)(r||"",n,o)},[r]),{isOpen:s,openSearchBar:()=>i(e=>!e),filteredServices:a,searchServiceHandler:e=>{d&&clearTimeout(d),d=setTimeout(()=>{l(e)},300)}}}(e);return(0,s.jsxs)("div",{className:"".concat(K().searchBar," ").concat(r?"opened":"closed"),children:[(0,s.jsx)("div",{className:K().searchBarBackground}),(0,s.jsxs)("div",{className:K().searchBarButtonContent,onClick:l,children:[(0,s.jsx)("img",{src:U.src,alt:"Search",className:K().searchIcon}),(0,s.jsx)("div",{children:"Найти услугу"})]}),(0,s.jsx)(o.u_,{isOpen:r,toggle:l,className:K().searchModal,children:(0,s.jsxs)(o.fe,{className:K().modalBody,children:[(0,s.jsxs)("div",{className:K().searchBarHeader,children:[(0,s.jsx)(o.II,{type:"text",onChange:e=>d(e.target.value),placeholder:"Введите название услуги",className:K().searchInput}),(0,s.jsx)(X,{openSearchBar:l})]}),(0,s.jsx)(V.k,{filteredServices:u,serviceItems:t,inputIsNotEmpty:void 0,openSearchBar:l,isMain:n,host:i,slug:a})]})})]})}function X(e){let{openSearchBar:t}=e;return(0,s.jsx)("div",{className:K().closeBtn,onClick:t,children:(0,s.jsx)(d(),{src:R,alt:"Close"})})}var $=n(5945);function ee(e){let{worktypes:t,name:n,smallDesktop:i,host:a,slug:r,isMain:l,activeItem:d}=e,u=[],h=(0,c.useRef)(null);return t?(0,s.jsxs)("div",{ref:h,children:[t.map((e,t)=>t<5?(0,s.jsx)(Z.Z.Item,{className:"".concat(e.slug===d?"active":""),id:"item-".concat(t),children:(0,s.jsx)(D,{name:n,item:e,index:t,slug:r,host:a,isMain:l})},t):t>=5?(u.push(e),null):void 0),u.length>0&&(0,s.jsxs)(o.OB,{nav:!0,children:[(0,s.jsx)(o.Z_,{tag:"span",children:(0,s.jsx)($.Z,{})}),(0,s.jsx)(o.h_,{children:u.map((e,t)=>(0,s.jsx)(o.hP,{children:(0,s.jsx)(Z.Z.Item,{className:"".concat(e.slug===d?"active":""),id:"item-".concat(t),children:(0,s.jsx)(D,{name:n,item:e,index:t,slug:r,host:a,isMain:l,noLimitName:!0})},t)},t))})]})]}):null}async function et(e){let{slug:t,clientName:n}=e,s=t?"".concat(t,".").concat(_._):_._;try{let e=await fetch("https://".concat(s,"/api/").concat(n,"/worktypes")),t=await e.json();return t}catch(e){return console.error("Error fetching worktypes",e),[]}}var en=n(7153),es=n.n(en),ec=n(1163);function ei(e){let{worktypes:t,name:n,smallDesktop:i,host:a,slug:o,isMain:r,currentCity:l,searchServices:d}=e,u=(0,ec.useRouter)(),[h,_]=(0,c.useState)(""),[m,v]=(0,c.useState)([]);return((0,c.useEffect)(()=>{t&&v(t),u.query.subdomain&&localStorage.getItem("current_client")&&et({slug:u.query.subdomain,clientName:localStorage.getItem("current_client")}).then(e=>{v(e)})},[t]),(0,c.useEffect)(()=>{if(u.query.workType)return _(u.query.workType)},[u.query.workType]),a&&o)?(0,s.jsxs)(q.Z,{className:"".concat(es().navbarContainer," ").concat(es().secondNavbar),children:[(0,s.jsx)(Z.Z,{className:es().secondLevelMenu,children:(0,s.jsx)(ee,{activeItem:h,worktypes:m,name:n,smallDesktop:i,host:a,slug:o,isMain:r})}),(0,s.jsx)("div",{className:es().sideNav,children:l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p,{host:a,slug:o,serviceItems:l.city.worktype}),(0,s.jsx)("div",{className:es().verticalDivider}),(0,s.jsx)(G,{slug:o,host:a,serviceItems:d,isMain:!!r&&r})]})})]}):null}function ea(e){let{currentCity:t,name:n,worktypes:i,cities:a,isMain:l,slug:u,host:h,smallDesktop:m,searchServices:x}=e,[p,f]=(0,c.useState)(!1),[j,g]=(0,c.useState)([]);if(!u&&!h&&!t&&!i&&!a&&!x&&!l&&!n)return null;let A=[];(0,c.useEffect)(()=>{g((0,r.BF)(t,n))},[t,n]),(0,c.useEffect)(()=>(window.addEventListener("scroll",N),()=>{window.removeEventListener("scroll",N)}),[]);let N=()=>{window.scrollY>400?f(!0):f(!1)},k=(e,t)=>{(0,P.s)({key:e,value:t})};return(0,s.jsxs)("div",{className:O().desktopHeaderContainer,children:[(0,s.jsxs)(q.Z,{className:O().navbarContainer,children:[(0,s.jsx)(q.Z.Brand,{href:"/",children:(0,s.jsx)(d(),{className:O().logo,src:"http://".concat(_._).concat(W.src),alt:"ALPATEKS.RU",width:200,height:100})}),(0,s.jsxs)(Z.Z,{className:O().firstLevelMenu,children:[j.map((e,t)=>t<(m?3:4)?(0,s.jsx)(Z.Z.Item,{children:(0,s.jsx)(v(),{className:e.isActive?"active":"",href:l?"http://".concat(h).concat(e.link):e.link,onClick:()=>k("current_client",e.link.replace("/","")),shallow:!0,children:e.item})},"".concat(t,"-").concat(e.isActive?"active":"notActive")):(A.push(e),null)),A.length>0&&(0,s.jsxs)(o.OB,{nav:!0,children:[(0,s.jsx)(o.Z_,{nav:!0,caret:!0,children:"Еще"}),(0,s.jsx)(o.h_,{children:A.map((e,t)=>(0,s.jsx)(o.hP,{children:(0,s.jsx)(v(),{className:e.isActive?"active":"",href:l?"http://".concat(h).concat(e.link):e.link,onClick:()=>(0,P.s)({key:"current_client",value:e.link.replace("/","")}),children:e.item})},"".concat(t,"-").concat(e.isActive?"active":"notActive")))})]})]}),(0,s.jsxs)("div",{className:O().phoneContainer,children:[(0,s.jsx)("a",{className:O().phoneNumber,href:"tel:".concat(null==t?void 0:t.city.phone),children:null==t?void 0:t.city.phone}),(0,s.jsxs)("div",{className:O().workingTime,children:["с ",null==t?void 0:t.city.time_from," до ",null==t?void 0:t.city.time_to]})]}),(0,s.jsx)("div",{className:O().citiNameContainer,children:(0,s.jsx)(T,{currentCity:t,cities:a,host:h})})]}),"main"!==n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:O().divider}),(0,s.jsx)(ei,{worktypes:i,name:n,currentCity:t,smallDesktop:m,host:h,slug:u,isMain:l,searchServices:x})]}):null,(0,s.jsx)("div",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},className:"toTopButton ".concat(p?"showed":""),children:"Вверх"})]})}var eo=n(6655);function er(e){let{isMobile:t,smallDesktop:n}=function(){let[e,t]=(0,c.useState)(!1),[n,s]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let e=()=>{window.innerWidth<1150?(t(!0),s(!1)):window.innerWidth>=1150&&window.innerWidth<1500&&(t(!1),s(!0))};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),{isMobile:e,smallDesktop:n}}();return t?(0,s.jsx)(z,{...e}):t?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eo.a,{})}):(0,s.jsx)(ea,{smallDesktop:n,...e})}},754:function(e,t,n){"use strict";function s(e,t){if(!e||!e.length)return[];let n=[];for(let s=0;s<e.length;s+=t){let c=e.slice(s,s+t);n.push(c)}return n}n.d(t,{q:function(){return s}})},5660:function(e,t,n){"use strict";function s(e){let{key:t,value:n}=e;localStorage.setItem(t,n)}function c(e){return"undefined"!=typeof localStorage?localStorage.getItem(e):null}n.d(t,{r:function(){return c},s:function(){return s}})},1673:function(e,t,n){"use strict";n.d(t,{_:function(){return c}});var s=n(6725);function c(e,t,n){return fetch("https://".concat(t,".").concat(s._,"/api/search-service?search_text=").concat(e)).then(e=>e.json()).then(e=>n(e))}},9420:function(e,t,n){"use strict";function s(e,t){return e.length>t?e.slice(0,t)+"...":e}n.d(t,{t:function(){return s}})},448:function(e){e.exports={blockHeader:"blockHeader_blockHeader__cTws3",title:"blockHeader_title__yuPzY",subtitle:"blockHeader_subtitle__xVLeH",isDark:"blockHeader_isDark__2jqGl"}},2617:function(e){e.exports={callBlock:"callBlock_callBlock__7QwhZ",greyBackground:"callBlock_greyBackground__itcC5",callContainer:"callBlock_callContainer__x2AhT",column:"callBlock_column__DlJuE"}},2221:function(e){e.exports={chooseCityModalButton:"chooseCityModal_chooseCityModalButton__8Qee_",citiName:"chooseCityModal_citiName__BVEQI",mapPin:"chooseCityModal_mapPin__LmYeB"}},7426:function(e){e.exports={cityListModalBackground:"cityListModal_cityListModalBackground__k0iAl",cityListModalBackgroundActive:"cityListModal_cityListModalBackgroundActive__ss0Bw",cityListModalContainer:"cityListModal_cityListModalContainer__LVquq",cityListModalCloseButton:"cityListModal_cityListModalCloseButton__XUMVI",cityListModalTitle:"cityListModal_cityListModalTitle__z88lZ",cityListModalLetter:"cityListModal_cityListModalLetter__2IQ6q",cityListModalItem:"cityListModal_cityListModalItem__pnpfs",sortedCities:"cityListModal_sortedCities__JyMXD",citiesColumn:"cityListModal_citiesColumn__4BpTW",citiesList:"cityListModal_citiesList__U8VcO",modal:"cityListModal_modal__SMnkO"}},4616:function(e){e.exports={popoverContainer:"popover_popoverContainer__jaQaS",popoverTitle:"popover_popoverTitle__lcWWW",popoverControl:"popover_popoverControl__Rk_HV",popoverLink:"popover_popoverLink__xvl8K",popoverSuccessLink:"popover_popoverSuccessLink__SmPzo"}},3013:function(e){e.exports={form:"customForm_form__8ASix",formItem:"customForm_formItem__NTIsT",checkboxItem:"customForm_checkboxItem__tk2Vv",choosenService:"customForm_choosenService__RtOpw",choosenServiceTitle:"customForm_choosenServiceTitle__OHDdf",info:"customForm_info__Deu71",separator:"customForm_separator__LEfoK",choosenServiceName:"customForm_choosenServiceName__6jTV_",choosenServicePrice:"customForm_choosenServicePrice__YDOOv",closeButton:"customForm_closeButton__KoW4p",modal:"customForm_modal__oLSW8",caseModal:"customForm_caseModal__orpp1",gallery:"customForm_gallery__TLkas",bigImage:"customForm_bigImage__x6pbq",descriptionContainer:"customForm_descriptionContainer__GvCzR",title:"customForm_title__U9tRc",description:"customForm_description__MOiWT",link:"customForm_link__iXVfJ"}},9908:function(e){e.exports={secondLevelMenuItem:"customHeaderLink_secondLevelMenuItem__TGo28",secondLevelMenuIconContainer:"customHeaderLink_secondLevelMenuIconContainer__20HNz",secondLevelMenuIcon:"customHeaderLink_secondLevelMenuIcon__So2pd",secondLevelMenuItemText:"customHeaderLink_secondLevelMenuItemText__t4XsY",mobileCustomHeaderLink:"customHeaderLink_mobileCustomHeaderLink__zDz1h"}},2450:function(e){e.exports={loader:"loader_loader__W_eGo"}},549:function(e){e.exports={footer:"footer_footer__eoQOn",footerContainer:"footer_footerContainer__hPFjl",footerItem:"footer_footerItem__D7yPq",footerTitle:"footer_footerTitle__qx7c_",footerLinks:"footer_footerLinks__yIFRt",footerContacts:"footer_footerContacts__Bv4q2",services:"footer_services__70Tgj",address:"footer_address__f_Pc3",credentials:"footer_credentials__1skjn",phone:"footer_phone__zWxjN",extra_phone:"footer_extra_phone__Nv8jz",extra_phone_description:"footer_extra_phone_description__FoPyS",workingTime:"footer_workingTime__cYZTT",email:"footer_email___GYUc",social:"footer_social__cehpH",socilaButton:"footer_socilaButton__cUb7Q",ok:"footer_ok__3LjAY",copywrite:"footer_copywrite__Nzy2V"}},6965:function(e){e.exports={AllServicesListButton:"allServicesList_AllServicesListButton__qoofC",modal:"allServicesList_modal__6Zq_q",services:"allServicesList_services__AdotD",serviceItem:"allServicesList_serviceItem__2fA2_",name:"allServicesList_name__HuO7T",servieImage:"allServicesList_servieImage__jqHT5"}},3619:function(e){e.exports={searchBarBackground:"searchBar_searchBarBackground__RoWB0",searchBarInput:"searchBar_searchBarInput__4_I2n",searchBar:"searchBar_searchBar__8qIvN",searchBarContainer:"searchBar_searchBarContainer__i9hUT",closeSearchBarButton:"searchBar_closeSearchBarButton__4J4pg",searchBarButtonContent:"searchBar_searchBarButtonContent__yW5E3",searchIcon:"searchBar_searchIcon__WwP38",searchBarHeader:"searchBar_searchBarHeader__tEZRP",closeBtn:"searchBar_closeBtn__g7B2A",searchInput:"searchBar_searchInput__CHF96",searchModal:"searchBar_searchModal__PtMKu",modalBody:"searchBar_modalBody__kNbfz"}},480:function(e){e.exports={searchBarItemList:"searchBarItemList_searchBarItemList__z837o",serviceItem:"searchBarItemList_serviceItem__Ep4lv",serviceName:"searchBarItemList_serviceName__FN_Bc",serviceImage:"searchBarItemList_serviceImage__gOgKJ"}},7153:function(e){e.exports={navbarContainer:"secondLevelMenu_navbarContainer__f4y0q",secondNavbar:"secondLevelMenu_secondNavbar__UPISN",secondLevelMenu:"secondLevelMenu_secondLevelMenu__7iEj0",secondLevelMenuIconContainer:"secondLevelMenu_secondLevelMenuIconContainer__YDrA6",mobileMenu:"secondLevelMenu_mobileMenu__JItZf",verticalDivider:"secondLevelMenu_verticalDivider__o7tJe",sideNav:"secondLevelMenu_sideNav__PjI3D"}},9446:function(e){e.exports={navbarContainer:"header_navbarContainer__IBvGs",logo:"header_logo__ZJC0k",firstLevelMenu:"header_firstLevelMenu__S_2JH",secondNavbar:"header_secondNavbar__JRBKn",phoneContainer:"header_phoneContainer__07Y2E",phoneNumber:"header_phoneNumber__h0sbN",workingTime:"header_workingTime__dSWCC",citiNameContainer:"header_citiNameContainer__LPk5w",divider:"header_divider__yEF10",mobileMenu:"header_mobileMenu__IvdEU",secondLevelMenu:"header_secondLevelMenu__rAggC",navbarControl:"header_navbarControl__CE0TP",logoLink:"header_logoLink__t5r_K",navButton:"header_navButton__DBEbM"}}}]);