1let recaptchaResolver; 2let isRecaptchaReady = new Promise((resolve) => { 3 recaptchaResolver = resolve; 4}); 5const classNoValid = 'novalid'; 6function getReToken () { 7 return new Promise((callback) => { 8 $.fancybox.close(); 9 $.fancybox.open({ 10 src: 11 '<div class="recaptcha__container--wrap">' + 12 '<div class="recaptcha__container--tit">ÐодÑвеÑдиÑе, ÑÑо ÐÑ Ð½Ðµ ÑобоÑ</div>' + 13 '<div id="recaptcha__container" data-callback="sendForm">' + 14 "</div></div>", 15 type: "html", 16 opts: { 17 afterShow: function () { 18 grecaptcha.render("recaptcha__container", { 19 sitekey: "6Ld17LInAAAAAD_qayihIkAgHVXMcjm6DYZb71eo", 20 callback, 21 }); 22 }, 23 }, 24 }); 25 }); 26} 27const im = new Inputmask({ 28 mask: "8 (999) 999-99-99", 29 onBeforePaste: function (pastedValue, opts) { 30 let arr = pastedValue.split(''); 31 if (arr[0] === '+') arr.splice(0, 1); 32 if (arr[0] === '1') arr.splice(0, 1); 33 if (arr[0] === '2') arr.splice(0, 1); 34 if (arr[0] === '3') arr.splice(0, 1); 35 if (arr[0] === '4') arr.splice(0, 1); 36 if (arr[0] === '5') arr.splice(0, 1); 37 if (arr[0] === '6') arr.splice(0, 1); 38 if (arr[0] === '7') arr.splice(0, 1); 39 if (arr[0] === '8') arr.splice(0, 1); 40 return arr.join(''); 41 }, 42 postValidation: function (buffer, pos, c, currentResult, opts, maskset, strict, fromCheckval) { 43 if (['+', '1', '2', '3', '4', '5', '6', '7', '8'].includes(buffer[3])) { 44 return { 45 remove: 3, 46 caret: 3, 47 } 48 } 49 isCompleteMaskPhone = true; 50 return true; 51 }, 52 oncomplete() { 53 isCompleteMaskPhone = true; 54 }, 55 onincomplete() { 56 isCompleteMaskPhone = false; 57 }, 58}); 59const inputMaskSelector = '[name="phone"], .phoneInput'; 60im.mask(inputMaskSelector); 61function onloadCallback() { 62 recaptchaResolver(); 63} 64$('.lazyload').lazy(); 65// ÑÑнкÑÐ¸Ñ Ð²Ð¾Ð·Ð²ÑаÑÐ°ÐµÑ cookie Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ name, еÑли еÑÑÑ, еÑли неÑ, Ñо undefined 66function getCookie(name) { 67 let matches = document.cookie.match(new RegExp( 68 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 69 )); 70 return matches ? decodeURIComponent(matches[1]) : undefined; 71} 72function hide_raschet_butt() { 73 $('.raschet_butt').animate({ 74 right: '-157px' 75 }, 100, function () { 76 $('.raschet_butt').addClass('small'); 77 }); 78} 79async function validationForm(selector) { 80 return new Promise((resolve) => { 81 $(selector).find('.required').fValid({classNoValid}, function (error) { 82 resolve(error); 83 }); 84 }); 85} 86(function ($) { 87 $.fn.fValid = function (options, callback) { 88 let error = false; 89 let pattern = /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i; 90 this.each(function () { 91 let $this = $(this); 92 switch ($this.attr('type')) { 93 // case 'tel': 94 // if ($this.val().length < 11) { 95 // $this.addClass(options.classNoValid); 96 // error = true; 97 // } 98 // break; 99 case 'email': 100 if ($this.val() != '') { 101 if (pattern.test($this.val())) { 102 $this.removeClass(options.classNoValid); 103 } 104 else { 105 $this.addClass(options.classNoValid); 106 error = true; 107 } 108 } 109 else { 110 $this.addClass(options.classNoValid); 111 error = true; 112 } 113 break; 114 case 'checkbox': 115 if(!$this.is(':checked')) { 116 $this.parent().addClass(classNoValid); 117 error = true; 118 } 119 else { 120 $this.parent().removeClass(classNoValid) 121 } 122 break; 123 default: 124 if ($this.val() === '') { 125 $this.addClass(options.classNoValid); 126 error = true; 127 } 128 break; 129 } 130 }); 131 if (typeof callback == 'function') { 132 callback.call(null, !error); 133 } 134 } 135})(jQuery); 136function getUrlParams(url = location.search) { 137 let regex = /[?&]([^=#]+)=([^&#]*)/g, params = {}, match; 138 while (match = regex.exec(url)) { 139 params[match[1]] = match[2]; 140 } 141 return params; 142} 143(function () { 144//<!-- ÐоÑода 145 $("body").on('click', '#goroda .tit, #goroda .closeButt', function () { 146 $('#goroda .list_city').slideToggle(); 147 }); 148// slider 149 if ($(".slider").length > 0) { 150 $(".slider").owlCarousel({ 151 items: 1, 152 loop: true, 153 //animateOut: 'fadeOut', 154 autoplay: 1, 155 autoplayHoverPause: true, 156 lazyLoad: true, 157 nav: true, 158 navText: ['', ''] 159 }); 160 } 161})(); 162(function () { 163 //let url = window.location.href; 164 function getCookie(name) { 165 const match = document.cookie.match(new RegExp('(?:^|; )' + name.replace(/([$?*|{}()\[\]\\\/\+^])/g, '\\$1') + '=([^;]*)')); 166 return match ? decodeURIComponent(match[1]) : null; 167 } 168 function setCookie(name, value, days) { 169 let expires = ""; 170 if (days) { 171 let date = new Date(); 172 date.setTime(date.getTime() + (days*24*60*60*1000)); 173 expires = "; expires=" + date.toUTCString(); 174 } 175 document.cookie = name + "=" + encodeURIComponent(value) + expires + "; path=/"; 176 } 177 // ÐÑÐ¸Ð¼ÐµÑ Ð¸ÑполÑзованиÑ: 178 // let myCookie = getCookie('cookie_name'); 179 // console.log(myCookie); 180 // 181 // setCookie("user", "Alex", 365); 182 const COOKIES_BANNER_NICATOR = 'cookie_banner_nicator'; 183 if(!getCookie(COOKIES_BANNER_NICATOR)) { 184 $.getJSON(document.location.href, { 185 action: 'getForm', 186 tpl: 'cookies_banner' 187 }, function (resp) { 188 $('html').addClass('qbl--visible'); 189 $('body').append(resp); 190 $('body').on('click', '.qbl--btn', function(){ 191 $('.qbl--banner').remove(); 192 $('html').removeClass('qbl--visible'); 193 setCookie(COOKIES_BANNER_NICATOR, "1", 365); 194 }); 195 }); 196 } 197 // $("body").on('click', '.buttGetForm', function () {
198 // let $this = $(this); 199 // if (typeof Slideout == 'function') slideout.close(); 200 // $.getJSON(document.location.href, { 201 // action: $this.data('id'), 202 // tpl: $this.data('tpl') 203 // }, function (resp) { 204 // $('#wrapper,#footer-bg').addClass('blur'); 205 // $('body').append('<div class="overlay_l"></div>' + resp); 206 // im.mask(inputMaskSelector); 207 // }); 208 // }); 209 switch (getUrlParams()['utm_source']) { 210 case 'instagram': 211 $.getJSON(document.location.href, { 212 action: 'getForm', 213 tpl: 'callBack_instagram' 214 }, function (resp) { 215 $('#wrapper,#footer-bg').addClass('blur'); 216 $('body').append('<div class="overlay_ll"></div>' + resp); 217 let newUrl = window.location.href.replace(window.location.search, ''); 218 setTimeout(() => { 219 $('.closeWind_hide').fadeIn(); 220 history.pushState({}, null, newUrl); 221 }, 3000); 222 }); 223 break; 224 } 225 let alertwin = getCookie("alertwin"); 226 let timer_raschet_butt; 227 if (alertwin === "no") { 228 hide_raschet_butt(); 229 } 230 else { 231 timer_raschet_butt = setTimeout(hide_raschet_butt, 5000); 232 } 233 setTimeout(() => { 234 $('.raschet_butt').show(); 235 }, 200); 236 $("body").on('click', '.raschet_butt .butt_1,.exitblock__btn', function (e) { 237 e.stopPropagation(); 238 $(".exitblock").remove(); 239 var date = new Date; 240 date.setDate(date.getDate() + 7); 241 document.cookie = "alertwin=no; path=/; expires=" + date.toUTCString(); 242 if ($('.raschet_butt').hasClass('small')) { 243 $('.raschet_butt').removeClass('small'); 244 $('.raschet_butt').animate({ 245 right: '0' 246 }, 100); 247 return; 248 } 249 clearTimeout(timer_raschet_butt); 250 hide_raschet_butt(); 251 $("html:not(:animated),body:not(:animated)").animate({ 252 scrollTop: $('#zakaz_obrazc').offset().top 253 }, 600); 254 }); 255 $("body").on('click', '.raschet_butt .butt_2', function () { 256 hide_raschet_butt(); 257 }); 258 // пÑовеÑÑем, еÑÑÑ Ð»Ð¸ Ñ Ð½Ð°Ñ cookie, Ñ ÐºÐ¾ÑоÑой Ð¼Ñ Ð½Ðµ показÑваем окно и еÑли неÑ, запÑÑкаем показ 259 if (alertwin !== "no") { 260 $(document).mouseleave(function (e) { 261 if (e.clientY < 10) { 262 $(".exitblock").fadeIn("fast"); 263 // запиÑÑваем cookie на 1 денÑ, Ñ ÐºÐ¾ÑоÑой Ð¼Ñ Ð½Ðµ показÑваем окно 264 var date = new Date; 265 date.setDate(date.getDate() + 7); 266 document.cookie = "alertwin=no; path=/; expires=" + date.toUTCString(); 267 } 268 }); 269 $(document).click(function (e) { 270 if (($(".exitblock").is(':visible')) && (!$(e.target).closest(".exitblock .modaltext").length)) { 271 $(".exitblock").remove(); 272 } 273 }); 274 } 275 $('.flags').clone().insertAfter('.buttOpenTopMenu'); 276 if ($('.info_b').length && $('.info_b').data('link') != undefined && $('.info_b').data('link') != '') { 277 $('.info_b .text').append($('<a/>', { 278 href: 'http://' + $('.info_b').data('link'), 279 target: '_blank', 280 text: 'ÐеÑейÑи на ÑайÑ' 281 })); 282 } 283 $(".tabs").accessibleTabs({ 284 tabhead: 'div.titTab', 285 fx: "fadeIn" 286 }); 287 //.page_8 .products 288 $('body').on('click', '.butt_hide', function (e) { 289 var data_id = $(this).data('id'); 290 $('#cont_sl_' + data_id).slideUp(function () { 291 $("html:not(:animated),body:not(:animated)").animate({ 292 scrollTop: $('#link_ss_' + data_id).offset().top 293 }, 800); 294 }); 295 }); 296 if( $('#zakaz_obrazc').length ) { 297 $.getJSON(document.location.href, { 298 action_getElements: 'getFormZakazObrazc' 299 }, function (resp) { 300 $('#zakaz_obrazc').html(resp); 301 im.mask(inputMaskSelector); 302 }); 303 } 304 if( $('#fos').length ) { 305 $.getJSON(document.location.href, { 306 action_getElements: 'getFormFos' 307 }, function (resp) { 308 $('#fos').html(resp); 309 im.mask(inputMaskSelector); 310 }); 311 } 312 // fast form 313 $("body").on('click', '.buttGetForm', function () { 314 let $this = $(this); 315 if (typeof Slideout == 'function') slideout.close(); 316 $.getJSON(document.location.href, { 317 action: $this.data('id'), 318 tpl: $this.data('tpl') 319 }, function (resp) { 320 $('#wrapper,#footer-bg').addClass('blur'); 321 $('body').append('<div class="overlay_l"></div>' + resp); 322 im.mask(inputMaskSelector); 323 }); 324 }); 325 // close fast form 326 $("body").on('click', '.overlay_l,.closeWind', function () { 327 try { 328 let input = $('#bgCallBack').find(inputMaskSelector).get(0); 329 if (input.inputmask) input.inputmask.remove() 330 } catch (e) {} 331 $('.overlay_l,.overlay_ll,#bgCallBack').remove(); 332 $('#wrapper,#footer-bg').removeClass('blur'); 333 }); 334 // valid & send fast form 335 $("body").on('click', `.${classNoValid}`, function (e) { 336 $(this).removeClass(classNoValid); 337 }); 338 // можно ÑдалиÑÑ 339 // var i = 0; 340 // $("body").on('click', 'input[type=tel]', function (e) { 341 // if (i === 0) $(this).val('+7'); 342 // }); 343 // $("body").on('keyup', 'input[type=tel]', function (e) { 344 // i = 1; 345 // $(this).val($(this).val().replace(/[^\d+]/g, '')); 346 // }); 347 $('body').on('click', '.buttSendForm', async function (e) { 348 await isRecaptchaReady;
349 let $this = $(this); 350 let form = $(this).parent(); 351 const isValidForm = await validationForm('#' + $(this).parent().parent().attr('id')); 352 if (!isValidForm) return; 353 let inputPhone = $(form).find(inputMaskSelector).get(0); 354 if( inputPhone.value !== '' && inputPhone.inputmask && !inputPhone.inputmask.isValid() ) { 355 inputPhone.classList.add(classNoValid); 356 return; 357 } 358 const token = await getReToken(); 359 $.fancybox.close(); 360 let formData = form.serializeArray() 361 formData.push({ 362 name: 'token', 363 value: token, 364 }); 365 $.getJSON(document.location.href, { 366 action: form.attr('action'), 367 tpl: $this.data('tpl'), 368 data: JSON.stringify(formData) 369 }, function (data) { 370 if (inputPhone && inputPhone.inputmask) inputPhone.inputmask.remove(); 371 arr = data.split('||'); 372 $('#' + arr[0]).empty().html(arr[1]); 373 $('.overlay_ll').addClass('overlay_l'); 374 }); 375 }); 376 //<!-- FeedBack 377 $('body').on('submit', '.fFos', async function (e) { 378 e.preventDefault(); 379 let form = $(this); 380 let formWrap = $(this).parent(); 381 let formData = form.serializeArray() 382 const isValidForm = await validationForm('#' + formWrap.attr('id')); 383 if (!isValidForm) return; 384 let inputPhone = $(form).find(inputMaskSelector).get(0); 385 if( inputPhone.value !== '' && inputPhone.inputmask && !inputPhone.inputmask.isValid() ) { 386 inputPhone.classList.add(classNoValid); 387 return; 388 } 389 await isRecaptchaReady; 390 const token = await getReToken(); 391 $.fancybox.close(); 392 formData.push({ 393 name: 'token', 394 value: token, 395 }); 396 $.ajax({ 397 url: document.location.href, 398 type: "post", 399 data: formData, 400 dataType: 'html', 401 success: function (response) { 402 if (inputPhone && inputPhone.inputmask) inputPhone.inputmask.remove(); 403 if ($(formWrap).attr('id') == 'zakaz_obrazc') { 404 let date = new Date; 405 date.setDate(date.getDate() + 7); 406 document.cookie = "alertwin=no; path=/; expires=" + date.toUTCString(); 407 $('.raschet_butt').remove(); 408 } 409 formWrap.empty(); 410 let sp = $(response).find('.spasibo').html(); 411 if (sp === undefined) { 412 formWrap.html($(response).find('#' + $(formWrap).attr('id')).html()); 413 } 414 else { 415 formWrap.html('<span class="spasibo">' + sp + '</span>'); 416 } 417 }, 418 error: function (jqXHR, textStatus, errorThrown) { 419 alert(textStatus + ' ' + jqXHR.status + ' ' + errorThrown); 420 } 421 }); 422 return false; 423 }); 424 //--> 425})(); 426// Reviews�$(function(){� $('body').on('submit', '.formRew', function(e) {� if(typeof(as_reqStartCallback)=='function') as_reqStartCallback();� var data = $(this).serializeArray();� $.ajax({� url: document.location.href,� type: "post",� data: data,� dataType: 'html',� success: function(response){� if(typeof(as_reqCompletCallback)=='function') as_reqCompletCallback(); � $(".formRew_wrapp").empty();� var sp = $(response).find('.formRew_wrapp .spasibo').html();� if(sp==undefined){� $(".formRew_wrapp").html($(response).find('.formRew_wrapp').html());� }� else {� $(".formRew_wrapp").html('<span class="spasibo">'+sp+'</span>');� }� },� error: function(jqXHR,textStatus,errorThrown){� alert(textStatus+' '+jqXHR.status+' '+errorThrown);� }� })� return false;� });�}); 427var slideout,� getElements = false;�$(function() {� //<!-- slideout� slideout = new Slideout({� 'panel': document.getElementById('wrapper'),� 'menu': document.getElementById('slideMenu'),� 'padding': 256,� 'tolerance': 70� });� // Toggle button� document.querySelector('.buttOpenTopMenu').addEventListener('click', function() {� slideout.toggle();� });� $("body").on('click', '#slideMenu a', function() {� slideout.toggle()� });� //--> slideout� resizer();� $(window).resize(function() {� slideout.close();� resizer();� });� setInterval("$('#footer_plug').css('height',$('footer').outerHeight())", 1000)�});�function resizer() { //<!-- start resizer()� //<!--start getSlideMenu� if ($("#slideMenu").length > 0 && $(window).width() <= 860 && !getElements) {� getElements = true;� $.getJSON(document.location.href, {� action_getElements: 'getSlideMenu'� }, function(data) {� $('#slideMenu').empty().html(data);� });� }� //--> end getSlider�} //--> end resizer()
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.