1// Cookie manipulatiions 2if ($.cookie === undefined) { 3 !function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? a(require("jquery")) : a(jQuery) }(function (a) { function b(a) { return h.raw ? a : encodeURIComponent(a) } function c(a) { return h.raw ? a : decodeURIComponent(a) } function d(a) { return b(h.json ? JSON.stringify(a) : String(a)) } function e(a) { 0 === a.indexOf('"') && (a = a.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")); try { return a = decodeURIComponent(a.replace(g, " ")), h.json ? JSON.parse(a) : a } catch (b) { } } function f(b, c) { var d = h.raw ? b : e(b); return a.isFunction(c) ? c(d) : d } var g = /\+/g, h = a.cookie = function (e, g, i) { if (void 0 !== g && !a.isFunction(g)) { if (i = a.extend({}, h.defaults, i), "number" == typeof i.expires) { var j = i.expires, k = i.expires = new Date; k.setTime(+k + 864e5 * j) } return document.cookie = [b(e), "=", d(g), i.expires ? "; expires=" + i.expires.toUTCString() : "", i.path ? "; path=" + i.path : "", i.domain ? "; domain=" + i.domain : "", i.secure ? "; secure" : ""].join("") } for (var l = e ? void 0 : {}, m = document.cookie ? document.cookie.split("; ") : [], n = 0, o = m.length; o > n; n++) { var p = m[n].split("="), q = c(p.shift()), r = p.join("="); if (e && e === q) { l = f(r, g); break } e || void 0 === (r = f(r)) || (l[q] = r) } return l }; h.defaults = {}, a.removeCookie = function (b, c) { return void 0 === a.cookie(b) ? !1 : (a.cookie(b, "", a.extend({}, c, { expires: -1 })), !a.cookie(b)) } }); 4} 5 6!function (a) { function f(a, b) { if (!(a.originalEvent.touches.length > 1)) { a.preventDefault(); var c = a.originalEvent.changedTouches[0], d = document.createEvent("MouseEvents"); d.initMouseEvent(b, !0, !0, window, 1, c.screenX, c.screenY, c.clientX, c.clientY, !1, !1, !1, !1, 0, null), a.target.dispatchEvent(d) } } if (a.support.touch = "ontouchend" in document, a.support.touch) { var e, b = a.ui.mouse.prototype, c = b._mouseInit, d = b._mouseDestroy; b._touchStart = function (a) { var b = this; !e && b._mouseCapture(a.originalEvent.changedTouches[0]) && (e = !0, b._touchMoved = !1, f(a, "mouseover"), f(a, "mousemove"), f(a, "mousedown")) }, b._touchMove = function (a) { e && (this._touchMoved = !0, f(a, "mousemove")) }, b._touchEnd = function (a) { e && (f(a, "mouseup"), f(a, "mouseout"), this._touchMoved || f(a, "click"), e = !1) }, b._mouseInit = function () { var b = this; b.element.bind({ touchstart: a.proxy(b, "_touchStart"), touchmove: a.proxy(b, "_touchMove"), touchend: a.proxy(b, "_touchEnd") }), c.call(b) }, b._mouseDestroy = function () { var b = this; b.element.unbind({ touchstart: a.proxy(b, "_touchStart"), touchmove: a.proxy(b, "_touchMove"), touchend: a.proxy(b, "_touchEnd") }), d.call(b) } } }(jQuery); 7 8$('[data-max-pages]').each(function () { 9 cur_part = $(this).attr('data-load-part'); 10 if (parseInt($(this).attr('data-max-pages')) > 1) { 11 $('[data-load=' + cur_part + ']').show(); 12 } 13}) 14 15jQuery(document).ready(function ($) { 16 17 $('[data-action=autoload]').on('change', function () { 18 $(this).parents('form').trigger('submit'); 19 }); 20 21 $('[data-action="search_filter_ajax"] [data-taxonomy]').click(function () { 22 if (!$(this).find('input').is(':checked')) { $(this).removeClass('active'); } else { $(this).addClass('active'); } 23 }); 24 25 $('[data-action="reset_filter"]').click(function () { 26 27 $('[data-action=search_filter_ajax]').trigger("reset"); 28 29 $('[data-range-slider]').each(function () { 30 let field = $(this).attr('data-range-slider'); 31 let min_val = $('[name=min_pm_' + field + ']').attr('data-value'); 32 let max_val = $('[name=max_pm_' + field + ']').attr('data-value'); 33 $(this).slider("option", "values", [parseInt(min_val), parseInt(max_val)]); 34 }); 35 36 $('[data-action=search_filter_ajax] .active').removeClass('active'); 37 38 $('[data-action=search_filter_ajax]').trigger("submit"); 39 40 $('[data-action=search_filter_ajax] .w-checkbox-input--inputType-custom').removeClass('w--redirected-checked'); 41 }); 42
43 $('[data-action="search_filter_ajax"]').submit(function (e) { 44 45 e.preventDefault(); 46 47 let cur_part = $('body').attr('data-load-current'); 48 let data_load = $('[data-load=' + cur_part + ']'); 49 50 let formData = new FormData($(this)[0]); 51 let fields = {}; 52 53 for (let [key, value] of formData) { 54 fields[key] = value; 55 } 56 57 fields['query'] = query_vars; 58 59 $('[data-action=preload]').show(); 60 ajaxs('filter', fields, function (data) { 61 if (data) { 62 if (cur_part !== undefined) { 63 cur_part = '=' + cur_part; 64 } else { 65 cur_part = ''; 66 } 67 68 let parent_container = $('[data-load-part' + cur_part + ']').parent().parent(); 69 $('[data-load-part' + cur_part + ']').parent().remove(); 70 parent_container.prepend(data); 71 72 const max_pages = parseInt($('[data-max-pages]').attr('data-max-pages')); 73 74 if (max_pages <= 1 || isNaN(max_pages)) { 75 $(data_load).hide(); 76 } else { 77 $(data_load).show(); 78 } 79 80 if (typeof (wtw_after_filter_ajax_load) === 'function') { 81 wtw_after_filter_ajax_load(cur_part); 82 } else { 83 Webflow.destroy(); Webflow.ready(); 84 if (Webflow.require('ix2') !== undefined) Webflow.require('ix2').init(); 85 } 86 87 $('[data-action=preload]').hide(); 88 89 } else { 90 $(data_load).hide(); 91 } 92 }); 93 }); 94 95 // $('[data-action="search_filter_ajax"]').trigger('submit'); 96 97 $('[href*=\"brandjs\"],.w-webflow-badge').attr('style', 'display:none !important'); 98 99 if ($('[data-load]')[0]) { 100 101 $('[data-load-part]:first').each(function () { 102 $('body').attr('data-load-current', $(this).attr('data-load-part')); 103 }); 104 105 $('[data-set-part]').click(function () { 106 $('body').attr('data-load-current', $(this).attr('data-set-part')); 107 }); 108 109 $('[data-max-pages=0]').each(function () { 110 cur_part = $(this).attr('data-load-part'); 111 $('[data-load=' + cur_part + ']').hide(); 112 }) 113 114 $('[data-max-pages=1]').each(function () { 115 cur_part = $(this).attr('data-load-part'); 116 if ($(this).attr('data-current-page') === '1') { 117 $('[data-load=' + cur_part + ']').hide(); 118 } 119 }) 120 121 $('[data-load]').click(function () { 122 var part = $(this).attr('data-load'); $('body').attr('data-load-current', part); 123 var max_pages = $('[data-load-part=' + part + ']:last').attr('data-max-pages'); 124 var current_page = $('[data-load-part=' + part + ']').last().attr('data-current-page'); 125 var archive = $(this).attr('data-load'); $('body').attr('data-archive', part); 126 var data = { 127 'query': query_vars, 128 'page': current_page, 129 'part': part, 130 'archive': archive 131 }; 132 if (current_page != max_pages) { 133 $('[data-action=preload]').show(); 134 ajaxs('ajaxs_load_posts', data, function (data) { 135 if (data) { 136 current_page++; 137 cur_part = $('body').attr('data-load-current'); 138 if (cur_part !== undefined) { 139 cur_part = '=' + cur_part; 140 } else { 141 cur_part = ''; 142 } 143 $('[data-load-part' + cur_part + ']').last().parent().after(data); 144 if (current_page == max_pages) $('[data-load' + cur_part + ']').hide(); 145 Webflow.destroy(); Webflow.ready(); 146 if (Webflow.require('ix2') != undefined) Webflow.require('ix2').init(); 147 $('[data-action=preload]').hide(); 148 } else { 149 $(data_load).hide(); 150 } 151 }); 152 } 153 }); 154 155 if ($('body').attr('data-load-scroll') !== undefined) { 156 $(window).scroll(function () { 157 var scroll_offset = $('body').attr('data-load-scroll'); 158 var part = $(this).attr('data-load'); $('body').attr('data-load-current', part); 159 var max_pages = $('[data-load-part=' + part + ']:last').attr('data-max-pages'); 160 var current_page = $('[data-load-part=' + part + ']').last().attr('data-current-page'); 161 var archive = $(this).attr('data-load'); $('body').attr('data-archive', part); 162 var data = { 163 'query': query_vars, 164 'page': current_page, 165 'part': part, 166 'archive': archive 167 }; 168 if ($(document).scrollTop() > ($(document).height() - scroll_offset) && current_page != max_pages && !$('body').hasClass('loading')) { 169 $('body').addClass('loading'); 170 ajaxs('ajaxs_load_posts', data, function (data) { 171 if (data) { 172 cur_part = $('body').attr('data-load-current'); 173 if (cur_part !== undefined) { 174 data_load = '[data-load=' + cur_part + ']'; 175 } else { 176 data_load = '[data-load]'; 177 } 178 $('body').removeClass('loading'); 179 $(data_load).before(data); 180 current_page++; 181 if (current_page == max_pages) $(data_load).hide(); 182 Webflow.destroy(); Webflow.ready(); 183 if (Webflow.require('ix2') != undefined) Webflow.require('ix2').init(); 184 } 185 }); 186 } 187 }); 188 } 189 } 190 191 $('body').on('click', '[data-copy]', function () { 192 params = $(this).attr('data-copy').split(' '); 193 $('.' + params[1]).html($(this).parent().find('.' + params[0]).html()); 194 wtw_webflow_init(); 195 }); 196 197 $('body').on('click', '[data-copy-attrs]', function () { 198 params = $(this).attr('data-copy').split(' '); 199 $('.' + params[1]).html($(this).parent().find('.' + params[0]).html()); 200 Webflow.destroy(); Webflow.ready(); 201 if (Webflow.require('ix2') != undefined) Webflow.require('ix2').init(); 202 }); 203 204 $('[data-object=wp_term_menu] a').each(function () { 205 if (document.URL === $(this).attr('href')) { 206 $(this).addClass('active'); 207 $(this).addClass('w--current'); 208 $(this).parents().each(function () { 209 if ($(this).attr('data-object') === 'wp_term_menu') return false;
210 $(this).addClass('active'); 211 $(this).addClass('w--current'); 212 }); 213 } 214 }); 215 216 $('a').not('.w--current,.active').each(function () { 217 if (document.URL === $(this).attr('href')) { 218 $(this).addClass('w--current'); 219 } 220 }); 221 222 $('a').each(function () { 223 if ($(this).attr('href') === '#') { 224 $(this).removeClass('w--current'); 225 } 226 }); 227 228 $('[data-content=term-level] .w--current').each(function () { 229 $(this).parent().parent().parents('[data-content=term-level]').each(function () { 230 $(this).children().first().trigger('click'); 231 }); 232 }); 233 234 // обÑабоÑка полей ÑилÑÑÑа 235 $('[name=search_filter]').submit(function (e) { 236 var form = $(this); 237 if ($(this).attr('data-mode') !== 'ajax') { 238 if ($(this).find('[name=s]').val() === '') { 239 $(this).find('[name=s]').removeAttr('name'); 240 } 241 $(this).find('.w-input').each(function () { 242 if ($(this).attr('data-value') === $(this).val()) { 243 // $(this).removeAttr('name'); 244 } 245 }); 246 } 247 }); 248 249 // ÑÐ»Ð°Ð¹Ð´ÐµÑ Ð´Ð¸Ð°Ð¿Ð¾Ð·Ð¾Ð½Ð¾Ð² знаÑений 250 $('[data-range-slider]').each(function () { 251 var field = $(this).attr('data-range-slider'); 252 $(this).slider({ 253 step: parseInt($(this).attr('data-ui-slider')), 254 range: true, 255 min: parseInt($("[name=min_pm_" + field + "]").attr('data-value')), 256 max: parseInt($("[name=max_pm_" + field + "]").attr('data-value')), 257 values: [parseInt($("[name=min_pm_" + field + "]").val()), parseInt($("[name=max_pm_" + field + "]").val())], 258 slide: function (event, ui) {
259 $("[name=min_pm_" + field + "]").val(ui.values[0]).keyup(); 260 $("[name=max_pm_" + field + "]").val(ui.values[1]).keyup(); 261 } 262 }); 263 }); 264 265}); 266 267// use in Ajax filter 268 269function set_query_vars(query_data) { 270 query_vars = query_data; 271} 272 273function wtw_webflow_init() { 274 Webflow.destroy(); 275 Webflow.ready(); 276 WebflowIx2 = Webflow.require('ix2'); 277 WebflowIx2 != undefined ? WebflowIx2.init() : ''; 278 document.dispatchEvent(new Event('readystatechange')); 279} 280 281function d() { 282 for (var i = 0; i < arguments.length; i++) { 283 console.log(arguments[i]); 284 } 285} 286 287function dt() { 288 for (var i = 0; i < arguments.length; i++) { 289 console.table(arguments[i]); 290 } 291} 292 293function wtw_number_format(number, decimals, dec_point, thousands_sep) { 294 number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); 295 var n = !isFinite(+number) ? 0 : +number, 296 prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), 297 sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, 298 dec = (typeof dec_point === 'undefined') ? '.' : dec_point, 299 s = '', 300 toFixedFix = function (n, prec) { 301 var k = Math.pow(10, prec); 302 return '' + (Math.round(n * k) / k) 303 .toFixed(prec); 304 }; 305 s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)) 306 .split('.'); 307 if (s[0].length > 3) { 308 s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); 309 } 310 if ((s[1] || '') 311 .length < prec) { 312 s[1] = s[1] || ''; 313 s[1] += new Array(prec - s[1].length + 1) 314 .join('0'); 315 } 316 return s.join(dec); 317}
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.