`,document.body.appendChild(n);const a=()=>{n.classList.remove("mo"),setTimeout((()=>n.remove()),200)};return n.onclick=e=>(e.target===n||"IMG"===e.target.tagName||e.target.closest(".mx"))&&a(),setTimeout((()=>n.classList.add("mo")),10),a},$=(e,t=document)=>t.querySelector(e),$$=(e,t=document)=>t.querySelectorAll(e);class PriceModalManager{static init(){const e=$(".prices__cards"),t=$(".prices__table");e&&PriceModalManager.attachCardClickListener(e,t),t&&PriceModalManager.attachRowClickToTable(t)}static attachCardClickListener(e,t){e.addEventListener("click",(e=>{e.preventDefault();const i=e.target.closest(".prices__card");if(!i)return;const n=`Стоимость › ${$(".prices__card-title",i)?.textContent||""}`,a=$(".prices__card-picts",i);if(!a)return;const s=Array.from($$("img",a)).map((e=>e.src)),o=Array.from($$(".prices__row",t)).filter((e=>{const t=$("img",$(".prices__pict",e));return t&&s.includes(t.src)})),r=document.createElement("table");r.className="prices__table";const l=document.createElement("tbody");o.forEach((e=>l.appendChild(e.cloneNode(!0)))),r.appendChild(l),PriceModalManager.openTableModal(r.outerHTML,n)}))}static attachRowClickToTable(e){$$(".prices__row",e).forEach((e=>e.addEventListener("click",PriceModalManager.handleRowClick)))}static openTableModal(e,t){createModal(e,t,1),setTimeout((()=>{const e=$('[role="dialog"] .prices__table');e&&PriceModalManager.attachRowClickToTable(e)}),0)}static handleRowClick(e){e.preventDefault();const t=e.currentTarget,i=PriceModalManager.extractRowDetails(t);if(!i.rowImage)return;const n=PriceModalManager.generateModalContent(i);createModal(n,i.itemInfo,1)}static extractRowDetails(e){return{rowImage:$("img",$(".prices__pict",e))?.src||"",itemInfo:$(".prices__item strong",e)?.innerHTML||""}}static generateModalContent({rowImage:e,itemInfo:t}){return` `}}PriceModalManager.init(),$(".about__summary")?.addEventListener("click",(e=>{e.preventDefault(),createModal($(".about__details .features").outerHTML,e.target.getAttribute("title")||"")})),$$(".ratings__card").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const i=e.getAttribute("id");createModal({yandex:'',tripadvisor:'
',google:''}[i],e.querySelector(".ratings__platform").textContent,1)}))}));class PickerUtils{static styles="";static $(e,t=document){return t.querySelector(e)}static $$(e,t=document){return Array.from(t.querySelectorAll(e))}static createContainer(e){const t=this.$(e);if(!t)throw new Error(`Container not found: ${e}`);return t}static setKeyEvents(e){e.addEventListener("keydown",(t=>{["Enter"," "].includes(t.key)&&(t.preventDefault(),e.click())}))}static updateDisplay(e,t,i=""){PickerUtils.$(e).innerText=`${t||"не указано"}${t?i:""}`}}class DatePicker extends PickerUtils{#e;#t;#i;#n;constructor(){super(),this.#t=null}getDateString(e){return e.toISOString().split("T")[0]}formatDate(e){return{day:e.getDate(),month:e.toLocaleString(this.#e,{month:"short"}),weekday:e.toLocaleString(this.#e,{weekday:"short"})}}generate(e="UTC"){const t=new Date((new Date).toLocaleString("en-US",{timeZone:e})),i=new Date(t.setHours(0,0,0,0));this.#n.innerHTML="";for(let e=0;e<14;e++){const n=new Date(i);n.setDate(i.getDate()+e);const a=this.getDateString(n),s=a===this.getDateString(t)&&t.getHours()>=18,{day:o,month:r,weekday:l}=this.formatDate(n),c=document.createElement("div");c.className="date-picker-item",c.dataset.date=a,c.tabIndex=0,c.innerHTML=`${l} ${o} ${r} `,0!==n.getDay()&&6!==n.getDay()||c.classList.add("weekend"),s?c.classList.add("disabled"):(c.addEventListener("click",(()=>this.#a(c,a))),this.constructor.setKeyEvents(c)),this.#t===a&&c.classList.add("selected"),this.#n.appendChild(c)}}#a(e,t){const i=e.classList.contains("selected");this.constructor.$$(".date-picker-item",this.#n).forEach((e=>e.classList.remove("selected"))),i?this.#t=null:(e.classList.add("selected"),this.#t=t),this.#i?.(this.#t)}init({containerSelector:e,initialDate:t=null,localeString:i="default",timeZone:n="UTC",onChange:a=()=>{}}){this.#n=this.constructor.createContainer(e),this.#e=i,this.#t=t,this.#i=a,this.#n.classList.add("date-picker-container"),this.generate(n)}destroy(){this.#n.innerHTML="",this.#t=null,this.#i=null,this.#n=null}}class TimePicker extends PickerUtils{#s;#i;#n;constructor(){super(),this.#s=null}generate(e=0,t=23){this.#n.innerHTML="";for(let i=e;i<=t;i++){const e=`${i}:00`,t=document.createElement("div");t.className="time-picker-item date-picker-item",t.dataset.time=e,t.tabIndex=0,t.innerHTML=`≈ ${e.split(":")[0]}:00 `,t.addEventListener("click",(()=>this.#a(t,e))),this.constructor.setKeyEvents(t),this.#s===e&&t.classList.add("selected"),this.#n.appendChild(t)}}#a(e,t){const i=e.classList.contains("selected");this.constructor.$$(".time-picker-item",this.#n).forEach((e=>e.classList.remove("selected"))),i?this.#s=null:(e.classList.add("selected"),this.#s=t),this.#i?.(this.#s)}init({containerSelector:e,initialTime:t=null,startHour:i=0,endHour:n=23,onChange:a=()=>{}}){this.#n=this.constructor.createContainer(e),this.#s=t,this.#i=a,this.#n.classList.add("time-picker-container"),this.generate(i,n)}destroy(){this.#n.innerHTML="",this.#s=null,this.#i=null,this.#n=null}}class NumberPicker extends PickerUtils{#o;#i;#n;constructor(){super(),this.#o=null}generate(e,t,i){const n=this.#o||e;this.#n.innerHTML=`- +
`;const a=this.constructor.$(".number-picker-slider",this.#n),s=this.constructor.$(".decrement",this.#n),o=this.constructor.$(".increment",this.#n);a.addEventListener("input",(()=>{this.#o=a.value,this.#i?.(a.value)})),s.addEventListener("click",(e=>{e.preventDefault(),a.stepDown(),a.dispatchEvent(new Event("input"))})),o.addEventListener("click",(e=>{e.preventDefault(),a.stepUp(),a.dispatchEvent(new Event("input"))}))}init({containerSelector:e,initialValue:t=0,min:i=0,max:n=100,step:a=1,onChange:s=()=>{}}){this.#n=this.constructor.createContainer(e),this.#o=t,this.#i=s,this.#n.classList.add("number-picker-container"),this.generate(i,n,a)}destroy(){this.#n.innerHTML="",this.#o=null,this.#i=null,this.#n=null}}class PhoneNumberPicker extends PickerUtils{#r="+375";#i=null;formatPhoneNumber(e){const t=e.replace(/[^\d]+/g,""),i=t.match(/^375(\d{0,2})(\d{0,3})(\d{0,2})(\d{0,2})$/);if(i){const[,e,t,n,a]=i;return`+375 ${e?`(${e})`:""} ${t||""}${n?`-${n}`:""}${a?`-${a}`:""}`}return t.length>=12?this.formatPhoneNumber(t.slice(0,12)):e}updateDisplay(e){this.constructor.$(".phone-display",e).textContent=this.#r}generateKeyboard(e){const t=document.createElement("div");t.className="phone-keyboard",[["(25)","(29)","(33)","(44)"],["1","2","3","⌫"],["4","5","6","✕"],["7","8","9","0"]].forEach((i=>{const n=document.createElement("div");n.className="phone-keyboard-row",i.forEach((t=>{const i=document.createElement("div");i.className="phone-key",t.startsWith("(")&&i.classList.add("phone-key--area-code"),"⌫"===t&&(i.classList.add("phone-key--delete"),i.classList.add("elli"),t+="исправить "),"✕"===t&&(i.classList.add("phone-key--reset"),i.classList.add("elli"),t+="очистить "),isNaN(t)||i.classList.add("phone-key--digit"),i.innerHTML=t,i.addEventListener("click",(()=>{if(t.startsWith("⌫")&&this.#r.length>7)this.#r=this.formatPhoneNumber(this.#r.replace(/[^\d]+/g,"").slice(0,-1));else if(t.startsWith("✕"))this.#r="+375";else if(isNaN(t)){if(t.startsWith("(")){const e=this.#r.replace(/[^\d]+/g,""),i=t.replace(/[^\d]+/g,"");this.#r=this.formatPhoneNumber(e.slice(0,3)+i+e.slice(5))}}else this.#r+=t;this.#r=this.formatPhoneNumber(this.#r),this.updateDisplay(e),this.updateAreaCodeSelection(e),this.#i?.(this.#r)})),n.appendChild(i)})),t.appendChild(n)})),e.appendChild(t)}generate(e){e.innerHTML="";const t=document.createElement("input");t.type="tel",t.style.position="absolute",t.style.opacity="0",t.style.pointerEvents="none",t.style.height="0",e.appendChild(t);const i=document.createElement("div");i.className="phone-display",i.textContent=this.#r,i.addEventListener("click",(()=>{t.focus()})),t.addEventListener("keydown",(t=>{const i=t.key;i>="0"&&i<="9"?this.#r+=i:"Backspace"===i&&this.#r.length>7&&(this.#r=this.formatPhoneNumber(this.#r.replace(/[^\d]+/g,"").slice(0,-1))),this.#r=this.formatPhoneNumber(this.#r),this.updateDisplay(e),this.updateAreaCodeSelection(e),this.#i?.(this.#r)})),e.appendChild(i),this.generateKeyboard(e),this.updateDisplay(e),this.updateAreaCodeSelection(e)}updateAreaCodeSelection(e){const t=e.querySelectorAll(".phone-key--area-code"),i=this.#r.replace(/[^\d]+/g,"");t.forEach((e=>{const t=e.textContent.replace(/[^\d]+/g,"");i.slice(3,5)===t?e.classList.add("selected"):e.classList.remove("selected")}))}init({containerSelector:e,onNumberChange:t,initialNumber:i="+375"}){const n=this.constructor.createContainer(e);n&&(n.classList.add("phone-input-container"),this.#i=t,this.#r=this.formatPhoneNumber(i),this.generate(n))}destroy(){this.#r="+375",this.#i=null}getPhoneNumber(){return this.#r}clear(){this.#r="+375";const e=this.constructor.$(".phone-input-container");e&&this.updateDisplay(e)}}class MultiSelectPicker extends PickerUtils{#n;#l=new Set;#i;#c;constructor(e){super(),this.#c=e}#a(e){e.classList.toggle("selected");const t=PickerUtils.$("small",e)?.innerText;e.classList.contains("selected")?this.#l.add(t):this.#l.delete(t);const i=Array.from(this.#l);this.#i?.({items:i.join(", "),count:i.length})}init({containerSelector:e,initialItems:t=[],onChange:i=()=>{}}){this.#n=this.constructor.createContainer(e),this.#i=i,this.#l=new Set(t),this.#n.classList.add("multi-select-picker-container"),this.constructor.$$(`.${this.#c}`,this.#n).forEach((e=>{this.constructor.setKeyEvents(e);const t=e.querySelector("small")?.textContent;this.#l.has(t)&&e.classList.add("selected"),e.addEventListener("click",(t=>{t.preventDefault(),this.#a(e)}))}))}destroy(){this.#n.innerHTML="",this.#l.clear(),this.#i=null,this.#n=null}}class Booking{static tpl="";static msg="";static mem={};static getTodayDateByMinskTime(){const e=new Date;return new Date(e.getTime()+108e5).toISOString().split("T")[0]}static saveToStorage(e,t){try{e+=Booking.getTodayDateByMinskTime(),localStorage.setItem(e,JSON.stringify(t))}catch(i){Booking.mem[e]=t}}static loadFromStorage(e){try{e+=Booking.getTodayDateByMinskTime();const t=localStorage.getItem(e);return t?JSON.parse(t):void 0}catch(t){return Booking.mem[e]}}static mdl=Booking.loadFromStorage("bkng_mdl")||{};static storeOnRender(){Booking.saveToStorage("bkng_mdl",Booking.mdl)}static renderSummary(){const e=[["Мобильный",Booking.mdl.phnn||""],["Дата / время",(Booking.mdl.date||"")+(Booking.mdl.date&&Booking.mdl.time?" / ":"")+(Booking.mdl.time||"")],["Транспорт",Booking.mdl.tech||""],["Кол-во чел.",(Booking.mdl.nmbr?Booking.mdl.nmbr+" чел.":"не знаем")+" "+(Booking.mdl.opts||"")+" "],["Примечание",Booking.mdl.cmnt||""]];$(".phone-display")?.classList[Booking.mdl.phnn?"add":"remove"]("phone-valid"),Booking.mdl.phnn&&($(".pckd__phnn").innerText=Booking.mdl.phnn),$("#summ").innerHTML=e.map((e=>e[1]?`${e[0]} ${e[1]}
`:"")).join(""),Booking.msg=e.map((e=>e[1]?`${e[0]}\n*${e[1]}*\n\n`:"")).join(""),Booking.storeOnRender()}static async cftt(e,t={particleCount:50,spread:70,origin:{y:.8}}){try{"confetti"in window||await import("https://unpkg.com/canvas-confetti@1.9.3/dist/confetti.browser.js"),e&&confetti(t)}catch(e){}}}const bron=e=>{e.preventDefault(),Booking.cftt(),Booking.tpl||(Booking.tpl=$("#bkng").innerHTML,$("#bkng").innerHTML="");const t=createModal(Booking.tpl,"Онлайн-бронирование",1);setTimeout((()=>{$(".booking__cmnt").value=Booking.mdl.cmnt||"",$(".booking__cmnt")?.addEventListener("input",(e=>{Booking.mdl.cmnt=e.target.value,Booking.renderSummary();const t=Booking.mdl.cmnt.length;$(".tpdlnght").innerText=t?`${t}/400`:""})),$("#submit-btn")?.addEventListener("click",(async e=>{e.preventDefault();const i=createModal('',"Отправка данных..."),n=e=>new Promise((t=>setTimeout(t,e)));await n(200),await fetch("/api/bookings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Booking.msg)}),i(),await n(300);const a=$("#summ").innerHTML;t(),await n(300);const s=createModal(``,"Бронирование успешно",1);$("#x0").addEventListener("click",(()=>s())),await n(200),Booking.cftt(1,{particleCount:50,origin:{y:.8}}),await n(200),Booking.cftt(1,{particleCount:50,origin:{y:.8,x:.3}}),Booking.cftt(1,{particleCount:50,origin:{y:.8,x:.7}}),await n(200),Booking.cftt(1,{particleCount:100,origin:{y:.9}})})),(new DatePicker).init({containerSelector:"#date-picker",initialDate:Booking.mdl.date,timeZone:"Europe/Minsk",localeString:"ru-RU",onChange:e=>{Booking.mdl.date=e,Booking.renderSummary(),PickerUtils.updateDisplay(".pckd__date",e)}}),(new TimePicker).init({containerSelector:"#time-picker",initialTime:Booking.mdl.time,startHour:9,endHour:18,onChange:e=>{Booking.mdl.time=e,Booking.renderSummary(),PickerUtils.updateDisplay(".pckd__time",e)}}),(new NumberPicker).init({containerSelector:"#number-picker",initialValue:Booking.mdl.nmbr,min:0,max:20,step:1,onChange:e=>{Booking.mdl.nmbr=e,Booking.renderSummary(),PickerUtils.updateDisplay(".pckd__nmbr",e," чел.")}}),new MultiSelectPicker("kidspets-picker-item").init({containerSelector:"#kidspets-picker",initialItems:(Booking.mdl.opts||"").split(", ").filter(Boolean),onChange:({items:e})=>{Booking.mdl.opts=e,Booking.renderSummary()}}),new MultiSelectPicker("tech-picker-item").init({containerSelector:"#tech-picker",initialItems:(Booking.mdl.tech||"").split(", ").filter(Boolean),onChange:({items:e,count:t})=>{Booking.mdl.tech=e,Booking.renderSummary(),PickerUtils.updateDisplay(".pckd__tech",t?`${t} выбрано`:"")}}),Booking.mdl.tech&&PickerUtils.updateDisplay(".pckd__tech",Booking.mdl.tech?`${Booking.mdl.tech.split(",").length} выбрано`:""),Booking.mdl.date&&PickerUtils.updateDisplay(".pckd__date",Booking.mdl.date),Booking.mdl.time&&PickerUtils.updateDisplay(".pckd__time",Booking.mdl.time),Booking.mdl.nmbr&&PickerUtils.updateDisplay(".pckd__nmbr",Booking.mdl.nmbr," чел."),(new PhoneNumberPicker).init({containerSelector:"#phone-input",onNumberChange:e=>{Booking.mdl.phnn=19===e.length?e:"",Booking.renderSummary()},initialNumber:Booking.mdl.phnn||"+375"}),Booking.renderSummary()}),10)};$(".hero__button.header__button")?.addEventListener("click",bron);const _pst='',_pgs="Ремонт аккумулятора электросамоката Мы предлагаем полный спектр услуг по ремонту аккумуляторов электросамокатов: от простой замены ячеек до сложного восстановления и увеличения мощности. Благодаря наличию собственной точечной сварки и другого профессионального оборудования, мы можем решить любую задачу.
Наши услуги Разборка / сборка любого типа электротранспорта Восстановление и сборка аккумуляторных батарей Ремонт электроники, контроллеров, платы управления Увеличение ёмкости аккумулятора Балансировка аккумулятора Проверка ресурса аккумулятора (емкость, сопротивление) Индивидуальная разработка по ТЗ заказчика Ремонт и установка светодиодной подсветки Ремонт электродвигателей, мотор-колес Ремонт и восстановление плат ВМS, РСВ Ремонт дисплеев, замена осей, втулок и подшипников Аквазащита устройств / гидроизоляция Тюнинг и многое другое Новые услуги Сегодня мы рады представить вам наши новые услуги:
Ремонт электровелосипедов Ремонт электросамокатов Ремонт аккумуляторов Балансировка аккумуляторов Шиномонтаж электросамокатов Ремонт механических повреждений электросамоката Ремонт электрооборудования на электросамокатах и электровелосипедах Цены на услуги можно узнать по запросу. Диагностику проводим абсолютно бесплатно.
",_pgm="Откройте для себя Беловежскую Пущу на электросамокатах от E-ride Путешествуйте «по зелёному коридору» Беловежской Пущи и окунитесь в мир удивительной природы, которая подарит Вам незабываемые впечатления.
Эко-маршрут «По зелёному коридору»: отличное приключение в гармонии с природой Познайте особенности растительного и животного мира Узнайте интересные факты и истории, связанные с Беловежской Пущей Насладитесь красотами леса и просторами зелени Создайте свой маршрут с помощью интерактивной карты Выберите удобное время Определите темп движения Выберите направление Забронируйте свое уникальное путешествие на электросамокатах прямо сейчас Испытайте гармонию с природой, насладитесь чистым воздухом и погрузитесь в атмосферу Беловежской Пущи на высококачественных электросамокатах E-ride .
";$('[href="/maps/eco-route-along-the-green-corridor"]').onclick=e=>{e.preventDefault(),createModal(`${_pst}${_pgm}`,"Эко-маршрут")},$('[href="/services"]').onclick=e=>{e.preventDefault(),createModal(`${_pst}${_pgs}`,"Ремонт и сервис")};