PageSourceSearch

https://www.msichoices.org/wp-content/plugins/msi-blocks/build/lat…/script.js?ver=27e8c84358a95e51b109

js msichoices.org collected 2026-10-02 02:53:01 UTC 95,414 bytes, 3,168 lines download raw bytes

vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap
2/******/ 	var __webpack_modules__ = ({
3
vendor: 89,570 bytes, lines 4-3022
4/***/ "./node_modules/slick-carousel/slick/slick.js":
5/*!****************************************************!*\
6  !*** ./node_modules/slick-carousel/slick/slick.js ***!
7  \****************************************************/
8/***/ ((module, exports, __webpack_require__) => {
9
10var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
11     _ _      _       _
12 ___| (_) ___| | __  (_)___
13/ __| | |/ __| |/ /  | / __|
14\__ \ | | (__|   < _ | \__ \
15|___/_|_|\___|_|\_(_)/ |___/
16                   |__/
17
18 Version: 1.8.1
19  Author: Ken Wheeler
20 Website: http://kenwheeler.github.io
21    Docs: http://kenwheeler.github.io/slick
22    Repo: http://github.com/kenwheeler/slick
23  Issues: http://github.com/kenwheeler/slick/issues
24
25 */
26/* global window, document, define, jQuery, setInterval, clearInterval */
27;(function(factory) {
28    'use strict';
29    if (true) {
30        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "jquery")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
31		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
32		(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
33		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
34    } else {}
35
36}(function($) {
37    'use strict';
38    var Slick = window.Slick || {};
39
40    Slick = (function() {
41
42        var instanceUid = 0;
43
44        function Slick(element, settings) {
45
46            var _ = this, dataSettings;
47
48            _.defaults = {
49                accessibility: true,
50                adaptiveHeight: false,
51                appendArrows: $(element),
52                appendDots: $(element),
53                arrows: true,
54                asNavFor: null,
55                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
56                nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
57                autoplay: false,
58                autoplaySpeed: 3000,
59                centerMode: false,
60                centerPadding: '50px',
61                cssEase: 'ease',
62                customPaging: function(slider, i) {
63                    return $('<button type="button" />').text(i + 1);
64                },
65                dots: false,
66                dotsClass: 'slick-dots',
67                draggable: true,
68                easing: 'linear',
69                edgeFriction: 0.35,
70                fade: false,
71                focusOnSelect: false,
72                focusOnChange: false,
73                infinite: true,
74                initialSlide: 0,
75                lazyLoad: 'ondemand',
76                mobileFirst: false,
77                pauseOnHover: true,
78                pauseOnFocus: true,
79                pauseOnDotsHover: false,
80                respondTo: 'window',
81                responsive: null,
82                rows: 1,
83                rtl: false,
84                slide: '',
85                slidesPerRow: 1,
86                slidesToShow: 1,
87                slidesToScroll: 1,
88                speed: 500,
89                swipe: true,
90                swipeToSlide: false,
91                touchMove: true,
92                touchThreshold: 5,
93                useCSS: true,
94                useTransform: true,
95                variableWidth: false,
96                vertical: false,
97                verticalSwiping: false,
98                waitForAnimate: true,
99                zIndex: 1000
100            };
101
102            _.initials = {
103                animating: false,
104                dragging: false,
105                autoPlayTimer: null,
106                currentDirection: 0,
107                currentLeft: null,
108                currentSlide: 0,
109                direction: 1,
110                $dots: null,
111                listWidth: null,
112                listHeight: null,
113                loadIndex: 0,
114                $nextArrow: null,
115                $prevArrow: null,
116                scrolling: false,
117                slideCount: null,
118                slideWidth: null,
119                $slideTrack: null,
120                $slides: null,
121                sliding: false,
122                slideOffset: 0,
123                swipeLeft: null,
124                swiping: false,
125                $list: null,
126                touchObject: {},
127                transformsEnabled: false,
128                unslicked: false
129            };
130
131            $.extend(_, _.initials);
132
133            _.activeBreakpoint = null;
134            _.animType = null;
135            _.animProp = null;
136            _.breakpoints = [];
137            _.breakpointSettings = [];
138            _.cssTransitions = false;
139            _.focussed = false;
140            _.interrupted = false;
141            _.hidden = 'hidden';
142            _.paused = true;
143            _.positionProp = null;
144            _.respondTo = null;
145            _.rowCount = 1;
146            _.shouldClick = true;
147            _.$slider = $(element);
148            _.$slidesCache = null;
149            _.transformType = null;
150            _.transitionType = null;
151            _.visibilityChange = 'visibilitychange';
152            _.windowWidth = 0;
153            _.windowTimer = null;
154
155            dataSettings = $(element).data('slick') || {};
156
157            _.options = $.extend({}, _.defaults, settings, dataSettings);
158
159            _.currentSlide = _.options.initialSlide;
160
161            _.originalSettings = _.options;
162
163            if (typeof document.mozHidden !== 'undefined') {
164                _.hidden = 'mozHidden';
165                _.visibilityChange = 'mozvisibilitychange';
166            } else if (typeof document.webkitHidden !== 'undefined') {
167                _.hidden = 'webkitHidden';
168                _.visibilityChange = 'webkitvisibilitychange';
169            }
170
171            _.autoPlay = $.proxy(_.autoPlay, _);
172            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
173            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
174            _.changeSlide = $.proxy(_.changeSlide, _);
175            _.clickHandler = $.proxy(_.clickHandler, _);
176            _.selectHandler = $.proxy(_.selectHandler, _);
177            _.setPosition = $.proxy(_.setPosition, _);
178            _.swipeHandler = $.proxy(_.swipeHandler, _);
179            _.dragHandler = $.proxy(_.dragHandler, _);
180            _.keyHandler = $.proxy(_.keyHandler, _);
181
182            _.instanceUid = instanceUid++;
183
184            // A simple way to check for HTML strings
185            // Strict HTML recognition (must start with <)
186            // Extracted from jQuery v1.11 source
187            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
188
189
190            _.registerBreakpoints();
191            _.init(true);
192
193        }
194
195        return Slick;
196
197    }());
198
199    Slick.prototype.activateADA = function() {
200        var _ = this;
201
202        _.$slideTrack.find('.slick-active').attr({
203            'aria-hidden': 'false'
204        }).find('a, input, button, select').attr({
205            'tabindex': '0'
206        });
207
208    };
209
210    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
211
212        var _ = this;
213
214        if (typeof(index) === 'boolean') {
215            addBefore = index;
216            index = null;
217        } else if (index < 0 || (index >= _.slideCount)) {
218            return false;
219        }
220
221        _.unload();
222
223        if (typeof(index) === 'number') {
224            if (index === 0 && _.$slides.length === 0) {
225                $(markup).appendTo(_.$slideTrack);
226            } else if (addBefore) {
227                $(markup).insertBefore(_.$slides.eq(index));
228            } else {
229                $(markup).insertAfter(_.$slides.eq(index));
230            }
231        } else {
232            if (addBefore === true) {
233                $(markup).prependTo(_.$slideTrack);
234            } else {
235                $(markup).appendTo(_.$slideTrack);
236            }
237        }
238
239        _.$slides = _.$slideTrack.children(this.options.slide);
240
241        _.$slideTrack.children(this.options.slide).detach();
242
243        _.$slideTrack.append(_.$slides);
244
245        _.$slides.each(function(index, element) {
246            $(element).attr('data-slick-index', index);
247        });
248
249        _.$slidesCache = _.$slides;
250
251        _.reinit();
252
253    };
254
255    Slick.prototype.animateHeight = function() {
256        var _ = this;
257        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
258            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
259            _.$list.animate({
260                height: targetHeight
261            }, _.options.speed);
262        }
263    };
264
265    Slick.prototype.animateSlide = function(targetLeft, callback) {
266
267        var animProps = {},
268            _ = this;
269
270        _.animateHeight();
271
272        if (_.options.rtl === true && _.options.vertical === false) {
273            targetLeft = -targetLeft;
274        }
275        if (_.transformsEnabled === false) {
276            if (_.options.vertical === false) {
277                _.$slideTrack.animate({
278                    left: targetLeft
279                }, _.options.speed, _.options.easing, callback);
280            } else {
281                _.$slideTrack.animate({
282                    top: targetLeft
283                }, _.options.speed, _.options.easing, callback);
284            }
285
286        } else {
287
288            if (_.cssTransitions === false) {
289                if (_.options.rtl === true) {
290                    _.currentLeft = -(_.currentLeft);
291                }
292                $({
293                    animStart: _.currentLeft
294                }).animate({
295                    animStart: targetLeft
296                }, {
297                    duration: _.options.speed,
298                    easing: _.options.easing,
299                    step: function(now) {
300                        now = Math.ceil(now);
301                        if (_.options.vertical === false) {
302                            animProps[_.animType] = 'translate(' +
303                                now + 'px, 0px)';
304                            _.$slideTrack.css(animProps);
305                        } else {
306                            animProps[_.animType] = 'translate(0px,' +
307                                now + 'px)';
308                            _.$slideTrack.css(animProps);
309                        }
310                    },
311                    complete: function() {
312                        if (callback) {
313                            callback.call();
314                        }
315                    }
316                });
317
318            } else {
319
320                _.applyTransition();
321                targetLeft = Math.ceil(targetLeft);
322
323                if (_.options.vertical === false) {
324                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
325                } else {
326                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
327                }
328                _.$slideTrack.css(animProps);
329
330                if (callback) {
331                    setTimeout(function() {
332
333                        _.disableTransition();
334
335                        callback.call();
336                    }, _.options.speed);
337                }
338
339            }
340
341        }
342
343    };
344
345    Slick.prototype.getNavTarget = function() {
346
347        var _ = this,
348            asNavFor = _.options.asNavFor;
349
350        if ( asNavFor && asNavFor !== null ) {
351            asNavFor = $(asNavFor).not(_.$slider);
352        }
353
354        return asNavFor;
355
356    };
357
358    Slick.prototype.asNavFor = function(index) {
359
360        var _ = this,
361            asNavFor = _.getNavTarget();
362
363        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
364            asNavFor.each(function() {
365                var target = $(this).slick('getSlick');
366                if(!target.unslicked) {
367                    target.slideHandler(index, true);
368                }
369            });
370        }
371
372    };
373
374    Slick.prototype.applyTransition = function(slide) {
375
376        var _ = this,
377            transition = {};
378
379        if (_.options.fade === false) {
380            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
381        } else {
382            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
383        }
384
385        if (_.options.fade === false) {
386            _.$slideTrack.css(transition);
387        } else {
388            _.$slides.eq(slide).css(transition);
389        }
390
391    };
392
393    Slick.prototype.autoPlay = function() {
394
395        var _ = this;
396
397        _.autoPlayClear();
398
399        if ( _.slideCount > _.options.slidesToShow ) {
400            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
401        }
402
403    };
404
405    Slick.prototype.autoPlayClear = function() {
406
407        var _ = this;
408
409        if (_.autoPlayTimer) {
410            clearInterval(_.autoPlayTimer);
411        }
412
413    };
414
415    Slick.prototype.autoPlayIterator = function() {
416
417        var _ = this,
418            slideTo = _.currentSlide + _.options.slidesToScroll;
419
420        if ( !_.paused && !_.interrupted && !_.focussed ) {
421
422            if ( _.options.infinite === false ) {
423
424                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
425                    _.direction = 0;
426                }
427
428                else if ( _.direction === 0 ) {
429
430                    slideTo = _.currentSlide - _.options.slidesToScroll;
431
432                    if ( _.currentSlide - 1 === 0 ) {
433                        _.direction = 1;
434                    }
435
436                }
437
438            }
439
440            _.slideHandler( slideTo );
441
442        }
443
444    };
445
446    Slick.prototype.buildArrows = function() {
447
448        var _ = this;
449
450        if (_.options.arrows === true ) {
451
452            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
453            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
454
455            if( _.slideCount > _.options.slidesToShow ) {
456
457                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
458                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
459
460                if (_.htmlExpr.test(_.options.prevArrow)) {
461                    _.$prevArrow.prependTo(_.options.appendArrows);
462                }
463
464                if (_.htmlExpr.test(_.options.nextArrow)) {
465                    _.$nextArrow.appendTo(_.options.appendArrows);
466                }
467
468                if (_.options.infinite !== true) {
469                    _.$prevArrow
470                        .addClass('slick-disabled')
471                        .attr('aria-disabled', 'true');
472                }
473
474            } else {
475
476                _.$prevArrow.add( _.$nextArrow )
477
478                    .addClass('slick-hidden')
479                    .attr({
480                        'aria-disabled': 'true',
481                        'tabindex': '-1'
482                    });
483
484            }
485
486        }
487
488    };
489
490    Slick.prototype.buildDots = function() {
491
492        var _ = this,
493            i, dot;
494
495        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
496
497            _.$slider.addClass('slick-dotted');
498
499            dot = $('<ul />').addClass(_.options.dotsClass);
500
501            for (i = 0; i <= _.getDotCount(); i += 1) {
502                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
503            }
504
505            _.$dots = dot.appendTo(_.options.appendDots);
506
507            _.$dots.find('li').first().addClass('slick-active');
508
509        }
510
511    };
512
513    Slick.prototype.buildOut = function() {
514
515        var _ = this;
516
517        _.$slides =
518            _.$slider
519                .children( _.options.slide + ':not(.slick-cloned)')
520                .addClass('slick-slide');
521
522        _.slideCount = _.$slides.length;
523
524        _.$slides.each(function(index, element) {
525            $(element)
526                .attr('data-slick-index', index)
527                .data('originalStyling', $(element).attr('style') || '');
528        });
529
530        _.$slider.addClass('slick-slider');
531
532        _.$slideTrack = (_.slideCount === 0) ?
533            $('<div class="slick-track"/>').appendTo(_.$slider) :
534            _.$slides.wrapAll('<div class="slick-track"/>').parent();
535
536        _.$list = _.$slideTrack.wrap(
537            '<div class="slick-list"/>').parent();
538        _.$slideTrack.css('opacity', 0);
539
540        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
541            _.options.slidesToScroll = 1;
542        }
543
544        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
545
546        _.setupInfinite();
547
548        _.buildArrows();
549
550        _.buildDots();
551
552        _.updateDots();
553
554
555        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
556
557        if (_.options.draggable === true) {
558            _.$list.addClass('draggable');
559        }
560
561    };
562
563    Slick.prototype.buildRows = function() {
564
565        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
566
567        newSlides = document.createDocumentFragment();
568        originalSlides = _.$slider.children();
569
570        if(_.options.rows > 0) {
571
572            slidesPerSection = _.options.slidesPerRow * _.options.rows;
573            numOfSlides = Math.ceil(
574                originalSlides.length / slidesPerSection
575            );
576
577            for(a = 0; a < numOfSlides; a++){
578                var slide = document.createElement('div');
579                for(b = 0; b < _.options.rows; b++) {
580                    var row = document.createElement('div');
581                    for(c = 0; c < _.options.slidesPerRow; c++) {
582                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
583                        if (originalSlides.get(target)) {
584                            row.appendChild(originalSlides.get(target));
585                        }
586                    }
587                    slide.appendChild(row);
588                }
589                newSlides.appendChild(slide);
590            }
591
592            _.$slider.empty().append(newSlides);
593            _.$slider.children().children().children()
594                .css({
595                    'width':(100 / _.options.slidesPerRow) + '%',
596                    'display': 'inline-block'
597                });
598
599        }
600
601    };
602
603    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
604
605        var _ = this,
606            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
607        var sliderWidth = _.$slider.width();
608        var windowWidth = window.innerWidth || $(window).width();
609
610        if (_.respondTo === 'window') {
611            respondToWidth = windowWidth;
612        } else if (_.respondTo === 'slider') {
613            respondToWidth = sliderWidth;
614        } else if (_.respondTo === 'min') {
615            respondToWidth = Math.min(windowWidth, sliderWidth);
616        }
617
618        if ( _.options.responsive &&
619            _.options.responsive.length &&
620            _.options.responsive !== null) {
621
622            targetBreakpoint = null;
623
624            for (breakpoint in _.breakpoints) {
625                if (_.breakpoints.hasOwnProperty(breakpoint)) {
626                    if (_.originalSettings.mobileFirst === false) {
627                        if (respondToWidth < _.breakpoints[breakpoint]) {
628                            targetBreakpoint = _.breakpoints[breakpoint];
629                        }
630                    } else {
631                        if (respondToWidth > _.breakpoints[breakpoint]) {
632                            targetBreakpoint = _.breakpoints[breakpoint];
633                        }
634                    }
635                }
636            }
637
638            if (targetBreakpoint !== null) {
639                if (_.activeBreakpoint !== null) {
640                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
641                        _.activeBreakpoint =
642                            targetBreakpoint;
643                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
644                            _.unslick(targetBreakpoint);
645                        } else {
646                            _.options = $.extend({}, _.originalSettings,
647                                _.breakpointSettings[
648                                    targetBreakpoint]);
649                            if (initial === true) {
650                                _.currentSlide = _.options.initialSlide;
651                            }
652                            _.refresh(initial);
653                        }
654                        triggerBreakpoint = targetBreakpoint;
655                    }
656                } else {
657                    _.activeBreakpoint = targetBreakpoint;
658                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
659                        _.unslick(targetBreakpoint);
660                    } else {
661                        _.options = $.extend({}, _.originalSettings,
662                            _.breakpointSettings[
663                                targetBreakpoint]);
664                        if (initial === true) {
665                            _.currentSlide = _.options.initialSlide;
666                        }
667                        _.refresh(initial);
668                    }
669                    triggerBreakpoint = targetBreakpoint;
670                }
671            } else {
672                if (_.activeBreakpoint !== null) {
673                    _.activeBreakpoint = null;
674                    _.options = _.originalSettings;
675                    if (initial === true) {
676                        _.currentSlide = _.options.initialSlide;
677                    }
678                    _.refresh(initial);
679                    triggerBreakpoint = targetBreakpoint;
680                }
681            }
682
683            // only trigger breakpoints during an actual break. not on initialize.
684            if( !initial && triggerBreakpoint !== false ) {
685                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
686            }
687        }
688
689    };
690
691    Slick.prototype.changeSlide = function(event, dontAnimate) {
692
693        var _ = this,
694            $target = $(event.currentTarget),
695            indexOffset, slideOffset, unevenOffset;
696
697        // If target is a link, prevent default action.
698        if($target.is('a')) {
699            event.preventDefault();
700        }
701
702        // If target is not the <li> element (ie: a child), find the <li>.
703        if(!$target.is('li')) {
704            $target = $target.closest('li');
705        }
706
707        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
708        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
709
710        switch (event.data.message) {
711
712            case 'previous':
713                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
714                if (_.slideCount > _.options.slidesToShow) {
715                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
716                }
717                break;
718
719            case 'next':
720                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
721                if (_.slideCount > _.options.slidesToShow) {
722                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
723                }
724                break;
725
726            case 'index':
727                var index = event.data.index === 0 ? 0 :
728                    event.data.index || $target.index() * _.options.slidesToScroll;
729
730                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
731                $target.children().trigger('focus');
732                break;
733
734            default:
735                return;
736        }
737
738    };
739
740    Slick.prototype.checkNavigable = function(index) {
741
742        var _ = this,
743            navigables, prevNavigable;
744
745        navigables = _.getNavigableIndexes();
746        prevNavigable = 0;
747        if (index > navigables[navigables.length - 1]) {
748            index = navigables[navigables.length - 1];
749        } else {
750            for (var n in navigables) {
751                if (index < navigables[n]) {
752                    index = prevNavigable;
753                    break;
754                }
755                prevNavigable = navigables[n];
756            }
757        }
758
759        return index;
760    };
761
762    Slick.prototype.cleanUpEvents = function() {
763
764        var _ = this;
765
766        if (_.options.dots && _.$dots !== null) {
767
768            $('li', _.$dots)
769                .off('click.slick', _.changeSlide)
770                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
771                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
772
773            if (_.options.accessibility === true) {
774                _.$dots.off('keydown.slick', _.keyHandler);
775            }
776        }
777
778        _.$slider.off('focus.slick blur.slick');
779
780        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
781            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
782            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
783
784            if (_.options.accessibility === true) {
785                _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
786                _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
787            }
788        }
789
790        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
791        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
792        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
793        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
794
795        _.$list.off('click.slick', _.clickHandler);
796
797        $(document).off(_.visibilityChange, _.visibility);
798
799        _.cleanUpSlideEvents();
800
801        if (_.options.accessibility === true) {
802            _.$list.off('keydown.slick', _.keyHandler);
803        }
804
805        if (_.options.focusOnSelect === true) {
806            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
807        }
808
809        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
810
811        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
812
813        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
814
815        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
816
817    };
818
819    Slick.prototype.cleanUpSlideEvents = function() {
820
821        var _ = this;
822
823        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
824        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
825
826    };
827
828    Slick.prototype.cleanUpRows = function() {
829
830        var _ = this, originalSlides;
831
832        if(_.options.rows > 0) {
833            originalSlides = _.$slides.children().children();
834            originalSlides.removeAttr('style');
835            _.$slider.empty().append(originalSlides);
836        }
837
838    };
839
840    Slick.prototype.clickHandler = function(event) {
841
842        var _ = this;
843
844        if (_.shouldClick === false) {
845            event.stopImmediatePropagation();
846            event.stopPropagation();
847            event.preventDefault();
848        }
849
850    };
851
852    Slick.prototype.destroy = function(refresh) {
853
854        var _ = this;
855
856        _.autoPlayClear();
857
858        _.touchObject = {};
859
860        _.cleanUpEvents();
861
862        $('.slick-cloned', _.$slider).detach();
863
864        if (_.$dots) {
865            _.$dots.remove();
866        }
867
868        if ( _.$prevArrow && _.$prevArrow.length ) {
869
870            _.$prevArrow
871                .removeClass('slick-disabled slick-arrow slick-hidden')
872                .removeAttr('aria-hidden aria-disabled tabindex')
873                .css('display','');
874
875            if ( _.htmlExpr.test( _.options.prevArrow )) {
876                _.$prevArrow.remove();
877            }
878        }
879
880        if ( _.$nextArrow && _.$nextArrow.length ) {
881
882            _.$nextArrow
883                .removeClass('slick-disabled slick-arrow slick-hidden')
884                .removeAttr('aria-hidden aria-disabled tabindex')
885                .css('display','');
886
887            if ( _.htmlExpr.test( _.options.nextArrow )) {
888                _.$nextArrow.remove();
889            }
890        }
891
892
893        if (_.$slides) {
894
895            _.$slides
896                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
897                .removeAttr('aria-hidden')
898                .removeAttr('data-slick-index')
899                .each(function(){
900                    $(this).attr('style', $(this).data('originalStyling'));
901                });
902
903            _.$slideTrack.children(this.options.slide).detach();
904
905            _.$slideTrack.detach();
906
907            _.$list.detach();
908
909            _.$slider.append(_.$slides);
910        }
911
912        _.cleanUpRows();
913
914        _.$slider.removeClass('slick-slider');
915        _.$slider.removeClass('slick-initialized');
916        _.$slider.removeClass('slick-dotted');
917
918        _.unslicked = true;
919
920        if(!refresh) {
921            _.$slider.trigger('destroy', [_]);
922        }
923
924    };
925
926    Slick.prototype.disableTransition = function(slide) {
927
928        var _ = this,
929            transition = {};
930
931        transition[_.transitionType] = '';
932
933        if (_.options.fade === false) {
934            _.$slideTrack.css(transition);
935        } else {
936            _.$slides.eq(slide).css(transition);
937        }
938
939    };
940
941    Slick.prototype.fadeSlide = function(slideIndex, callback) {
942
943        var _ = this;
944
945        if (_.cssTransitions === false) {
946
947            _.$slides.eq(slideIndex).css({
948                zIndex: _.options.zIndex
949            });
950
951            _.$slides.eq(slideIndex).animate({
952                opacity: 1
953            }, _.options.speed, _.options.easing, callback);
954
955        } else {
956
957            _.applyTransition(slideIndex);
958
959            _.$slides.eq(slideIndex).css({
960                opacity: 1,
961                zIndex: _.options.zIndex
962            });
963
964            if (callback) {
965                setTimeout(function() {
966
967                    _.disableTransition(slideIndex);
968
969                    callback.call();
970                }, _.options.speed);
971            }
972
973        }
974
975    };
976
977    Slick.prototype.fadeSlideOut = function(slideIndex) {
978
979        var _ = this;
980
981        if (_.cssTransitions === false) {
982
983            _.$slides.eq(slideIndex).animate({
984                opacity: 0,
985                zIndex: _.options.zIndex - 2
986            }, _.options.speed, _.options.easing);
987
988        } else {
989
990            _.applyTransition(slideIndex);
991
992            _.$slides.eq(slideIndex).css({
993                opacity: 0,
994                zIndex: _.options.zIndex - 2
995            });
996
997        }
998
999    };
1000
1001    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
1002
1003        var _ = this;
1004
1005        if (filter !== null) {
1006
1007            _.$slidesCache = _.$slides;
1008
1009            _.unload();
1010
1011            _.$slideTrack.children(this.options.slide).detach();
1012
1013            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
1014
1015            _.reinit();
1016
1017        }
1018
1019    };
1020
1021    Slick.prototype.focusHandler = function() {
1022
1023        var _ = this;
1024
1025        _.$slider
1026            .off('focus.slick blur.slick')
1027            .on('focus.slick blur.slick', '*', function(event) {
1028
1029            event.stopImmediatePropagation();
1030            var $sf = $(this);
1031
1032            setTimeout(function() {
1033
1034                if( _.options.pauseOnFocus ) {
1035                    _.focussed = $sf.is(':focus');
1036                    _.autoPlay();
1037                }
1038
1039            }, 0);
1040
1041        });
1042    };
1043
1044    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
1045
1046        var _ = this;
1047        return _.currentSlide;
1048
1049    };
1050
1051    Slick.prototype.getDotCount = function() {
1052
1053        var _ = this;
1054
1055        var breakPoint = 0;
1056        var counter = 0;
1057        var pagerQty = 0;
1058
1059        if (_.options.infinite === true) {
1060            if (_.slideCount <= _.options.slidesToShow) {
1061                 ++pagerQty;
1062            } else {
1063                while (breakPoint < _.slideCount) {
1064                    ++pagerQty;
1065                    breakPoint = counter + _.options.slidesToScroll;
1066                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1067                }
1068            }
1069        } else if (_.options.centerMode === true) {
1070            pagerQty = _.slideCount;
1071        } else if(!_.options.asNavFor) {
1072            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
1073        }else {
1074            while (breakPoint < _.slideCount) {
1075                ++pagerQty;
1076                breakPoint = counter + _.options.slidesToScroll;
1077                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1078            }
1079        }
1080
1081        return pagerQty - 1;
1082
1083    };
1084
1085    Slick.prototype.getLeft = function(slideIndex) {
1086
1087        var _ = this,
1088            targetLeft,
1089            verticalHeight,
1090            verticalOffset = 0,
1091            targetSlide,
1092            coef;
1093
1094        _.slideOffset = 0;
1095        verticalHeight = _.$slides.first().outerHeight(true);
1096
1097        if (_.options.infinite === true) {
1098            if (_.slideCount > _.options.slidesToShow) {
1099                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1100                coef = -1
1101
1102                if (_.options.vertical === true && _.options.centerMode === true) {
1103                    if (_.options.slidesToShow === 2) {
1104                        coef = -1.5;
1105                    } else if (_.options.slidesToShow === 1) {
1106                        coef = -2
1107                    }
1108                }
1109                verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
1110            }
1111            if (_.slideCount % _.options.slidesToScroll !== 0) {
1112                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1113                    if (slideIndex > _.slideCount) {
1114                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
1115                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1116                    } else {
1117                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1118                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1119                    }
1120                }
1121            }
1122        } else {
1123            if (slideIndex + _.options.slidesToShow > _.slideCount) {
1124                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1125                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1126            }
1127        }
1128
1129        if (_.slideCount <= _.options.slidesToShow) {
1130            _.slideOffset = 0;
1131            verticalOffset = 0;
1132        }
1133
1134        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
1135            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
1136        } else if (_.options.centerMode === true && _.options.infinite === true) {
1137            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1138        } else if (_.options.centerMode === true) {
1139            _.slideOffset = 0;
1140            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1141        }
1142
1143        if (_.options.vertical === false) {
1144            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1145        } else {
1146            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1147        }
1148
1149        if (_.options.variableWidth === true) {
1150
1151            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1152                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1153            } else {
1154                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1155            }
1156
1157            if (_.options.rtl === true) {
1158                if (targetSlide[0]) {
1159                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1160                } else {
1161                    targetLeft =  0;
1162                }
1163            } else {
1164                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1165            }
1166
1167            if (_.options.centerMode === true) {
1168                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1169                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1170                } else {
1171                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1172                }
1173
1174                if (_.options.rtl === true) {
1175                    if (targetSlide[0]) {
1176                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1177                    } else {
1178                        targetLeft =  0;
1179                    }
1180                } else {
1181                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1182                }
1183
1184                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1185            }
1186        }
1187
1188        return targetLeft;
1189
1190    };
1191
1192    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1193
1194        var _ = this;
1195
1196        return _.options[option];
1197
1198    };
1199
1200    Slick.prototype.getNavigableIndexes = function() {
1201
1202        var _ = this,
1203            breakPoint = 0,
1204            counter = 0,
1205            indexes = [],
1206            max;
1207
1208        if (_.options.infinite === false) {
1209            max = _.slideCount;
1210        } else {
1211            breakPoint = _.options.slidesToScroll * -1;
1212            counter = _.options.slidesToScroll * -1;
1213            max = _.slideCount * 2;
1214        }
1215
1216        while (breakPoint < max) {
1217            indexes.push(breakPoint);
1218            breakPoint = counter + _.options.slidesToScroll;
1219            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1220        }
1221
1222        return indexes;
1223
1224    };
1225
1226    Slick.prototype.getSlick = function() {
1227
1228        return this;
1229
1230    };
1231
1232    Slick.prototype.getSlideCount = function() {
1233
1234        var _ = this,
1235            slidesTraversed, swipedSlide, centerOffset;
1236
1237        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1238
1239        if (_.options.swipeToSlide === true) {
1240            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1241                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1242                    swipedSlide = slide;
1243                    return false;
1244                }
1245            });
1246
1247            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1248
1249            return slidesTraversed;
1250
1251        } else {
1252            return _.options.slidesToScroll;
1253        }
1254
1255    };
1256
1257    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1258
1259        var _ = this;
1260
1261        _.changeSlide({
1262            data: {
1263                message: 'index',
1264                index: parseInt(slide)
1265            }
1266        }, dontAnimate);
1267
1268    };
1269
1270    Slick.prototype.init = function(creation) {
1271
1272        var _ = this;
1273
1274        if (!$(_.$slider).hasClass('slick-initialized')) {
1275
1276            $(_.$slider).addClass('slick-initialized');
1277
1278            _.buildRows();
1279            _.buildOut();
1280            _.setProps();
1281            _.startLoad();
1282            _.loadSlider();
1283            _.initializeEvents();
1284            _.updateArrows();
1285            _.updateDots();
1286            _.checkResponsive(true);
1287            _.focusHandler();
1288
1289        }
1290
1291        if (creation) {
1292            _.$slider.trigger('init', [_]);
1293        }
1294
1295        if (_.options.accessibility === true) {
1296            _.initADA();
1297        }
1298
1299        if ( _.options.autoplay ) {
1300
1301            _.paused = false;
1302            _.autoPlay();
1303
1304        }
1305
1306    };
1307
1308    Slick.prototype.initADA = function() {
1309        var _ = this,
1310                numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
1311                tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
1312                    return (val >= 0) && (val < _.slideCount);
1313                });
1314
1315        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1316            'aria-hidden': 'true',
1317            'tabindex': '-1'
1318        }).find('a, input, button, select').attr({
1319            'tabindex': '-1'
1320        });
1321
1322        if (_.$dots !== null) {
1323            _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
1324                var slideControlIndex = tabControlIndexes.indexOf(i);
1325
1326                $(this).attr({
1327                    'role': 'tabpanel',
1328                    'id': 'slick-slide' + _.instanceUid + i,
1329                    'tabindex': -1
1330                });
1331
1332                if (slideControlIndex !== -1) {
1333                   var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
1334                   if ($('#' + ariaButtonControl).length) {
1335                     $(this).attr({
1336                         'aria-describedby': ariaButtonControl
1337                     });
1338                   }
1339                }
1340            });
1341
1342            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
1343                var mappedSlideIndex = tabControlIndexes[i];
1344
1345                $(this).attr({
1346                    'role': 'presentation'
1347                });
1348
1349                $(this).find('button').first().attr({
1350                    'role': 'tab',
1351                    'id': 'slick-slide-control' + _.instanceUid + i,
1352                    'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
1353                    'aria-label': (i + 1) + ' of ' + numDotGroups,
1354                    'aria-selected': null,
1355                    'tabindex': '-1'
1356                });
1357
1358            }).eq(_.currentSlide).find('button').attr({
1359                'aria-selected': 'true',
1360                'tabindex': '0'
1361            }).end();
1362        }
1363
1364        for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
1365          if (_.options.focusOnChange) {
1366            _.$slides.eq(i).attr({'tabindex': '0'});
1367          } else {
1368            _.$slides.eq(i).removeAttr('tabindex');
1369          }
1370        }
1371
1372        _.activateADA();
1373
1374    };
1375
1376    Slick.prototype.initArrowEvents = function() {
1377
1378        var _ = this;
1379
1380        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1381            _.$prevArrow
1382               .off('click.slick')
1383               .on('click.slick', {
1384                    message: 'previous'
1385               }, _.changeSlide);
1386            _.$nextArrow
1387               .off('click.slick')
1388               .on('click.slick', {
1389                    message: 'next'
1390               }, _.changeSlide);
1391
1392            if (_.options.accessibility === true) {
1393                _.$prevArrow.on('keydown.slick', _.keyHandler);
1394                _.$nextArrow.on('keydown.slick', _.keyHandler);
1395            }
1396        }
1397
1398    };
1399
1400    Slick.prototype.initDotEvents = function() {
1401
1402        var _ = this;
1403
1404        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1405            $('li', _.$dots).on('click.slick', {
1406                message: 'index'
1407            }, _.changeSlide);
1408
1409            if (_.options.accessibility === true) {
1410                _.$dots.on('keydown.slick', _.keyHandler);
1411            }
1412        }
1413
1414        if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
1415
1416            $('li', _.$dots)
1417                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1418                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1419
1420        }
1421
1422    };
1423
1424    Slick.prototype.initSlideEvents = function() {
1425
1426        var _ = this;
1427
1428        if ( _.options.pauseOnHover ) {
1429
1430            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1431            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1432
1433        }
1434
1435    };
1436
1437    Slick.prototype.initializeEvents = function() {
1438
1439        var _ = this;
1440
1441        _.initArrowEvents();
1442
1443        _.initDotEvents();
1444        _.initSlideEvents();
1445
1446        _.$list.on('touchstart.slick mousedown.slick', {
1447            action: 'start'
1448        }, _.swipeHandler);
1449        _.$list.on('touchmove.slick mousemove.slick', {
1450            action: 'move'
1451        }, _.swipeHandler);
1452        _.$list.on('touchend.slick mouseup.slick', {
1453            action: 'end'
1454        }, _.swipeHandler);
1455        _.$list.on('touchcancel.slick mouseleave.slick', {
1456            action: 'end'
1457        }, _.swipeHandler);
1458
1459        _.$list.on('click.slick', _.clickHandler);
1460
1461        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1462
1463        if (_.options.accessibility === true) {
1464            _.$list.on('keydown.slick', _.keyHandler);
1465        }
1466
1467        if (_.options.focusOnSelect === true) {
1468            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1469        }
1470
1471        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1472
1473        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1474
1475        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1476
1477        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1478        $(_.setPosition);
1479
1480    };
1481
1482    Slick.prototype.initUI = function() {
1483
1484        var _ = this;
1485
1486        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1487
1488            _.$prevArrow.show();
1489            _.$nextArrow.show();
1490
1491        }
1492
1493        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1494
1495            _.$dots.show();
1496
1497        }
1498
1499    };
1500
1501    Slick.prototype.keyHandler = function(event) {
1502
1503        var _ = this;
1504         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1505        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1506            if (event.keyCode === 37 && _.options.accessibility === true) {
1507                _.changeSlide({
1508                    data: {
1509                        message: _.options.rtl === true ? 'next' :  'previous'
1510                    }
1511                });
1512            } else if (event.keyCode === 39 && _.options.accessibility === true) {
1513                _.changeSlide({
1514                    data: {
1515                        message: _.options.rtl === true ? 'previous' : 'next'
1516                    }
1517                });
1518            }
1519        }
1520
1521    };
1522
1523    Slick.prototype.lazyLoad = function() {
1524
1525        var _ = this,
1526            loadRange, cloneRange, rangeStart, rangeEnd;
1527
1528        function loadImages(imagesScope) {
1529
1530            $('img[data-lazy]', imagesScope).each(function() {
1531
1532                var image = $(this),
1533                    imageSource = $(this).attr('data-lazy'),
1534                    imageSrcSet = $(this).attr('data-srcset'),
1535                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
1536                    imageToLoad = document.createElement('img');
1537
1538                imageToLoad.onload = function() {
1539
1540                    image
1541                        .animate({ opacity: 0 }, 100, function() {
1542
1543                            if (imageSrcSet) {
1544                                image
1545                                    .attr('srcset', imageSrcSet );
1546
1547                                if (imageSizes) {
1548                                    image
1549                                        .attr('sizes', imageSizes );
1550                                }
1551                            }
1552
1553                            image
1554                                .attr('src', imageSource)
1555                                .animate({ opacity: 1 }, 200, function() {
1556                                    image
1557                                        .removeAttr('data-lazy data-srcset data-sizes')
1558                                        .removeClass('slick-loading');
1559                                });
1560                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1561                        });
1562
1563                };
1564
1565                imageToLoad.onerror = function() {
1566
1567                    image
1568                        .removeAttr( 'data-lazy' )
1569                        .removeClass( 'slick-loading' )
1570                        .addClass( 'slick-lazyload-error' );
1571
1572                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1573
1574                };
1575
1576                imageToLoad.src = imageSource;
1577
1578            });
1579
1580        }
1581
1582        if (_.options.centerMode === true) {
1583            if (_.options.infinite === true) {
1584                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1585                rangeEnd = rangeStart + _.options.slidesToShow + 2;
1586            } else {
1587                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1588                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1589            }
1590        } else {
1591            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1592            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1593            if (_.options.fade === true) {
1594                if (rangeStart > 0) rangeStart--;
1595                if (rangeEnd <= _.slideCount) rangeEnd++;
1596            }
1597        }
1598
1599        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1600
1601        if (_.options.lazyLoad === 'anticipated') {
1602            var prevSlide = rangeStart - 1,
1603                nextSlide = rangeEnd,
1604                $slides = _.$slider.find('.slick-slide');
1605
1606            for (var i = 0; i < _.options.slidesToScroll; i++) {
1607                if (prevSlide < 0) prevSlide = _.slideCount - 1;
1608                loadRange = loadRange.add($slides.eq(prevSlide));
1609                loadRange = loadRange.add($slides.eq(nextSlide));
1610                prevSlide--;
1611                nextSlide++;
1612            }
1613        }
1614
1615        loadImages(loadRange);
1616
1617        if (_.slideCount <= _.options.slidesToShow) {
1618            cloneRange = _.$slider.find('.slick-slide');
1619            loadImages(cloneRange);
1620        } else
1621        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1622            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1623            loadImages(cloneRange);
1624        } else if (_.currentSlide === 0) {
1625            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1626            loadImages(cloneRange);
1627        }
1628
1629    };
1630
1631    Slick.prototype.loadSlider = function() {
1632
1633        var _ = this;
1634
1635        _.setPosition();
1636
1637        _.$slideTrack.css({
1638            opacity: 1
1639        });
1640
1641        _.$slider.removeClass('slick-loading');
1642
1643        _.initUI();
1644
1645        if (_.options.lazyLoad === 'progressive') {
1646            _.progressiveLazyLoad();
1647        }
1648
1649    };
1650
1651    Slick.prototype.next = Slick.prototype.slickNext = function() {
1652
1653        var _ = this;
1654
1655        _.changeSlide({
1656            data: {
1657                message: 'next'
1658            }
1659        });
1660
1661    };
1662
1663    Slick.prototype.orientationChange = function() {
1664
1665        var _ = this;
1666
1667        _.checkResponsive();
1668        _.setPosition();
1669
1670    };
1671
1672    Slick.prototype.pause = Slick.prototype.slickPause = function() {
1673
1674        var _ = this;
1675
1676        _.autoPlayClear();
1677        _.paused = true;
1678
1679    };
1680
1681    Slick.prototype.play = Slick.prototype.slickPlay = function() {
1682
1683        var _ = this;
1684
1685        _.autoPlay();
1686        _.options.autoplay = true;
1687        _.paused = false;
1688        _.focussed = false;
1689        _.interrupted = false;
1690
1691    };
1692
1693    Slick.prototype.postSlide = function(index) {
1694
1695        var _ = this;
1696
1697        if( !_.unslicked ) {
1698
1699            _.$slider.trigger('afterChange', [_, index]);
1700
1701            _.animating = false;
1702
1703            if (_.slideCount > _.options.slidesToShow) {
1704                _.setPosition();
1705            }
1706
1707            _.swipeLeft = null;
1708
1709            if ( _.options.autoplay ) {
1710                _.autoPlay();
1711            }
1712
1713            if (_.options.accessibility === true) {
1714                _.initADA();
1715
1716                if (_.options.focusOnChange) {
1717                    var $currentSlide = $(_.$slides.get(_.currentSlide));
1718                    $currentSlide.attr('tabindex', 0).focus();
1719                }
1720            }
1721
1722        }
1723
1724    };
1725
1726    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1727
1728        var _ = this;
1729
1730        _.changeSlide({
1731            data: {
1732                message: 'previous'
1733            }
1734        });
1735
1736    };
1737
1738    Slick.prototype.preventDefault = function(event) {
1739
1740        event.preventDefault();
1741
1742    };
1743
1744    Slick.prototype.progressiveLazyLoad = function( tryCount ) {
1745
1746        tryCount = tryCount || 1;
1747
1748        var _ = this,
1749            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
1750            image,
1751            imageSource,
1752            imageSrcSet,
1753            imageSizes,
1754            imageToLoad;
1755
1756        if ( $imgsToLoad.length ) {
1757
1758            image = $imgsToLoad.first();
1759            imageSource = image.attr('data-lazy');
1760            imageSrcSet = image.attr('data-srcset');
1761            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');
1762            imageToLoad = document.createElement('img');
1763
1764            imageToLoad.onload = function() {
1765
1766                if (imageSrcSet) {
1767                    image
1768                        .attr('srcset', imageSrcSet );
1769
1770                    if (imageSizes) {
1771                        image
1772                            .attr('sizes', imageSizes );
1773                    }
1774                }
1775
1776                image
1777                    .attr( 'src', imageSource )
1778                    .removeAttr('data-lazy data-srcset data-sizes')
1779                    .removeClass('slick-loading');
1780
1781                if ( _.options.adaptiveHeight === true ) {
1782                    _.setPosition();
1783                }
1784
1785                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
1786                _.progressiveLazyLoad();
1787
1788            };
1789
1790            imageToLoad.onerror = function() {
1791
1792                if ( tryCount < 3 ) {
1793
1794                    /**
1795                     * try to load the image 3 times,
1796                     * leave a slight delay so we don't get
1797                     * servers blocking the request.
1798                     */
1799                    setTimeout( function() {
1800                        _.progressiveLazyLoad( tryCount + 1 );
1801                    }, 500 );
1802
1803                } else {
1804
1805                    image
1806                        .removeAttr( 'data-lazy' )
1807                        .removeClass( 'slick-loading' )
1808                        .addClass( 'slick-lazyload-error' );
1809
1810                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1811
1812                    _.progressiveLazyLoad();
1813
1814                }
1815
1816            };
1817
1818            imageToLoad.src = imageSource;
1819
1820        } else {
1821
1822            _.$slider.trigger('allImagesLoaded', [ _ ]);
1823
1824        }
1825
1826    };
1827
1828    Slick.prototype.refresh = function( initializing ) {
1829
1830        var _ = this, currentSlide, lastVisibleIndex;
1831
1832        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1833
1834        // in non-infinite sliders, we don't want to go past the
1835        // last visible index.
1836        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
1837            _.currentSlide = lastVisibleIndex;
1838        }
1839
1840        // if less slides than to show, go to start.
1841        if ( _.slideCount <= _.options.slidesToShow ) {
1842            _.currentSlide = 0;
1843
1844        }
1845
1846        currentSlide = _.currentSlide;
1847
1848        _.destroy(true);
1849
1850        $.extend(_, _.initials, { currentSlide: currentSlide });
1851
1852        _.init();
1853
1854        if( !initializing ) {
1855
1856            _.changeSlide({
1857                data: {
1858                    message: 'index',
1859                    index: currentSlide
1860                }
1861            }, false);
1862
1863        }
1864
1865    };
1866
1867    Slick.prototype.registerBreakpoints = function() {
1868
1869        var _ = this, breakpoint, currentBreakpoint, l,
1870            responsiveSettings = _.options.responsive || null;
1871
1872        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
1873
1874            _.respondTo = _.options.respondTo || 'window';
1875
1876            for ( breakpoint in responsiveSettings ) {
1877
1878                l = _.breakpoints.length-1;
1879
1880                if (responsiveSettings.hasOwnProperty(breakpoint)) {
1881                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1882
1883                    // loop through the breakpoints and cut out any existing
1884                    // ones with the same breakpoint number, we don't want dupes.
1885                    while( l >= 0 ) {
1886                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
1887                            _.breakpoints.splice(l,1);
1888                        }
1889                        l--;
1890                    }
1891
1892                    _.breakpoints.push(currentBreakpoint);
1893                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1894
1895                }
1896
1897            }
1898
1899            _.breakpoints.sort(function(a, b) {
1900                return ( _.options.mobileFirst ) ? a-b : b-a;
1901            });
1902
1903        }
1904
1905    };
1906
1907    Slick.prototype.reinit = function() {
1908
1909        var _ = this;
1910
1911        _.$slides =
1912            _.$slideTrack
1913                .children(_.options.slide)
1914                .addClass('slick-slide');
1915
1916        _.slideCount = _.$slides.length;
1917
1918        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1919            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1920        }
1921
1922        if (_.slideCount <= _.options.slidesToShow) {
1923            _.currentSlide = 0;
1924        }
1925
1926        _.registerBreakpoints();
1927
1928        _.setProps();
1929        _.setupInfinite();
1930        _.buildArrows();
1931        _.updateArrows();
1932        _.initArrowEvents();
1933        _.buildDots();
1934        _.updateDots();
1935        _.initDotEvents();
1936        _.cleanUpSlideEvents();
1937        _.initSlideEvents();
1938
1939        _.checkResponsive(false, true);
1940
1941        if (_.options.focusOnSelect === true) {
1942            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1943        }
1944
1945        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
1946
1947        _.setPosition();
1948        _.focusHandler();
1949
1950        _.paused = !_.options.autoplay;
1951        _.autoPlay();
1952
1953        _.$slider.trigger('reInit', [_]);
1954
1955    };
1956
1957    Slick.prototype.resize = function() {
1958
1959        var _ = this;
1960
1961        if ($(window).width() !== _.windowWidth) {
1962            clearTimeout(_.windowDelay);
1963            _.windowDelay = window.setTimeout(function() {
1964                _.windowWidth = $(window).width();
1965                _.checkResponsive();
1966                if( !_.unslicked ) { _.setPosition(); }
1967            }, 50);
1968        }
1969    };
1970
1971    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
1972
1973        var _ = this;
1974
1975        if (typeof(index) === 'boolean') {
1976            removeBefore = index;
1977            index = removeBefore === true ? 0 : _.slideCount - 1;
1978        } else {
1979            index = removeBefore === true ? --index : index;
1980        }
1981
1982        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1983            return false;
1984        }
1985
1986        _.unload();
1987
1988        if (removeAll === true) {
1989            _.$slideTrack.children().remove();
1990        } else {
1991            _.$slideTrack.children(this.options.slide).eq(index).remove();
1992        }
1993
1994        _.$slides = _.$slideTrack.children(this.options.slide);
1995
1996        _.$slideTrack.children(this.options.slide).detach();
1997
1998        _.$slideTrack.append(_.$slides);
1999
2000        _.$slidesCache = _.$slides;
2001
2002        _.reinit();
2003
2004    };
2005
2006    Slick.prototype.setCSS = function(position) {
2007
2008        var _ = this,
2009            positionProps = {},
2010            x, y;
2011
2012        if (_.options.rtl === true) {
2013            position = -position;
2014        }
2015        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
2016        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
2017
2018        positionProps[_.positionProp] = position;
2019
2020        if (_.transformsEnabled === false) {
2021            _.$slideTrack.css(positionProps);
2022        } else {
2023            positionProps = {};
2024            if (_.cssTransitions === false) {
2025                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
2026                _.$slideTrack.css(positionProps);
2027            } else {
2028                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
2029                _.$slideTrack.css(positionProps);
2030            }
2031        }
2032
2033    };
2034
2035    Slick.prototype.setDimensions = function() {
2036
2037        var _ = this;
2038
2039        if (_.options.vertical === false) {
2040            if (_.options.centerMode === true) {
2041                _.$list.css({
2042                    padding: ('0px ' + _.options.centerPadding)
2043                });
2044            }
2045        } else {
2046            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
2047            if (_.options.centerMode === true) {
2048                _.$list.css({
2049                    padding: (_.options.centerPadding + ' 0px')
2050                });
2051            }
2052        }
2053
2054        _.listWidth = _.$list.width();
2055        _.listHeight = _.$list.height();
2056
2057
2058        if (_.options.vertical === false && _.options.variableWidth === false) {
2059            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
2060            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
2061
2062        } else if (_.options.variableWidth === true) {
2063            _.$slideTrack.width(5000 * _.slideCount);
2064        } else {
2065            _.slideWidth = Math.ceil(_.listWidth);
2066            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
2067        }
2068
2069        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
2070        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
2071
2072    };
2073
2074    Slick.prototype.setFade = function() {
2075
2076        var _ = this,
2077            targetLeft;
2078
2079        _.$slides.each(function(index, element) {
2080            targetLeft = (_.slideWidth * index) * -1;
2081            if (_.options.rtl === true) {
2082                $(element).css({
2083                    position: 'relative',
2084                    right: targetLeft,
2085                    top: 0,
2086                    zIndex: _.options.zIndex - 2,
2087                    opacity: 0
2088                });
2089            } else {
2090                $(element).css({
2091                    position: 'relative',
2092                    left: targetLeft,
2093                    top: 0,
2094                    zIndex: _.options.zIndex - 2,
2095                    opacity: 0
2096                });
2097            }
2098        });
2099
2100        _.$slides.eq(_.currentSlide).css({
2101            zIndex: _.options.zIndex - 1,
2102            opacity: 1
2103        });
2104
2105    };
2106
2107    Slick.prototype.setHeight = function() {
2108
2109        var _ = this;
2110
2111        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
2112            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
2113            _.$list.css('height', targetHeight);
2114        }
2115
2116    };
2117
2118    Slick.prototype.setOption =
2119    Slick.prototype.slickSetOption = function() {
2120
2121        /**
2122         * accepts arguments in format of:
2123         *
2124         *  - for changing a single option's value:
2125         *     .slick("setOption", option, value, refresh )
2126         *
2127         *  - for changing a set of responsive options:
2128         *     .slick("setOption", 'responsive', [{}, ...], refresh )
2129         *
2130         *  - for updating multiple values at once (not responsive)
2131         *     .slick("setOption", { 'option': value, ... }, refresh )
2132         */
2133
2134        var _ = this, l, item, option, value, refresh = false, type;
2135
2136        if( $.type( arguments[0] ) === 'object' ) {
2137
2138            option =  arguments[0];
2139            refresh = arguments[1];
2140            type = 'multiple';
2141
2142        } else if ( $.type( arguments[0] ) === 'string' ) {
2143
2144            option =  arguments[0];
2145            value = arguments[1];
2146            refresh = arguments[2];
2147
2148            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
2149
2150                type = 'responsive';
2151
2152            } else if ( typeof arguments[1] !== 'undefined' ) {
2153
2154                type = 'single';
2155
2156            }
2157
2158        }
2159
2160        if ( type === 'single' ) {
2161
2162            _.options[option] = value;
2163
2164
2165        } else if ( type === 'multiple' ) {
2166
2167            $.each( option , function( opt, val ) {
2168
2169                _.options[opt] = val;
2170
2171            });
2172
2173
2174        } else if ( type === 'responsive' ) {
2175
2176            for ( item in value ) {
2177
2178                if( $.type( _.options.responsive ) !== 'array' ) {
2179
2180                    _.options.responsive = [ value[item] ];
2181
2182                } else {
2183
2184                    l = _.options.responsive.length-1;
2185
2186                    // loop through the responsive object and splice out duplicates.
2187                    while( l >= 0 ) {
2188
2189                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
2190
2191                            _.options.responsive.splice(l,1);
2192
2193                        }
2194
2195                        l--;
2196
2197                    }
2198
2199                    _.options.responsive.push( value[item] );
2200
2201                }
2202
2203            }
2204
2205        }
2206
2207        if ( refresh ) {
2208
2209            _.unload();
2210            _.reinit();
2211
2212        }
2213
2214    };
2215
2216    Slick.prototype.setPosition = function() {
2217
2218        var _ = this;
2219
2220        _.setDimensions();
2221
2222        _.setHeight();
2223
2224        if (_.options.fade === false) {
2225            _.setCSS(_.getLeft(_.currentSlide));
2226        } else {
2227            _.setFade();
2228        }
2229
2230        _.$slider.trigger('setPosition', [_]);
2231
2232    };
2233
2234    Slick.prototype.setProps = function() {
2235
2236        var _ = this,
2237            bodyStyle = document.body.style;
2238
2239        _.positionProp = _.options.vertical === true ? 'top' : 'left';
2240
2241        if (_.positionProp === 'top') {
2242            _.$slider.addClass('slick-vertical');
2243        } else {
2244            _.$slider.removeClass('slick-vertical');
2245        }
2246
2247        if (bodyStyle.WebkitTransition !== undefined ||
2248            bodyStyle.MozTransition !== undefined ||
2249            bodyStyle.msTransition !== undefined) {
2250            if (_.options.useCSS === true) {
2251                _.cssTransitions = true;
2252            }
2253        }
2254
2255        if ( _.options.fade ) {
2256            if ( typeof _.options.zIndex === 'number' ) {
2257                if( _.options.zIndex < 3 ) {
2258                    _.options.zIndex = 3;
2259                }
2260            } else {
2261                _.options.zIndex = _.defaults.zIndex;
2262            }
2263        }
2264
2265        if (bodyStyle.OTransform !== undefined) {
2266            _.animType = 'OTransform';
2267            _.transformType = '-o-transform';
2268            _.transitionType = 'OTransition';
2269            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2270        }
2271        if (bodyStyle.MozTransform !== undefined) {
2272            _.animType = 'MozTransform';
2273            _.transformType = '-moz-transform';
2274            _.transitionType = 'MozTransition';
2275            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
2276        }
2277        if (bodyStyle.webkitTransform !== undefined) {
2278            _.animType = 'webkitTransform';
2279            _.transformType = '-webkit-transform';
2280            _.transitionType = 'webkitTransition';
2281            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2282        }
2283        if (bodyStyle.msTransform !== undefined) {
2284            _.animType = 'msTransform';
2285            _.transformType = '-ms-transform';
2286            _.transitionType = 'msTransition';
2287            if (bodyStyle.msTransform === undefined) _.animType = false;
2288        }
2289        if (bodyStyle.transform !== undefined && _.animType !== false) {
2290            _.animType = 'transform';
2291            _.transformType = 'transform';
2292            _.transitionType = 'transition';
2293        }
2294        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
2295    };
2296
2297
2298    Slick.prototype.setSlideClasses = function(index) {
2299
2300        var _ = this,
2301            centerOffset, allSlides, indexOffset, remainder;
2302
2303        allSlides = _.$slider
2304            .find('.slick-slide')
2305            .removeClass('slick-active slick-center slick-current')
2306            .attr('aria-hidden', 'true');
2307
2308        _.$slides
2309            .eq(index)
2310            .addClass('slick-current');
2311
2312        if (_.options.centerMode === true) {
2313
2314            var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
2315
2316            centerOffset = Math.floor(_.options.slidesToShow / 2);
2317
2318            if (_.options.infinite === true) {
2319
2320                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
2321                    _.$slides
2322                        .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
2323                        .addClass('slick-active')
2324                        .attr('aria-hidden', 'false');
2325
2326                } else {
2327
2328                    indexOffset = _.options.slidesToShow + index;
2329                    allSlides
2330                        .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
2331                        .addClass('slick-active')
2332                        .attr('aria-hidden', 'false');
2333
2334                }
2335
2336                if (index === 0) {
2337
2338                    allSlides
2339                        .eq(allSlides.length - 1 - _.options.slidesToShow)
2340                        .addClass('slick-center');
2341
2342                } else if (index === _.slideCount - 1) {
2343
2344                    allSlides
2345                        .eq(_.options.slidesToShow)
2346                        .addClass('slick-center');
2347
2348                }
2349
2350            }
2351
2352            _.$slides
2353                .eq(index)
2354                .addClass('slick-center');
2355
2356        } else {
2357
2358            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
2359
2360                _.$slides
2361                    .slice(index, index + _.options.slidesToShow)
2362                    .addClass('slick-active')
2363                    .attr('aria-hidden', 'false');
2364
2365            } else if (allSlides.length <= _.options.slidesToShow) {
2366
2367                allSlides
2368                    .addClass('slick-active')
2369                    .attr('aria-hidden', 'false');
2370
2371            } else {
2372
2373                remainder = _.slideCount % _.options.slidesToShow;
2374                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2375
2376                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2377
2378                    allSlides
2379                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2380                        .addClass('slick-active')
2381                        .attr('aria-hidden', 'false');
2382
2383                } else {
2384
2385                    allSlides
2386                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
2387                        .addClass('slick-active')
2388                        .attr('aria-hidden', 'false');
2389
2390                }
2391
2392            }
2393
2394        }
2395
2396        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
2397            _.lazyLoad();
2398        }
2399    };
2400
2401    Slick.prototype.setupInfinite = function() {
2402
2403        var _ = this,
2404            i, slideIndex, infiniteCount;
2405
2406        if (_.options.fade === true) {
2407            _.options.centerMode = false;
2408        }
2409
2410        if (_.options.infinite === true && _.options.fade === false) {
2411
2412            slideIndex = null;
2413
2414            if (_.slideCount > _.options.slidesToShow) {
2415
2416                if (_.options.centerMode === true) {
2417                    infiniteCount = _.options.slidesToShow + 1;
2418                } else {
2419                    infiniteCount = _.options.slidesToShow;
2420                }
2421
2422                for (i = _.slideCount; i > (_.slideCount -
2423                        infiniteCount); i -= 1) {
2424                    slideIndex = i - 1;
2425                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2426                        .attr('data-slick-index', slideIndex - _.slideCount)
2427                        .prependTo(_.$slideTrack).addClass('slick-cloned');
2428                }
2429                for (i = 0; i < infiniteCount  + _.slideCount; i += 1) {
2430                    slideIndex = i;
2431                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2432                        .attr('data-slick-index', slideIndex + _.slideCount)
2433                        .appendTo(_.$slideTrack).addClass('slick-cloned');
2434                }
2435                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2436                    $(this).attr('id', '');
2437                });
2438
2439            }
2440
2441        }
2442
2443    };
2444
2445    Slick.prototype.interrupt = function( toggle ) {
2446
2447        var _ = this;
2448
2449        if( !toggle ) {
2450            _.autoPlay();
2451        }
2452        _.interrupted = toggle;
2453
2454    };
2455
2456    Slick.prototype.selectHandler = function(event) {
2457
2458        var _ = this;
2459
2460        var targetElement =
2461            $(event.target).is('.slick-slide') ?
2462                $(event.target) :
2463                $(event.target).parents('.slick-slide');
2464
2465        var index = parseInt(targetElement.attr('data-slick-index'));
2466
2467        if (!index) index = 0;
2468
2469        if (_.slideCount <= _.options.slidesToShow) {
2470
2471            _.slideHandler(index, false, true);
2472            return;
2473
2474        }
2475
2476        _.slideHandler(index);
2477
2478    };
2479
2480    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2481
2482        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2483            _ = this, navTarget;
2484
2485        sync = sync || false;
2486
2487        if (_.animating === true && _.options.waitForAnimate === true) {
2488            return;
2489        }
2490
2491        if (_.options.fade === true && _.currentSlide === index) {
2492            return;
2493        }
2494
2495        if (sync === false) {
2496            _.asNavFor(index);
2497        }
2498
2499        targetSlide = index;
2500        targetLeft = _.getLeft(targetSlide);
2501        slideLeft = _.getLeft(_.currentSlide);
2502
2503        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2504
2505        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2506            if (_.options.fade === false) {
2507                targetSlide = _.currentSlide;
2508                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2509                    _.animateSlide(slideLeft, function() {
2510                        _.postSlide(targetSlide);
2511                    });
2512                } else {
2513                    _.postSlide(targetSlide);
2514                }
2515            }
2516            return;
2517        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2518            if (_.options.fade === false) {
2519                targetSlide = _.currentSlide;
2520                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2521                    _.animateSlide(slideLeft, function() {
2522                        _.postSlide(targetSlide);
2523                    });
2524                } else {
2525                    _.postSlide(targetSlide);
2526                }
2527            }
2528            return;
2529        }
2530
2531        if ( _.options.autoplay ) {
2532            clearInterval(_.autoPlayTimer);
2533        }
2534
2535        if (targetSlide < 0) {
2536            if (_.slideCount % _.options.slidesToScroll !== 0) {
2537                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2538            } else {
2539                animSlide = _.slideCount + targetSlide;
2540            }
2541        } else if (targetSlide >= _.slideCount) {
2542            if (_.slideCount % _.options.slidesToScroll !== 0) {
2543                animSlide = 0;
2544            } else {
2545                animSlide = targetSlide - _.slideCount;
2546            }
2547        } else {
2548            animSlide = targetSlide;
2549        }
2550
2551        _.animating = true;
2552
2553        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2554
2555        oldSlide = _.currentSlide;
2556        _.currentSlide = animSlide;
2557
2558        _.setSlideClasses(_.currentSlide);
2559
2560        if ( _.options.asNavFor ) {
2561
2562            navTarget = _.getNavTarget();
2563            navTarget = navTarget.slick('getSlick');
2564
2565            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
2566                navTarget.setSlideClasses(_.currentSlide);
2567            }
2568
2569        }
2570
2571        _.updateDots();
2572        _.updateArrows();
2573
2574        if (_.options.fade === true) {
2575            if (dontAnimate !== true) {
2576
2577                _.fadeSlideOut(oldSlide);
2578
2579                _.fadeSlide(animSlide, function() {
2580                    _.postSlide(animSlide);
2581                });
2582
2583            } else {
2584                _.postSlide(animSlide);
2585            }
2586            _.animateHeight();
2587            return;
2588        }
2589
2590        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2591            _.animateSlide(targetLeft, function() {
2592                _.postSlide(animSlide);
2593            });
2594        } else {
2595            _.postSlide(animSlide);
2596        }
2597
2598    };
2599
2600    Slick.prototype.startLoad = function() {
2601
2602        var _ = this;
2603
2604        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2605
2606            _.$prevArrow.hide();
2607            _.$nextArrow.hide();
2608
2609        }
2610
2611        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2612
2613            _.$dots.hide();
2614
2615        }
2616
2617        _.$slider.addClass('slick-loading');
2618
2619    };
2620
2621    Slick.prototype.swipeDirection = function() {
2622
2623        var xDist, yDist, r, swipeAngle, _ = this;
2624
2625        xDist = _.touchObject.startX - _.touchObject.curX;
2626        yDist = _.touchObject.startY - _.touchObject.curY;
2627        r = Math.atan2(yDist, xDist);
2628
2629        swipeAngle = Math.round(r * 180 / Math.PI);
2630        if (swipeAngle < 0) {
2631            swipeAngle = 360 - Math.abs(swipeAngle);
2632        }
2633
2634        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2635            return (_.options.rtl === false ? 'left' : 'right');
2636        }
2637        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2638            return (_.options.rtl === false ? 'left' : 'right');
2639        }
2640        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2641            return (_.options.rtl === false ? 'right' : 'left');
2642        }
2643        if (_.options.verticalSwiping === true) {
2644            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2645                return 'down';
2646            } else {
2647                return 'up';
2648            }
2649        }
2650
2651        return 'vertical';
2652
2653    };
2654
2655    Slick.prototype.swipeEnd = function(event) {
2656
2657        var _ = this,
2658            slideCount,
2659            direction;
2660
2661        _.dragging = false;
2662        _.swiping = false;
2663
2664        if (_.scrolling) {
2665            _.scrolling = false;
2666            return false;
2667        }
2668
2669        _.interrupted = false;
2670        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
2671
2672        if ( _.touchObject.curX === undefined ) {
2673            return false;
2674        }
2675
2676        if ( _.touchObject.edgeHit === true ) {
2677            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
2678        }
2679
2680        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
2681
2682            direction = _.swipeDirection();
2683
2684            switch ( direction ) {
2685
2686                case 'left':
2687                case 'down':
2688
2689                    slideCount =
2690                        _.options.swipeToSlide ?
2691                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
2692                            _.currentSlide + _.getSlideCount();
2693
2694                    _.currentDirection = 0;
2695
2696                    break;
2697
2698                case 'right':
2699                case 'up':
2700
2701                    slideCount =
2702                        _.options.swipeToSlide ?
2703                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
2704                            _.currentSlide - _.getSlideCount();
2705
2706                    _.currentDirection = 1;
2707
2708                    break;
2709
2710                default:
2711
2712
2713            }
2714
2715            if( direction != 'vertical' ) {
2716
2717                _.slideHandler( slideCount );
2718                _.touchObject = {};
2719                _.$slider.trigger('swipe', [_, direction ]);
2720
2721            }
2722
2723        } else {
2724
2725            if ( _.touchObject.startX !== _.touchObject.curX ) {
2726
2727                _.slideHandler( _.currentSlide );
2728                _.touchObject = {};
2729
2730            }
2731
2732        }
2733
2734    };
2735
2736    Slick.prototype.swipeHandler = function(event) {
2737
2738        var _ = this;
2739
2740        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2741            return;
2742        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2743            return;
2744        }
2745
2746        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2747            event.originalEvent.touches.length : 1;
2748
2749        _.touchObject.minSwipe = _.listWidth / _.options
2750            .touchThreshold;
2751
2752        if (_.options.verticalSwiping === true) {
2753            _.touchObject.minSwipe = _.listHeight / _.options
2754                .touchThreshold;
2755        }
2756
2757        switch (event.data.action) {
2758
2759            case 'start':
2760                _.swipeStart(event);
2761                break;
2762
2763            case 'move':
2764                _.swipeMove(event);
2765                break;
2766
2767            case 'end':
2768                _.swipeEnd(event);
2769                break;
2770
2771        }
2772
2773    };
2774
2775    Slick.prototype.swipeMove = function(event) {
2776
2777        var _ = this,
2778            edgeWasHit = false,
2779            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
2780
2781        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2782
2783        if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
2784            return false;
2785        }
2786
2787        curLeft = _.getLeft(_.currentSlide);
2788
2789        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2790        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2791
2792        _.touchObject.swipeLength = Math.round(Math.sqrt(
2793            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2794
2795        verticalSwipeLength = Math.round(Math.sqrt(
2796            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2797
2798        if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
2799            _.scrolling = true;
2800            return false;
2801        }
2802
2803        if (_.options.verticalSwiping === true) {
2804            _.touchObject.swipeLength = verticalSwipeLength;
2805        }
2806
2807        swipeDirection = _.swipeDirection();
2808
2809        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2810            _.swiping = true;
2811            event.preventDefault();
2812        }
2813
2814        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2815        if (_.options.verticalSwiping === true) {
2816            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2817        }
2818
2819
2820        swipeLength = _.touchObject.swipeLength;
2821
2822        _.touchObject.edgeHit = false;
2823
2824        if (_.options.infinite === false) {
2825            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2826                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2827                _.touchObject.edgeHit = true;
2828            }
2829        }
2830
2831        if (_.options.vertical === false) {
2832            _.swipeLeft = curLeft + swipeLength * positionOffset;
2833        } else {
2834            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2835        }
2836        if (_.options.verticalSwiping === true) {
2837            _.swipeLeft = curLeft + swipeLength * positionOffset;
2838        }
2839
2840        if (_.options.fade === true || _.options.touchMove === false) {
2841            return false;
2842        }
2843
2844        if (_.animating === true) {
2845            _.swipeLeft = null;
2846            return false;
2847        }
2848
2849        _.setCSS(_.swipeLeft);
2850
2851    };
2852
2853    Slick.prototype.swipeStart = function(event) {
2854
2855        var _ = this,
2856            touches;
2857
2858        _.interrupted = true;
2859
2860        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2861            _.touchObject = {};
2862            return false;
2863        }
2864
2865        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2866            touches = event.originalEvent.touches[0];
2867        }
2868
2869        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2870        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2871
2872        _.dragging = true;
2873
2874    };
2875
2876    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
2877
2878        var _ = this;
2879
2880        if (_.$slidesCache !== null) {
2881
2882            _.unload();
2883
2884            _.$slideTrack.children(this.options.slide).detach();
2885
2886            _.$slidesCache.appendTo(_.$slideTrack);
2887
2888            _.reinit();
2889
2890        }
2891
2892    };
2893
2894    Slick.prototype.unload = function() {
2895
2896        var _ = this;
2897
2898        $('.slick-cloned', _.$slider).remove();
2899
2900        if (_.$dots) {
2901            _.$dots.remove();
2902        }
2903
2904        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2905            _.$prevArrow.remove();
2906        }
2907
2908        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2909            _.$nextArrow.remove();
2910        }
2911
2912        _.$slides
2913            .removeClass('slick-slide slick-active slick-visible slick-current')
2914            .attr('aria-hidden', 'true')
2915            .css('width', '');
2916
2917    };
2918
2919    Slick.prototype.unslick = function(fromBreakpoint) {
2920
2921        var _ = this;
2922        _.$slider.trigger('unslick', [_, fromBreakpoint]);
2923        _.destroy();
2924
2925    };
2926
2927    Slick.prototype.updateArrows = function() {
2928
2929        var _ = this,
2930            centerOffset;
2931
2932        centerOffset = Math.floor(_.options.slidesToShow / 2);
2933
2934        if ( _.options.arrows === true &&
2935            _.slideCount > _.options.slidesToShow &&
2936            !_.options.infinite ) {
2937
2938            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2939            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2940
2941            if (_.currentSlide === 0) {
2942
2943                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2944                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2945
2946            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2947
2948                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2949                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2950
2951            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2952
2953                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2954                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2955
2956            }
2957
2958        }
2959
2960    };
2961
2962    Slick.prototype.updateDots = function() {
2963
2964        var _ = this;
2965
2966        if (_.$dots !== null) {
2967
2968            _.$dots
2969                .find('li')
2970                    .removeClass('slick-active')
2971                    .end();
2972
2973            _.$dots
2974                .find('li')
2975                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2976                .addClass('slick-active');
2977
2978        }
2979
2980    };
2981
2982    Slick.prototype.visibility = function() {
2983
2984        var _ = this;
2985
2986        if ( _.options.autoplay ) {
2987
2988            if ( document[_.hidden] ) {
2989
2990                _.interrupted = true;
2991
2992            } else {
2993
2994                _.interrupted = false;
2995
2996            }
2997
2998        }
2999
3000    };
3001
3002    $.fn.slick = function() {
3003        var _ = this,
3004            opt = arguments[0],
3005            args = Array.prototype.slice.call(arguments, 1),
3006            l = _.length,
3007            i,
3008            ret;
3009        for (i = 0; i < l; i++) {
3010            if (typeof opt == 'object' || typeof opt == 'undefined')
3011                _[i].slick = new Slick(_[i], opt);
3012            else
3013                ret = _[i].slick[opt].apply(_[i].slick, args);
3014            if (typeof ret != 'undefined') return ret;
3015        }
3016        return _;
3017    };
3018
3019}));
3020
3021
3022/***/ })
3022,
3023
3024/***/ "jquery":
3025/*!*************************!*\
3026  !*** external "jQuery" ***!
3027  \*************************/
3028/***/ ((module) => {
3029
3030"use strict";
3031module.exports = window["jQuery"];
3032
3033/***/ })
3034
3035/******/ 	});
3036/************************************************************************/
3037/******/ 	// The module cache
3038/******/ 	var __webpack_module_cache__ = {};
3039/******/ 	
3040/******/ 	// The require function
3041/******/ 	function __webpack_require__(moduleId) {
3042/******/ 		// Check if module is in cache
3043/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
3044/******/ 		if (cachedModule !== undefined) {
3045/******/ 			return cachedModule.exports;
3046/******/ 		}
3047/******/ 		// Create a new module (and put it into the cache)
3048/******/ 		var module = __webpack_module_cache__[moduleId] = {
3049/******/ 			// no module.id needed
3050/******/ 			// no module.loaded needed
3051/******/ 			exports: {}
3052/******/ 		};
3053/******/ 	
3054/******/ 		// Execute the module function
3055/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3056/******/ 	
3057/******/ 		// Return the exports of the module
3058/******/ 		return module.exports;
3059/******/ 	}
3060/******/ 	
3061/************************************************************************/
3062/******/ 	/* webpack/runtime/compat get default export */
3063/******/ 	(() => {
3064/******/ 		// getDefaultExport function for compatibility with non-harmony modules
3065/******/ 		__webpack_require__.n = (module) => {
3066/******/ 			var getter = module && module.__esModule ?
3067/******/ 				() => (module['default']) :
3068/******/ 				() => (module);
3069/******/ 			__webpack_require__.d(getter, { a: getter });
3070/******/ 			return getter;
3071/******/ 		};
3072/******/ 	})();
3073/******/ 	
3074/******/ 	/* webpack/runtime/define property getters */
3075/******/ 	(() => {
3076/******/ 		// define getter functions for harmony exports
3077/******/ 		__webpack_require__.d = (exports, definition) => {
3078/******/ 			for(var key in definition) {
3079/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3080/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3081/******/ 				}
3082/******/ 			}
3083/******/ 		};
3084/******/ 	})();
3085/******/ 	
3086/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
3087/******/ 	(() => {
3088/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3089/******/ 	})();
3090/******/ 	
3091/******/ 	/* webpack/runtime/make namespace object */
3092/******/ 	(() => {
3093/******/ 		// define __esModule on exports
3094/******/ 		__webpack_require__.r = (exports) => {
3095/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3096/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3097/******/ 			}
3098/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
3099/******/ 		};
3100/******/ 	})();
3101/******/ 	
3102/************************************************************************/
3103var __webpack_exports__ = {};
3104// This entry need to be wrapped in an IIFE because it need to be in strict mode.
3105(() => {
3106"use strict";
3107/*!******************************************!*\
3108  !*** ./src/latest-news-global/script.js ***!
3109  \******************************************/
3110__webpack_require__.r(__webpack_exports__);
3111/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3112/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3113/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! slick-carousel */ "./node_modules/slick-carousel/slick/slick.js");
3114/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(slick_carousel__WEBPACK_IMPORTED_MODULE_1__);
3115
3116
3117(function ($) {
3118  $(document).ready(function () {
3119    const $latestNewsGlobal = $(".wp-block-msi-blocks-latest-news-global");
3120    $latestNewsGlobal.find(".post-slides").each(function () {
3121      var $parent = $(this).parent();
3122      $(this).slick({
3123        dots: true,
3124        infinite: false,
3125        slidesToShow: 1,
3126        slidesToScroll: 1,
3127        arrows: true,
3128        adaptiveHeight: true,
3129        variableWidth: false,
3130        centerMode: false,
3131        accessibility: true,
3132        responsive: [{
3133          breakpoint: 600,
3134          settings: {
3135            slidesToShow: 1,
3136            slidesToScroll: 1
3137          }
3138        }],
3139        appendDots: $latestNewsGlobal.find(".slide-msi-dots", $parent),
3140        prevArrow: $latestNewsGlobal.find(".slide-msi-prev", $parent),
3141        nextArrow: $latestNewsGlobal.find(".slide-msi-next", $parent)
3142      });
3143    });
3144    function adjustLineClamp() {
3145      const $latestNewsBlock = $(".wp-block-msi-blocks-latest-news-global");
3146      const containers = $latestNewsBlock.find(".article-content");
3147      containers.each((index, container) => {
3148        const $container = $(container);
3149        const containerHeight = 327;
3150        const titleHeight = $container.find(".article-content-text-title").outerHeight(true);
3151        const $description = $container.find(".article-content-text-description");
3152        const dateHeight = $container.find(".date").outerHeight(true);
3153        const btnHeight = $container.find("a").outerHeight();
3154        const lineHeight = parseInt(window.getComputedStyle($description[0]).lineHeight);
3155        const availableSpace = containerHeight - titleHeight - dateHeight - btnHeight - 16;
3156        const lineClampValue = Math.floor(availableSpace / lineHeight);
3157        $description[0].style.webkitLineClamp = lineClampValue;
3158      });
3159    }
3160    adjustLineClamp();
3161    window.onresize = adjustLineClamp;
3162  });
3163})(jQuery);
3164})();
3165
3166/******/ })()
3167;
3168//# sourceMappingURL=script.js.map

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.