PageSourceSearch

https://www.bingostore.ru/wa-data/public/site/themes/bingostore/bingostore.js?v1.0

js bingostore.ru collected 2026-10-09 00:39:41 UTC 29,247 bytes, 803 lines download raw bytes

1$(window).load(function() {
2    $('.wa-step-confirm-section').find('.wa-checkbox-wrapper input').addClass('active').attr('checked', 'checked');
3    $('.product__service-item input').on('change', function () {
4        if ($(this).prop("checked")) {
5            var id = $(this).val();
6            if ($('#advancedservices_plugin_object_tooltip_link_' + id).length) {
7                $('#advancedservices_plugin_object_tooltip_link_' + id).trigger('click');   
8            }
9        }
10    });
11})
12$(document).ready(function () {
13    /* Переход на товар через отзыв*/
14    $('.product__list-product').on('click', '.product__list-rating-icon', function () {
15        var urlP = $(this).closest('.product__list-link');
16        urlP.attr('href', function(i, h) {
17        return h + (h.indexOf('?') != -1 ? "&scrollR" : "?scrollR");
18        });
19    });
20        
21    /* Соглашение пользвователя в корзине */
22    $('.cart__page').on('change', 'input:not(.wa-error), select, textarea', function () {
23        setTimeout(function () {
24
25            if (!$('.wa-step-confirm-section').find('.wa-checkbox-wrapper input').hasClass('.wa-error')) {
26                $('.wa-step-confirm-section').find('.wa-checkbox-wrapper input').addClass('active').attr('checked', 'checked');
27            }
28
29        }, 1000)
30    })
31    $('.cart__page').on('click', '.wa-dropdown-area, .wa-dropdown-toggle', function () {
32        setTimeout(function () {
33
34            if (!$('.wa-step-confirm-section').find('.wa-checkbox-wrapper input').hasClass('.wa-error')) {
35                $('.wa-step-confirm-section').find('.wa-checkbox-wrapper input').addClass('active').attr('checked', 'checked');
36            }
37
38        }, 1000)
39    })
40    /* Свернуть и развернуть описание категории */
41    var content_block = $(".about-as.categ-seo .about-as__text");
42    var content_height = $(content_block).height();
43    var _HEIGHT = 200;
44    if (content_height > _HEIGHT) {
45        $(content_block).height(_HEIGHT);
46        $(".about-as.categ-seo").on('click', ".product-info__block-description__toggler.niv", function(){
47            if ($(this).hasClass("active")) {
48                $(content_block).removeClass("open").css('height', _HEIGHT+"px");
49                $(this).removeClass("active");
50            } else {
51                $(content_block).addClass("open").css('height', "auto");
52                $(this).addClass("active");
53            }
54        });
55    } else {
56        $(content_block).addClass("open");
57        $(".product-info__block-description__toggler.niv").hide();
58        
59    }
60    /* Добавление класса при клике на ссылку саб кат*/
61     $('.sub-links').on('click', '.sub-links__link', function () {
62        $(this).addClass("clicked");
63    });
64    /* Клик по HTML */
65    function closePopups(event, target) {
66        let block = $(".header__auth, .header__auth-sub, .product__skus, .filters, .sorting, .filters__modal-name, .filter-param-wrapper, .filter-param");
67        if (target) {
68            block = block.not(target);
69            block.removeClass("active");
70            return;
71        }
72        if (!block.is(event.target) && block.has(event.target).length === 0) {
73            block.removeClass("active");
74        }
75    }
76    $(document).click(function (e) {
77        closePopups(e, null);
78    });
79    /* Попоп окно покупки товара */
80    $('.product__popap').on('click', '.product__popap-overlay, .product__popap-close, .product__popap-btn-next', function () {
81        $(this).closest('.product__popap').removeClass('active');
82    });
83    /* Кнопка добавить отзыв на странице товара */
84    $('.product__rait-add-reviews').on('click', function () {
85        if ($(this).hasClass('bottom-btn')) {
86            $( ".reviewsplus-add" ).trigger( "click" );
87            var anim = $('.reviewsplus-main').offset().top;
88            $("html, body").animate({ scrollTop: anim - 600 }, 500);
89        }
90        else {
91            $( ".reviewsplus-add" ).trigger( "click" );
92            var anim = $('.product__reviews.reviews').offset().top;
93            $("html, body").animate({ scrollTop: anim - 85 }, 500);
94        }
95    });
96    /* Форма отправки сообщений */
97    $('.kontakty__form .feedback-form').on('submit', function(){
98        var errors = false;
99        var form = $(this);
100        var wrapper = form.closest('.main-form__form');
101        if ($('.kontakty__form .feedback-form input[name="user_phone"]').val() == "") {
102            $('.kontakty__form .feedback-form input[name="user_phone"]').closest('.wa-field').addClass('error');
103            errors = true;
104        }
105        if (!errors) {
106            $.post(form.attr('action'), form.serialize(), function(response){
107                if (response.status == "ok") {
108                    $('body').append("<div class='thanks__block'><div class='thanks__block-header'>Уведомление<span class='icon-close'></span></div><div class='thanks__block-title'>Ваша заявка была успешно отправлена</div><div class='thanks__block-desc'>Наши менеджеры свяжутся с Вами в ближайшее время</div><div class='thanks__block-close'>Закрыть окно</div></div>");
109                    setTimeout(function () {
110                        $('.thanks__block').on('click', '.icon-close, .thanks__block-close', function () {
111                            $(this).closest('.thanks__block').remove();
112                            form.find('input, textarea').val('');
113                        });
114                    }, 1000);
115                } else {
116                    wrapper.append("<div class='error'>Ошибка!<br>Повторите отправку позже</div>");
117                }
118            }, 'json');
119        }
120        return false;
121    });
122    /*Фильтр в категории */
123    if ($('.filters').length) {
124        $('.filters').on('click', '.filters__modal-name', function () {
125            if ($(this).closest('.filter-param').hasClass('active')) {
126               $(this).closest('.filter-param').removeClass('active');
127            }
128            else {
129                $('.filter-param').removeClass('active');
130                $(this).closest('.filter-param').addClass('active');
131                closePopups(null, $('.filters, .filters__modal-name, .filter-param'));
132            }
133        });
134    }
135    $('.filters .filter-param').on('click', 'label input[type=checkbox]', function () {
136        if ($(this).hasClass('active')) {
137            $(this).removeClass('active');
138            $(this).removeAttr('checked', 'checked');
139        }
140        else {
141            $(this).addClass('active');
142            $(this).attr('checked', 'checked');
143        }
144    });
145    /* Добавление нумерации ля товаров в корзине */
146    if ($('.wa-products').length) {
147        $('.wa-product').each(function (i) {
148            var index = i + 1;
149           $(this).find('.wa-product-body').append( "<div class='wa-column-index'>" + index + "." + "</div>" );
150        });
151    }
152    
153    /* Табики на странице товаров */
154    $('.product__description-block').on('click', '.product__desc-title', function () {
155        $('.product__desc-title').removeClass('active');
156        $(this).addClass('active');
157        var attrTitle = $(this).attr('data-desc-title');
158        $('.product_desc-main').find("div[data-desc='" + attrTitle + "']").show().siblings().hide();
159    });
160    /* Выбор артикула на товаре */
161    $('.product__skus').on('click', '.product__skus-trigger', function () {
162        if ($(this).closest('.product__skus').hasClass('active')) {
163            $(this).closest('.product__skus').removeClass('active');
164        }
165        else {
166            $(this).closest('.product__skus').addClass('active');
167            closePopups(null, $('.product__skus, .product__skus-trigger'));
168
169        }
170    });
171    $('.product__skus-menu label').on('change', function () {
172       var text = $(this).find('.product__skus-name').text();
173       $('.product__skus-trigger span').text(text);
174    });
175    /* Сервисы в корзине */
176    $('.wa-services').on('click', '.wa-service .wa-field input', function () {
177        if ($(this).hasClass('active')) {
178            $(this).removeClass('active');
179            $(this).removeAttr('checked', 'checked');
180        }
181        else {
182            $(this).addClass('active');
183            $(this).attr('checked', 'checked');
184        }
185    });
186    /* Соглашение пользователя инпут */
187    $('.wa-step-confirm-section').on('click', '.wa-checkbox-wrapper input', function () {
188        if ($(this).hasClass('active')) {
189            $(this).removeClass('active');
190            $(this).removeAttr('checked', 'checked');
191        }
192        else {
193            $(this).addClass('active');
194            $(this).attr('checked', 'checked');
195        }
196    });
197    /* Сервисы на странице товара */
198    $('.product__service').on('click', '.product__service-item input', function () {
199        if ($(this).hasClass('active')) {
200            $(this).removeClass('active');
201            $(this).removeAttr('checked', 'checked');
202        }
203        else {
204            $(this).addClass('active');
205            $(this).attr('checked', 'checked');
206        }
207    });
208    $('.product__skus-item input').each(function (i) {
209        if (i == 0){
210            $(this).addClass('active');
211        }
212    });
213    $('.product__skus').on('change', '.product__skus-item input', function () {
214        if ($(this).hasClass('active')) {
215           return false;
216        }
217        else {
218            $('.product__skus-item input').removeClass('active');
219            $(this).addClass('active');
220        }
221    });
222    /* Изменение кол-ва на товаре */
223    $(document).ready(function(){
224    $(document).on('click', ".qty__btn", function () {
225        var qty_input = $(this).parent().find(".qty__input"); 
226        var current_value = $(qty_input).val();
227        
228        if($(this).hasClass("minus")) {
229            if(current_value > 1) {
230                $(qty_input).val(--current_value);
231            }
232        } else { 
233            $(qty_input).val(++current_value);
234        }
235        $(qty_input).trigger("change");
236    }); 
237}); 
238    /* Скрипт для смены кол-ва товаров в категориях */
239    $('.products_per_page a').click(function () {
240        var that = $(this);
241        if (!that.hasClass('selected')) {
242            if (that.data('perpage')) {
243                $.cookie('products_per_page', that.data('perpage'), {expires: 30, path: "/"});
244            } else {
245                $.cookie('products_per_page', '', {expires: 0, path: "/"});
246            }
247            location.reload();
248        }
249        return false;
250    });
251
252    /* Выпадашка смены кол-ва товаров на странице категорий */
253    $('.per_page').on('click', '.per_page_name', function () {
254        if ($(this).closest('.per_page').hasClass('active')) {
255            $(this).closest('.per_page').removeClass('active');
256        }
257        else {
258            $(this).closest('.per_page').addClass('active');
259            closePopups(null, $('.per_page'));
260        }
261    });
262    /* Сортировка на странице категории */
263    $('.sorting').on('click', '.sorting__name', function () {
264        if ($(this).closest('.sorting').hasClass('active')) {
265            $(this).closest('.sorting').removeClass('active');
266        }
267        else {
268            $(this).closest('.sorting').addClass('active');
269        }
270    });
271    /* Переключатель списков на главной */
272    $('.sales').on('click', '.sales__tab', function () {
273        if (!$(this).hasClass('active')) {
274            $('.sales__tab').removeClass('active');
275            $(this).addClass('active');
276            var attr = $(this).attr('data-tab');
277            $('.sales').find(".trigger").hide();
278            $('.sales').find(".trigger[data-tabs='" + attr + "']").show();
279            $('.product-list img').retina({ force_original_dimensions: true });
280        }
281        
282
283    });
284    /* Фиксированный хедер */
285    var header_main = $('.header.not-mob:not(.order)');
286    var offset = $('.nav-menu').offset().top;
287    $(window).scroll(function () {
288        var scroll = $(window).scrollTop();
289            if (scroll > (offset - 30)) {
290                header_main.addClass('fixed');
291            } else {
292                header_main.removeClass('fixed');
293            }
294    });
295    /* Открывашка блока аторизации */
296    $('.header__auth').on('click', function () {
297       if ($(this).hasClass('active')) {
298            $(this).removeClass('active');
299            $('.header__auth-sub').removeClass('active');
300       }
301       else {
302            $(this).addClass('active');
303            $('.header__auth-sub').addClass('active');
304            closePopups(null, $('.header__auth-sub, .header__auth'));
305       }
306    });
307    /* Смена категорий при наведении в хедере */
308    var hoverOverTimeout = null;
309	var hoverOverTimeoutFN = null;
310    $('.nav-menu__link.nav-menu__link_has-sublinks').hover(function () {
311            var popap = $(this).attr('data-sublinks');
312            if(hoverOverTimeout){
313                clearTimeout(hoverOverTimeout);
314                hoverOverTimeout = null;
315            }
316            hoverOverTimeout = setTimeout(function() { 
317                $('.nav-menu__sublinks-content').find(popap).show().siblings().hide();
318                if ($(this).hasClass('open')) {
319                    $(this).removeClass('open');
320                }
321                else {
322                    $('.nav-menu__link.nav-menu__link_has-sublinks').removeClass('open');
323                    $(this).addClass('open');
324                }
325                $('.nav-menu').addClass('active');
326                $('.nav-menu__links_additional').removeClass('activated');
327                $('.nav-menu__show-more').removeClass('open');
328                $('.nav-menu__sublinks-content').find(popap).isotope({
329                itemSelector: '.nav-menu__sublinks-blocks',
330                layoutMode: 'masonry'
331                });
332             }, 100);         
333    });
334    $('.nav-menu').mouseleave(function () {
335        if(hoverOverTimeout){
336			clearTimeout(hoverOverTimeout);
337			hoverOverTimeout = null;
338		}
339
340		if(hoverOverTimeoutFN){
341			clearTimeout(hoverOverTimeoutFN);
342			hoverOverTimeoutFN = null;
343		}
344        $(this).removeClass('active');
345        $('.nav-menu__links_additional').removeClass('activated');
346        $('.nav-menu__show-more').removeClass('open');
347    });
348    $('.nav-menu__show-more').hover(function () {
349        if(hoverOverTimeout){
350            clearTimeout(hoverOverTimeout);
351            hoverOverTimeout = null;
352        }
353        hoverOverTimeout = setTimeout(function() { 
354        $(this).addClass('open');
355        $('.nav-menu').removeClass('active');
356        $('.nav-menu__links_additional').addClass('activated');
357        $('.nav-menu__links_additional .nav-menu__links-isotope').isotope({
358          itemSelector: '.nav-menu__sublinks-add',
359          layoutMode: 'masonry'
360        });
361        }, 100); 
362    });
363    
364});
365
366    /* Добавление кнопки еще при маленьком экране */
367    function nav_menu_build() {
368        var panel = $(".nav-menu__wrapper");
369        var panel_width = $(panel).outerWidth() - 44;
370        var link_sum = 0;
371        var nav_menu = $('.nav-menu__links_visible');
372        nav_menu.find(".nav-menu__block").each(function(){
373            link_sum += $(this).outerWidth();
374            if(panel_width < link_sum) {
375                $('.nav-menu__links_additional .nav-menu__links-isotope').append('<div class="nav-menu__sublinks-add"></div>')
376                $(this).clone().appendTo(".nav-menu__sublinks-add");
377                $(this).hide();
378                var popap = $(this).find('.nav-menu__link_has-sublinks').attr('data-sublinks');
379                $('.nav-menu__sublinks-content').find(popap).clone().appendTo(".nav-menu__sublinks-add");
380                $(".nav-menu__links").find(".nav-menu__show-more").addClass("activated");
381            }
382        });
383    }
384
385    function nav_menu_rebuild() {
386        $(".nav-menu__links_visible").find(".nav-menu__block").show();
387        $(".nav-menu__links_additional").find(".nav-menu__sublinks-add").remove();
388        $(".nav-menu__links").find(".nav-menu__show-more").removeClass("activated");
389        nav_menu_build();
390    }
391
392    $(window).resize(function(){
393        nav_menu_rebuild();
394    });
395    $(window).load(function(){
396        nav_menu_build();
397    });
398// Show Menu on Hover
399( function($) {
400
401    var enter, leave;
402
403    var storage = {
404        activeClass: "submenu-is-shown",
405        activeShadowClass: "is-shadow-shown",
406        showTime: 200,
407        $last_li: false
408    };
409
410    var bindEvents = function() {
411        var $selector = $(".flyout-nav > li"),
412            links = $selector.find("> a");
413
414        $selector.on("mouseenter", function() {
415            showSubMenu( $(this) );
416        });
417
418        $selector.on("mouseleave", function() {
419            hideSubMenu( $(this) );
420        });
421
422        links.on("click", function() {
423            onClick( $(this).closest("li") );
424        });
425
426        links.each( function() {
427            var link = this,
428                $li = $(link).closest("li"),
429                has_sub_menu = ( $li.find(".flyout").length );
430
431            if (has_sub_menu) {
432                link.addEventListener("touchstart", function(event) {
433                    onTouchStart(event, $li );
434                }, false);
435            }
436        });
437
438        $("body").get(0).addEventListener("touchstart", function(event) {
439            onBodyClick(event, $(this));
440        }, false);
441
442    };
443
444    var onBodyClick = function(event) {
445        var activeBodyClass = storage.activeShadowClass,
446            is_click_on_shadow = ( $(event.target).hasClass(activeBodyClass) );
447
448        if (is_click_on_shadow) {
449            var $active_li = $(".flyout-nav > li." + storage.activeClass).first();
450
451            if ($active_li.length) {
452                hideSubMenu( $active_li );
453            }
454        }
455    };
456
457    var onClick = function( $li ) {
458        var is_active = $li.hasClass(storage.activeClass);
459
460        if (is_active) {
461            var href = $li.find("> a").attr("href");
462            if ( href && (href !== "javascript:void(0);") ) {
463                hideSubMenu( $li );
464            }
465
466        } else {
467            showSubMenu( $li );
468        }
469    };
470
471    var onTouchStart = function(event, $li) {
472        event.preventDefault();
473
474        var is_active = $li.hasClass(storage.activeClass);
475
476        if (is_active) {
477            hideSubMenu( $li );
478        } else {
479            var $last_li = $(".flyout-nav > li." +storage.activeClass);
480            if ($last_li.length) {
481                storage.$last_li = $last_li;
482            }
483            showSubMenu( $li );
484        }
485    };
486
487    var showSubMenu = function( $li ) {
488        var is_active = $li.hasClass(storage.activeClass),
489            has_sub_menu = ( $li.find(".flyout").length );
490
491        if (is_active) {
492            clearTimeout( leave );
493
494        } else {
495            if (has_sub_menu) {
496
497                enter = setTimeout( function() {
498
499                    if (storage.$last_li && storage.$last_li.length) {
500                        clearTimeout( leave );
501                        storage.$last_li.removeClass(storage.activeClass);
502                    }
503
504                    $li.addClass(storage.activeClass);
505                    toggleMainOrnament(true);
506                }, storage.showTime);
507            }
508        }
509    };
510
511    var hideSubMenu = function( $li ) {
512        var is_active = $li.hasClass(storage.activeClass);
513
514        if (!is_active) {
515            clearTimeout( enter );
516
517        } else {
518            storage.$last_li = $li;
519
520            leave = setTimeout(function () {
521                $li.removeClass(storage.activeClass);
522                toggleMainOrnament(false);
523            }, storage.showTime * 2);
524        }
525    };
526
527    var toggleMainOrnament = function($toggle) {
528        var $body = $("body"),
529            activeClass = storage.activeShadowClass;
530
531        if ($toggle) {
532            $body.addClass(activeClass);
533        } else {
534            $body.removeClass(activeClass);
535        }
536    };
537
538    $(document).ready( function() {
539        bindEvents();
540    });
541
542})(jQuery);
543
544var MatchMedia = function( media_query ) {
545    var matchMedia = window.matchMedia,
546        is_supported = (typeof matchMedia === "function");
547    if (is_supported && media_query) {
548        return matchMedia(media_query).matches
549    } else {
550        return false;
551    }
552};
553
554$(document).ready(function() {
555
556    // MOBILE nav slide-out menu
557    $('#mobile-nav-toggle').click( function(){
558        if (!$('.nav-negative').length) {
559            $('body').prepend($('header .apps').clone().removeClass('apps').addClass('nav-negative'));
560            $('body').prepend($('header .auth').clone().addClass('nav-negative'));
561            $('body').prepend($('header .search').clone().addClass('nav-negative'));
562            $('body').prepend($('header .offline').clone().addClass('nav-negative'));
563            $('.nav-negative').hide().slideToggle(200);
564        } else {
565            $('.nav-negative').slideToggle(200);
566        }
567        $("html, body").animate({ scrollTop: 0 }, 200);
568        return false;
569    });
570
571    // STICKY CART for non-mobile
572    $(window).scroll(function(){
573        var is_mobile_case = MatchMedia("only screen and (max-width: 760px)");
574        if (!is_mobile_case) {
575            var scroll_top = $(this).scrollTop();
576            var $card = $("#cart"),
577                $flyer = $('#cart-flyer');
578
579            if ( scroll_top >= 55 && !$card.hasClass( "fixed" ) && !$card.hasClass( "empty" ) && !($(".cart-summary-page")).length ) {
580                $card.hide();
581
582                $card.addClass( "fixed" );
583                if ($flyer.length) {
584                    var _width = $flyer.width()+52;
585                    var _offset_right = $(window).width() - $flyer.offset().left - _width + 1;
586
587                    $("#cart").css({ "right": _offset_right+"px", "width": _width+"px" });
588                }
589
590                $card.show();
591                // $card.slideToggle(200);
592            } else if ( scroll_top < 50 && $("#cart").hasClass( "fixed" ) ) {
593                $card.removeClass( "fixed" );
594                $card.css({ "width": "auto" });
595            }
596        }
597    });
598});
599
600// MAILER app email subscribe form
601var SubscribeSection = ( function($) {
602
603    SubscribeSection = function(options) {
604        var that = this;
605
606        // DOM
607        that.$wrapper = options["$wrapper"];
608        that.$form = that.$wrapper.find("form");
609        that.$emailField = that.$wrapper.find(".js-email-field");
610        that.$submitButton = that.$wrapper.find(".js-submit-button");
611
612        // VARS
613        that.request_uri = options["request_uri"];
614        that.locales = options["locales"];
615
616        // DYNAMIC VARS
617
618        // INIT
619        that.initClass();
620    };
621
622    SubscribeSection.prototype.initClass = function() {
623        var that = this;
624
625        var $invisible_captcha = that.$form.find(".wa-invisible-recaptcha");
626        if (!$invisible_captcha.length) {
627            that.initView();
628        }
629
630        that.initSubmit();
631    };
632
633    SubscribeSection.prototype.initView = function() {
634        var that = this;
635
636        that.$emailField.on("focus", function() {
637            toggleView(true);
638        });
639
640        $(document).on("click", watcher);
641
642        function watcher(event) {
643            var is_exist = $.contains(document, that.$wrapper[0]);
644            if (is_exist) {
645                var is_target = $.contains(that.$wrapper[0], event.target);
646                if (!is_target) {
647                    toggleView(false);
648                }
649            } else {
650                $(document).off("click", watcher);
651            }
652        }
653
654        function toggleView(show) {
655            var active_class = "is-extended";
656            if (show) {
657                that.$wrapper.addClass(active_class);
658            } else {
659                var email_value = that.$emailField.val();
660                if (!email_value.length) {
661                    that.$wrapper.removeClass(active_class);
662                } else {
663
664                }
665            }
666        }
667    };
668
669    SubscribeSection.prototype.initSubmit = function() {
670        var that = this,
671            $form = that.$form,
672            $errorsPlace = that.$wrapper.find(".js-errors-place"),
673            is_locked = false;
674
675        $form.on("submit", onSubmit);
676
677        function onSubmit(event) {
678            event.preventDefault();
679
680            var formData = getData();
681
682            if (formData.errors.length) {
683                renderErrors(formData.errors);
684            } else {
685                request(formData.data);
686            }
687        }
688
689        /**
690         * @return {Object}
691         * */
692        function getData() {
693            var result = {
694                    data: [],
695                    errors: []
696                },
697                data = $form.serializeArray();
698
699            $.each(data, function(index, item) {
700                if (item.value) {
701                    result.data.push(item);
702                } else {
703                    result.errors.push({
704                        name: item.name
705                    });
706                }
707            });
708
709            return result;
710        }
711
712        /**
713         * @param {Array} data
714         * */
715        function request(data) {
716            if (!is_locked) {
717                is_locked = true;
718
719                var href = that.request_uri;
720
721                $.post(href, data, function(response) {
722                    if (response.status === "ok") {
723                        renderSuccess();
724
725                    } else if (response.errors) {
726                        var errors = formatErrors(response.errors);
727                        renderErrors(errors);
728                    }
729                }, "json").always( function() {
730                    is_locked = false;
731                });
732            }
733
734            /**
735             * @param {Object} errors
736             * @result {Array}
737             * */
738            function formatErrors(errors) {
739                var result = [];
740
741                $.each(errors, function(text, item) {
742                    var name = item[0];
743
744                    if (name === "subscriber[email]") { name = "email"; }
745
746                    result.push({
747                        name: name,
748                        value: text
749                    });
750                });
751
752                return result;
753            }
754        }
755
756        /**
757         * @param {Array} errors
758         * */
759        function renderErrors(errors) {
760            var error_class = "error";
761
762            if (!errors || !errors[0]) {
763                errors = [];
764            }
765
766            $.each(errors, function(index, item) {
767                var name = item.name,
768                    text = item.value;
769
770                var $field = that.$wrapper.find("[name=\"" + name + "\"]"),
771                    $text = $("<span class='c-error' />").addClass("error");
772
773                if ($field.length && !$field.hasClass(error_class)) {
774                    if (text) {
775                        $field.parent().append($text.text(text));
776                    }
777
778                    $field
779                        .addClass(error_class)
780                        .one("focus click change", function() {
781                            $field.removeClass(error_class);
782                            $text.remove();
783                        });
784                } else {
785                    $errorsPlace.append($text);
786
787                    $form.one("submit", function() {
788                        $text.remove();
789                    });
790                }
791            });
792        }
793
794        function renderSuccess() {
795            var $text = that.$wrapper.find(".js-success-message");
796            $form.hide();
797            $text.show();
798        }
799    };
800
801    return SubscribeSection;
802
803})(jQuery);

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.