PageSourceSearch

https://kayaker.ru/bitrix/cache/js/s1/kayaker/template_229ac03f97b…ded81be44ebec4ac2388_v1.js?1773655461156510

js kayaker.ru collected 2026-10-04 00:17:46 UTC 156,510 bytes, 4,172 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:62:"/local/templates/kayaker/assets/slick/slick.js?160859458689261";s:6:"source";s:46:"/local/templates/kayaker/assets/slick/slick.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3/*
4     _ _      _       _
5 ___| (_) ___| | __  (_)___
6/ __| | |/ __| |/ /  | / __|
7\__ \ | | (__|   < _ | \__ \
8|___/_|_|\___|_|\_(_)/ |___/
9                   |__/
10
11 Version: 1.8.0
12  Author: Ken Wheeler
13 Website: http://kenwheeler.github.io
14    Docs: http://kenwheeler.github.io/slick
15    Repo: http://github.com/kenwheeler/slick
16  Issues: http://github.com/kenwheeler/slick/issues
17
18 */
19/* global window, document, define, jQuery, setInterval, clearInterval */
20;(function(factory) {
21    'use strict';
22    if (typeof define === 'function' && define.amd) {
23        define(['jquery'], factory);
24    } else if (typeof exports !== 'undefined') {
25        module.exports = factory(require('jquery'));
26    } else {
27        factory(jQuery);
28    }
29
30}(function($) {
31    'use strict';
32    var Slick = window.Slick || {};
33
34    Slick = (function() {
35
36        var instanceUid = 0;
37
38        function Slick(element, settings) {
39
40            var _ = this, dataSettings;
41
42            _.defaults = {
43                accessibility: true,
44                adaptiveHeight: false,
45                appendArrows: $(element),
46                appendDots: $(element),
47                arrows: true,
48                asNavFor: null,
49                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
50                nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
51                autoplay: false,
52                autoplaySpeed: 3000,
53                centerMode: false,
54                centerPadding: '50px',
55                cssEase: 'ease',
56                customPaging: function(slider, i) {
57                    return $('<button type="button" />').text(i + 1);
58                },
59                dots: false,
60                dotsClass: 'slick-dots',
61                draggable: true,
62                easing: 'linear',
63                edgeFriction: 0.35,
64                fade: false,
65                focusOnSelect: false,
66                focusOnChange: false,
67                infinite: true,
68                initialSlide: 0,
69                lazyLoad: 'ondemand',
70                mobileFirst: false,
71                pauseOnHover: true,
72                pauseOnFocus: true,
73                pauseOnDotsHover: false,
74                respondTo: 'window',
75                responsive: null,
76                rows: 1,
77                rtl: false,
78                slide: '',
79                slidesPerRow: 1,
80                slidesToShow: 1,
81                slidesToScroll: 1,
82                speed: 500,
83                swipe: true,
84                swipeToSlide: false,
85                touchMove: true,
86                touchThreshold: 5,
87                useCSS: true,
88                useTransform: true,
89                variableWidth: false,
90                vertical: false,
91                verticalSwiping: false,
92                waitForAnimate: true,
93                zIndex: 1000
94            };
95
96            _.initials = {
97                animating: false,
98                dragging: false,
99                autoPlayTimer: null,
100                currentDirection: 0,
101                currentLeft: null,
102                currentSlide: 0,
103                direction: 1,
104                $dots: null,
105                listWidth: null,
106                listHeight: null,
107                loadIndex: 0,
108                $nextArrow: null,
109                $prevArrow: null,
110                scrolling: false,
111                slideCount: null,
112                slideWidth: null,
113                $slideTrack: null,
114                $slides: null,
115                sliding: false,
116                slideOffset: 0,
117                swipeLeft: null,
118                swiping: false,
119                $list: null,
120                touchObject: {},
121                transformsEnabled: false,
122                unslicked: false
123            };
124
125            $.extend(_, _.initials);
126
127            _.activeBreakpoint = null;
128            _.animType = null;
129            _.animProp = null;
130            _.breakpoints = [];
131            _.breakpointSettings = [];
132            _.cssTransitions = false;
vendor: 9,182 bytes, lines 133-449
133            _.focussed = false;
134            _.interrupted = false;
135            _.hidden = 'hidden';
136            _.paused = true;
137            _.positionProp = null;
138            _.respondTo = null;
139            _.rowCount = 1;
140            _.shouldClick = true;
141            _.$slider = $(element);
142            _.$slidesCache = null;
143            _.transformType = null;
144            _.transitionType = null;
145            _.visibilityChange = 'visibilitychange';
146            _.windowWidth = 0;
147            _.windowTimer = null;
148
149            dataSettings = $(element).data('slick') || {};
150
151            _.options = $.extend({}, _.defaults, settings, dataSettings);
152
153            _.currentSlide = _.options.initialSlide;
154
155            _.originalSettings = _.options;
156
157            if (typeof document.mozHidden !== 'undefined') {
158                _.hidden = 'mozHidden';
159                _.visibilityChange = 'mozvisibilitychange';
160            } else if (typeof document.webkitHidden !== 'undefined') {
161                _.hidden = 'webkitHidden';
162                _.visibilityChange = 'webkitvisibilitychange';
163            }
164
165            _.autoPlay = $.proxy(_.autoPlay, _);
166            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
167            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
168            _.changeSlide = $.proxy(_.changeSlide, _);
169            _.clickHandler = $.proxy(_.clickHandler, _);
170            _.selectHandler = $.proxy(_.selectHandler, _);
171            _.setPosition = $.proxy(_.setPosition, _);
172            _.swipeHandler = $.proxy(_.swipeHandler, _);
173            _.dragHandler = $.proxy(_.dragHandler, _);
174            _.keyHandler = $.proxy(_.keyHandler, _);
175
176            _.instanceUid = instanceUid++;
177
178            // A simple way to check for HTML strings
179            // Strict HTML recognition (must start with <)
180            // Extracted from jQuery v1.11 source
181            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
182
183
184            _.registerBreakpoints();
185            _.init(true);
186
187        }
188
189        return Slick;
190
191    }());
192
193    Slick.prototype.activateADA = function() {
194        var _ = this;
195
196        _.$slideTrack.find('.slick-active').attr({
197            'aria-hidden': 'false'
198        }).find('a, input, button, select').attr({
199            'tabindex': '0'
200        });
201
202    };
203
204    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
205
206        var _ = this;
207
208        if (typeof(index) === 'boolean') {
209            addBefore = index;
210            index = null;
211        } else if (index < 0 || (index >= _.slideCount)) {
212            return false;
213        }
214
215        _.unload();
216
217        if (typeof(index) === 'number') {
218            if (index === 0 && _.$slides.length === 0) {
219                $(markup).appendTo(_.$slideTrack);
220            } else if (addBefore) {
221                $(markup).insertBefore(_.$slides.eq(index));
222            } else {
223                $(markup).insertAfter(_.$slides.eq(index));
224            }
225        } else {
226            if (addBefore === true) {
227                $(markup).prependTo(_.$slideTrack);
228            } else {
229                $(markup).appendTo(_.$slideTrack);
230            }
231        }
232
233        _.$slides = _.$slideTrack.children(this.options.slide);
234
235        _.$slideTrack.children(this.options.slide).detach();
236
237        _.$slideTrack.append(_.$slides);
238
239        _.$slides.each(function(index, element) {
240            $(element).attr('data-slick-index', index);
241        });
242
243        _.$slidesCache = _.$slides;
244
245        _.reinit();
246
247    };
248
249    Slick.prototype.animateHeight = function() {
250        var _ = this;
251        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
252            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
253            _.$list.animate({
254                height: targetHeight
255            }, _.options.speed);
256        }
257    };
258
259    Slick.prototype.animateSlide = function(targetLeft, callback) {
260
261        var animProps = {},
262            _ = this;
263
264        _.animateHeight();
265
266        if (_.options.rtl === true && _.options.vertical === false) {
267            targetLeft = -targetLeft;
268        }
269        if (_.transformsEnabled === false) {
270            if (_.options.vertical === false) {
271                _.$slideTrack.animate({
272                    left: targetLeft
273                }, _.options.speed, _.options.easing, callback);
274            } else {
275                _.$slideTrack.animate({
276                    top: targetLeft
277                }, _.options.speed, _.options.easing, callback);
278            }
279
280        } else {
281
282            if (_.cssTransitions === false) {
283                if (_.options.rtl === true) {
284                    _.currentLeft = -(_.currentLeft);
285                }
286                $({
287                    animStart: _.currentLeft
288                }).animate({
289                    animStart: targetLeft
290                }, {
291                    duration: _.options.speed,
292                    easing: _.options.easing,
293                    step: function(now) {
294                        now = Math.ceil(now);
295                        if (_.options.vertical === false) {
296                            animProps[_.animType] = 'translate(' +
297                                now + 'px, 0px)';
298                            _.$slideTrack.css(animProps);
299                        } else {
300                            animProps[_.animType] = 'translate(0px,' +
301                                now + 'px)';
302                            _.$slideTrack.css(animProps);
303                        }
304                    },
305                    complete: function() {
306                        if (callback) {
307                            callback.call();
308                        }
309                    }
310                });
311
312            } else {
313
314                _.applyTransition();
315                targetLeft = Math.ceil(targetLeft);
316
317                if (_.options.vertical === false) {
318                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
319                } else {
320                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
321                }
322                _.$slideTrack.css(animProps);
323
324                if (callback) {
325                    setTimeout(function() {
326
327                        _.disableTransition();
328
329                        callback.call();
330                    }, _.options.speed);
331                }
332
333            }
334
335        }
336
337    };
338
339    Slick.prototype.getNavTarget = function() {
340
341        var _ = this,
342            asNavFor = _.options.asNavFor;
343
344        if ( asNavFor && asNavFor !== null ) {
345            asNavFor = $(asNavFor).not(_.$slider);
346        }
347
348        return asNavFor;
349
350    };
351
352    Slick.prototype.asNavFor = function(index) {
353
354        var _ = this,
355            asNavFor = _.getNavTarget();
356
357        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
358            asNavFor.each(function() {
359                var target = $(this).slick('getSlick');
360                if(!target.unslicked) {
361                    target.slideHandler(index, true);
362                }
363            });
364        }
365
366    };
367
368    Slick.prototype.applyTransition = function(slide) {
369
370        var _ = this,
371            transition = {};
372
373        if (_.options.fade === false) {
374            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
375        } else {
376            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
377        }
378
379        if (_.options.fade === false) {
380            _.$slideTrack.css(transition);
381        } else {
382            _.$slides.eq(slide).css(transition);
383        }
384
385    };
386
387    Slick.prototype.autoPlay = function() {
388
389        var _ = this;
390
391        _.autoPlayClear();
392
393        if ( _.slideCount > _.options.slidesToShow ) {	
394			
395            //_.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
396			_.SetTime ();
397        }
398        
399
400    };
401	
402	Slick.prototype.SetTime = function () //argit
403	{
404		var _ = this;
405		var time = parseInt(_.$slides.eq(_.currentSlide).find('a').data('time')) * 1000; //argit		
406		_.autoPlayTimer = setTimeout( _.autoPlayIterator, time );//argit
407	}
408	
409
410    Slick.prototype.autoPlayClear = function() {
411
412        var _ = this;
413
414        if (_.autoPlayTimer) {
415            clearTimeout(_.autoPlayTimer); //argit
416        }
417
418    };
419
420    Slick.prototype.autoPlayIterator = function() {
421
422        var _ = this,
423            slideTo = _.currentSlide + _.options.slidesToScroll;
424
425        if ( !_.paused && !_.interrupted && !_.focussed ) {
426
427            if ( _.options.infinite === false ) {
428
429                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
430                    _.direction = 0;
431                }
432
433                else if ( _.direction === 0 ) {
434
435                    slideTo = _.currentSlide - _.options.slidesToScroll;
436
437                    if ( _.currentSlide - 1 === 0 ) {
438                        _.direction = 1;
439                    }
440
441                }
442
443            }
444
445            _.slideHandler( slideTo );
446
447        }
448	
449		_.SetTime ();
vendor: 19,719 bytes, lines 449-1107
449
450
451    };
452
453    Slick.prototype.buildArrows = function() {
454
455        var _ = this;
456
457        if (_.options.arrows === true ) {
458
459            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
460            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
461
462            if( _.slideCount > _.options.slidesToShow ) {
463
464                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
465                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
466
467                if (_.htmlExpr.test(_.options.prevArrow)) {
468                    _.$prevArrow.prependTo(_.options.appendArrows);
469                }
470
471                if (_.htmlExpr.test(_.options.nextArrow)) {
472                    _.$nextArrow.appendTo(_.options.appendArrows);
473                }
474
475                if (_.options.infinite !== true) {
476                    _.$prevArrow
477                        .addClass('slick-disabled')
478                        .attr('aria-disabled', 'true');
479                }
480
481            } else {
482
483                _.$prevArrow.add( _.$nextArrow )
484
485                    .addClass('slick-hidden')
486                    .attr({
487                        'aria-disabled': 'true',
488                        'tabindex': '-1'
489                    });
490
491            }
492
493        }
494
495    };
496
497    Slick.prototype.buildDots = function() {
498
499        var _ = this,
500            i, dot;
501
502        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
503
504            _.$slider.addClass('slick-dotted');
505
506            dot = $('<ul />').addClass(_.options.dotsClass);
507
508            for (i = 0; i <= _.getDotCount(); i += 1) {
509                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
510            }
511
512            _.$dots = dot.appendTo(_.options.appendDots);
513
514            _.$dots.find('li').first().addClass('slick-active');
515
516        }
517
518    };
519
520    Slick.prototype.buildOut = function() {
521
522        var _ = this;
523
524        _.$slides =
525            _.$slider
526                .children( _.options.slide + ':not(.slick-cloned)')
527                .addClass('slick-slide');
528
529        _.slideCount = _.$slides.length;
530
531        _.$slides.each(function(index, element) {
532            $(element)
533                .attr('data-slick-index', index)
534                .data('originalStyling', $(element).attr('style') || '');
535        });
536
537        _.$slider.addClass('slick-slider');
538
539        _.$slideTrack = (_.slideCount === 0) ?
540            $('<div class="slick-track"/>').appendTo(_.$slider) :
541            _.$slides.wrapAll('<div class="slick-track"/>').parent();
542
543        _.$list = _.$slideTrack.wrap(
544            '<div class="slick-list"/>').parent();
545        _.$slideTrack.css('opacity', 0);
546
547        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
548            _.options.slidesToScroll = 1;
549        }
550
551        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
552
553        _.setupInfinite();
554
555        _.buildArrows();
556
557        _.buildDots();
558
559        _.updateDots();
560
561
562        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
563
564        if (_.options.draggable === true) {
565            _.$list.addClass('draggable');
566        }
567
568    };
569
570    Slick.prototype.buildRows = function() {
571
572        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
573
574        newSlides = document.createDocumentFragment();
575        originalSlides = _.$slider.children();
576
577        if(_.options.rows > 0) {
578
579            slidesPerSection = _.options.slidesPerRow * _.options.rows;
580            numOfSlides = Math.ceil(
581                originalSlides.length / slidesPerSection
582            );
583
584            for(a = 0; a < numOfSlides; a++){
585                var slide = document.createElement('div');
586                for(b = 0; b < _.options.rows; b++) {
587                    var row = document.createElement('div');
588                    for(c = 0; c < _.options.slidesPerRow; c++) {
589                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
590                        if (originalSlides.get(target)) {
591                            row.appendChild(originalSlides.get(target));
592                        }
593                    }
594                    slide.appendChild(row);
595                }
596                newSlides.appendChild(slide);
597            }
598
599            _.$slider.empty().append(newSlides);
600            _.$slider.children().children().children()
601                .css({
602                    'width':(100 / _.options.slidesPerRow) + '%',
603                    'display': 'inline-block'
604                });
605
606        }
607
608    };
609
610    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
611
612        var _ = this,
613            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
614        var sliderWidth = _.$slider.width();
615        var windowWidth = window.innerWidth || $(window).width();
616
617        if (_.respondTo === 'window') {
618            respondToWidth = windowWidth;
619        } else if (_.respondTo === 'slider') {
620            respondToWidth = sliderWidth;
621        } else if (_.respondTo === 'min') {
622            respondToWidth = Math.min(windowWidth, sliderWidth);
623        }
624
625        if ( _.options.responsive &&
626            _.options.responsive.length &&
627            _.options.responsive !== null) {
628
629            targetBreakpoint = null;
630
631            for (breakpoint in _.breakpoints) {
632                if (_.breakpoints.hasOwnProperty(breakpoint)) {
633                    if (_.originalSettings.mobileFirst === false) {
634                        if (respondToWidth < _.breakpoints[breakpoint]) {
635                            targetBreakpoint = _.breakpoints[breakpoint];
636                        }
637                    } else {
638                        if (respondToWidth > _.breakpoints[breakpoint]) {
639                            targetBreakpoint = _.breakpoints[breakpoint];
640                        }
641                    }
642                }
643            }
644
645            if (targetBreakpoint !== null) {
646                if (_.activeBreakpoint !== null) {
647                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
648                        _.activeBreakpoint =
649                            targetBreakpoint;
650                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
651                            _.unslick(targetBreakpoint);
652                        } else {
653                            _.options = $.extend({}, _.originalSettings,
654                                _.breakpointSettings[
655                                    targetBreakpoint]);
656                            if (initial === true) {
657                                _.currentSlide = _.options.initialSlide;
658                            }
659                            _.refresh(initial);
660                        }
661                        triggerBreakpoint = targetBreakpoint;
662                    }
663                } else {
664                    _.activeBreakpoint = targetBreakpoint;
665                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
666                        _.unslick(targetBreakpoint);
667                    } else {
668                        _.options = $.extend({}, _.originalSettings,
669                            _.breakpointSettings[
670                                targetBreakpoint]);
671                        if (initial === true) {
672                            _.currentSlide = _.options.initialSlide;
673                        }
674                        _.refresh(initial);
675                    }
676                    triggerBreakpoint = targetBreakpoint;
677                }
678            } else {
679                if (_.activeBreakpoint !== null) {
680                    _.activeBreakpoint = null;
681                    _.options = _.originalSettings;
682                    if (initial === true) {
683                        _.currentSlide = _.options.initialSlide;
684                    }
685                    _.refresh(initial);
686                    triggerBreakpoint = targetBreakpoint;
687                }
688            }
689
690            // only trigger breakpoints during an actual break. not on initialize.
691            if( !initial && triggerBreakpoint !== false ) {
692                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
693            }
694        }
695
696    };
697
698    Slick.prototype.changeSlide = function(event, dontAnimate) {
699
700        var _ = this,
701            $target = $(event.currentTarget),
702            indexOffset, slideOffset, unevenOffset;
703
704        // If target is a link, prevent default action.
705        if($target.is('a')) {
706            event.preventDefault();
707        }
708
709        // If target is not the <li> element (ie: a child), find the <li>.
710        if(!$target.is('li')) {
711            $target = $target.closest('li');
712        }
713
714        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
715        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
716
717        switch (event.data.message) {
718
719            case 'previous':
720                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
721                if (_.slideCount > _.options.slidesToShow) {
722                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
723                }
724                break;
725
726            case 'next':
727                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
728                if (_.slideCount > _.options.slidesToShow) {
729                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
730                }
731                break;
732
733            case 'index':
734                var index = event.data.index === 0 ? 0 :
735                    event.data.index || $target.index() * _.options.slidesToScroll;
736
737                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
738                $target.children().trigger('focus');
739                break;
740
741            default:
742                return;
743        }
744
745    };
746
747    Slick.prototype.checkNavigable = function(index) {
748
749        var _ = this,
750            navigables, prevNavigable;
751
752        navigables = _.getNavigableIndexes();
753        prevNavigable = 0;
754        if (index > navigables[navigables.length - 1]) {
755            index = navigables[navigables.length - 1];
756        } else {
757            for (var n in navigables) {
758                if (index < navigables[n]) {
759                    index = prevNavigable;
760                    break;
761                }
762                prevNavigable = navigables[n];
763            }
764        }
765
766        return index;
767    };
768
769    Slick.prototype.cleanUpEvents = function() {
770
771        var _ = this;
772
773        if (_.options.dots && _.$dots !== null) {
774
775            $('li', _.$dots)
776                .off('click.slick', _.changeSlide)
777                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
778                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
779
780            if (_.options.accessibility === true) {
781                _.$dots.off('keydown.slick', _.keyHandler);
782            }
783        }
784
785        _.$slider.off('focus.slick blur.slick');
786
787        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
788            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
789            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
790
791            if (_.options.accessibility === true) {
792                _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
793                _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
794            }
795        }
796
797        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
798        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
799        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
800        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
801
802        _.$list.off('click.slick', _.clickHandler);
803
804        $(document).off(_.visibilityChange, _.visibility);
805
806        _.cleanUpSlideEvents();
807
808        if (_.options.accessibility === true) {
809            _.$list.off('keydown.slick', _.keyHandler);
810        }
811
812        if (_.options.focusOnSelect === true) {
813            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
814        }
815
816        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
817
818        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
819
820        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
821
822        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
823
824    };
825
826    Slick.prototype.cleanUpSlideEvents = function() {
827
828        var _ = this;
829
830        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
831        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
832
833    };
834
835    Slick.prototype.cleanUpRows = function() {
836
837        var _ = this, originalSlides;
838
839        if(_.options.rows > 0) {
840            originalSlides = _.$slides.children().children();
841            originalSlides.removeAttr('style');
842            _.$slider.empty().append(originalSlides);
843        }
844
845    };
846
847    Slick.prototype.clickHandler = function(event) {
848
849        var _ = this;
850
851        if (_.shouldClick === false) {
852            event.stopImmediatePropagation();
853            event.stopPropagation();
854            event.preventDefault();
855        }
856
857    };
858
859    Slick.prototype.destroy = function(refresh) {
860
861        var _ = this;
862
863        _.autoPlayClear();
864
865        _.touchObject = {};
866
867        _.cleanUpEvents();
868
869        $('.slick-cloned', _.$slider).detach();
870
871        if (_.$dots) {
872            _.$dots.remove();
873        }
874
875        if ( _.$prevArrow && _.$prevArrow.length ) {
876
877            _.$prevArrow
878                .removeClass('slick-disabled slick-arrow slick-hidden')
879                .removeAttr('aria-hidden aria-disabled tabindex')
880                .css('display','');
881
882            if ( _.htmlExpr.test( _.options.prevArrow )) {
883                _.$prevArrow.remove();
884            }
885        }
886
887        if ( _.$nextArrow && _.$nextArrow.length ) {
888
889            _.$nextArrow
890                .removeClass('slick-disabled slick-arrow slick-hidden')
891                .removeAttr('aria-hidden aria-disabled tabindex')
892                .css('display','');
893
894            if ( _.htmlExpr.test( _.options.nextArrow )) {
895                _.$nextArrow.remove();
896            }
897        }
898
899
900        if (_.$slides) {
901
902            _.$slides
903                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
904                .removeAttr('aria-hidden')
905                .removeAttr('data-slick-index')
906                .each(function(){
907                    $(this).attr('style', $(this).data('originalStyling'));
908                });
909
910            _.$slideTrack.children(this.options.slide).detach();
911
912            _.$slideTrack.detach();
913
914            _.$list.detach();
915
916            _.$slider.append(_.$slides);
917        }
918
919        _.cleanUpRows();
920
921        _.$slider.removeClass('slick-slider');
922        _.$slider.removeClass('slick-initialized');
923        _.$slider.removeClass('slick-dotted');
924
925        _.unslicked = true;
926
927        if(!refresh) {
928            _.$slider.trigger('destroy', [_]);
929        }
930
931    };
932
933    Slick.prototype.disableTransition = function(slide) {
934
935        var _ = this,
936            transition = {};
937
938        transition[_.transitionType] = '';
939
940        if (_.options.fade === false) {
941            _.$slideTrack.css(transition);
942        } else {
943            _.$slides.eq(slide).css(transition);
944        }
945
946    };
947
948    Slick.prototype.fadeSlide = function(slideIndex, callback) {
949
950        var _ = this;
951
952        if (_.cssTransitions === false) {
953
954            _.$slides.eq(slideIndex).css({
955                zIndex: _.options.zIndex
956            });
957
958            _.$slides.eq(slideIndex).animate({
959                opacity: 1
960            }, _.options.speed, _.options.easing, callback);
961
962        } else {
963
964            _.applyTransition(slideIndex);
965
966            _.$slides.eq(slideIndex).css({
967                opacity: 1,
968                zIndex: _.options.zIndex
969            });
970
971            if (callback) {
972                setTimeout(function() {
973
974                    _.disableTransition(slideIndex);
975
976                    callback.call();
977                }, _.options.speed);
978            }
979
980        }
981
982    };
983
984    Slick.prototype.fadeSlideOut = function(slideIndex) {
985
986        var _ = this;
987
988        if (_.cssTransitions === false) {
989
990            _.$slides.eq(slideIndex).animate({
991                opacity: 0,
992                zIndex: _.options.zIndex - 2
993            }, _.options.speed, _.options.easing);
994
995        } else {
996
997            _.applyTransition(slideIndex);
998
999            _.$slides.eq(slideIndex).css({
1000                opacity: 0,
1001                zIndex: _.options.zIndex - 2
1002            });
1003
1004        }
1005
1006    };
1007
1008    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
1009
1010        var _ = this;
1011
1012        if (filter !== null) {
1013
1014            _.$slidesCache = _.$slides;
1015
1016            _.unload();
1017
1018            _.$slideTrack.children(this.options.slide).detach();
1019
1020            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
1021
1022            _.reinit();
1023
1024        }
1025
1026    };
1027
1028    Slick.prototype.focusHandler = function() {
1029
1030        var _ = this;
1031
1032        _.$slider
1033            .off('focus.slick blur.slick')
1034            .on('focus.slick blur.slick', '*', function(event) {
1035
1036            event.stopImmediatePropagation();
1037            var $sf = $(this);
1038
1039            setTimeout(function() {
1040
1041                if( _.options.pauseOnFocus ) {
1042                    _.focussed = $sf.is(':focus');
1043                    _.autoPlay();
1044                }
1045
1046            }, 0);
1047
1048        });
1049    };
1050
1051    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
1052
1053        var _ = this;
1054        return _.currentSlide;
1055
1056    };
1057
1058    Slick.prototype.getDotCount = function() {
1059
1060        var _ = this;
1061
1062        var breakPoint = 0;
1063        var counter = 0;
1064        var pagerQty = 0;
1065
1066        if (_.options.infinite === true) {
1067            if (_.slideCount <= _.options.slidesToShow) {
1068                 ++pagerQty;
1069            } else {
1070                while (breakPoint < _.slideCount) {
1071                    ++pagerQty;
1072                    breakPoint = counter + _.options.slidesToScroll;
1073                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1074                }
1075            }
1076        } else if (_.options.centerMode === true) {
1077            pagerQty = _.slideCount;
1078        } else if(!_.options.asNavFor) {
1079            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
1080        }else {
1081            while (breakPoint < _.slideCount) {
1082                ++pagerQty;
1083                breakPoint = counter + _.options.slidesToScroll;
1084                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1085            }
1086        }
1087
1088        return pagerQty - 1;
1089
1090    };
1091
1092    Slick.prototype.getLeft = function(slideIndex) {
1093
1094        var _ = this,
1095            targetLeft,
1096            verticalHeight,
1097            verticalOffset = 0,
1098            targetSlide,
1099            coef;
1100
1101        _.slideOffset = 0;
1102        verticalHeight = _.$slides.first().outerHeight(true);
1103
1104        if (_.options.infinite === true) {
1105            if (_.slideCount > _.options.slidesToShow) {
1106                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1107                coef = -1
1107
1108
1109                if (_.options.vertical === true && _.options.centerMode === true) {
1110                    if (_.options.slidesToShow === 2) {
1111                        coef = -1.5;
1112                    } else if (_.options.slidesToShow === 1) {
1113                        coef = -2
vendor: 25,499 bytes, lines 1113-1969
1113
1114                    }
1115                }
1116                verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
1117            }
1118            if (_.slideCount % _.options.slidesToScroll !== 0) {
1119                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1120                    if (slideIndex > _.slideCount) {
1121                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
1122                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1123                    } else {
1124                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1125                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1126                    }
1127                }
1128            }
1129        } else {
1130            if (slideIndex + _.options.slidesToShow > _.slideCount) {
1131                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1132                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1133            }
1134        }
1135
1136        if (_.slideCount <= _.options.slidesToShow) {
1137            _.slideOffset = 0;
1138            verticalOffset = 0;
1139        }
1140
1141        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
1142            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
1143        } else if (_.options.centerMode === true && _.options.infinite === true) {
1144            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1145        } else if (_.options.centerMode === true) {
1146            _.slideOffset = 0;
1147            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1148        }
1149
1150        if (_.options.vertical === false) {
1151            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1152        } else {
1153            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1154        }
1155
1156        if (_.options.variableWidth === true) {
1157
1158            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1159                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1160            } else {
1161                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1162            }
1163
1164            if (_.options.rtl === true) {
1165                if (targetSlide[0]) {
1166                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1167                } else {
1168                    targetLeft =  0;
1169                }
1170            } else {
1171                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1172            }
1173
1174            if (_.options.centerMode === true) {
1175                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1176                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1177                } else {
1178                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1179                }
1180
1181                if (_.options.rtl === true) {
1182                    if (targetSlide[0]) {
1183                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1184                    } else {
1185                        targetLeft =  0;
1186                    }
1187                } else {
1188                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1189                }
1190
1191                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1192            }
1193        }
1194
1195        return targetLeft;
1196
1197    };
1198
1199    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1200
1201        var _ = this;
1202
1203        return _.options[option];
1204
1205    };
1206
1207    Slick.prototype.getNavigableIndexes = function() {
1208
1209        var _ = this,
1210            breakPoint = 0,
1211            counter = 0,
1212            indexes = [],
1213            max;
1214
1215        if (_.options.infinite === false) {
1216            max = _.slideCount;
1217        } else {
1218            breakPoint = _.options.slidesToScroll * -1;
1219            counter = _.options.slidesToScroll * -1;
1220            max = _.slideCount * 2;
1221        }
1222
1223        while (breakPoint < max) {
1224            indexes.push(breakPoint);
1225            breakPoint = counter + _.options.slidesToScroll;
1226            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1227        }
1228
1229        return indexes;
1230
1231    };
1232
1233    Slick.prototype.getSlick = function() {
1234
1235        return this;
1236
1237    };
1238
1239    Slick.prototype.getSlideCount = function() {
1240
1241        var _ = this,
1242            slidesTraversed, swipedSlide, centerOffset;
1243
1244        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1245
1246        if (_.options.swipeToSlide === true) {
1247            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1248                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1249                    swipedSlide = slide;
1250                    return false;
1251                }
1252            });
1253
1254            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1255
1256            return slidesTraversed;
1257
1258        } else {
1259            return _.options.slidesToScroll;
1260        }
1261
1262    };
1263
1264    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1265
1266        var _ = this;
1267
1268        _.changeSlide({
1269            data: {
1270                message: 'index',
1271                index: parseInt(slide)
1272            }
1273        }, dontAnimate);
1274
1275    };
1276
1277    Slick.prototype.init = function(creation) {
1278
1279        var _ = this;
1280
1281        if (!$(_.$slider).hasClass('slick-initialized')) {
1282
1283            $(_.$slider).addClass('slick-initialized');
1284
1285            _.buildRows();
1286            _.buildOut();
1287            _.setProps();
1288            _.startLoad();
1289            _.loadSlider();
1290            _.initializeEvents();
1291            _.updateArrows();
1292            _.updateDots();
1293            _.checkResponsive(true);
1294            _.focusHandler();
1295
1296        }
1297
1298        if (creation) {
1299            _.$slider.trigger('init', [_]);
1300        }
1301
1302        if (_.options.accessibility === true) {
1303            _.initADA();
1304        }
1305
1306        if ( _.options.autoplay ) {
1307
1308            _.paused = false;
1309            _.autoPlay();
1310
1311        }
1312
1313    };
1314
1315    Slick.prototype.initADA = function() {
1316        var _ = this,
1317                numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
1318                tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
1319                    return (val >= 0) && (val < _.slideCount);
1320                });
1321
1322        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1323            'aria-hidden': 'true',
1324            'tabindex': '-1'
1325        }).find('a, input, button, select').attr({
1326            'tabindex': '-1'
1327        });
1328
1329        if (_.$dots !== null) {
1330            _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
1331                var slideControlIndex = tabControlIndexes.indexOf(i);
1332
1333                $(this).attr({
1334                    'role': 'tabpanel',
1335                    'id': 'slick-slide' + _.instanceUid + i,
1336                    'tabindex': -1
1337                });
1338
1339                if (slideControlIndex !== -1) {
1340                   var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
1341                   if ($('#' + ariaButtonControl).length) {
1342                     $(this).attr({
1343                         'aria-describedby': ariaButtonControl
1344                     });
1345                   }
1346                }
1347            });
1348
1349            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
1350                var mappedSlideIndex = tabControlIndexes[i];
1351
1352                $(this).attr({
1353                    'role': 'presentation'
1354                });
1355
1356                $(this).find('button').first().attr({
1357                    'role': 'tab',
1358                    'id': 'slick-slide-control' + _.instanceUid + i,
1359                    'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
1360                    'aria-label': (i + 1) + ' of ' + numDotGroups,
1361                    'aria-selected': null,
1362                    'tabindex': '-1'
1363                });
1364
1365            }).eq(_.currentSlide).find('button').attr({
1366                'aria-selected': 'true',
1367                'tabindex': '0'
1368            }).end();
1369        }
1370
1371        for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
1372          if (_.options.focusOnChange) {
1373            _.$slides.eq(i).attr({'tabindex': '0'});
1374          } else {
1375            _.$slides.eq(i).removeAttr('tabindex');
1376          }
1377        }
1378
1379        _.activateADA();
1380
1381    };
1382
1383    Slick.prototype.initArrowEvents = function() {
1384
1385        var _ = this;
1386
1387        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1388            _.$prevArrow
1389               .off('click.slick')
1390               .on('click.slick', {
1391                    message: 'previous'
1392               }, _.changeSlide);
1393            _.$nextArrow
1394               .off('click.slick')
1395               .on('click.slick', {
1396                    message: 'next'
1397               }, _.changeSlide);
1398
1399            if (_.options.accessibility === true) {
1400                _.$prevArrow.on('keydown.slick', _.keyHandler);
1401                _.$nextArrow.on('keydown.slick', _.keyHandler);
1402            }
1403        }
1404
1405    };
1406
1407    Slick.prototype.initDotEvents = function() {
1408
1409        var _ = this;
1410
1411        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1412            $('li', _.$dots).on('click.slick', {
1413                message: 'index'
1414            }, _.changeSlide);
1415
1416            if (_.options.accessibility === true) {
1417                _.$dots.on('keydown.slick', _.keyHandler);
1418            }
1419        }
1420
1421        if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
1422
1423            $('li', _.$dots)
1424                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1425                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1426
1427        }
1428
1429    };
1430
1431    Slick.prototype.initSlideEvents = function() {
1432
1433        var _ = this;
1434
1435        if ( _.options.pauseOnHover ) {
1436
1437            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1438            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1439
1440        }
1441
1442    };
1443
1444    Slick.prototype.initializeEvents = function() {
1445
1446        var _ = this;
1447
1448        _.initArrowEvents();
1449
1450        _.initDotEvents();
1451        _.initSlideEvents();
1452
1453        _.$list.on('touchstart.slick mousedown.slick', {
1454            action: 'start'
1455        }, _.swipeHandler);
1456        _.$list.on('touchmove.slick mousemove.slick', {
1457            action: 'move'
1458        }, _.swipeHandler);
1459        _.$list.on('touchend.slick mouseup.slick', {
1460            action: 'end'
1461        }, _.swipeHandler);
1462        _.$list.on('touchcancel.slick mouseleave.slick', {
1463            action: 'end'
1464        }, _.swipeHandler);
1465
1466        _.$list.on('click.slick', _.clickHandler);
1467
1468        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1469
1470        if (_.options.accessibility === true) {
1471            _.$list.on('keydown.slick', _.keyHandler);
1472        }
1473
1474        if (_.options.focusOnSelect === true) {
1475            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1476        }
1477
1478        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1479
1480        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1481
1482        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1483
1484        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1485        $(_.setPosition);
1486
1487    };
1488
1489    Slick.prototype.initUI = function() {
1490
1491        var _ = this;
1492
1493        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1494
1495            _.$prevArrow.show();
1496            _.$nextArrow.show();
1497
1498        }
1499
1500        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1501
1502            _.$dots.show();
1503
1504        }
1505
1506    };
1507
1508    Slick.prototype.keyHandler = function(event) {
1509
1510        var _ = this;
1511         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1512        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1513            if (event.keyCode === 37 && _.options.accessibility === true) {
1514                _.changeSlide({
1515                    data: {
1516                        message: _.options.rtl === true ? 'next' :  'previous'
1517                    }
1518                });
1519            } else if (event.keyCode === 39 && _.options.accessibility === true) {
1520                _.changeSlide({
1521                    data: {
1522                        message: _.options.rtl === true ? 'previous' : 'next'
1523                    }
1524                });
1525            }
1526        }
1527
1528    };
1529
1530    Slick.prototype.lazyLoad = function() {
1531
1532        var _ = this,
1533            loadRange, cloneRange, rangeStart, rangeEnd;
1534
1535        function loadImages(imagesScope) {
1536
1537            $('img[data-lazy]', imagesScope).each(function() {
1538
1539                var image = $(this),
1540                    imageSource = $(this).attr('data-lazy'),
1541                    imageSrcSet = $(this).attr('data-srcset'),
1542                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
1543                    imageToLoad = document.createElement('img');
1544
1545                imageToLoad.onload = function() {
1546
1547                    image
1548                        .animate({ opacity: 0 }, 100, function() {
1549
1550                            if (imageSrcSet) {
1551                                image
1552                                    .attr('srcset', imageSrcSet );
1553
1554                                if (imageSizes) {
1555                                    image
1556                                        .attr('sizes', imageSizes );
1557                                }
1558                            }
1559
1560                            image
1561                                .attr('src', imageSource)
1562                                .animate({ opacity: 1 }, 200, function() {
1563                                    image
1564                                        .removeAttr('data-lazy data-srcset data-sizes')
1565                                        .removeClass('slick-loading');
1566                                });
1567                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1568                        });
1569
1570                };
1571
1572                imageToLoad.onerror = function() {
1573
1574                    image
1575                        .removeAttr( 'data-lazy' )
1576                        .removeClass( 'slick-loading' )
1577                        .addClass( 'slick-lazyload-error' );
1578
1579                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1580
1581                };
1582
1583                imageToLoad.src = imageSource;
1584
1585            });
1586
1587        }
1588
1589        if (_.options.centerMode === true) {
1590            if (_.options.infinite === true) {
1591                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1592                rangeEnd = rangeStart + _.options.slidesToShow + 2;
1593            } else {
1594                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1595                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1596            }
1597        } else {
1598            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1599            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1600            if (_.options.fade === true) {
1601                if (rangeStart > 0) rangeStart--;
1602                if (rangeEnd <= _.slideCount) rangeEnd++;
1603            }
1604        }
1605
1606        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1607
1608        if (_.options.lazyLoad === 'anticipated') {
1609            var prevSlide = rangeStart - 1,
1610                nextSlide = rangeEnd,
1611                $slides = _.$slider.find('.slick-slide');
1612
1613            for (var i = 0; i < _.options.slidesToScroll; i++) {
1614                if (prevSlide < 0) prevSlide = _.slideCount - 1;
1615                loadRange = loadRange.add($slides.eq(prevSlide));
1616                loadRange = loadRange.add($slides.eq(nextSlide));
1617                prevSlide--;
1618                nextSlide++;
1619            }
1620        }
1621
1622        loadImages(loadRange);
1623
1624        if (_.slideCount <= _.options.slidesToShow) {
1625            cloneRange = _.$slider.find('.slick-slide');
1626            loadImages(cloneRange);
1627        } else
1628        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1629            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1630            loadImages(cloneRange);
1631        } else if (_.currentSlide === 0) {
1632            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1633            loadImages(cloneRange);
1634        }
1635
1636    };
1637
1638    Slick.prototype.loadSlider = function() {
1639
1640        var _ = this;
1641
1642        _.setPosition();
1643
1644        _.$slideTrack.css({
1645            opacity: 1
1646        });
1647
1648        _.$slider.removeClass('slick-loading');
1649
1650        _.initUI();
1651
1652        if (_.options.lazyLoad === 'progressive') {
1653            _.progressiveLazyLoad();
1654        }
1655
1656    };
1657
1658    Slick.prototype.next = Slick.prototype.slickNext = function() {
1659
1660        var _ = this;
1661
1662        _.changeSlide({
1663            data: {
1664                message: 'next'
1665            }
1666        });
1667
1668    };
1669
1670    Slick.prototype.orientationChange = function() {
1671
1672        var _ = this;
1673
1674        _.checkResponsive();
1675        _.setPosition();
1676
1677    };
1678
1679    Slick.prototype.pause = Slick.prototype.slickPause = function() {
1680
1681        var _ = this;
1682
1683        _.autoPlayClear();
1684        _.paused = true;
1685
1686    };
1687
1688    Slick.prototype.play = Slick.prototype.slickPlay = function() {
1689
1690        var _ = this;
1691
1692        _.autoPlay();
1693        _.options.autoplay = true;
1694        _.paused = false;
1695        _.focussed = false;
1696        _.interrupted = false;
1697
1698    };
1699
1700    Slick.prototype.postSlide = function(index) {
1701
1702        var _ = this;
1703
1704        if( !_.unslicked ) {
1705
1706            _.$slider.trigger('afterChange', [_, index]);
1707
1708            _.animating = false;
1709
1710            if (_.slideCount > _.options.slidesToShow) {
1711                _.setPosition();
1712            }
1713
1714            _.swipeLeft = null;
1715
1716            if ( _.options.autoplay ) {
1717                _.autoPlay();
1718            }
1719
1720            if (_.options.accessibility === true) {
1721                _.initADA();
1722
1723                if (_.options.focusOnChange) {
1724                    var $currentSlide = $(_.$slides.get(_.currentSlide));
1725                    $currentSlide.attr('tabindex', 0).focus();
1726                }
1727            }
1728
1729        }
1730
1731    };
1732
1733    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1734
1735        var _ = this;
1736
1737        _.changeSlide({
1738            data: {
1739                message: 'previous'
1740            }
1741        });
1742
1743    };
1744
1745    Slick.prototype.preventDefault = function(event) {
1746
1747        event.preventDefault();
1748
1749    };
1750
1751    Slick.prototype.progressiveLazyLoad = function( tryCount ) {
1752
1753        tryCount = tryCount || 1;
1754
1755        var _ = this,
1756            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
1757            image,
1758            imageSource,
1759            imageSrcSet,
1760            imageSizes,
1761            imageToLoad;
1762
1763        if ( $imgsToLoad.length ) {
1764
1765            image = $imgsToLoad.first();
1766            imageSource = image.attr('data-lazy');
1767            imageSrcSet = image.attr('data-srcset');
1768            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');
1769            imageToLoad = document.createElement('img');
1770
1771            imageToLoad.onload = function() {
1772
1773                if (imageSrcSet) {
1774                    image
1775                        .attr('srcset', imageSrcSet );
1776
1777                    if (imageSizes) {
1778                        image
1779                            .attr('sizes', imageSizes );
1780                    }
1781                }
1782
1783                image
1784                    .attr( 'src', imageSource )
1785                    .removeAttr('data-lazy data-srcset data-sizes')
1786                    .removeClass('slick-loading');
1787
1788                if ( _.options.adaptiveHeight === true ) {
1789                    _.setPosition();
1790                }
1791
1792                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
1793                _.progressiveLazyLoad();
1794
1795            };
1796
1797            imageToLoad.onerror = function() {
1798
1799                if ( tryCount < 3 ) {
1800
1801                    /**
1802                     * try to load the image 3 times,
1803                     * leave a slight delay so we don't get
1804                     * servers blocking the request.
1805                     */
1806                    setTimeout( function() {
1807                        _.progressiveLazyLoad( tryCount + 1 );
1808                    }, 500 );
1809
1810                } else {
1811
1812                    image
1813                        .removeAttr( 'data-lazy' )
1814                        .removeClass( 'slick-loading' )
1815                        .addClass( 'slick-lazyload-error' );
1816
1817                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1818
1819                    _.progressiveLazyLoad();
1820
1821                }
1822
1823            };
1824
1825            imageToLoad.src = imageSource;
1826
1827        } else {
1828
1829            _.$slider.trigger('allImagesLoaded', [ _ ]);
1830
1831        }
1832
1833    };
1834
1835    Slick.prototype.refresh = function( initializing ) {
1836
1837        var _ = this, currentSlide, lastVisibleIndex;
1838
1839        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1840
1841        // in non-infinite sliders, we don't want to go past the
1842        // last visible index.
1843        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
1844            _.currentSlide = lastVisibleIndex;
1845        }
1846
1847        // if less slides than to show, go to start.
1848        if ( _.slideCount <= _.options.slidesToShow ) {
1849            _.currentSlide = 0;
1850
1851        }
1852
1853        currentSlide = _.currentSlide;
1854
1855        _.destroy(true);
1856
1857        $.extend(_, _.initials, { currentSlide: currentSlide });
1858
1859        _.init();
1860
1861        if( !initializing ) {
1862
1863            _.changeSlide({
1864                data: {
1865                    message: 'index',
1866                    index: currentSlide
1867                }
1868            }, false);
1869
1870        }
1871
1872    };
1873
1874    Slick.prototype.registerBreakpoints = function() {
1875
1876        var _ = this, breakpoint, currentBreakpoint, l,
1877            responsiveSettings = _.options.responsive || null;
1878
1879        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
1880
1881            _.respondTo = _.options.respondTo || 'window';
1882
1883            for ( breakpoint in responsiveSettings ) {
1884
1885                l = _.breakpoints.length-1;
1886
1887                if (responsiveSettings.hasOwnProperty(breakpoint)) {
1888                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1889
1890                    // loop through the breakpoints and cut out any existing
1891                    // ones with the same breakpoint number, we don't want dupes.
1892                    while( l >= 0 ) {
1893                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
1894                            _.breakpoints.splice(l,1);
1895                        }
1896                        l--;
1897                    }
1898
1899                    _.breakpoints.push(currentBreakpoint);
1900                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1901
1902                }
1903
1904            }
1905
1906            _.breakpoints.sort(function(a, b) {
1907                return ( _.options.mobileFirst ) ? a-b : b-a;
1908            });
1909
1910        }
1911
1912    };
1913
1914    Slick.prototype.reinit = function() {
1915
1916        var _ = this;
1917
1918        _.$slides =
1919            _.$slideTrack
1920                .children(_.options.slide)
1921                .addClass('slick-slide');
1922
1923        _.slideCount = _.$slides.length;
1924
1925        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1926            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1927        }
1928
1929        if (_.slideCount <= _.options.slidesToShow) {
1930            _.currentSlide = 0;
1931        }
1932
1933        _.registerBreakpoints();
1934
1935        _.setProps();
1936        _.setupInfinite();
1937        _.buildArrows();
1938        _.updateArrows();
1939        _.initArrowEvents();
1940        _.buildDots();
1941        _.updateDots();
1942        _.initDotEvents();
1943        _.cleanUpSlideEvents();
1944        _.initSlideEvents();
1945
1946        _.checkResponsive(false, true);
1947
1948        if (_.options.focusOnSelect === true) {
1949            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1950        }
1951
1952        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
1953
1954        _.setPosition();
1955        _.focusHandler();
1956
1957        _.paused = !_.options.autoplay;
1958        _.autoPlay();
1959
1960        _.$slider.trigger('reInit', [_]);
1961
1962    };
1963
1964    Slick.prototype.resize = function() {
1965
1966        var _ = this;
1967
1968        if ($(window).width() !== _.windowWidth) {
1969            clearTimeout(_.windowDelay);
1969 //argit
vendor: 17,276 bytes, lines 1969-2539
1969
1970            _.windowDelay = window.setTimeout(function() {
1971                _.windowWidth = $(window).width();
1972                _.checkResponsive();
1973                if( !_.unslicked ) { _.setPosition(); }
1974            }, 50);
1975        }
1976    };
1977
1978    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
1979
1980        var _ = this;
1981
1982        if (typeof(index) === 'boolean') {
1983            removeBefore = index;
1984            index = removeBefore === true ? 0 : _.slideCount - 1;
1985        } else {
1986            index = removeBefore === true ? --index : index;
1987        }
1988
1989        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1990            return false;
1991        }
1992
1993        _.unload();
1994
1995        if (removeAll === true) {
1996            _.$slideTrack.children().remove();
1997        } else {
1998            _.$slideTrack.children(this.options.slide).eq(index).remove();
1999        }
2000
2001        _.$slides = _.$slideTrack.children(this.options.slide);
2002
2003        _.$slideTrack.children(this.options.slide).detach();
2004
2005        _.$slideTrack.append(_.$slides);
2006
2007        _.$slidesCache = _.$slides;
2008
2009        _.reinit();
2010
2011    };
2012
2013    Slick.prototype.setCSS = function(position) {
2014
2015        var _ = this,
2016            positionProps = {},
2017            x, y;
2018
2019        if (_.options.rtl === true) {
2020            position = -position;
2021        }
2022        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
2023        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
2024
2025        positionProps[_.positionProp] = position;
2026
2027        if (_.transformsEnabled === false) {
2028            _.$slideTrack.css(positionProps);
2029        } else {
2030            positionProps = {};
2031            if (_.cssTransitions === false) {
2032                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
2033                _.$slideTrack.css(positionProps);
2034            } else {
2035                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
2036                _.$slideTrack.css(positionProps);
2037            }
2038        }
2039
2040    };
2041
2042    Slick.prototype.setDimensions = function() {
2043
2044        var _ = this;
2045
2046        if (_.options.vertical === false) {
2047            if (_.options.centerMode === true) {
2048                _.$list.css({
2049                    padding: ('0px ' + _.options.centerPadding)
2050                });
2051            }
2052        } else {
2053            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
2054            if (_.options.centerMode === true) {
2055                _.$list.css({
2056                    padding: (_.options.centerPadding + ' 0px')
2057                });
2058            }
2059        }
2060
2061        _.listWidth = _.$list.width();
2062        _.listHeight = _.$list.height();
2063
2064
2065        if (_.options.vertical === false && _.options.variableWidth === false) {
2066            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
2067            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
2068
2069        } else if (_.options.variableWidth === true) {
2070            _.$slideTrack.width(5000 * _.slideCount);
2071        } else {
2072            _.slideWidth = Math.ceil(_.listWidth);
2073            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
2074        }
2075
2076        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
2077        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
2078
2079    };
2080
2081    Slick.prototype.setFade = function() {
2082
2083        var _ = this,
2084            targetLeft;
2085
2086        _.$slides.each(function(index, element) {
2087            targetLeft = (_.slideWidth * index) * -1;
2088            if (_.options.rtl === true) {
2089                $(element).css({
2090                    position: 'relative',
2091                    right: targetLeft,
2092                    top: 0,
2093                    zIndex: _.options.zIndex - 2,
2094                    opacity: 0
2095                });
2096            } else {
2097                $(element).css({
2098                    position: 'relative',
2099                    left: targetLeft,
2100                    top: 0,
2101                    zIndex: _.options.zIndex - 2,
2102                    opacity: 0
2103                });
2104            }
2105        });
2106
2107        _.$slides.eq(_.currentSlide).css({
2108            zIndex: _.options.zIndex - 1,
2109            opacity: 1
2110        });
2111
2112    };
2113
2114    Slick.prototype.setHeight = function() {
2115
2116        var _ = this;
2117
2118        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
2119            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
2120            _.$list.css('height', targetHeight);
2121        }
2122
2123    };
2124
2125    Slick.prototype.setOption =
2126    Slick.prototype.slickSetOption = function() {
2127
2128        /**
2129         * accepts arguments in format of:
2130         *
2131         *  - for changing a single option's value:
2132         *     .slick("setOption", option, value, refresh )
2133         *
2134         *  - for changing a set of responsive options:
2135         *     .slick("setOption", 'responsive', [{}, ...], refresh )
2136         *
2137         *  - for updating multiple values at once (not responsive)
2138         *     .slick("setOption", { 'option': value, ... }, refresh )
2139         */
2140
2141        var _ = this, l, item, option, value, refresh = false, type;
2142
2143        if( $.type( arguments[0] ) === 'object' ) {
2144
2145            option =  arguments[0];
2146            refresh = arguments[1];
2147            type = 'multiple';
2148
2149        } else if ( $.type( arguments[0] ) === 'string' ) {
2150
2151            option =  arguments[0];
2152            value = arguments[1];
2153            refresh = arguments[2];
2154
2155            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
2156
2157                type = 'responsive';
2158
2159            } else if ( typeof arguments[1] !== 'undefined' ) {
2160
2161                type = 'single';
2162
2163            }
2164
2165        }
2166
2167        if ( type === 'single' ) {
2168
2169            _.options[option] = value;
2170
2171
2172        } else if ( type === 'multiple' ) {
2173
2174            $.each( option , function( opt, val ) {
2175
2176                _.options[opt] = val;
2177
2178            });
2179
2180
2181        } else if ( type === 'responsive' ) {
2182
2183            for ( item in value ) {
2184
2185                if( $.type( _.options.responsive ) !== 'array' ) {
2186
2187                    _.options.responsive = [ value[item] ];
2188
2189                } else {
2190
2191                    l = _.options.responsive.length-1;
2192
2193                    // loop through the responsive object and splice out duplicates.
2194                    while( l >= 0 ) {
2195
2196                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
2197
2198                            _.options.responsive.splice(l,1);
2199
2200                        }
2201
2202                        l--;
2203
2204                    }
2205
2206                    _.options.responsive.push( value[item] );
2207
2208                }
2209
2210            }
2211
2212        }
2213
2214        if ( refresh ) {
2215
2216            _.unload();
2217            _.reinit();
2218
2219        }
2220
2221    };
2222
2223    Slick.prototype.setPosition = function() {
2224
2225        var _ = this;
2226
2227        _.setDimensions();
2228
2229        _.setHeight();
2230
2231        if (_.options.fade === false) {
2232            _.setCSS(_.getLeft(_.currentSlide));
2233        } else {
2234            _.setFade();
2235        }
2236
2237        _.$slider.trigger('setPosition', [_]);
2238
2239    };
2240
2241    Slick.prototype.setProps = function() {
2242
2243        var _ = this,
2244            bodyStyle = document.body.style;
2245
2246        _.positionProp = _.options.vertical === true ? 'top' : 'left';
2247
2248        if (_.positionProp === 'top') {
2249            _.$slider.addClass('slick-vertical');
2250        } else {
2251            _.$slider.removeClass('slick-vertical');
2252        }
2253
2254        if (bodyStyle.WebkitTransition !== undefined ||
2255            bodyStyle.MozTransition !== undefined ||
2256            bodyStyle.msTransition !== undefined) {
2257            if (_.options.useCSS === true) {
2258                _.cssTransitions = true;
2259            }
2260        }
2261
2262        if ( _.options.fade ) {
2263            if ( typeof _.options.zIndex === 'number' ) {
2264                if( _.options.zIndex < 3 ) {
2265                    _.options.zIndex = 3;
2266                }
2267            } else {
2268                _.options.zIndex = _.defaults.zIndex;
2269            }
2270        }
2271
2272        if (bodyStyle.OTransform !== undefined) {
2273            _.animType = 'OTransform';
2274            _.transformType = '-o-transform';
2275            _.transitionType = 'OTransition';
2276            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2277        }
2278        if (bodyStyle.MozTransform !== undefined) {
2279            _.animType = 'MozTransform';
2280            _.transformType = '-moz-transform';
2281            _.transitionType = 'MozTransition';
2282            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
2283        }
2284        if (bodyStyle.webkitTransform !== undefined) {
2285            _.animType = 'webkitTransform';
2286            _.transformType = '-webkit-transform';
2287            _.transitionType = 'webkitTransition';
2288            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2289        }
2290        if (bodyStyle.msTransform !== undefined) {
2291            _.animType = 'msTransform';
2292            _.transformType = '-ms-transform';
2293            _.transitionType = 'msTransition';
2294            if (bodyStyle.msTransform === undefined) _.animType = false;
2295        }
2296        if (bodyStyle.transform !== undefined && _.animType !== false) {
2297            _.animType = 'transform';
2298            _.transformType = 'transform';
2299            _.transitionType = 'transition';
2300        }
2301        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
2302    };
2303
2304
2305    Slick.prototype.setSlideClasses = function(index) {
2306
2307        var _ = this,
2308            centerOffset, allSlides, indexOffset, remainder;
2309
2310        allSlides = _.$slider
2311            .find('.slick-slide')
2312            .removeClass('slick-active slick-center slick-current')
2313            .attr('aria-hidden', 'true');
2314
2315        _.$slides
2316            .eq(index)
2317            .addClass('slick-current');
2318
2319        if (_.options.centerMode === true) {
2320
2321            var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
2322
2323            centerOffset = Math.floor(_.options.slidesToShow / 2);
2324
2325            if (_.options.infinite === true) {
2326
2327                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
2328                    _.$slides
2329                        .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
2330                        .addClass('slick-active')
2331                        .attr('aria-hidden', 'false');
2332
2333                } else {
2334
2335                    indexOffset = _.options.slidesToShow + index;
2336                    allSlides
2337                        .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
2338                        .addClass('slick-active')
2339                        .attr('aria-hidden', 'false');
2340
2341                }
2342
2343                if (index === 0) {
2344
2345                    allSlides
2346                        .eq(allSlides.length - 1 - _.options.slidesToShow)
2347                        .addClass('slick-center');
2348
2349                } else if (index === _.slideCount - 1) {
2350
2351                    allSlides
2352                        .eq(_.options.slidesToShow)
2353                        .addClass('slick-center');
2354
2355                }
2356
2357            }
2358
2359            _.$slides
2360                .eq(index)
2361                .addClass('slick-center');
2362
2363        } else {
2364
2365            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
2366
2367                _.$slides
2368                    .slice(index, index + _.options.slidesToShow)
2369                    .addClass('slick-active')
2370                    .attr('aria-hidden', 'false');
2371
2372            } else if (allSlides.length <= _.options.slidesToShow) {
2373
2374                allSlides
2375                    .addClass('slick-active')
2376                    .attr('aria-hidden', 'false');
2377
2378            } else {
2379
2380                remainder = _.slideCount % _.options.slidesToShow;
2381                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2382
2383                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2384
2385                    allSlides
2386                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2387                        .addClass('slick-active')
2388                        .attr('aria-hidden', 'false');
2389
2390                } else {
2391
2392                    allSlides
2393                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
2394                        .addClass('slick-active')
2395                        .attr('aria-hidden', 'false');
2396
2397                }
2398
2399            }
2400
2401        }
2402
2403        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
2404            _.lazyLoad();
2405        }
2406    };
2407
2408    Slick.prototype.setupInfinite = function() {
2409
2410        var _ = this,
2411            i, slideIndex, infiniteCount;
2412
2413        if (_.options.fade === true) {
2414            _.options.centerMode = false;
2415        }
2416
2417        if (_.options.infinite === true && _.options.fade === false) {
2418
2419            slideIndex = null;
2420
2421            if (_.slideCount > _.options.slidesToShow) {
2422
2423                if (_.options.centerMode === true) {
2424                    infiniteCount = _.options.slidesToShow + 1;
2425                } else {
2426                    infiniteCount = _.options.slidesToShow;
2427                }
2428
2429                for (i = _.slideCount; i > (_.slideCount -
2430                        infiniteCount); i -= 1) {
2431                    slideIndex = i - 1;
2432                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2433                        .attr('data-slick-index', slideIndex - _.slideCount)
2434                        .prependTo(_.$slideTrack).addClass('slick-cloned');
2435                }
2436                for (i = 0; i < infiniteCount  + _.slideCount; i += 1) {
2437                    slideIndex = i;
2438                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2439                        .attr('data-slick-index', slideIndex + _.slideCount)
2440                        .appendTo(_.$slideTrack).addClass('slick-cloned');
2441                }
2442                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2443                    $(this).attr('id', '');
2444                });
2445
2446            }
2447
2448        }
2449
2450    };
2451
2452    Slick.prototype.interrupt = function( toggle ) {
2453
2454        var _ = this;
2455
2456        if( !toggle ) {
2457            _.autoPlay();
2458        }
2459        _.interrupted = toggle;
2460
2461    };
2462
2463    Slick.prototype.selectHandler = function(event) {
2464
2465        var _ = this;
2466
2467        var targetElement =
2468            $(event.target).is('.slick-slide') ?
2469                $(event.target) :
2470                $(event.target).parents('.slick-slide');
2471
2472        var index = parseInt(targetElement.attr('data-slick-index'));
2473
2474        if (!index) index = 0;
2475
2476        if (_.slideCount <= _.options.slidesToShow) {
2477
2478            _.slideHandler(index, false, true);
2479            return;
2480
2481        }
2482
2483        _.slideHandler(index);
2484
2485    };
2486
2487    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2488
2489        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2490            _ = this, navTarget;
2491
2492        sync = sync || false;
2493
2494        if (_.animating === true && _.options.waitForAnimate === true) {
2495            return;
2496        }
2497
2498        if (_.options.fade === true && _.currentSlide === index) {
2499            return;
2500        }
2501
2502        if (sync === false) {
2503            _.asNavFor(index);
2504        }
2505
2506        targetSlide = index;
2507        targetLeft = _.getLeft(targetSlide);
2508        slideLeft = _.getLeft(_.currentSlide);
2509
2510        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2511
2512        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2513            if (_.options.fade === false) {
2514                targetSlide = _.currentSlide;
2515                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2516                    _.animateSlide(slideLeft, function() {
2517                        _.postSlide(targetSlide);
2518                    });
2519                } else {
2520                    _.postSlide(targetSlide);
2521                }
2522            }
2523            return;
2524        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2525            if (_.options.fade === false) {
2526                targetSlide = _.currentSlide;
2527                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2528                    _.animateSlide(slideLeft, function() {
2529                        _.postSlide(targetSlide);
2530                    });
2531                } else {
2532                    _.postSlide(targetSlide);
2533                }
2534            }
2535            return;
2536        }
2537
2538        if ( _.options.autoplay ) {
2539            clear
2539Timeout(_.autoPlayTimer); //argit
vendor: 4,716 bytes, lines 2539-2716
2539
2540        }
2541
2542        if (targetSlide < 0) {
2543            if (_.slideCount % _.options.slidesToScroll !== 0) {
2544                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2545            } else {
2546                animSlide = _.slideCount + targetSlide;
2547            }
2548        } else if (targetSlide >= _.slideCount) {
2549            if (_.slideCount % _.options.slidesToScroll !== 0) {
2550                animSlide = 0;
2551            } else {
2552                animSlide = targetSlide - _.slideCount;
2553            }
2554        } else {
2555            animSlide = targetSlide;
2556        }
2557
2558        _.animating = true;
2559
2560        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2561
2562        oldSlide = _.currentSlide;
2563        _.currentSlide = animSlide;
2564
2565        _.setSlideClasses(_.currentSlide);
2566
2567        if ( _.options.asNavFor ) {
2568
2569            navTarget = _.getNavTarget();
2570            navTarget = navTarget.slick('getSlick');
2571
2572            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
2573                navTarget.setSlideClasses(_.currentSlide);
2574            }
2575
2576        }
2577
2578        _.updateDots();
2579        _.updateArrows();
2580
2581        if (_.options.fade === true) {
2582            if (dontAnimate !== true) {
2583
2584                _.fadeSlideOut(oldSlide);
2585
2586                _.fadeSlide(animSlide, function() {
2587                    _.postSlide(animSlide);
2588                });
2589
2590            } else {
2591                _.postSlide(animSlide);
2592            }
2593            _.animateHeight();
2594            return;
2595        }
2596
2597        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2598            _.animateSlide(targetLeft, function() {
2599                _.postSlide(animSlide);
2600            });
2601        } else {
2602            _.postSlide(animSlide);
2603        }
2604
2605    };
2606
2607    Slick.prototype.startLoad = function() {
2608
2609        var _ = this;
2610
2611        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2612
2613            _.$prevArrow.hide();
2614            _.$nextArrow.hide();
2615
2616        }
2617
2618        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2619
2620            _.$dots.hide();
2621
2622        }
2623
2624        _.$slider.addClass('slick-loading');
2625
2626    };
2627
2628    Slick.prototype.swipeDirection = function() {
2629
2630        var xDist, yDist, r, swipeAngle, _ = this;
2631
2632        xDist = _.touchObject.startX - _.touchObject.curX;
2633        yDist = _.touchObject.startY - _.touchObject.curY;
2634        r = Math.atan2(yDist, xDist);
2635
2636        swipeAngle = Math.round(r * 180 / Math.PI);
2637        if (swipeAngle < 0) {
2638            swipeAngle = 360 - Math.abs(swipeAngle);
2639        }
2640
2641        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2642            return (_.options.rtl === false ? 'left' : 'right');
2643        }
2644        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2645            return (_.options.rtl === false ? 'left' : 'right');
2646        }
2647        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2648            return (_.options.rtl === false ? 'right' : 'left');
2649        }
2650        if (_.options.verticalSwiping === true) {
2651            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2652                return 'down';
2653            } else {
2654                return 'up';
2655            }
2656        }
2657
2658        return 'vertical';
2659
2660    };
2661
2662    Slick.prototype.swipeEnd = function(event) {
2663
2664        var _ = this,
2665            slideCount,
2666            direction;
2667
2668        _.dragging = false;
2669        _.swiping = false;
2670
2671        if (_.scrolling) {
2672            _.scrolling = false;
2673            return false;
2674        }
2675
2676        _.interrupted = false;
2677        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
2678
2679        if ( _.touchObject.curX === undefined ) {
2680            return false;
2681        }
2682
2683        if ( _.touchObject.edgeHit === true ) {
2684            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
2685        }
2686
2687        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
2688
2689            direction = _.swipeDirection();
2690
2691            switch ( direction ) {
2692
2693                case 'left':
2694                case 'down':
2695
2696                    slideCount =
2697                        _.options.swipeToSlide ?
2698                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
2699                            _.currentSlide + _.getSlideCount();
2700
2701                    _.currentDirection = 0;
2702
2703                    break;
2704
2705                case 'right':
2706                case 'up':
2707
2708                    slideCount =
2709                        _.options.swipeToSlide ?
2710                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
2711                            _.currentSlide - _.getSlideCount();
2712
2713                    _.currentDirection = 1;
2714
2715                    break;
2716
vendor: 3,992 bytes, lines 2717-2848
2717                default:
2718
2719
2720            }
2721
2722            if( direction != 'vertical' ) {
2723
2724                _.slideHandler( slideCount );
2725                _.touchObject = {};
2726                _.$slider.trigger('swipe', [_, direction ]);
2727
2728            }
2729
2730        } else {
2731
2732            if ( _.touchObject.startX !== _.touchObject.curX ) {
2733
2734                _.slideHandler( _.currentSlide );
2735                _.touchObject = {};
2736
2737            }
2738
2739        }
2740
2741    };
2742
2743    Slick.prototype.swipeHandler = function(event) {
2744
2745        var _ = this;
2746
2747        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2748            return;
2749        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2750            return;
2751        }
2752
2753        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2754            event.originalEvent.touches.length : 1;
2755
2756        _.touchObject.minSwipe = _.listWidth / _.options
2757            .touchThreshold;
2758
2759        if (_.options.verticalSwiping === true) {
2760            _.touchObject.minSwipe = _.listHeight / _.options
2761                .touchThreshold;
2762        }
2763
2764        switch (event.data.action) {
2765
2766            case 'start':
2767                _.swipeStart(event);
2768                break;
2769
2770            case 'move':
2771                _.swipeMove(event);
2772                break;
2773
2774            case 'end':
2775                _.swipeEnd(event);
2776                break;
2777
2778        }
2779
2780    };
2781
2782    Slick.prototype.swipeMove = function(event) {
2783
2784        var _ = this,
2785            edgeWasHit = false,
2786            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
2787
2788        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2789
2790        if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
2791            return false;
2792        }
2793
2794        curLeft = _.getLeft(_.currentSlide);
2795
2796        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2797        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2798
2799        _.touchObject.swipeLength = Math.round(Math.sqrt(
2800            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2801
2802        verticalSwipeLength = Math.round(Math.sqrt(
2803            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2804
2805        if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
2806            _.scrolling = true;
2807            return false;
2808        }
2809
2810        if (_.options.verticalSwiping === true) {
2811            _.touchObject.swipeLength = verticalSwipeLength;
2812        }
2813
2814        swipeDirection = _.swipeDirection();
2815
2816        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2817            _.swiping = true;
2818            event.preventDefault();
2819        }
2820
2821        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2822        if (_.options.verticalSwiping === true) {
2823            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2824        }
2825
2826
2827        swipeLength = _.touchObject.swipeLength;
2828
2829        _.touchObject.edgeHit = false;
2830
2831        if (_.options.infinite === false) {
2832            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2833                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2834                _.touchObject.edgeHit = true;
2835            }
2836        }
2837
2838        if (_.options.vertical === false) {
2839            _.swipeLeft = curLeft + swipeLength * positionOffset;
2840        } else {
2841            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2842        }
2843        if (_.options.verticalSwiping === true) {
2844            _.swipeLeft = curLeft + swipeLength * positionOffset;
2845        }
2846
2847        if (_.options.fade === true || _.options.touchMove === false) {
2848            return false;
2849        }
2850
2851        if (_.animating === true) {
2852            _.swipeLeft = null;
2853            return false;
2854        }
2855
2856        _.setCSS(_.swipeLeft);
2857
2858    };
2859
2860    Slick.prototype.swipeStart = function(event) {
2861
2862        var _ = this,
2863            touches;
2864
2865        _.interrupted = true;
2866
2867        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2868            _.touchObject = {};
2869            return false;
2870        }
2871
2872        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2873            touches = event.originalEvent.touches[0];
2874        }
2875
2876        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2877        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2878
2879        _.dragging = true;
2880
2881    };
2882
2883    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
2884
2885        var _ = this;
2886
2887        if (_.$slidesCache !== null) {
2888
2889            _.unload();
2890
2891            _.$slideTrack.children(this.options.slide).detach();
2892
2893            _.$slidesCache.appendTo(_.$slideTrack);
2894
2895            _.reinit();
2896
2897        }
2898
2899    };
2900
2901    Slick.prototype.unload = function() {
2902
2903        var _ = this;
2904
2905        $('.slick-cloned', _.$slider).remove();
2906
2907        if (_.$dots) {
2908            _.$dots.remove();
2909        }
2910
2911        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2912            _.$prevArrow.remove();
2913        }
2914
2915        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2916            _.$nextArrow.remove();
2917        }
2918
2919        _.$slides
2920            .removeClass('slick-slide slick-active slick-visible slick-current')
2921            .attr('aria-hidden', 'true')
2922            .css('width', '');
2923
2924    };
2925
2926    Slick.prototype.unslick = function(fromBreakpoint) {
2927
2928        var _ = this;
2929        _.$slider.trigger('unslick', [_, fromBreakpoint]);
2930        _.destroy();
2931
2932    };
2933
2934    Slick.prototype.updateArrows = function() {
2935
2936        var _ = this,
2937            centerOffset;
2938
2939        centerOffset = Math.floor(_.options.slidesToShow / 2);
2940
2941        if ( _.options.arrows === true &&
2942            _.slideCount > _.options.slidesToShow &&
2943            !_.options.infinite ) {
2944
2945            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2946            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2947
2948            if (_.currentSlide === 0) {
2949
2950                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2951                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2952
2953            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2954
2955                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2956                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2957
2958            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2959
2960                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2961                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2962
2963            }
2964
2965        }
2966
2967    };
2968
2969    Slick.prototype.updateDots = function() {
2970
2971        var _ = this;
2972
2973        if (_.$dots !== null) {
2974
2975            _.$dots
2976                .find('li')
2977                    .removeClass('slick-active')
2978                    .end();
2979
2980            _.$dots
2981                .find('li')
2982                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2983                .addClass('slick-active');
2984
2985        }
2986
2987    };
2988
2989    Slick.prototype.visibility = function() {
2990
2991        var _ = this;
2992
2993        if ( _.options.autoplay ) {
2994
2995            if ( document[_.hidden] ) {
2996
2997                _.interrupted = true;
2998
2999            } else {
3000
3001                _.interrupted = false;
3002
3003            }
3004
3005        }
3006
3007    };
3008
3009    $.fn.slick = function() {
3010        var _ = this,
3011            opt = arguments[0],
3012            args = Array.prototype.slice.call(arguments, 1),
3013            l = _.length,
3014            i,
3015            ret;
3016        for (i = 0; i < l; i++) {
3017            if (typeof opt == 'object' || typeof opt == 'undefined')
3018                _[i].slick = new Slick(_[i], opt);
3019            else
3020                ret = _[i].slick[opt].apply(_[i].slick, args);
3021            if (typeof ret != 'undefined') return ret;
3022        }
3023        return _;
3024    };
3025
3026}));
3027
3028/* End */
3029;
3030; /* Start:"a:4:{s:4:"full";s:75:"/local/templates/kayaker/assets/js/jquery.touchSwipe.min.js?159785954820430";s:6:"source";s:59:"/local/templates/kayaker/assets/js/jquery.touchSwipe.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3031/*!
3032 * @fileOverview TouchSwipe - jQuery Plugin
3033 * @version 1.6.18
3034 *
3035 * @author Matt Bryson http://www.github.com/mattbryson
3036 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
3037 * @see http://labs.rampinteractive.co.uk/touchSwipe/
3038 * @see http://plugins.jquery.com/project/touchSwipe
3039 * @license
3040 * Copyright (c) 2010-2015 Matt Bryson
3041 * Dual licensed under the MIT or GPL Version 2 licenses.
3042 *
3043 */
3044!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,f
vendor: 16,513 bytes, line 3044
3044ingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.cancelable!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&distance<DOUBLE_TAP_THRESHOLD}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){if(maximumsMap[direction])return maximumsMap[direction].distance}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return pinchZoom<1?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return angle<0&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return angle<=45&&angle>=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",
3044NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});
3045/* End */
3046;
3047; /* Start:"a:4:{s:4:"full";s:71:"/local/templates/kayaker/assets/js/jquery.maskedinput.js?15978595485915";s:6:"source";s:56:"/local/templates/kayaker/assets/js/jquery.maskedinput.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3048!function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory("object"==typeof exports?require("jquery"):jQuery);}(function($){var caretTimeoutId,ua=navigator.userAgent,iPhone=/iphone/i.test(ua),chrome=/chrome/i.test(ua),android=/android/i.test(ua);$.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},$.fn.extend({caret:function(begin,end){var range;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof begin?(end="number"==typeof end?end:begin,this.each(function(){this.setSelectionRange?this.setSelectionRange(begin,end):this.createTextRange&&(range=this.createTextRange(),range.collapse(!0),range.moveEnd("character",end),range.moveStart("character",begin),range.select());})):(this[0].setSelectionRange?(begin=this[0].selectionStart,end=this[0].selectionEnd):document.selection&&document.selection.createRange&&(range=document.selection.createRange(),begin=0-range.duplicate().moveStart("character",-1e5),end=begin+range.text.length),{begin:begin,end:end});},unmask:function(){return this.trigger("unmask");},mask:function(mask,settings){var input,defs,tests,partialPosition,firstNonMaskPos,lastRequiredNonMaskPos,len,oldVal;if(!mask&&this.length>0){input=$(this[0]);var fn=input.data($.mask.dataName);return fn?fn():void 0;}return settings=$.extend({autoclear:$.mask.autoclear,placeholder:$.mask.placeholder,completed:null},settings),defs=$.mask.definitions,tests=[],partialPosition=len=mask.length,firstNonMaskPos=null,$.each(mask.split(""),function(i,c){"?"==c?(len--,partialPosition=i):defs[c]?(tests.push(new RegExp(defs[c])),null===firstNonMaskPos&&(firstNonMaskPos=tests.length-1),partialPosition>i&&(lastRequiredNonMaskPos=tests.length-1)):tests.push(null);}),this.trigger("unmask").each(function(){function tryFireCompleted(){if(settings.completed){for(var i=firstNonMaskPos;lastRequiredNonMaskPos>=i;i++)if(tests[i]&&buffer[i]===getPlaceholder(i))return;settings.completed.call(input);}}function getPlaceholder(i){return settings.placeholder.charAt(i<settings.placeholder.length?
3048i:0);}function seekNext(pos){for(;++pos<len&&!tests[pos];);return pos;}function seekPrev(pos){for(;--pos>=0&&!tests[pos];);return pos;}function shiftL(begin,end){var i,j;if(!(0>begin)){for(i=begin,j=seekNext(end);len>i;i++)if(tests[i]){if(!(len>j&&tests[i].test(buffer[j])))break;buffer[i]=buffer[j],buffer[j]=getPlaceholder(j),j=seekNext(j);}writeBuffer(),input.caret(Math.max(firstNonMaskPos,begin));}}function shiftR(pos){var i,c,j,t;for(i=pos,c=getPlaceholder(pos);len>i;i++)if(tests[i]){if(j=seekNext(i),t=buffer[i],buffer[i]=c,!(len>j&&tests[j].test(t)))break;c=t;}}function androidInputEvent(){var curVal=input.val(),pos=input.caret();if(curVal.length<oldVal.length){for(checkVal(!0);pos.begin>0&&!tests[pos.begin-1];)pos.begin--;if(0===pos.begin)for(;pos.begin<firstNonMaskPos&&!tests[pos.begin];)pos.begin++;input.caret(pos.begin,pos.begin);}else{for(checkVal(!0);pos.begin<len&&!tests[pos.begin];)pos.begin++;input.caret(pos.begin,pos.begin);}tryFireCompleted();}function blurEvent(){checkVal(),input.val()!=focusText&&input.change();}function keydownEvent(e){if(!input.prop("readonly")){var pos,begin,end,k=e.which||e.keyCode;oldVal=input.val(),8===k||46===k||iPhone&&127===k?(pos=input.caret(),begin=pos.begin,end=pos.end,end-begin===0&&(begin=46!==k?seekPrev(begin):end=seekNext(begin-1),end=46===k?seekNext(end):end),clearBuffer(begin,end),shiftL(begin,end-1),e.preventDefault()):13===k?blurEvent.call(this,e):27===k&&(input.val(focusText),input.caret(0,checkVal()),e.preventDefault());}}function keypressEvent(e){if(!input.prop("readonly")){var p,c,next,k=e.which||e.keyCode,pos=input.caret();if(!(e.ctrlKey||e.altKey||e.metaKey||32>k)&&k&&13!==k){if(pos.end-pos.begin!==0&&(clearBuffer(pos.begin,pos.end),shiftL(pos.begin,pos.end-1)),p=seekNext(pos.begin-1),len>p&&(c=String.fromCharCode(k),tests[p].test(c))){if(shiftR(p),buffer[p]=c,writeBuffer(),next=seekNext(p),android){var proxy=function(){$.proxy($.fn.caret,input,next)();};setTimeout(proxy,0);}else input.caret(next);pos.begin<=lastRequiredNonMaskPos&&tryFireCompleted();}e.preventDefault();}}}function clearBuffer(start,end){var i;for(i=start;end>i&&len>i;i++)tests[i]&&(buffer[i]=getPlaceholder(i));}function writeBuffer(){input.val(buffer.join(""));}function checkVal(allow){var i,c,pos,test=input.val(),lastMatch=-1;for(i=0,pos=0;len>i;i++)if(tests[i]){for(buffer[i]=getPlaceholder(i);pos++<test.length;)if(c=test.charAt(pos-1),tests[i].test(c)){buffer[i]=c,lastMatch=i;break;}if(pos>test.length){clearBuffer(i+1,len);break;}}else buffer[i]===test.charAt(pos)&&pos++,partialPosition>i&&(lastMatch=i);return allow?writeBuffer():partialPosition>lastMatch+1?settings.autoclear||buffer.join("")===defaultBuffer?(input.val()&&input.val(""),clearBuffer(0,len)):writeBuffer():(writeBuffer(),input.val(input.val().substring(0,lastMatch+1))),partialPosition?i:firstNonMaskPos;}var input=$(this),buffer=$.map(mask.split(""),function(c,i){return"?"!=c?defs[c]?getPlaceholder(i):c:void 0;}),defaultBuffer=buffer.join(""),focusText=input.val();input.data($.mask.dataName,function(){return $.map(buffer,function(c,i){return tests[i]&&c!=getPlaceholder(i)?c:null;}).join("");}),input.one("unmask",function(){input.off(".mask").removeData($.mask.dataName);}).on("focus.mask",function(){if(!input.prop("readonly")){clearTimeout(caretTimeoutId);var pos;focusText=input.val(),pos=checkVal(),caretTimeoutId=setTimeout(function(){writeBuffer(),pos==mask.replace("?","").length?input.caret(0,pos):input.caret(pos);},10);}}).on("blur.mask",blurEvent).on("keydown.mask",keydownEvent).on("keypress.mask",keypressEvent).on("input.mask paste.mask",function(){input.prop("readonly")||setTimeout(function(){var pos=checkVal(!0);input.caret(pos),tryFireCompleted();},0);}),chrome&&android&&input.off("input.mask").on("input.mask",androidInputEvent),checkVal();});}});});
3049/* End */
3050;
3051; /* Start:"a:4:{s:4:"full";s:66:"/local/templates/kayaker/assets/js/jquery.cookie.js?15978595483121";s:6:"source";s:51:"/local/templates/kayaker/assets/js/jquery.cookie.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3052/*!
3053 * jQuery Cookie Plugin v1.4.1
3054 * https://github.com/carhartl/jquery-cookie
3055 *
3056 * Copyright 2013 Klaus Hartl
3057 * Released under the MIT license
3058 */
3059(function (factory) {
3060	if (typeof define === 'function' && define.amd) {
3061		// AMD
3062		define(['jquery'], factory);
3063	} else if (typeof exports === 'object') {
3064		// CommonJS
3065		factory(require('jquery'));
3066	} else {
3067		// Browser globals
3068		factory(jQuery);
3069	}
3070}(function ($) {
3071
3072	var pluses = /\+/g;
3073
3074	function encode(s) {
3075		return config.raw ? s : encodeURIComponent(s);
3076	}
3077
3078	function decode(s) {
3079		return config.raw ? s : decodeURIComponent(s);
3080	}
3081
3082	function stringifyCookieValue(value) {
3083		return encode(config.json ? JSON.stringify(value) : String(value));
3084	}
3085
3086	function parseCookieValue(s) {
3087		if (s.indexOf('"') === 0) {
3088			// This is a quoted cookie as according to RFC2068, unescape...
3089			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
3090		}
3091
3092		try {
3093			// Replace server-side written pluses with spaces.
3094			// If we can't decode the cookie, ignore it, it's unusable.
3095			// If we can't parse the cookie, ignore it, it's unusable.
3096			s = decodeURIComponent(s.replace(pluses, ' '));
3097			return config.json ? JSON.parse(s) : s;
3098		} catch(e) {}
3099	}
3100
3101	function read(s, converter) {
3102		var value = config.raw ? s : parseCookieValue(s);
3103		return $.isFunction(converter) ? converter(value) : value;
3104	}
3105
3106	var config = $.cookie = function (key, value, options) {
3107
3108		// Write
3109
3110		if (value !== undefined && !$.isFunction(value)) {
3111			options = $.extend({}, config.defaults, options);
3112
3113			if (typeof options.expires === 'number') {
3114				var days = options.expires, t = options.expires = new Date();
3115				t.setTime(+t + days * 864e+5);
3116			}
3117
3118			return (document.cookie = [
3119				encode(key), '=', stringifyCookieValue(value),
3120				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
3121				options.path    ? '; path=' + options.path : '',
3122				options.domain  ? '; domain=' + options.domain : '',
3123				options.secure  ? '; secure' : ''
3124			].join(''));
3125		}
3126
3127		// Read
3128
3129		var result = key ? undefined : {};
3130
3131		// To prevent the for loop in the first place assign an empty array
3132		// in case there are no cookies at all. Also prevents odd result when
3133		// calling $.cookie().
3134		var cookies = document.cookie ? document.cookie.split('; ') : [];
3135
3136		for (var i = 0, l = cookies.length; i < l; i++) {
3137			var parts = cookies[i].split('=');
3138			var name = decode(parts.shift());
3139			var cookie = parts.join('=');
3140
3141			if (key && key === name) {
3142				// If second argument (value) is a function it's a converter...
3143				result = read(cookie, value);
3144				break;
3145			}
3146
3147			// Prevent storing a cookie that we couldn't decode.
3148			if (!key && (cookie = read(cookie)) !== undefined) {
3149				result[name] = cookie;
3150			}
3151		}
3152
3153		return result;
3154	};
3155
3156	config.defaults = {};
3157
3158	$.removeCookie = function (key, options) {
3159		if ($.cookie(key) === undefined) {
3160			return false;
3161		}
3162
3163		// Must not alter options, thus extending a fresh object...
3164		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
3165		return !$.cookie(key);
3166	};
3167
3168}));
3169
3170/* End */
3171;
3172; /* Start:"a:4:{s:4:"full";s:72:"/local/templates/kayaker/assets/js/jquery.lazyload.min.js?15978595483103";s:6:"source";s:57:"/local/templates/kayaker/assets/js/jquery.lazyload.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3173/*
3174 * Lazy Load - jQuery plugin for lazy loading images
3175 *
3176 * Copyright (c) 2007-2012 Mika Tuupola
3177 *
3178 * Licensed under the MIT license:
3179 *   http://www.opensource.org/licenses/mit-license.php
3180 *
3181 * Project home:
3182 *   http://www.appelsiini.net/projects/lazyload
3183 *
3184 * Version:  1.8.1-dev
3185 *
3186 */
3187(function(a,b){var c=a(b);a.fn.lazyload=function(d){function h(){var b=0;e.each(function(){var c=a(this);if(g.skip_invisible&&!c.is(":visible"))return;if(!a.abovethetop(this,g)&&!a.leftofbegin(this,g))if(!a.belowthefold(this,g)&&!a.rightoffold(this,g))c.trigger("appear"),b=0;else if(++b>g.failure_limit)return!1})}var e=this,f,g={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null};return d&&(undefined!==d.failurelimit&&(d.failure_limit=d.failurelimit,delete d.failurelimit),undefined!==d.effectspeed&&(d.effect_speed=d.effectspeed,delete d.effectspeed),a.extend(g,d)),f=g.container===undefined||g.container===b?c:a(g.container),0===g.event.indexOf("scroll")&&f.bind(g.event,function(a){return h()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,c.one("appear",function(){if(!this.loaded){if(g.appear){var d=e.length;g.appear.call(b,d,g)}a("<img />").bind("load",function(){c.hide().attr("src",c.data(g.data_attribute))[g.effect](g.effect_speed),b.loaded=!0;var d=a.grep(e,function(a){return!a.loaded});e=a(d);if(g.load){var f=e.length;g.load.call(b,f,g)}}).attr("src",c.data(g.data_attribute))}}),0!==g.event.indexOf("scroll")&&c.bind(g.event,function(a){b.loaded||c.trigger("appear")})}),c.bind("resize",function(a){h()}),a(document).ready(function(){h()}),this},a.belowthefold=function(d,e){var f;return e.container===undefined||e.container===b?f=c.height()+c.scrollTop():f=a(e.container).offset().top+a(e.container).height(),f<=a(d).offset().top-e.threshold},a.rightoffold=function(d,e){var f;return e.container===undefined||e.container===b?f=c.width()+c.scrollLeft():f=a(e.container).offset().left+a(e.container).width(),f<=a(d).offset().left-e.threshold},a.abovethetop=function(d,e){var f;return e.container===undefined||e.container===b?f=c.scrollTop():f=a(e.container).offset().top,f>=a(d).offset().top+e.threshold+a(d).height()},a.leftofbegin=function(d,e){var f;return e.container===undefined||e.container===b?f=c.scrollLeft():f=a(e.container).offset().left,f>=a(d).offset().left+e.threshold+a(d).width()},a.inviewport=function(b,c){return!a.rightofscreen(b,c)&&!a.leftofscreen(b,c)&&!a.belowthefold(b,c)&&!a.abovethetop(b,c)},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return!a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})})(jQuery,window)
3188
3189/* End */
3190;
3191; /* Start:"a:4:{s:4:"full";s:60:"/local/templates/kayaker/assets/js/script.js?170360447432410";s:6:"source";s:44:"/local/templates/kayaker/assets/js/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3192var myGeoObjects = [];
3193var myMap;
3194var clusterer;
3195
3196function add_issue_points (postcode)
3197{
3198    if (!('.product__delivery__issue-points').length) return;
3199        
3200    if($('.cdek_issue_points').hasClass('product_issue_points')) 
3201        isProduct = true;
3202    else
3203        isProduct = false;
3204    
3205    if (typeof(postcode) === "undefined")
3206        data = {citypostcode: $.cookie("postcode")};
3207    else
3208        data = {citypostcode: postcode};
3209    
3210    data['action'] = 'cdek';
3211
3212    //$.get('https://integration.cdek.ru/pvzlist/v1/xml', data, function(xml){
3213    $.post('/catalog/ajax.php', data, function(xml){
3214        
3215        str = '';
3216        
3217        issue_points = [];
3218        
3219        selects = '<div class="select_wrapper">';
3220        
3221        if(!isProduct)
3222            selects += '<div class="select-value">
3222Выберите пункт выдачи</div>';            
3223        
3224        selects += '<div class="select select-issue_points">';
3225        
3226        $(xml).find('PvzList Pvz').each(function(i){
3227            
3228            if(isProduct)
3229                selects += '<div><span>' + $(this).attr('Address') +'</span>';
3230            else
3231                selects += '<div class="option" data-id="' + i + '">' + $(this).attr('Address') 
3232            
3233            
3234            if(isProduct) selects +=  '<div class="issue-point__in-cart js-order">купить</div>';
3235                
3236            selects += '</div>';
3237            
3238            str_issue_point = '<div class="issue_point issue_point_' + i + '">';
3239            
3240            str_issue_point += '<div class="issue_point__address">';
3241            str_issue_point += $(this).attr('Address'); //'г.' + $(this).attr('City') + ', ' + 
3242            
3243            str_issue_point += '</div><div class="issue_point__station">';
3244            str_issue_point += $(this).attr('NearestStation');
3245            
3246            //str_issue_point += '</div><div class="issue_point__comment">';
3247            //str_issue_point += $(this).attr('AddressComment');
3248            
3249            str_issue_point += '</div><div class="issue_point__worktime">';
3250            str_issue_point += 'Режим работы: <span>' + $(this).attr('WorkTime') + '</span>';
3251            
3252            str_issue_point += '</div><div class="issue_point__phone">';
3253            str_issue_point += 'Телефон: <span>' + $(this).attr('Phone') + '</span>';
3254            
3255            str_issue_point += '</div>';
3256            str_issue_point += '</div>';
3257            
3258            str += str_issue_point;
3259            
3260            issue_points[issue_points.length] = {
3261                y: $(this).attr('coordX'),
3262                x: $(this).attr('coordY'),
3263                str: '<b>'+$(this).attr('Address')+'</b><br>'+'Режим работы: ' + $(this).attr('WorkTime')+'<br>'+'Телефон: ' + $(this).attr('Phone'),
3264            }
3265                                
3266        });
3267        
3268        selects += '</div></div>';
3269        
3270        if (issue_points.length > 0)
3271        {
3272            
3273            $('#map').html('<div id="map1"></div>');
3274            
3275            ymaps.ready(function (){
3276                myMap = new ymaps.Map("map1", {
3277                    center: [55.76, 37.64],
3278                    zoom: 16,
3279                    //controls: []
3280                });
3281                myMap.behaviors.disable('multiTouch');
3282                
3283//                console.log (issue_points);
3284                
3285                for(i=0; i < issue_points.length; i++)
3286                {
3287                    
3288                    placemark = new ymaps.Placemark([issue_points[i]['x'], issue_points[i]['y']],{
3289                                    option_i: i,
3290                                    balloonContentBody: issue_points[i]['str'],
3291                                    },{
3292                                    iconLayout: 'default#image',
3293                                    //iconImageHref: '<?=get_template_directory_uri()?>/assets/img/map-badge.png', 
3294                                    //iconImageSize: [107, 143],
3295                                    //iconImageOffset: [-53, -143]
3296                    });
3297                    myGeoObjects[myGeoObjects.length] = placemark;
3298                    
3299                    placemark.events.add(['click'],  function (e) {                                                
3300                        let option_i = e.get('target').properties.get('option_i');
3301                        $('.cdek_issue_points .option').eq(option_i).click();
3302                    })
3303                    
3304                
3305                }
3306                
3307                clusterer = new ymaps.Clusterer({
3308                    clusterDisableClickZoom: false,
3309                    clusterOpenBalloonOnClick: false,
3310                });                
3311
3312                clusterer.add(myGeoObjects);
3313                myMap.geoObjects.add(clusterer);
3314                
3315                myMap.controls.add(new ymaps.control.ZoomControl());
3316                myMap.controls.add('typeSelector');
3317                
3318                
3319                //console.log(bounds);
3320                bounds = myMap.geoObjects.getBounds();                                    
3321                bounds[0][0] += 0.005;
3322                myMap.setBounds(bounds);
3323            });
3324            
3325            $('.cdek_issue_points').html(selects + str);
3326            $('#map').show();
3327        }
3328        else
3329        {
3330            $('.cdek_issue_points').html('<div class="m_30">В данном городе нет доступных пунктов выдачи СДЭК</div>');
3331            $('#map').hide();
3332        }
3333    },'xml').fail(function() {
3334        $('.cdek_issue_points').html('<div class="m_30">В данном городе нет доступных пунктов выдачи СДЭК</div>');
3335        $('#map').hide();
3336    })
3337}
3338    
3339function show_modal(className){
3340        
3341/*        
3342        
3343        var scrollPosition = [
3344        self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
3345        self.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop
3346        ];
3347        var html = jQuery('html'); // it would make more sense to apply this to body, but IE7 won't have that
3348        html.data('scroll-position', scrollPosition);
3349        html.data('previous-overflow', html.css('overflow'));
3350        html.css('overflow', 'hidden');
3351        html.css('height', '100vh');
3352        window.scrollTo(scrollPosition[0], scrollPosition[1]);
3353*/        
3354       
3355        if (win_w < 768)            
3356            $(className).css('display', 'block');        
3357        else
3358            $(className).css('display', 'flex');
3359
3360        $(className).animate({'opacity': '1'}, 250);
3361        
3362        if ($(className+' > div').height() > $(className).height())
3363            $(className).css({'align-items': 'flex-start'})
3364        else
3365            $(className).css({'align-items': 'center'})
3366        
3367        
3368        
3369}
3370
3371function hide_modal(){              
3372
3373    /*
3374    var html = jQuery('html');
3375    var scrollPosition = html.data('scroll-position');
3376    html.css('overflow', html.data('previous-overflow'));
3377    window.scrollTo(scrollPosition[0], scrollPosition[1])
3378    */
3379    
3380    $('.blackout-modal').animate({'opacity': '0'}, 250, function(){
3381        $('.blackout-modal').hide();            
3382    });
3383    $('.modal-order').animate({'opacity': '0'}, 250, function(){
3384        $('.modal-order').hide();
3385    });
3386    
3387}
3388
3389
3390function UpdateCartDisplay()
3391{
3392    total_quantity = 0;
3393    total_price = 0;
3394    cart_items_string = '';
3395    
3396    for(key in cart_items)
3397    {        
3398        total_quantity += parseInt(cart_items[key]['quantity']);
3399        total_price += cart_items[key]['quantity'] * cart_items[key]['price'];
3400        
3401        cart_items_string += '<div class="border_bottom">\
3402                                <div style="white-space: normal">\
3403                                    '+cart_items[key]['name']+'\
3404                                </div>\
3405                                <div>\
3406                                    * '+cart_items[key]['quantity']+' шт\
3407                                </div>\
3408                                <div>\
3409                                    '+(cart_items[key]['price']+' '.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 '))+' p\
3410                                </div>\
3411                            </div>';
3412    }
3413    
3414    
3415    $('.js-cart-items').html (cart_items_string);
3416    $('.js-cart-quantity').html (total_quantity);
3417    $('.js-total-price').html((total_price+' '.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 '))+' p');
3418    
3419
3420}
3421
3422    /*
3423    var recaptcha_cart;
3424    var recaptcha_quickorder;
3425    var recaptcha_installment;
3426    var recaptcha_review;
3427    
3428    var myCallBack = function() {
3429
3430  
3431        if ($('#recaptcha_cart').length)
3432            recaptcha_cart = grecaptcha.render('recaptcha_cart', {
3433                'sitekey' : '6Ld-h6UUAAAAAIYy0OuIHejPokbuPf4w3I8RSdUp', 
3434                'theme' : 'light'
3435            });
3436        
3437        /*
3438        if ($('#recaptcha_quickorder').length)
3439            recaptcha_quickorder = grecaptcha.render('recaptcha_quickorder', {
3440                'sitekey' : '6Ld-h6UUAAAAAIYy0OuIHejPokbuPf4w3I8RSdUp', 
3441                'theme' : 'light'
3442            });
3443        * /
3444         if ($('#recaptcha_installment').length)
3445            recaptcha_installment = grecaptcha.render('recaptcha_installment', {
3446                'sitekey' : '6Ld-h6UUAAAAAIYy0OuIHejPokbuPf4w3I8RSdUp', 
3447                'theme' : 'light'
3448            });
3449         
3450         if ($('#recaptcha_review').length)
3451            recaptcha_review = grecaptcha.render('recaptcha_review', {
3452                'sitekey' : '6Ld-h6UUAAAAAIYy0OuIHejPokbuPf4w3I8RSdUp', 
3453                'theme' : 'light'
3454            });
3455        
3456    };
3457    */
3458
3459    function valid_field ($el, name, type){
3460
3461        var warning = false;
3462        
3463        if ($el.val() == '')
3464        {
3465            warning = true;
3466        }
3467        
3468        if(type == 'email')
3469            if ($el.val().search(/^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$$/i) == -1)
3470            {                
3471                warning = true;
3472            }
3473            
3474        if(type == 'phone')
3475            if ($el.val().length < 7 || ($el.val().indexOf("_") != -1) || $el.val() == '')
3476            {                
3477                warning = true;
3478            }
3479            
3480        if(type == 'uds_code')
3481            if ($el.val().length < 6 || ($el.val().indexOf("_") != -1) || $el.val() == '')
3482            {                
3483                warning = true;
3484            }
3485            
3486        if(type == 'stars')
3487            if ($el.val() <= 0)
3488            {                
3489                warning = true;
3490            }
3491        
3492        if (warning)
3493        {
3494            if(type == 'uds_code')
3495            {
3496                if (!$el.parent().parent().next().hasClass('form__warning')) $el.parent().parent().after('<div class="form__warning"></div>');
3497                $el.parent().parent().next().html('Поле ' + name + ' не корректно');
3498            }
3499            else
3500            {
3501                if (!$el.next().hasClass('form__warning')) $el.after('<div class="form__warning"></div>');
3502                $el.next().html('Поле ' + name + ' не корректно');
3503            }
3504        }
3505        
3506        return warning;
3507
3508    }
3509    
3510var uds_uid;
3511var uds_code;
3512
3513$(function(){
3514    
3515    
3516    $('.js-open-archive').click(function(){
3517        $(this).toggleClass('active');
3518        $(this).next().toggleClass('active');
3519    });
3520
3521    
3522    
3523    $('.js-popular-categories-more').click(function(){
3524        $('.js-popular-categories').toggleClass('active');
3525        if ($('.js-popular-categories').hasClass('active'))
3526            $(this).html('Скрыть все');
3527        else{
3528            $(this).html('Показать все');
3529            $("html, body").animate({scrollTop: $('.js-popular-categories-scroll').offset().top+"px"});
3530        }
3531    });
3532    
3533    
3534    $('.js-recommended').slick({
3535		dots: false,
3536		infinite: true,
3537		arrows: true,
3538        slidesToShow: 4,
3539        slidesToScroll: 4,
3540        responsive: [
3541            {
3542                breakpoint: 1600,
3543                settings: {
3544                    slidesToShow: 3,
3545                    slidesToScroll: 3,
3546                }
3547            },
3548            {
3549                breakpoint: 1024,
3550                settings: {
3551                    slidesToShow: 3,
3552                    slidesToScroll: 3
3553                }
3554            },
3555            {
3556                breakpoint: 768,
3557                settings: {
3558                    slidesToShow: 1,
3559                    slidesToScroll: 1
3560                }
3561            }
3562        ]
3563	});
3564    
3565    
3566    $('body').on('click','.select-value', function(){
3567        $(this).next().toggleClass('active');
3568    });
3569    
3570    $('body').on('click', '.cdek_issue_points .option', function(){
3571        
3572        $('#issue_point').val($(this).html());
3573        
3574        $('.issue_point').removeClass('active');
3575        $('.issue_point_'+$(this).data('id')).addClass('active');
3576        
3577        $('.cdek_issue_points .select-value').html($(this).html());
3578        $(this).parent().removeClass('active');
3579        
3580        //выделяем на карте        
3581        
3582        let placemark = myGeoObjects[$(this).index()];
3583        myMap.setZoom(16, {duration: 2000});
3584        myMap.setCenter(placemark.geometry.getCoordinates());        
3585        var objectState = clusterer.getObjectState(placemark);
3586        if (objectState.isClustered) {
3587            objectState.cluster.state.set('activeObject', placemark);
3588            clusterer.balloon.open(objectState.cluster);
3589        } else if (objectState.isShown) {
3590            placemark.balloon.open();
3591        }
3592        
3593        
3594    });
3595    
3596    $('.blackout-modal').click(function(){
3597        hide_modal();
3598    }); 
3599
3600    $('.modal').click(function(event){
3601        event.stopPropagation();
3602    }); 
3603    
3604    $('.js-review__submit').click(function(){
3605        $button = $(this);
3606        $form = $(this).closest('form');
3607        $form.find('.form__warning').html(''); 
3608
3609        $stars = $('.js-rating');
3610        $email = $form.find("input[name=email]");
3611        $name = $form.find("input[name=name]");
3612        $review = $form.find("textarea[name=review]");
3613        
3614        warning = valid_field ($email, 'email', 'email');
3615        warning += valid_field ($name, 'Имя', 'name');
3616        warning += valid_field ($stars, 'Рейтинг', 'stars');
3617        
3618        if (warning) return false;
3619
3620        data = {
3621            action: 'add_review', 
3622            ID: element['id'], 
3623            
3624            review: $review.val(),
3625            name: $name.val(),
3626            email: $email.val(),
3627            stars: $stars.val(), 
3628            product_title: element['name'],
3629                                  
3630            //response: grecaptcha.getResponse(recaptcha_review),            
3631        },
3632        
3633       
3634        
3635        $.post('/catalog/ajax.php', data, function(data){
3636            data = JSON.parse (data);
3637            if (data['success'])
3638                $('.js-new-review').html('<div class="success_addtocart">Спасибо, за Ваш отзыв</div>');
3639            else
3640            {
3641                if (!$button.next().hasClass('form__warning')) $button.after('<div class="form__warning"></div>');
3642                $button.next().html(data['error']);
3643            }
3644		})
3645               
3646    });
3647    
3648    $('.set_rating .star, .mobile-set_rating .star').each(function(i){
3649        //$(this).attr('data-i', i+1);
3650        $(this).click(function(){        
3651            $('.js-rating').val($(this).data('i'));
3652            
3653            $(this).addClass('active');
3654            $(this).prevAll('.star').addClass('active');
3655            $(this).nextAll('.star').removeClass('active');        
3656        });
3657    });
3658 
3659    $("head").append($("<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/suggestions.min.css' type='text/css' />"));    
3660    //$("head").append($("<link rel='stylesheet' href='/local/templates/kayaker/assets/slick/slick.css' type='text/css' />"));
3661    //$("head").append($("<link rel='stylesheet' href='/local/templates/kayaker/assets/slick/slick-theme.css' type='text/css' />"));
3662    
3663    //cart
3664    
3665    $('.js-goal-instagram').click(function(){if (typeof yaCounter53489092 != "undefined") yaCounter53489092.reachGoal('instagram');});
3666    $('.js-goal-vk').click(function(){if (typeof yaCounter53489092 != "undefined") yaCounter53489092.reachGoal('vk');});
3667    $('.js-goal-phone').click(function(){if (typeof yaCounter53489092 != "undefined") yaCounter53489092.reachGoal('phone');});
3668    
3669   
3670    $("img.lazy").lazyload({
3671        effect : "fadeIn"
3672    });
3673
3674    
3675/*
3676    $('.category_active > span').each(function(){        
3677        $(this).css({
3678            'display': 'block', 
3679            'width': $(this).find('span').width()+3
3680        });
3681    });
3682*/  
3683
3684    
3685    
3686    $('.accordeon__title').each (function(i){
3687        
3688        $(this).click(function(){
3689            $('.accordeon__body').each(function(j){
3690                if (i!=j)
3691                $(this).removeClass('active');
3692            });
3693            $(this).next().toggleClass('active');
3694        });
3695        
3696    });
3697    
3698    
3699
3700    $('input[name=phone]').mask("+7(999) 999-99-99");
3701    $('input[name=customerPhone]').mask("+7(999) 999-99-99");
3702    $('.js-uds__input').mask("999999");
3703    
3704
3705    $.fn.setCursorPosition = function(pos) {
3706    if ($(this).get(0).setSelectionRange) {
3707      $(this).get(0).setSelectionRange(pos, pos);
3708    } else if ($(this).get(0).createTextRange) {
3709      var range = $(this).get(0).createTextRange();
3710      range.collapse(true);
3711      range.moveEnd('character', pos);
3712      range.moveStart('character', pos);
3713      range.select();
3714    }
3715  };
3716  $('input[name="phone"]').click(function(){
3717    $(this).setCursorPosition(2);
3718  });
3719
3720
3721    
3722    
3723    
3724    $('.front-page__photos_img').height($('.front-page__photos_img').height());
3725    
3726    
3727    
3728    $('.slider').slick({
3729		dots: true,
3730		infinite: true,
3731		autoplay: true,
3732		fade: true,
3733		arrows: false,
3734	});
3735    
3736    $('.front-page__description_ic').click(function(){
3737        
3738        if (!$('.front-page__description').hasClass('active'))
3739        {
3740            $('.front-page__description').css('height',$('.front-page__description > div').height());
3741        }
3742        
3743        $('.front-page__description_ic').toggleClass('active');
3744        $('.front-page__description').toggleClass('active');
3745    });
3746   
3747
3748
3749    
3750    $('.mobile-menu-icon').click(function(i){                
3751        $('.mobile-menu-icon').toggleClass('active');
3752        $('.mobile-menu-hide').toggleClass('active');
3753        $('header').toggleClass('active');
3754        $('.mobile-menu-top').toggleClass('active');
3755        
3756        if ($(this).hasClass('active'))
3757        {
3758            $('body').addClass('fixed');
3759            $('.submenu').removeClass('active');
3760            $('.mobile-menu li, .mobile-menu span').show();
3761        }
3762        else
3763        {
3764            $('body').removeClass('fixed');
3765        }
3766        
3767        if ($(this).hasClass('active'))
3768        {
3769            var scrollPosition = [
3770            self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
3771            self.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop
3772            ];
3773            var html = jQuery('html'); // it would make more sense to apply this to body, but IE7 won't have that
3774            html.data('scroll-position', scrollPosition);
3775            html.data('previous-overflow', html.css('overflow'));
3776            html.css('overflow', 'hidden');
3777            html.css('height', '100vh');
3778            window.scrollTo(scrollPosition[0], scrollPosition[1]);
3779        }
3780        else
3781        {
3782            var html = jQuery('html');
3783            var scrollPosition = html.data('scroll-position');
3784            html.css('overflow', html.data('previous-overflow'));
3785            window.scrollTo(scrollPosition[0], scrollPosition[1])
3786        }
3787        
3788    });
3789
3790    
3791    $('.mobile-menu__filter .submenu > li > div').css({'height': $(window).height() - 59 - 150 - 50 + 'px'});
3792    
3793    $('nav.mobile-menu').css({'height': $(window).height() - 59 + 'px'});
3794    $('.mobile-menu .submenu').css({'min-height': $(window).height() - 59 + 'px'});
3795    
3796    $('.mobile-menu-has-sub').click(function(i){                
3797        $(this).hide();
3798        $(this).parent().siblings().hide();
3799        
3800        $(this).next().toggleClass('active');
3801        
3802        $('nav.mobile-menu').animate({ scrollTop: 0 }, 0);
3803    });
3804    
3805    $('.go-back-menu').click(function(){
3806        
3807        $(this).parent().removeClass('active');
3808        
3809        $(this).parent().prev().show();
3810        $(this).parent().parent().siblings().show();
3811    });
3812    
3813    $('.submenu').swipe({
3814            swipeRight:function(event, direction, distance, duration, fingerCount, fingerData,currentDirection) {
3815                    $(this).removeClass('active');
3816                    $(this).prev().show();
3817                    $(this).parent().siblings().show();
3818                    
3819            }
3820    });
3821   
3822    
3823        
3824    
3825    win_w = $(document).width();
3826    
3827    
3828    
3829    if (win_w < 768)
3830    {
3831        $('.front-page__photos .row').slick({
3832            dots: false,		
3833            arrows: false,
3834        });
3835        
3836        $('.front-page__news .row').slick({
3837            dots: false,		
3838            arrows: false,
3839        });
3840        
3841        $('.button_read-more').click(function(){
3842            $(this).toggleClass('active');
3843            $('.text-more').toggleClass('active');
3844        });  
3845        
3846        $('.props__title').click(function(){
3847            $(this).toggleClass('active');
3848            $('.props').toggleClass('active');
3849        }); 
3850        
3851        
3852    }
3853    else
3854    {
3855        if ($('.js-contacts__fixed').length){            
3856            
3857            $('.js-contacts__fixed').css({'width': $('.js-contacts__fixed').width()});
3858            $('.js-contacts__fixed').css({'height': $('.js-contacts__fixed').height()});
3859        
3860            $(document).scroll(function(){
3861                //console.log($(document).scrollTop() + ' ' + $('.js-contacts__fixed-sibling').offset().top );
3862                
3863                document_scroll = $(document).scrollTop();
3864                offset_top = $('.js-contacts__fixed-sibling').offset().top;
3865                
3866                max_offset = $('.js-contacts__fixed-sibling').height() - $('.js-contacts__fixed').height();                
3867                offset_now = $('.js-contacts__fixed').offset().top;
3868                
3869                if (document_scroll > offset_top )
3870                {
3871                    if (document_scroll > (offset_top + max_offset) )
3872                    {
3873                            $('.js-contacts__fixed').css({'top': max_offset})
3874                            $('.js-contacts__fixed').removeClass('fixed');
3875                    }
3876                    else
3877                    {
3878                            $('.js-contacts__fixed').css({'top': 0})
3879                            $('.js-contacts__fixed').addClass('fixed');
3880                    }
3881                }
3882                else
3883                {
3884                    
3885                    $('.js-contacts__fixed').removeClass('fixed');
3886                    $('.js-contacts__fixed').css({'top': 0})
3887                }
3888            });
3889        }
3890        
3891        if ($('.item__right_fixed').length && ($('.item__left2').height() > $('.item__right_fixed').height())){
3892            
3893            $('.item__right_fixed').css({'width': $('.item__right_fixed').width()});
3894            $('.item__right_fixed').css({'height': $('.item__right_fixed').height()+50});
3895        
3896            $(document).scroll(function(){
3897                //console.log($(document).scrollTop() + ' ' + $('.item__left2').offset().top );
3898                
3899                document_scroll = $(document).scrollTop();
3900                offset_top = $('.item__left2').offset().top;
3901                
3902                max_offset = $('.item__left2').height() - $('.item__right_fixed').height();                
3903                offset_now = $('.item__right_fixed').offset().top;
3904                
3905                if (document_scroll > offset_top )
3906                {
3907                    if (document_scroll > (offset_top + max_offset) )
3908                    {
3909                            $('.item__right_fixed').css({'top': max_offset})
3910                            $('.item__right_fixed').removeClass('fixed');
3911                    }
3912                    else
3913                    {
3914                            $('.item__right_fixed').css({'top': 0})
3915                            $('.item__right_fixed').addClass('fixed');
3916                    }
3917                }
3918                else
3919                {
3920                    
3921                    $('.item__right_fixed').removeClass('fixed');
3922                    $('.item__right_fixed').css({'top': 0})
3923                }
3924            });
3925        }
3926    }
3927    
3928    
3929        
3930    /*
3931    if (win_w > 1900)
3932    {
3933        $('.front-page__photos .row').slick({
3934            dots: false,		
3935            arrows: false,
3936            variableWidth: true,            
3937        });   
3938    }
3939    */
3940    
3941    /* city */
3942    
3943    function detectAddressByIp(ip) {
3944        var token = "c927081e46162026f569fb652eb8773eae5f2158";
3945        var serviceUrl = "https://suggestions.dadata.ru/suggestions/api/4_1/rs/detectAddressByIp";
3946        if (ip) {
3947            serviceUrl += "?ip=" + ip;
3948        }
3949        var params = {
3950            type: "GET",
3951            contentType: "application/json",
3952            headers: {
3953            "Authorization": "Token " + token
3954            }
3955        };
3956            return $.ajax(serviceUrl, params);
3957    }
3958    
3959    function detectCity ()
3960    {
3961        detectAddressByIp().done(function(response) {
3962        $("#suggestions").text(JSON.stringify(response, null, 4));
3963        $('.js-city-value').html(response['location']['data']['city']);
3964        $('input[name=city]').val(response['location']['data']['city']);
3965        change_phone(response['location']['data']['city']);
3966        $.cookie('city', response['location']['data']['city'], {expires: 365, path: '/',});
3967        $.cookie('postcode', response['location']['data']['postal_code'], {expires: 365, path: '/',});
3968        
3969        add_issue_points();
3970        //console.log(response);
3971        }) 
3972    }
3973    
3974    var postcode = $.cookie("postcode"); 
3975        
3976    if (postcode == "undefined" || postcode == null)
3977    {
3978        detectCity ();    
3979    }
3980    
3981    
3982    
3983    $('.automatically').click(function() {
3984        detectCity ();
3985        hide_modal();
3986    })
3987    
3988    $('.cities > a').click(function() {
3989        $.cookie('city', $(this).html(), {expires: 365, path: '/',});
3990        $.cookie('postcode', $(this).data('postal_code'), {expires: 365, path: '/',});
3991        //console.log($(this).data('postal_code'));
3992        //console.log($.cookie('postcode'));
3993        add_issue_points();        
3994        $('.js-city-value').html($(this).html());
3995        $('input[name=city]').val($(this).html());
3996        change_phone($(this).html());
3997        hide_modal();
3998    })
3999    
4000    function change_phone(city)
4001    {
4002        if (city == 'Санкт-Петербург')
4003        {
4004            $('.js-phone').attr('href', 'tel:'+phone_piter);
4005            $('.js-phone').html(phone_piter);
4006        }
4007        else
4008        {
4009            $('.js-phone').attr('href', 'tel:'+phone_other);
4010            $('.js-phone').html(phone_other);
4011        }
4012    }
4013
4014    $(".find-address").suggestions({
4015        token: "c927081e46162026f569fb652eb8773eae5f2158",
4016        type: "ADDRESS",
4017        hint: false,
4018        bounds: "city",
4019        constraints: {
4020        label: "",
4021        locations: { city_type_full: "город" }
4022        },
4023        onSelect: function(suggestion) {
4024            
4025            $.cookie('city', suggestion['data']['city'], {expires: 365, path: '/',});
4026            $.cookie('postcode', suggestion['data']['postal_code'], {expires: 365, path: '/',});
4027            add_issue_points();
4028            
4029            $('.js-city-value').html(suggestion['data']['city']);
4030            $('input[name=city]').val(suggestion['data']['city']);
4031            change_phone(suggestion['data']['city']);
4032            hide_modal();
4033            //console.log(suggestion['data']['postal_code']);
4034            
4035        }
4036    });
4037
4038    /* modal */
4039    
4040    
4041    
4042    $('.modal__close').click(function(){
4043		hide_modal();
4044	});    
4045        
4046    $('.js-city').click(function(){
4047        //ARGIT        
4048
4049		show_modal('.js-blackout-modal-city');
4050                
4051        $('.js-cities_wrapper').css({'max-height': 'auto'});
4052        $('.js-cities').css({height: 'auto'});
4053        
4054        h = Math.floor($('.js-modal-cities__content').height() - $('.cities_flex').height());
4055        w = Math.floor($('.js-modal-cities__content').width());
4056        $('.js-cities_wrapper').css({'max-height': h+'px'});
4057        
4058         
4059        h = $('.js-cities').height();
4060        h = (h/(Math.floor(w/150))+30);			
4061        
4062        $('.js-cities').css({height: h+'px'});
4063	})
4064    
4065    $('.js-search').click(function(){
4066		show_modal('.js-blackout-modal-search');
4067        $('.search_string .text-input').focus();        
4068	})
4069    
4070    $('.js-subscribe').click(function(){
4071        $button = $(this);
4072        $form = $(this).closest('.subscribe');
4073        $form.find('.form__warning').html(''); 
4074        $form.find('.form__success').html(''); 
4075        $email = $form.find('.subscribe__input');
4076        
4077        
4078        warning = valid_field ($email, 'Email', 'email');      
4079        
4080        if (warning) return false;
4081        
4082        var data = {            
4083            action: 'add_subscriber',            
4084            email: $email.val(),           
4085		}
4086	
4087		jQuery.post('/catalog/ajax.php', data, function(data){                            
4088            data = JSON.parse (data);         
4089            
4090            if (typeof (data['error']) == 'undefined')
4091            {                
4092                $('.subscribe__input').val('');
4093                $button.after ('<div class="form__success">Спасибо за вашу подписку</div>');                   
4094            }
4095            else
4096            {                
4097                if (!$button.next().hasClass('form__warning')) $button.after('<div class="form__warning"></div>');
4098                $button.next().html(data['error']);
4099            }
4100		});//,'json'
4101        
4102        
4103    });
4104    
4105    $('.text-input').each(function (){
4106        $(this).after('<div class="placeholder">'+$(this).attr('placeholder')+'</div>');
4107    });
4108    
4109    $('.text-input').keyup(function(){
4110        if ($(this).val() == '')
4111        {   
4112            $(this).removeClass('active');
4113            $(this).next().removeClass('active');            
4114        }
4115        else
4116        {
4117            $(this).addClass('active');
4118            $(this).next().addClass('active');            
4119        }
4120    });        
4121    
4122    if ($('.js-product-rating')) {
4123        if (!$.cookie('rating_'+$('.js-product-rating').data('id')))
4124            $('.js-product-rating').addClass('active');
4125        
4126        $('.js-product-rating div').click(function(){ 
4127            let id = $(this).parent().data('id');
4128            let rating = $(this).data('i');
4129            if (!$.cookie('rating_'+id)){
4130                $.cookie('rating_'+id, 1, {expires: 365, path: '/',})
4131                $.post('/catalog/ajax.php', {action: 'rating', id: id, rating: rating}, function(rating){
4132                    //console.log(rating);
4133                    $('.js-product-rating').removeClass('active');
4134                    $('.js-product-rating div').each (function(i){
4135                        if ((i+1) <= rating)
4136                            $(this).find('path').css({
4137                            fill: '#2F2F2F' 
4138                            });
4139                        else
4140                            $(this).find('path').css({
4141                            fill: '#FFFFFF' 
4142                            });
4143                        
4144                    });                
4145                })
4146            } else {
4147                console.log('Вы уже проголосовали за рейтинг');
4148            }
4149                
4150            
4151        });
4152    }
4153     
4154
4155    
4156});
4157
4158/* End */
4159;
4160; /* Start:"a:4:{s:4:"full";s:59:"/local/templates/kayaker/assets/js/tinkoff.js?1744379943163";s:6:"source";s:45:"/local/templates/kayaker/assets/js/tinkoff.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
4161tinkoff_promoCode = 'installment_0_0_4_7,5';
4162tinkoff_shopId = '07497acc-8632-41cb-8fb2-39a5bb0c8678';
4163tinkoff_showcaseId = 'cbd5bae6-e3d3-4b4d-94d2-28dd7673bb8a';
4164
4165/* End */
4166;; /* /local/templates/kayaker/assets/slick/slick.js?160859458689261*/
4167; /* /local/templates/kayaker/assets/js/jquery.touchSwipe.min.js?159785954820430*/
4168; /* /local/templates/kayaker/assets/js/jquery.maskedinput.js?15978595485915*/
4169; /* /local/templates/kayaker/assets/js/jquery.cookie.js?15978595483121*/
4170; /* /local/templates/kayaker/assets/js/jquery.lazyload.min.js?15978595483103*/
4171; /* /local/templates/kayaker/assets/js/script.js?170360447432410*/
4172; /* /local/templates/kayaker/assets/js/tinkoff.js?1744379943163*/

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.