j1-template 2023.0.16 → 2023.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/banner.html +2 -2
  3. data/assets/error_pages/HTTP204.html +9 -5
  4. data/assets/error_pages/HTTP400.html +18 -2
  5. data/assets/error_pages/HTTP401.html +18 -2
  6. data/assets/error_pages/HTTP403.html +18 -2
  7. data/assets/error_pages/HTTP404.html +10 -2
  8. data/assets/error_pages/HTTP444.html +18 -2
  9. data/assets/error_pages/HTTP445.html +18 -2
  10. data/assets/error_pages/HTTP446.html +18 -2
  11. data/assets/error_pages/HTTP447.html +18 -2
  12. data/assets/error_pages/HTTP448.html +18 -2
  13. data/assets/error_pages/HTTP500.html +18 -2
  14. data/assets/error_pages/HTTP501.html +18 -2
  15. data/assets/error_pages/HTTP502.html +18 -2
  16. data/assets/error_pages/HTTP503.html +18 -2
  17. data/assets/themes/j1/adapter/js/cookieConsent.js +41 -25
  18. data/assets/themes/j1/adapter/js/fab.js +3 -1
  19. data/assets/themes/j1/adapter/js/j1.js +39 -1
  20. data/assets/themes/j1/adapter/js/slick.js +221 -0
  21. data/assets/themes/j1/adapter/js/translator.js +45 -3
  22. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +4 -4
  23. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  24. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +10 -4
  25. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +1 -1
  26. data/assets/themes/j1/modules/slick/LICENSE +20 -0
  27. data/assets/themes/j1/modules/slick/README.md +292 -0
  28. data/assets/themes/j1/modules/slick/ajax-loader.gif +0 -0
  29. data/assets/themes/j1/modules/slick/css/slick.css +129 -0
  30. data/assets/themes/j1/modules/slick/css/slick.min.css +15 -0
  31. data/assets/themes/j1/modules/slick/fonts/slick.eot +0 -0
  32. data/assets/themes/j1/modules/slick/fonts/slick.svg +14 -0
  33. data/assets/themes/j1/modules/slick/fonts/slick.ttf +0 -0
  34. data/assets/themes/j1/modules/slick/fonts/slick.woff +0 -0
  35. data/assets/themes/j1/modules/slick/js/slick.js +2295 -0
  36. data/assets/themes/j1/modules/slick/js/slick.min.js +1 -0
  37. data/assets/themes/j1/modules/translator/css/translator.css +3 -3
  38. data/assets/themes/j1/modules/translator/css/translator.min.css +1 -1
  39. data/assets/themes/j1/modules/translator/js/translator.js +19 -7
  40. data/lib/j1/version.rb +1 -1
  41. data/lib/starter_web/Gemfile +2 -2
  42. data/lib/starter_web/README.md +5 -5
  43. data/lib/starter_web/_config.yml +4 -2
  44. data/lib/starter_web/_data/modules/defaults/cookies.yml +1 -1
  45. data/lib/starter_web/_data/modules/navigator_menu.yml +3 -0
  46. data/lib/starter_web/_data/resources.yml +26 -0
  47. data/lib/starter_web/_data/templates/feed.xml +1 -1
  48. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  49. data/lib/starter_web/package.json +2 -2
  50. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +0 -1
  51. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +1 -1
  52. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  53. data/lib/starter_web/utilsrv/package.json +1 -1
  54. metadata +14 -2
@@ -0,0 +1,2295 @@
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+ Version: 1.8.1
9
+ Author: Ken Wheeler
10
+ Website: http://kenwheeler.github.io
11
+ Docs: http://kenwheeler.github.io/slick
12
+ Repo: http://github.com/kenwheeler/slick
13
+ Issues: http://github.com/kenwheeler/slick/issues
14
+ */
15
+ /* global window, document, define, jQuery, setInterval, clearInterval */
16
+ ;
17
+ (function (factory) {
18
+ 'use strict';
19
+ if (typeof define === 'function' && define.amd) {
20
+ define(['jquery'], factory);
21
+ } else if (typeof exports !== 'undefined') {
22
+ module.exports = factory(require('jquery'));
23
+ } else {
24
+ factory(jQuery);
25
+ }
26
+ }(function ($) {
27
+ 'use strict';
28
+ var Slick = window.Slick || {};
29
+ Slick = (function () {
30
+ var instanceUid = 0;
31
+
32
+ function Slick(element, settings) {
33
+ var _ = this,
34
+ dataSettings;
35
+ _.defaults = {
36
+ accessibility: true,
37
+ adaptiveHeight: false,
38
+ appendArrows: $(element),
39
+ appendDots: $(element),
40
+ arrows: true,
41
+ asNavFor: null,
42
+ prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
43
+ nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
44
+ autoplay: false,
45
+ autoplaySpeed: 3000,
46
+ centerMode: false,
47
+ centerPadding: '50px',
48
+ cssEase: 'ease',
49
+ customPaging: function (slider, i) {
50
+ return $('<button type="button" />').text(i + 1);
51
+ },
52
+
53
+ dots: false,
54
+ dotsClass: 'slick-dots',
55
+ draggable: true,
56
+ easing: 'linear',
57
+ edgeFriction: 0.35,
58
+ fade: false,
59
+ focusOnSelect: false,
60
+ focusOnChange: false,
61
+ infinite: true,
62
+ initialSlide: 0,
63
+ lazyLoad: 'ondemand',
64
+ mobileFirst: false,
65
+ pauseOnHover: true,
66
+ pauseOnFocus: true,
67
+ pauseOnDotsHover: false,
68
+ respondTo: 'window',
69
+ responsive: null,
70
+ rows: 1,
71
+ rtl: false,
72
+ slide: '',
73
+ slidesPerRow: 1,
74
+ slidesToShow: 1,
75
+ slidesToScroll: 1,
76
+ speed: 500,
77
+ swipe: true,
78
+ swipeToSlide: false,
79
+ touchMove: true,
80
+ touchThreshold: 5,
81
+ useCSS: true,
82
+ useTransform: true,
83
+ variableWidth: false,
84
+ vertical: false,
85
+ verticalSwiping: false,
86
+ waitForAnimate: true,
87
+ zIndex: 1000
88
+ };
89
+
90
+ _.initials = {
91
+ animating: false,
92
+ dragging: false,
93
+ autoPlayTimer: null,
94
+ currentDirection: 0,
95
+ currentLeft: null,
96
+ currentSlide: 0,
97
+ direction: 1,
98
+ $dots: null,
99
+ listWidth: null,
100
+ listHeight: null,
101
+ loadIndex: 0,
102
+ $nextArrow: null,
103
+ $prevArrow: null,
104
+ scrolling: false,
105
+ slideCount: null,
106
+ slideWidth: null,
107
+ $slideTrack: null,
108
+ $slides: null,
109
+ sliding: false,
110
+ slideOffset: 0,
111
+ swipeLeft: null,
112
+ swiping: false,
113
+ $list: null,
114
+ touchObject: {},
115
+ transformsEnabled: false,
116
+ unslicked: false
117
+ };
118
+
119
+ $.extend(_, _.initials);
120
+ _.activeBreakpoint = null;
121
+ _.animType = null;
122
+ _.animProp = null;
123
+ _.breakpoints = [];
124
+ _.breakpointSettings = [];
125
+ _.cssTransitions = false;
126
+ _.focussed = false;
127
+ _.interrupted = false;
128
+ _.hidden = 'hidden';
129
+ _.paused = true;
130
+ _.positionProp = null;
131
+ _.respondTo = null;
132
+ _.rowCount = 1;
133
+ _.shouldClick = true;
134
+ _.$slider = $(element);
135
+ _.$slidesCache = null;
136
+ _.transformType = null;
137
+ _.transitionType = null;
138
+ _.visibilityChange = 'visibilitychange';
139
+ _.windowWidth = 0;
140
+ _.windowTimer = null;
141
+ dataSettings = $(element).data('slick') || {};
142
+ _.options = $.extend({}, _.defaults, settings, dataSettings);
143
+ _.currentSlide = _.options.initialSlide;
144
+ _.originalSettings = _.options;
145
+ if (typeof document.mozHidden !== 'undefined') {
146
+ _.hidden = 'mozHidden';
147
+ _.visibilityChange = 'mozvisibilitychange';
148
+ } else if (typeof document.webkitHidden !== 'undefined') {
149
+ _.hidden = 'webkitHidden';
150
+ _.visibilityChange = 'webkitvisibilitychange';
151
+ }
152
+ _.autoPlay = $.proxy(_.autoPlay, _);
153
+ _.autoPlayClear = $.proxy(_.autoPlayClear, _);
154
+ _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
155
+ _.changeSlide = $.proxy(_.changeSlide, _);
156
+ _.clickHandler = $.proxy(_.clickHandler, _);
157
+ _.selectHandler = $.proxy(_.selectHandler, _);
158
+ _.setPosition = $.proxy(_.setPosition, _);
159
+ _.swipeHandler = $.proxy(_.swipeHandler, _);
160
+ _.dragHandler = $.proxy(_.dragHandler, _);
161
+ _.keyHandler = $.proxy(_.keyHandler, _);
162
+ _.instanceUid = instanceUid++;
163
+ // A simple way to check for HTML strings
164
+ // Strict HTML recognition (must start with <)
165
+ // Extracted from jQuery v1.11 source
166
+ _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
167
+ _.registerBreakpoints();
168
+ _.init(true);
169
+ }
170
+ return Slick;
171
+ }());
172
+
173
+ Slick.prototype.activateADA = function () {
174
+ var _ = this;
175
+ _.$slideTrack.find('.slick-active').attr({
176
+ 'aria-hidden': 'false'
177
+ }).find('a, input, button, select').attr({
178
+ 'tabindex': '0'
179
+ });
180
+ };
181
+
182
+ Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) {
183
+ var _ = this;
184
+ if (typeof (index) === 'boolean') {
185
+ addBefore = index;
186
+ index = null;
187
+ } else if (index < 0 || (index >= _.slideCount)) {
188
+ return false;
189
+ }
190
+ _.unload();
191
+ if (typeof (index) === 'number') {
192
+ if (index === 0 && _.$slides.length === 0) {
193
+ $(markup).appendTo(_.$slideTrack);
194
+ } else if (addBefore) {
195
+ $(markup).insertBefore(_.$slides.eq(index));
196
+ } else {
197
+ $(markup).insertAfter(_.$slides.eq(index));
198
+ }
199
+ } else {
200
+ if (addBefore === true) {
201
+ $(markup).prependTo(_.$slideTrack);
202
+ } else {
203
+ $(markup).appendTo(_.$slideTrack);
204
+ }
205
+ }
206
+ _.$slides = _.$slideTrack.children(this.options.slide);
207
+ _.$slideTrack.children(this.options.slide).detach();
208
+ _.$slideTrack.append(_.$slides);
209
+ _.$slides.each(function (index, element) {
210
+ $(element).attr('data-slick-index', index);
211
+ });
212
+ _.$slidesCache = _.$slides;
213
+ _.reinit();
214
+ };
215
+
216
+ Slick.prototype.animateHeight = function () {
217
+ var _ = this;
218
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
219
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
220
+ _.$list.animate({
221
+ height: targetHeight
222
+ }, _.options.speed);
223
+ }
224
+ };
225
+
226
+ Slick.prototype.animateSlide = function (targetLeft, callback) {
227
+ var animProps = {},
228
+ _ = this;
229
+ _.animateHeight();
230
+ if (_.options.rtl === true && _.options.vertical === false) {
231
+ targetLeft = -targetLeft;
232
+ }
233
+ if (_.transformsEnabled === false) {
234
+ if (_.options.vertical === false) {
235
+ _.$slideTrack.animate({
236
+ left: targetLeft
237
+ }, _.options.speed, _.options.easing, callback);
238
+ } else {
239
+ _.$slideTrack.animate({
240
+ top: targetLeft
241
+ }, _.options.speed, _.options.easing, callback);
242
+ }
243
+ } else {
244
+ if (_.cssTransitions === false) {
245
+ if (_.options.rtl === true) {
246
+ _.currentLeft = -(_.currentLeft);
247
+ }
248
+ $({
249
+ animStart: _.currentLeft
250
+ }).animate({
251
+ animStart: targetLeft
252
+ }, {
253
+ duration: _.options.speed,
254
+ easing: _.options.easing,
255
+ step: function (now) {
256
+ now = Math.ceil(now);
257
+ if (_.options.vertical === false) {
258
+ animProps[_.animType] = 'translate(' +
259
+ now + 'px, 0px)';
260
+ _.$slideTrack.css(animProps);
261
+ } else {
262
+ animProps[_.animType] = 'translate(0px,' +
263
+ now + 'px)';
264
+ _.$slideTrack.css(animProps);
265
+ }
266
+ },
267
+ complete: function () {
268
+ if (callback) {
269
+ callback.call();
270
+ }
271
+ }
272
+ });
273
+ } else {
274
+ _.applyTransition();
275
+ targetLeft = Math.ceil(targetLeft);
276
+ if (_.options.vertical === false) {
277
+ animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
278
+ } else {
279
+ animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
280
+ }
281
+ _.$slideTrack.css(animProps);
282
+ if (callback) {
283
+ setTimeout(function () {
284
+ _.disableTransition();
285
+ callback.call();
286
+ }, _.options.speed);
287
+ }
288
+ }
289
+ }
290
+ };
291
+
292
+ Slick.prototype.getNavTarget = function () {
293
+ var _ = this,
294
+ asNavFor = _.options.asNavFor;
295
+ if (asNavFor && asNavFor !== null) {
296
+ asNavFor = $(asNavFor).not(_.$slider);
297
+ }
298
+ return asNavFor;
299
+ };
300
+
301
+ Slick.prototype.asNavFor = function (index) {
302
+ var _ = this,
303
+ asNavFor = _.getNavTarget();
304
+ if (asNavFor !== null && typeof asNavFor === 'object') {
305
+ asNavFor.each(function () {
306
+ var target = $(this).slick('getSlick');
307
+ if (!target.unslicked) {
308
+ target.slideHandler(index, true);
309
+ }
310
+ });
311
+ }
312
+ };
313
+
314
+ Slick.prototype.applyTransition = function (slide) {
315
+ var _ = this,
316
+ transition = {};
317
+ if (_.options.fade === false) {
318
+ transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
319
+ } else {
320
+ transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
321
+ }
322
+ if (_.options.fade === false) {
323
+ _.$slideTrack.css(transition);
324
+ } else {
325
+ _.$slides.eq(slide).css(transition);
326
+ }
327
+ };
328
+
329
+ Slick.prototype.autoPlay = function () {
330
+ var _ = this;
331
+ _.autoPlayClear();
332
+ if (_.slideCount > _.options.slidesToShow) {
333
+ _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed);
334
+ }
335
+ };
336
+
337
+ Slick.prototype.autoPlayClear = function () {
338
+ var _ = this;
339
+ if (_.autoPlayTimer) {
340
+ clearInterval(_.autoPlayTimer);
341
+ }
342
+ };
343
+
344
+ Slick.prototype.autoPlayIterator = function () {
345
+ var _ = this,
346
+ slideTo = _.currentSlide + _.options.slidesToScroll;
347
+ if (!_.paused && !_.interrupted && !_.focussed) {
348
+ if (_.options.infinite === false) {
349
+ if (_.direction === 1 && (_.currentSlide + 1) === (_.slideCount - 1)) {
350
+ _.direction = 0;
351
+ } else if (_.direction === 0) {
352
+ slideTo = _.currentSlide - _.options.slidesToScroll;
353
+ if (_.currentSlide - 1 === 0) {
354
+ _.direction = 1;
355
+ }
356
+ }
357
+ }
358
+ _.slideHandler(slideTo);
359
+ }
360
+ };
361
+
362
+ Slick.prototype.buildArrows = function () {
363
+ var _ = this;
364
+ if (_.options.arrows === true) {
365
+ _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
366
+ _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
367
+ if (_.slideCount > _.options.slidesToShow) {
368
+ _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
369
+ _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
370
+ if (_.htmlExpr.test(_.options.prevArrow)) {
371
+ _.$prevArrow.prependTo(_.options.appendArrows);
372
+ }
373
+ if (_.htmlExpr.test(_.options.nextArrow)) {
374
+ _.$nextArrow.appendTo(_.options.appendArrows);
375
+ }
376
+ if (_.options.infinite !== true) {
377
+ _.$prevArrow
378
+ .addClass('slick-disabled')
379
+ .attr('aria-disabled', 'true');
380
+ }
381
+ } else {
382
+ _.$prevArrow.add(_.$nextArrow)
383
+ .addClass('slick-hidden')
384
+ .attr({
385
+ 'aria-disabled': 'true',
386
+ 'tabindex': '-1'
387
+ });
388
+ }
389
+ }
390
+ };
391
+
392
+ Slick.prototype.buildDots = function () {
393
+ var _ = this,
394
+ i, dot;
395
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
396
+ _.$slider.addClass('slick-dotted');
397
+ dot = $('<ul />').addClass(_.options.dotsClass);
398
+ for (i = 0; i <= _.getDotCount(); i += 1) {
399
+ dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
400
+ }
401
+ _.$dots = dot.appendTo(_.options.appendDots);
402
+ _.$dots.find('li').first().addClass('slick-active');
403
+ }
404
+ };
405
+
406
+ Slick.prototype.buildOut = function () {
407
+ var _ = this;
408
+ _.$slides =
409
+ _.$slider
410
+ .children(_.options.slide + ':not(.slick-cloned)')
411
+ .addClass('slick-slide');
412
+ _.slideCount = _.$slides.length;
413
+ _.$slides.each(function (index, element) {
414
+ $(element)
415
+ .attr('data-slick-index', index)
416
+ .data('originalStyling', $(element).attr('style') || '');
417
+ });
418
+ _.$slider.addClass('slick-slider');
419
+ _.$slideTrack = (_.slideCount === 0) ?
420
+ $('<div class="slick-track"/>').appendTo(_.$slider) :
421
+ _.$slides.wrapAll('<div class="slick-track"/>').parent();
422
+ _.$list = _.$slideTrack.wrap(
423
+ '<div class="slick-list"/>').parent();
424
+ _.$slideTrack.css('opacity', 0);
425
+ if (_.options.centerMode === true || _.options.swipeToSlide === true) {
426
+ _.options.slidesToScroll = 1;
427
+ }
428
+ $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
429
+ _.setupInfinite();
430
+ _.buildArrows();
431
+ _.buildDots();
432
+ _.updateDots();
433
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
434
+ if (_.options.draggable === true) {
435
+ _.$list.addClass('draggable');
436
+ }
437
+ };
438
+
439
+ Slick.prototype.buildRows = function () {
440
+ var _ = this,
441
+ a, b, c, newSlides, numOfSlides, originalSlides, slidesPerSection;
442
+ newSlides = document.createDocumentFragment();
443
+ originalSlides = _.$slider.children();
444
+ if (_.options.rows > 0) {
445
+ slidesPerSection = _.options.slidesPerRow * _.options.rows;
446
+ numOfSlides = Math.ceil(
447
+ originalSlides.length / slidesPerSection
448
+ );
449
+ for (a = 0; a < numOfSlides; a++) {
450
+ var slide = document.createElement('div');
451
+ for (b = 0; b < _.options.rows; b++) {
452
+ var row = document.createElement('div');
453
+ for (c = 0; c < _.options.slidesPerRow; c++) {
454
+ var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
455
+ if (originalSlides.get(target)) {
456
+ row.appendChild(originalSlides.get(target));
457
+ }
458
+ }
459
+ slide.appendChild(row);
460
+ }
461
+ newSlides.appendChild(slide);
462
+ }
463
+ _.$slider.empty().append(newSlides);
464
+ _.$slider.children().children().children()
465
+ .css({
466
+ 'width': (100 / _.options.slidesPerRow) + '%',
467
+ 'display': 'inline-block'
468
+ });
469
+ }
470
+ };
471
+
472
+ Slick.prototype.checkResponsive = function (initial, forceUpdate) {
473
+ var _ = this,
474
+ breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
475
+ var sliderWidth = _.$slider.width();
476
+ var windowWidth = window.innerWidth || $(window).width();
477
+ if (_.respondTo === 'window') {
478
+ respondToWidth = windowWidth;
479
+ } else if (_.respondTo === 'slider') {
480
+ respondToWidth = sliderWidth;
481
+ } else if (_.respondTo === 'min') {
482
+ respondToWidth = Math.min(windowWidth, sliderWidth);
483
+ }
484
+ if (_.options.responsive &&
485
+ _.options.responsive.length &&
486
+ _.options.responsive !== null) {
487
+ targetBreakpoint = null;
488
+ for (breakpoint in _.breakpoints) {
489
+ if (_.breakpoints.hasOwnProperty(breakpoint)) {
490
+ if (_.originalSettings.mobileFirst === false) {
491
+ if (respondToWidth < _.breakpoints[breakpoint]) {
492
+ targetBreakpoint = _.breakpoints[breakpoint];
493
+ }
494
+ } else {
495
+ if (respondToWidth > _.breakpoints[breakpoint]) {
496
+ targetBreakpoint = _.breakpoints[breakpoint];
497
+ }
498
+ }
499
+ }
500
+ }
501
+ if (targetBreakpoint !== null) {
502
+ if (_.activeBreakpoint !== null) {
503
+ if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
504
+ _.activeBreakpoint =
505
+ targetBreakpoint;
506
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
507
+ _.unslick(targetBreakpoint);
508
+ } else {
509
+ _.options = $.extend({}, _.originalSettings,
510
+ _.breakpointSettings[
511
+ targetBreakpoint]);
512
+ if (initial === true) {
513
+ _.currentSlide = _.options.initialSlide;
514
+ }
515
+ _.refresh(initial);
516
+ }
517
+ triggerBreakpoint = targetBreakpoint;
518
+ }
519
+ } else {
520
+ _.activeBreakpoint = targetBreakpoint;
521
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
522
+ _.unslick(targetBreakpoint);
523
+ } else {
524
+ _.options = $.extend({}, _.originalSettings,
525
+ _.breakpointSettings[
526
+ targetBreakpoint]);
527
+ if (initial === true) {
528
+ _.currentSlide = _.options.initialSlide;
529
+ }
530
+ _.refresh(initial);
531
+ }
532
+ triggerBreakpoint = targetBreakpoint;
533
+ }
534
+ } else {
535
+ if (_.activeBreakpoint !== null) {
536
+ _.activeBreakpoint = null;
537
+ _.options = _.originalSettings;
538
+ if (initial === true) {
539
+ _.currentSlide = _.options.initialSlide;
540
+ }
541
+ _.refresh(initial);
542
+ triggerBreakpoint = targetBreakpoint;
543
+ }
544
+ }
545
+ // only trigger breakpoints during an actual break. not on initialize.
546
+ if (!initial && triggerBreakpoint !== false) {
547
+ _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
548
+ }
549
+ }
550
+ };
551
+
552
+ Slick.prototype.changeSlide = function (event, dontAnimate) {
553
+ var _ = this,
554
+ $target = $(event.currentTarget),
555
+ indexOffset, slideOffset, unevenOffset;
556
+ // If target is a link, prevent default action.
557
+ if ($target.is('a')) {
558
+ event.preventDefault();
559
+ }
560
+ // If target is not the <li> element (ie: a child), find the <li>.
561
+ if (!$target.is('li')) {
562
+ $target = $target.closest('li');
563
+ }
564
+ unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
565
+ indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
566
+ switch (event.data.message) {
567
+ case 'previous':
568
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
569
+ if (_.slideCount > _.options.slidesToShow) {
570
+ _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
571
+ }
572
+ break;
573
+ case 'next':
574
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
575
+ if (_.slideCount > _.options.slidesToShow) {
576
+ _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
577
+ }
578
+ break;
579
+ case 'index':
580
+ var index = event.data.index === 0 ? 0 :
581
+ event.data.index || $target.index() * _.options.slidesToScroll;
582
+ _.slideHandler(_.checkNavigable(index), false, dontAnimate);
583
+ $target.children().trigger('focus');
584
+ break;
585
+ default:
586
+ return;
587
+ }
588
+ };
589
+
590
+ Slick.prototype.checkNavigable = function (index) {
591
+ var _ = this,
592
+ navigables, prevNavigable;
593
+ navigables = _.getNavigableIndexes();
594
+ prevNavigable = 0;
595
+ if (index > navigables[navigables.length - 1]) {
596
+ index = navigables[navigables.length - 1];
597
+ } else {
598
+ for (var n in navigables) {
599
+ if (index < navigables[n]) {
600
+ index = prevNavigable;
601
+ break;
602
+ }
603
+ prevNavigable = navigables[n];
604
+ }
605
+ }
606
+ return index;
607
+ };
608
+
609
+ Slick.prototype.cleanUpEvents = function () {
610
+ var _ = this;
611
+ if (_.options.dots && _.$dots !== null) {
612
+ $('li', _.$dots)
613
+ .off('click.slick', _.changeSlide)
614
+ .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
615
+ .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
616
+ if (_.options.accessibility === true) {
617
+ _.$dots.off('keydown.slick', _.keyHandler);
618
+ }
619
+ }
620
+ _.$slider.off('focus.slick blur.slick');
621
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
622
+ _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
623
+ _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
624
+ if (_.options.accessibility === true) {
625
+ _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
626
+ _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
627
+ }
628
+ }
629
+ _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
630
+ _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
631
+ _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
632
+ _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
633
+ _.$list.off('click.slick', _.clickHandler);
634
+ $(document).off(_.visibilityChange, _.visibility);
635
+ _.cleanUpSlideEvents();
636
+ if (_.options.accessibility === true) {
637
+ _.$list.off('keydown.slick', _.keyHandler);
638
+ }
639
+ if (_.options.focusOnSelect === true) {
640
+ $(_.$slideTrack).children().off('click.slick', _.selectHandler);
641
+ }
642
+ $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
643
+ $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
644
+ $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
645
+ $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
646
+ };
647
+
648
+ Slick.prototype.cleanUpSlideEvents = function () {
649
+ var _ = this;
650
+ _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
651
+ _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
652
+ };
653
+
654
+ Slick.prototype.cleanUpRows = function () {
655
+ var _ = this,
656
+ originalSlides;
657
+ if (_.options.rows > 0) {
658
+ originalSlides = _.$slides.children().children();
659
+ originalSlides.removeAttr('style');
660
+ _.$slider.empty().append(originalSlides);
661
+ }
662
+ };
663
+
664
+ Slick.prototype.clickHandler = function (event) {
665
+ var _ = this;
666
+ if (_.shouldClick === false) {
667
+ event.stopImmediatePropagation();
668
+ event.stopPropagation();
669
+ event.preventDefault();
670
+ }
671
+ };
672
+
673
+ Slick.prototype.destroy = function (refresh) {
674
+ var _ = this;
675
+ _.autoPlayClear();
676
+ _.touchObject = {};
677
+ _.cleanUpEvents();
678
+ $('.slick-cloned', _.$slider).detach();
679
+ if (_.$dots) {
680
+ _.$dots.remove();
681
+ }
682
+ if (_.$prevArrow && _.$prevArrow.length) {
683
+ _.$prevArrow
684
+ .removeClass('slick-disabled slick-arrow slick-hidden')
685
+ .removeAttr('aria-hidden aria-disabled tabindex')
686
+ .css('display', '');
687
+ if (_.htmlExpr.test(_.options.prevArrow)) {
688
+ _.$prevArrow.remove();
689
+ }
690
+ }
691
+ if (_.$nextArrow && _.$nextArrow.length) {
692
+ _.$nextArrow
693
+ .removeClass('slick-disabled slick-arrow slick-hidden')
694
+ .removeAttr('aria-hidden aria-disabled tabindex')
695
+ .css('display', '');
696
+ if (_.htmlExpr.test(_.options.nextArrow)) {
697
+ _.$nextArrow.remove();
698
+ }
699
+ }
700
+ if (_.$slides) {
701
+ _.$slides
702
+ .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
703
+ .removeAttr('aria-hidden')
704
+ .removeAttr('data-slick-index')
705
+ .each(function () {
706
+ $(this).attr('style', $(this).data('originalStyling'));
707
+ });
708
+ _.$slideTrack.children(this.options.slide).detach();
709
+ _.$slideTrack.detach();
710
+ _.$list.detach();
711
+ _.$slider.append(_.$slides);
712
+ }
713
+ _.cleanUpRows();
714
+ _.$slider.removeClass('slick-slider');
715
+ _.$slider.removeClass('slick-initialized');
716
+ _.$slider.removeClass('slick-dotted');
717
+ _.unslicked = true;
718
+ if (!refresh) {
719
+ _.$slider.trigger('destroy', [_]);
720
+ }
721
+ };
722
+
723
+ Slick.prototype.disableTransition = function (slide) {
724
+ var _ = this,
725
+ transition = {};
726
+ transition[_.transitionType] = '';
727
+ if (_.options.fade === false) {
728
+ _.$slideTrack.css(transition);
729
+ } else {
730
+ _.$slides.eq(slide).css(transition);
731
+ }
732
+ };
733
+
734
+ Slick.prototype.fadeSlide = function (slideIndex, callback) {
735
+ var _ = this;
736
+ if (_.cssTransitions === false) {
737
+ _.$slides.eq(slideIndex).css({
738
+ zIndex: _.options.zIndex
739
+ });
740
+ _.$slides.eq(slideIndex).animate({
741
+ opacity: 1
742
+ }, _.options.speed, _.options.easing, callback);
743
+ } else {
744
+ _.applyTransition(slideIndex);
745
+ _.$slides.eq(slideIndex).css({
746
+ opacity: 1,
747
+ zIndex: _.options.zIndex
748
+ });
749
+ if (callback) {
750
+ setTimeout(function () {
751
+ _.disableTransition(slideIndex);
752
+ callback.call();
753
+ }, _.options.speed);
754
+ }
755
+ }
756
+ };
757
+
758
+ Slick.prototype.fadeSlideOut = function (slideIndex) {
759
+ var _ = this;
760
+ if (_.cssTransitions === false) {
761
+ _.$slides.eq(slideIndex).animate({
762
+ opacity: 0,
763
+ zIndex: _.options.zIndex - 2
764
+ }, _.options.speed, _.options.easing);
765
+ } else {
766
+ _.applyTransition(slideIndex);
767
+ _.$slides.eq(slideIndex).css({
768
+ opacity: 0,
769
+ zIndex: _.options.zIndex - 2
770
+ });
771
+ }
772
+ };
773
+
774
+ Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {
775
+ var _ = this;
776
+ if (filter !== null) {
777
+ _.$slidesCache = _.$slides;
778
+ _.unload();
779
+ _.$slideTrack.children(this.options.slide).detach();
780
+ _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
781
+ _.reinit();
782
+ }
783
+ };
784
+
785
+ Slick.prototype.focusHandler = function () {
786
+ var _ = this;
787
+ // If any child element receives focus within the slider we need to pause the autoplay
788
+ _.$slider
789
+ .off('focus.slick blur.slick')
790
+ .on(
791
+ 'focus.slick',
792
+ '*',
793
+ function (event) {
794
+ var $sf = $(this);
795
+ setTimeout(function () {
796
+ if (_.options.pauseOnFocus) {
797
+ if ($sf.is(':focus')) {
798
+ _.focussed = true;
799
+ _.autoPlay();
800
+ }
801
+ }
802
+ }, 0);
803
+ }
804
+ ).on(
805
+ 'blur.slick',
806
+ '*',
807
+ function (event) {
808
+ var $sf = $(this);
809
+ // When a blur occurs on any elements within the slider we become unfocused
810
+ if (_.options.pauseOnFocus) {
811
+ _.focussed = false;
812
+ _.autoPlay();
813
+ }
814
+ }
815
+ );
816
+ };
817
+
818
+ Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {
819
+ var _ = this;
820
+ return _.currentSlide;
821
+ };
822
+
823
+ Slick.prototype.getDotCount = function () {
824
+ var _ = this;
825
+ var breakPoint = 0;
826
+ var counter = 0;
827
+ var pagerQty = 0;
828
+ if (_.options.infinite === true) {
829
+ if (_.slideCount <= _.options.slidesToShow) {
830
+ ++pagerQty;
831
+ } else {
832
+ while (breakPoint < _.slideCount) {
833
+ ++pagerQty;
834
+ breakPoint = counter + _.options.slidesToScroll;
835
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
836
+ }
837
+ }
838
+ } else if (_.options.centerMode === true) {
839
+ pagerQty = _.slideCount;
840
+ } else if (!_.options.asNavFor) {
841
+ pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
842
+ } else {
843
+ while (breakPoint < _.slideCount) {
844
+ ++pagerQty;
845
+ breakPoint = counter + _.options.slidesToScroll;
846
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
847
+ }
848
+ }
849
+ return pagerQty - 1;
850
+ };
851
+
852
+ Slick.prototype.getLeft = function (slideIndex) {
853
+ var _ = this,
854
+ targetLeft,
855
+ verticalHeight,
856
+ verticalOffset = 0,
857
+ targetSlide,
858
+ coef;
859
+ _.slideOffset = 0;
860
+ verticalHeight = _.$slides.first().outerHeight(true);
861
+ if (_.options.infinite === true) {
862
+ if (_.slideCount > _.options.slidesToShow) {
863
+ _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
864
+ coef = -1
865
+ if (_.options.vertical === true && _.options.centerMode === true) {
866
+ if (_.options.slidesToShow === 2) {
867
+ coef = -1.5;
868
+ } else if (_.options.slidesToShow === 1) {
869
+ coef = -2
870
+ }
871
+ }
872
+ verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
873
+ }
874
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
875
+ if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
876
+ if (slideIndex > _.slideCount) {
877
+ _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
878
+ verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
879
+ } else {
880
+ _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
881
+ verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
882
+ }
883
+ }
884
+ }
885
+ } else {
886
+ if (slideIndex + _.options.slidesToShow > _.slideCount) {
887
+ _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
888
+ verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
889
+ }
890
+ }
891
+ if (_.slideCount <= _.options.slidesToShow) {
892
+ _.slideOffset = 0;
893
+ verticalOffset = 0;
894
+ }
895
+ if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
896
+ _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
897
+ } else if (_.options.centerMode === true && _.options.infinite === true) {
898
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
899
+ } else if (_.options.centerMode === true) {
900
+ _.slideOffset = 0;
901
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
902
+ }
903
+ if (_.options.vertical === false) {
904
+ targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
905
+ } else {
906
+ targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
907
+ }
908
+ if (_.options.variableWidth === true) {
909
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
910
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
911
+ } else {
912
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
913
+ }
914
+ if (_.options.rtl === true) {
915
+ if (targetSlide[0]) {
916
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
917
+ } else {
918
+ targetLeft = 0;
919
+ }
920
+ } else {
921
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
922
+ }
923
+ if (_.options.centerMode === true) {
924
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
925
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
926
+ } else {
927
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
928
+ }
929
+ if (_.options.rtl === true) {
930
+ if (targetSlide[0]) {
931
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
932
+ } else {
933
+ targetLeft = 0;
934
+ }
935
+ } else {
936
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
937
+ }
938
+ targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
939
+ }
940
+ }
941
+ return targetLeft;
942
+ };
943
+
944
+ Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {
945
+ var _ = this;
946
+ return _.options[option];
947
+ };
948
+
949
+ Slick.prototype.getNavigableIndexes = function () {
950
+ var _ = this,
951
+ breakPoint = 0,
952
+ counter = 0,
953
+ indexes = [],
954
+ max;
955
+ if (_.options.infinite === false) {
956
+ max = _.slideCount;
957
+ } else {
958
+ breakPoint = _.options.slidesToScroll * -1;
959
+ counter = _.options.slidesToScroll * -1;
960
+ max = _.slideCount * 2;
961
+ }
962
+ while (breakPoint < max) {
963
+ indexes.push(breakPoint);
964
+ breakPoint = counter + _.options.slidesToScroll;
965
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
966
+ }
967
+ return indexes;
968
+ };
969
+
970
+ Slick.prototype.getSlick = function () {
971
+ return this;
972
+ };
973
+
974
+ Slick.prototype.getSlideCount = function () {
975
+ var _ = this,
976
+ slidesTraversed, swipedSlide, swipeTarget, centerOffset;
977
+ centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0;
978
+ swipeTarget = (_.swipeLeft * -1) + centerOffset;
979
+ if (_.options.swipeToSlide === true) {
980
+ _.$slideTrack.find('.slick-slide').each(function (index, slide) {
981
+ var slideOuterWidth, slideOffset, slideRightBoundary;
982
+ slideOuterWidth = $(slide).outerWidth();
983
+ slideOffset = slide.offsetLeft;
984
+ if (_.options.centerMode !== true) {
985
+ slideOffset += (slideOuterWidth / 2);
986
+ }
987
+ slideRightBoundary = slideOffset + (slideOuterWidth);
988
+ if (swipeTarget < slideRightBoundary) {
989
+ swipedSlide = slide;
990
+ return false;
991
+ }
992
+ });
993
+ slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
994
+ return slidesTraversed;
995
+ } else {
996
+ return _.options.slidesToScroll;
997
+ }
998
+ };
999
+
1000
+ Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {
1001
+ var _ = this;
1002
+ _.changeSlide({
1003
+ data: {
1004
+ message: 'index',
1005
+ index: parseInt(slide)
1006
+ }
1007
+ }, dontAnimate);
1008
+ };
1009
+
1010
+ Slick.prototype.init = function (creation) {
1011
+ var _ = this;
1012
+ if (!$(_.$slider).hasClass('slick-initialized')) {
1013
+ $(_.$slider).addClass('slick-initialized');
1014
+ _.buildRows();
1015
+ _.buildOut();
1016
+ _.setProps();
1017
+ _.startLoad();
1018
+ _.loadSlider();
1019
+ _.initializeEvents();
1020
+ _.updateArrows();
1021
+ _.updateDots();
1022
+ _.checkResponsive(true);
1023
+ _.focusHandler();
1024
+ }
1025
+ if (creation) {
1026
+ _.$slider.trigger('init', [_]);
1027
+ }
1028
+ if (_.options.accessibility === true) {
1029
+ _.initADA();
1030
+ }
1031
+ if (_.options.autoplay) {
1032
+ _.paused = false;
1033
+ _.autoPlay();
1034
+ }
1035
+ };
1036
+
1037
+ Slick.prototype.initADA = function () {
1038
+ var _ = this,
1039
+ numDotGroups = Math.ceil(_.slideCount / _.options.slidesToScroll),
1040
+ tabControlIndexes = _.getNavigableIndexes().filter(function (val) {
1041
+ return (val >= 0) && (val < _.slideCount);
1042
+ });
1043
+ _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1044
+ 'aria-hidden': 'true',
1045
+ 'tabindex': '-1'
1046
+ }).find('a, input, button, select').attr({
1047
+ 'tabindex': '-1'
1048
+ });
1049
+ if (_.$dots !== null) {
1050
+ _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {
1051
+ var slideControlIndex = tabControlIndexes.indexOf(i);
1052
+ $(this).attr({
1053
+ 'role': 'tabpanel',
1054
+ 'id': 'slick-slide' + _.instanceUid + i,
1055
+ 'tabindex': -1
1056
+ });
1057
+ if (slideControlIndex !== -1) {
1058
+ var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
1059
+ if ($('#' + ariaButtonControl).length) {
1060
+ $(this).attr({
1061
+ 'aria-describedby': ariaButtonControl
1062
+ });
1063
+ }
1064
+ }
1065
+ });
1066
+ _.$dots.attr('role', 'tablist').find('li').each(function (i) {
1067
+ var mappedSlideIndex = tabControlIndexes[i];
1068
+ $(this).attr({
1069
+ 'role': 'presentation'
1070
+ });
1071
+ $(this).find('button').first().attr({
1072
+ 'role': 'tab',
1073
+ 'id': 'slick-slide-control' + _.instanceUid + i,
1074
+ 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
1075
+ 'aria-label': (i + 1) + ' of ' + numDotGroups,
1076
+ 'aria-selected': null,
1077
+ 'tabindex': '-1'
1078
+ });
1079
+ }).eq(_.currentSlide).find('button').attr({
1080
+ 'aria-selected': 'true',
1081
+ 'tabindex': '0'
1082
+ }).end();
1083
+ }
1084
+ for (var i = _.currentSlide, max = i + _.options.slidesToShow; i < max; i++) {
1085
+ if (_.options.focusOnChange) {
1086
+ _.$slides.eq(i).attr({
1087
+ 'tabindex': '0'
1088
+ });
1089
+ } else {
1090
+ _.$slides.eq(i).removeAttr('tabindex');
1091
+ }
1092
+ }
1093
+ _.activateADA();
1094
+ };
1095
+
1096
+ Slick.prototype.initArrowEvents = function () {
1097
+ var _ = this;
1098
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1099
+ _.$prevArrow
1100
+ .off('click.slick')
1101
+ .on('click.slick', {
1102
+ message: 'previous'
1103
+ }, _.changeSlide);
1104
+ _.$nextArrow
1105
+ .off('click.slick')
1106
+ .on('click.slick', {
1107
+ message: 'next'
1108
+ }, _.changeSlide);
1109
+ if (_.options.accessibility === true) {
1110
+ _.$prevArrow.on('keydown.slick', _.keyHandler);
1111
+ _.$nextArrow.on('keydown.slick', _.keyHandler);
1112
+ }
1113
+ }
1114
+ };
1115
+
1116
+ Slick.prototype.initDotEvents = function () {
1117
+ var _ = this;
1118
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1119
+ $('li', _.$dots).on('click.slick', {
1120
+ message: 'index'
1121
+ }, _.changeSlide);
1122
+ if (_.options.accessibility === true) {
1123
+ _.$dots.on('keydown.slick', _.keyHandler);
1124
+ }
1125
+ }
1126
+ if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
1127
+ $('li', _.$dots)
1128
+ .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1129
+ .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1130
+ }
1131
+ };
1132
+
1133
+ Slick.prototype.initSlideEvents = function () {
1134
+ var _ = this;
1135
+ if (_.options.pauseOnHover) {
1136
+ _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1137
+ _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1138
+ }
1139
+ };
1140
+
1141
+ Slick.prototype.initializeEvents = function () {
1142
+ var _ = this;
1143
+ _.initArrowEvents();
1144
+ _.initDotEvents();
1145
+ _.initSlideEvents();
1146
+ _.$list.on('touchstart.slick mousedown.slick', {
1147
+ action: 'start'
1148
+ }, _.swipeHandler);
1149
+ _.$list.on('touchmove.slick mousemove.slick', {
1150
+ action: 'move'
1151
+ }, _.swipeHandler);
1152
+ _.$list.on('touchend.slick mouseup.slick', {
1153
+ action: 'end'
1154
+ }, _.swipeHandler);
1155
+ _.$list.on('touchcancel.slick mouseleave.slick', {
1156
+ action: 'end'
1157
+ }, _.swipeHandler);
1158
+ _.$list.on('click.slick', _.clickHandler);
1159
+ $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1160
+ if (_.options.accessibility === true) {
1161
+ _.$list.on('keydown.slick', _.keyHandler);
1162
+ }
1163
+ if (_.options.focusOnSelect === true) {
1164
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1165
+ }
1166
+ $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1167
+ $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1168
+ $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1169
+ $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1170
+ $(_.setPosition);
1171
+ };
1172
+
1173
+ Slick.prototype.initUI = function () {
1174
+ var _ = this;
1175
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1176
+ _.$prevArrow.show();
1177
+ _.$nextArrow.show();
1178
+ }
1179
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1180
+ _.$dots.show();
1181
+ }
1182
+ };
1183
+
1184
+ Slick.prototype.keyHandler = function (event) {
1185
+ var _ = this;
1186
+ //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1187
+ if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1188
+ if (event.keyCode === 37 && _.options.accessibility === true) {
1189
+ _.changeSlide({
1190
+ data: {
1191
+ message: _.options.rtl === true ? 'next' : 'previous'
1192
+ }
1193
+ });
1194
+ } else if (event.keyCode === 39 && _.options.accessibility === true) {
1195
+ _.changeSlide({
1196
+ data: {
1197
+ message: _.options.rtl === true ? 'previous' : 'next'
1198
+ }
1199
+ });
1200
+ }
1201
+ }
1202
+ };
1203
+
1204
+ Slick.prototype.lazyLoad = function () {
1205
+ var _ = this,
1206
+ loadRange, cloneRange, rangeStart, rangeEnd;
1207
+
1208
+ function loadImages(imagesScope) {
1209
+ $('img[data-lazy]', imagesScope).each(function () {
1210
+ var image = $(this),
1211
+ imageSource = $(this).attr('data-lazy'),
1212
+ imageSrcSet = $(this).attr('data-srcset'),
1213
+ imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
1214
+ imageToLoad = document.createElement('img');
1215
+ imageToLoad.onload = function () {
1216
+ image
1217
+ .animate({
1218
+ opacity: 0
1219
+ }, 100, function () {
1220
+ if (imageSrcSet) {
1221
+ image
1222
+ .attr('srcset', imageSrcSet);
1223
+ if (imageSizes) {
1224
+ image
1225
+ .attr('sizes', imageSizes);
1226
+ }
1227
+ }
1228
+ image
1229
+ .attr('src', imageSource)
1230
+ .animate({
1231
+ opacity: 1
1232
+ }, 200, function () {
1233
+ image
1234
+ .removeAttr('data-lazy data-srcset data-sizes')
1235
+ .removeClass('slick-loading');
1236
+ });
1237
+ _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1238
+ });
1239
+ };
1240
+ imageToLoad.onerror = function () {
1241
+ image
1242
+ .removeAttr('data-lazy')
1243
+ .removeClass('slick-loading')
1244
+ .addClass('slick-lazyload-error');
1245
+ _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
1246
+ };
1247
+ imageToLoad.src = imageSource;
1248
+ });
1249
+ }
1250
+ if (_.options.centerMode === true) {
1251
+ if (_.options.infinite === true) {
1252
+ rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1253
+ rangeEnd = rangeStart + _.options.slidesToShow + 2;
1254
+ } else {
1255
+ rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1256
+ rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1257
+ }
1258
+ } else {
1259
+ rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1260
+ rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1261
+ if (_.options.fade === true) {
1262
+ if (rangeStart > 0) rangeStart--;
1263
+ if (rangeEnd <= _.slideCount) rangeEnd++;
1264
+ }
1265
+ }
1266
+ loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1267
+ if (_.options.lazyLoad === 'anticipated') {
1268
+ var prevSlide = rangeStart - 1,
1269
+ nextSlide = rangeEnd,
1270
+ $slides = _.$slider.find('.slick-slide');
1271
+ for (var i = 0; i < _.options.slidesToScroll; i++) {
1272
+ if (prevSlide < 0) prevSlide = _.slideCount - 1;
1273
+ loadRange = loadRange.add($slides.eq(prevSlide));
1274
+ loadRange = loadRange.add($slides.eq(nextSlide));
1275
+ prevSlide--;
1276
+ nextSlide++;
1277
+ }
1278
+ }
1279
+ loadImages(loadRange);
1280
+ if (_.slideCount <= _.options.slidesToShow) {
1281
+ cloneRange = _.$slider.find('.slick-slide');
1282
+ loadImages(cloneRange);
1283
+ } else
1284
+ if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1285
+ cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1286
+ loadImages(cloneRange);
1287
+ } else if (_.currentSlide === 0) {
1288
+ cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1289
+ loadImages(cloneRange);
1290
+ }
1291
+ };
1292
+
1293
+ Slick.prototype.loadSlider = function () {
1294
+ var _ = this;
1295
+ _.setPosition();
1296
+ _.$slideTrack.css({
1297
+ opacity: 1
1298
+ });
1299
+ _.$slider.removeClass('slick-loading');
1300
+ _.initUI();
1301
+ if (_.options.lazyLoad === 'progressive') {
1302
+ _.progressiveLazyLoad();
1303
+ }
1304
+ };
1305
+
1306
+ Slick.prototype.next = Slick.prototype.slickNext = function () {
1307
+ var _ = this;
1308
+ _.changeSlide({
1309
+ data: {
1310
+ message: 'next'
1311
+ }
1312
+ });
1313
+ };
1314
+
1315
+ Slick.prototype.orientationChange = function () {
1316
+ var _ = this;
1317
+ _.checkResponsive();
1318
+ _.setPosition();
1319
+ };
1320
+
1321
+ Slick.prototype.pause = Slick.prototype.slickPause = function () {
1322
+ var _ = this;
1323
+ _.autoPlayClear();
1324
+ _.paused = true;
1325
+ };
1326
+
1327
+ Slick.prototype.play = Slick.prototype.slickPlay = function () {
1328
+ var _ = this;
1329
+ _.autoPlay();
1330
+ _.options.autoplay = true;
1331
+ _.paused = false;
1332
+ _.focussed = false;
1333
+ _.interrupted = false;
1334
+ };
1335
+
1336
+ Slick.prototype.postSlide = function (index) {
1337
+ var _ = this;
1338
+ if (!_.unslicked) {
1339
+ _.$slider.trigger('afterChange', [_, index]);
1340
+ _.animating = false;
1341
+ if (_.slideCount > _.options.slidesToShow) {
1342
+ _.setPosition();
1343
+ }
1344
+ _.swipeLeft = null;
1345
+ if (_.options.autoplay) {
1346
+ _.autoPlay();
1347
+ }
1348
+ if (_.options.accessibility === true) {
1349
+ _.initADA();
1350
+ if (_.options.focusOnChange) {
1351
+ var $currentSlide = $(_.$slides.get(_.currentSlide));
1352
+ $currentSlide.attr('tabindex', 0).focus();
1353
+ }
1354
+ }
1355
+ }
1356
+ };
1357
+
1358
+ Slick.prototype.prev = Slick.prototype.slickPrev = function () {
1359
+ var _ = this;
1360
+ _.changeSlide({
1361
+ data: {
1362
+ message: 'previous'
1363
+ }
1364
+ });
1365
+ };
1366
+
1367
+ Slick.prototype.preventDefault = function (event) {
1368
+ event.preventDefault();
1369
+ };
1370
+
1371
+ Slick.prototype.progressiveLazyLoad = function (tryCount) {
1372
+ tryCount = tryCount || 1;
1373
+ var _ = this,
1374
+ $imgsToLoad = $('img[data-lazy]', _.$slider),
1375
+ image,
1376
+ imageSource,
1377
+ imageSrcSet,
1378
+ imageSizes,
1379
+ imageToLoad;
1380
+ if ($imgsToLoad.length) {
1381
+ image = $imgsToLoad.first();
1382
+ imageSource = image.attr('data-lazy');
1383
+ imageSrcSet = image.attr('data-srcset');
1384
+ imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
1385
+ imageToLoad = document.createElement('img');
1386
+ imageToLoad.onload = function () {
1387
+ if (imageSrcSet) {
1388
+ image
1389
+ .attr('srcset', imageSrcSet);
1390
+ if (imageSizes) {
1391
+ image
1392
+ .attr('sizes', imageSizes);
1393
+ }
1394
+ }
1395
+ image
1396
+ .attr('src', imageSource)
1397
+ .removeAttr('data-lazy data-srcset data-sizes')
1398
+ .removeClass('slick-loading');
1399
+ if (_.options.adaptiveHeight === true) {
1400
+ _.setPosition();
1401
+ }
1402
+ _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1403
+ _.progressiveLazyLoad();
1404
+ };
1405
+ imageToLoad.onerror = function () {
1406
+ if (tryCount < 3) {
1407
+ /**
1408
+ * try to load the image 3 times,
1409
+ * leave a slight delay so we don't get
1410
+ * servers blocking the request.
1411
+ */
1412
+ setTimeout(function () {
1413
+ _.progressiveLazyLoad(tryCount + 1);
1414
+ }, 500);
1415
+ } else {
1416
+ image
1417
+ .removeAttr('data-lazy')
1418
+ .removeClass('slick-loading')
1419
+ .addClass('slick-lazyload-error');
1420
+ _.$slider.trigger('lazyLoadError', [_, image, imageSource]);
1421
+ _.progressiveLazyLoad();
1422
+ }
1423
+ };
1424
+ imageToLoad.src = imageSource;
1425
+ } else {
1426
+ _.$slider.trigger('allImagesLoaded', [_]);
1427
+ }
1428
+ };
1429
+
1430
+ Slick.prototype.refresh = function (initializing) {
1431
+ var _ = this,
1432
+ currentSlide, lastVisibleIndex;
1433
+ lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1434
+ // in non-infinite sliders, we don't want to go past the
1435
+ // last visible index.
1436
+ if (!_.options.infinite && (_.currentSlide > lastVisibleIndex)) {
1437
+ _.currentSlide = lastVisibleIndex;
1438
+ }
1439
+ // if less slides than to show, go to start.
1440
+ if (_.slideCount <= _.options.slidesToShow) {
1441
+ _.currentSlide = 0;
1442
+ }
1443
+ currentSlide = _.currentSlide;
1444
+ _.destroy(true);
1445
+ $.extend(_, _.initials, {
1446
+ currentSlide: currentSlide
1447
+ });
1448
+ _.init();
1449
+ if (!initializing) {
1450
+ _.changeSlide({
1451
+ data: {
1452
+ message: 'index',
1453
+ index: currentSlide
1454
+ }
1455
+ }, false);
1456
+ }
1457
+ };
1458
+
1459
+ Slick.prototype.registerBreakpoints = function () {
1460
+ var _ = this,
1461
+ breakpoint, currentBreakpoint, l,
1462
+ responsiveSettings = _.options.responsive || null;
1463
+ if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) {
1464
+ _.respondTo = _.options.respondTo || 'window';
1465
+ for (breakpoint in responsiveSettings) {
1466
+ l = _.breakpoints.length - 1;
1467
+ if (responsiveSettings.hasOwnProperty(breakpoint)) {
1468
+ currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1469
+ // loop through the breakpoints and cut out any existing
1470
+ // ones with the same breakpoint number, we don't want dupes.
1471
+ while (l >= 0) {
1472
+ if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {
1473
+ _.breakpoints.splice(l, 1);
1474
+ }
1475
+ l--;
1476
+ }
1477
+ _.breakpoints.push(currentBreakpoint);
1478
+ _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1479
+ }
1480
+ }
1481
+ _.breakpoints.sort(function (a, b) {
1482
+ return (_.options.mobileFirst) ? a - b : b - a;
1483
+ });
1484
+ }
1485
+ };
1486
+
1487
+ Slick.prototype.reinit = function () {
1488
+ var _ = this;
1489
+ _.$slides =
1490
+ _.$slideTrack
1491
+ .children(_.options.slide)
1492
+ .addClass('slick-slide');
1493
+ _.slideCount = _.$slides.length;
1494
+ if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1495
+ _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1496
+ }
1497
+ if (_.slideCount <= _.options.slidesToShow) {
1498
+ _.currentSlide = 0;
1499
+ }
1500
+ _.registerBreakpoints();
1501
+ _.setProps();
1502
+ _.setupInfinite();
1503
+ _.buildArrows();
1504
+ _.updateArrows();
1505
+ _.initArrowEvents();
1506
+ _.buildDots();
1507
+ _.updateDots();
1508
+ _.initDotEvents();
1509
+ _.cleanUpSlideEvents();
1510
+ _.initSlideEvents();
1511
+ _.checkResponsive(false, true);
1512
+ if (_.options.focusOnSelect === true) {
1513
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1514
+ }
1515
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
1516
+ _.setPosition();
1517
+ _.focusHandler();
1518
+ _.paused = !_.options.autoplay;
1519
+ _.autoPlay();
1520
+ _.$slider.trigger('reInit', [_]);
1521
+ };
1522
+
1523
+ Slick.prototype.resize = function () {
1524
+ var _ = this;
1525
+ if ($(window).width() !== _.windowWidth) {
1526
+ clearTimeout(_.windowDelay);
1527
+ _.windowDelay = window.setTimeout(function () {
1528
+ _.windowWidth = $(window).width();
1529
+ _.checkResponsive();
1530
+ if (!_.unslicked) {
1531
+ _.setPosition();
1532
+ }
1533
+ }, 50);
1534
+ }
1535
+ };
1536
+
1537
+ Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {
1538
+ var _ = this;
1539
+ if (typeof (index) === 'boolean') {
1540
+ removeBefore = index;
1541
+ index = removeBefore === true ? 0 : _.slideCount - 1;
1542
+ } else {
1543
+ index = removeBefore === true ? --index : index;
1544
+ }
1545
+ if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1546
+ return false;
1547
+ }
1548
+ _.unload();
1549
+ if (removeAll === true) {
1550
+ _.$slideTrack.children().remove();
1551
+ } else {
1552
+ _.$slideTrack.children(this.options.slide).eq(index).remove();
1553
+ }
1554
+ _.$slides = _.$slideTrack.children(this.options.slide);
1555
+ _.$slideTrack.children(this.options.slide).detach();
1556
+ _.$slideTrack.append(_.$slides);
1557
+ _.$slidesCache = _.$slides;
1558
+ _.reinit();
1559
+ };
1560
+
1561
+ Slick.prototype.setCSS = function (position) {
1562
+ var _ = this,
1563
+ positionProps = {},
1564
+ x, y;
1565
+ if (_.options.rtl === true) {
1566
+ position = -position;
1567
+ }
1568
+ x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
1569
+ y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
1570
+ positionProps[_.positionProp] = position;
1571
+ if (_.transformsEnabled === false) {
1572
+ _.$slideTrack.css(positionProps);
1573
+ } else {
1574
+ positionProps = {};
1575
+ if (_.cssTransitions === false) {
1576
+ positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
1577
+ _.$slideTrack.css(positionProps);
1578
+ } else {
1579
+ positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
1580
+ _.$slideTrack.css(positionProps);
1581
+ }
1582
+ }
1583
+ };
1584
+
1585
+ Slick.prototype.setDimensions = function () {
1586
+ var _ = this;
1587
+ if (_.options.vertical === false) {
1588
+ if (_.options.centerMode === true) {
1589
+ _.$list.css({
1590
+ padding: ('0px ' + _.options.centerPadding)
1591
+ });
1592
+ }
1593
+ } else {
1594
+ _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
1595
+ if (_.options.centerMode === true) {
1596
+ _.$list.css({
1597
+ padding: (_.options.centerPadding + ' 0px')
1598
+ });
1599
+ }
1600
+ }
1601
+ _.listWidth = _.$list.width();
1602
+ _.listHeight = _.$list.height();
1603
+ if (_.options.vertical === false && _.options.variableWidth === false) {
1604
+ _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
1605
+ _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
1606
+ } else if (_.options.variableWidth === true) {
1607
+ _.$slideTrack.width(5000 * _.slideCount);
1608
+ } else {
1609
+ _.slideWidth = Math.ceil(_.listWidth);
1610
+ _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
1611
+ }
1612
+ var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
1613
+ if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
1614
+ };
1615
+
1616
+ Slick.prototype.setFade = function () {
1617
+ var _ = this,
1618
+ targetLeft;
1619
+ _.$slides.each(function (index, element) {
1620
+ targetLeft = (_.slideWidth * index) * -1;
1621
+ if (_.options.rtl === true) {
1622
+ $(element).css({
1623
+ position: 'relative',
1624
+ right: targetLeft,
1625
+ top: 0,
1626
+ zIndex: _.options.zIndex - 2,
1627
+ opacity: 0
1628
+ });
1629
+ } else {
1630
+ $(element).css({
1631
+ position: 'relative',
1632
+ left: targetLeft,
1633
+ top: 0,
1634
+ zIndex: _.options.zIndex - 2,
1635
+ opacity: 0
1636
+ });
1637
+ }
1638
+ });
1639
+ _.$slides.eq(_.currentSlide).css({
1640
+ zIndex: _.options.zIndex - 1,
1641
+ opacity: 1
1642
+ });
1643
+ };
1644
+
1645
+ Slick.prototype.setHeight = function () {
1646
+ var _ = this;
1647
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
1648
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
1649
+ _.$list.css('height', targetHeight);
1650
+ }
1651
+ };
1652
+
1653
+ Slick.prototype.setOption =
1654
+ Slick.prototype.slickSetOption = function () {
1655
+ /**
1656
+ * accepts arguments in format of:
1657
+ *
1658
+ * - for changing a single option's value:
1659
+ * .slick("setOption", option, value, refresh )
1660
+ *
1661
+ * - for changing a set of responsive options:
1662
+ * .slick("setOption", 'responsive', [{}, ...], refresh )
1663
+ *
1664
+ * - for updating multiple values at once (not responsive)
1665
+ * .slick("setOption", { 'option': value, ... }, refresh )
1666
+ */
1667
+ var _ = this,
1668
+ l, item, option, value, refresh = false,
1669
+ type;
1670
+ if ($.type(arguments[0]) === 'object') {
1671
+ option = arguments[0];
1672
+ refresh = arguments[1];
1673
+ type = 'multiple';
1674
+ } else if ($.type(arguments[0]) === 'string') {
1675
+ option = arguments[0];
1676
+ value = arguments[1];
1677
+ refresh = arguments[2];
1678
+ if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') {
1679
+ type = 'responsive';
1680
+ } else if (typeof arguments[1] !== 'undefined') {
1681
+ type = 'single';
1682
+ }
1683
+ }
1684
+ if (type === 'single') {
1685
+ _.options[option] = value;
1686
+ } else if (type === 'multiple') {
1687
+ $.each(option, function (opt, val) {
1688
+ _.options[opt] = val;
1689
+ });
1690
+ } else if (type === 'responsive') {
1691
+ for (item in value) {
1692
+ if ($.type(_.options.responsive) !== 'array') {
1693
+ _.options.responsive = [value[item]];
1694
+ } else {
1695
+ l = _.options.responsive.length - 1;
1696
+ // loop through the responsive object and splice out duplicates.
1697
+ while (l >= 0) {
1698
+ if (_.options.responsive[l].breakpoint === value[item].breakpoint) {
1699
+ _.options.responsive.splice(l, 1);
1700
+ }
1701
+ l--;
1702
+ }
1703
+ _.options.responsive.push(value[item]);
1704
+ }
1705
+ }
1706
+ }
1707
+ if (refresh) {
1708
+ _.unload();
1709
+ _.reinit();
1710
+ }
1711
+ };
1712
+
1713
+ Slick.prototype.setPosition = function () {
1714
+ var _ = this;
1715
+ _.setDimensions();
1716
+ _.setHeight();
1717
+ if (_.options.fade === false) {
1718
+ _.setCSS(_.getLeft(_.currentSlide));
1719
+ } else {
1720
+ _.setFade();
1721
+ }
1722
+ _.$slider.trigger('setPosition', [_]);
1723
+ };
1724
+
1725
+ Slick.prototype.setProps = function () {
1726
+ var _ = this,
1727
+ bodyStyle = document.body.style;
1728
+ _.positionProp = _.options.vertical === true ? 'top' : 'left';
1729
+ if (_.positionProp === 'top') {
1730
+ _.$slider.addClass('slick-vertical');
1731
+ } else {
1732
+ _.$slider.removeClass('slick-vertical');
1733
+ }
1734
+ if (bodyStyle.WebkitTransition !== undefined ||
1735
+ bodyStyle.MozTransition !== undefined ||
1736
+ bodyStyle.msTransition !== undefined) {
1737
+ if (_.options.useCSS === true) {
1738
+ _.cssTransitions = true;
1739
+ }
1740
+ }
1741
+ if (_.options.fade) {
1742
+ if (typeof _.options.zIndex === 'number') {
1743
+ if (_.options.zIndex < 3) {
1744
+ _.options.zIndex = 3;
1745
+ }
1746
+ } else {
1747
+ _.options.zIndex = _.defaults.zIndex;
1748
+ }
1749
+ }
1750
+ if (bodyStyle.OTransform !== undefined) {
1751
+ _.animType = 'OTransform';
1752
+ _.transformType = '-o-transform';
1753
+ _.transitionType = 'OTransition';
1754
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
1755
+ }
1756
+ if (bodyStyle.MozTransform !== undefined) {
1757
+ _.animType = 'MozTransform';
1758
+ _.transformType = '-moz-transform';
1759
+ _.transitionType = 'MozTransition';
1760
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
1761
+ }
1762
+ if (bodyStyle.webkitTransform !== undefined) {
1763
+ _.animType = 'webkitTransform';
1764
+ _.transformType = '-webkit-transform';
1765
+ _.transitionType = 'webkitTransition';
1766
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
1767
+ }
1768
+ if (bodyStyle.msTransform !== undefined) {
1769
+ _.animType = 'msTransform';
1770
+ _.transformType = '-ms-transform';
1771
+ _.transitionType = 'msTransition';
1772
+ if (bodyStyle.msTransform === undefined) _.animType = false;
1773
+ }
1774
+ if (bodyStyle.transform !== undefined && _.animType !== false) {
1775
+ _.animType = 'transform';
1776
+ _.transformType = 'transform';
1777
+ _.transitionType = 'transition';
1778
+ }
1779
+ _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
1780
+ };
1781
+
1782
+ Slick.prototype.setSlideClasses = function (index) {
1783
+ var _ = this,
1784
+ centerOffset, allSlides, indexOffset, remainder;
1785
+ allSlides = _.$slider
1786
+ .find('.slick-slide')
1787
+ .removeClass('slick-active slick-center slick-current')
1788
+ .attr('aria-hidden', 'true');
1789
+ _.$slides
1790
+ .eq(index)
1791
+ .addClass('slick-current');
1792
+ if (_.options.centerMode === true) {
1793
+ var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
1794
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
1795
+ if (_.options.infinite === true) {
1796
+ if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
1797
+ _.$slides
1798
+ .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
1799
+ .addClass('slick-active')
1800
+ .attr('aria-hidden', 'false');
1801
+ } else {
1802
+ indexOffset = _.options.slidesToShow + index;
1803
+ allSlides
1804
+ .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
1805
+ .addClass('slick-active')
1806
+ .attr('aria-hidden', 'false');
1807
+ }
1808
+ if (index === 0) {
1809
+ allSlides
1810
+ .eq(_.options.slidesToShow + _.slideCount + 1)
1811
+ .addClass('slick-center');
1812
+ } else if (index === _.slideCount - 1) {
1813
+ allSlides
1814
+ .eq(_.options.slidesToShow)
1815
+ .addClass('slick-center');
1816
+ }
1817
+ }
1818
+ _.$slides
1819
+ .eq(index)
1820
+ .addClass('slick-center');
1821
+ } else {
1822
+ if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
1823
+ _.$slides
1824
+ .slice(index, index + _.options.slidesToShow)
1825
+ .addClass('slick-active')
1826
+ .attr('aria-hidden', 'false');
1827
+ } else if (allSlides.length <= _.options.slidesToShow) {
1828
+ allSlides
1829
+ .addClass('slick-active')
1830
+ .attr('aria-hidden', 'false');
1831
+ } else {
1832
+ remainder = _.slideCount % _.options.slidesToShow;
1833
+ indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
1834
+ if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
1835
+ allSlides
1836
+ .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
1837
+ .addClass('slick-active')
1838
+ .attr('aria-hidden', 'false');
1839
+ } else {
1840
+ allSlides
1841
+ .slice(indexOffset, indexOffset + _.options.slidesToShow)
1842
+ .addClass('slick-active')
1843
+ .attr('aria-hidden', 'false');
1844
+ }
1845
+ }
1846
+ }
1847
+ if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
1848
+ _.lazyLoad();
1849
+ }
1850
+ };
1851
+
1852
+ Slick.prototype.setupInfinite = function () {
1853
+ var _ = this,
1854
+ i, slideIndex, infiniteCount;
1855
+ if (_.options.fade === true) {
1856
+ _.options.centerMode = false;
1857
+ }
1858
+ if (_.options.infinite === true && _.options.fade === false) {
1859
+ slideIndex = null;
1860
+ if (_.slideCount > _.options.slidesToShow) {
1861
+ if (_.options.centerMode === true) {
1862
+ infiniteCount = _.options.slidesToShow + 1;
1863
+ } else {
1864
+ infiniteCount = _.options.slidesToShow;
1865
+ }
1866
+ for (i = _.slideCount; i > (_.slideCount -
1867
+ infiniteCount); i -= 1) {
1868
+ slideIndex = i - 1;
1869
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
1870
+ .attr('data-slick-index', slideIndex - _.slideCount)
1871
+ .prependTo(_.$slideTrack).addClass('slick-cloned');
1872
+ }
1873
+ for (i = 0; i < infiniteCount + _.slideCount; i += 1) {
1874
+ slideIndex = i;
1875
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
1876
+ .attr('data-slick-index', slideIndex + _.slideCount)
1877
+ .appendTo(_.$slideTrack).addClass('slick-cloned');
1878
+ }
1879
+ _.$slideTrack.find('.slick-cloned').find('[id]').each(function () {
1880
+ $(this).attr('id', '');
1881
+ });
1882
+ }
1883
+ }
1884
+ };
1885
+
1886
+ Slick.prototype.interrupt = function (toggle) {
1887
+ var _ = this;
1888
+ if (!toggle) {
1889
+ _.autoPlay();
1890
+ }
1891
+ _.interrupted = toggle;
1892
+ };
1893
+
1894
+ Slick.prototype.selectHandler = function (event) {
1895
+ var _ = this;
1896
+ var targetElement =
1897
+ $(event.target).is('.slick-slide') ?
1898
+ $(event.target) :
1899
+ $(event.target).parents('.slick-slide');
1900
+ var index = parseInt(targetElement.attr('data-slick-index'));
1901
+ if (!index) index = 0;
1902
+ if (_.slideCount <= _.options.slidesToShow) {
1903
+ _.slideHandler(index, false, true);
1904
+ return;
1905
+ }
1906
+ _.slideHandler(index);
1907
+ };
1908
+
1909
+ Slick.prototype.slideHandler = function (index, sync, dontAnimate) {
1910
+ var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
1911
+ _ = this,
1912
+ navTarget;
1913
+ sync = sync || false;
1914
+ if (_.animating === true && _.options.waitForAnimate === true) {
1915
+ return;
1916
+ }
1917
+ if (_.options.fade === true && _.currentSlide === index) {
1918
+ return;
1919
+ }
1920
+ if (sync === false) {
1921
+ _.asNavFor(index);
1922
+ }
1923
+ targetSlide = index;
1924
+ targetLeft = _.getLeft(targetSlide);
1925
+ slideLeft = _.getLeft(_.currentSlide);
1926
+ _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
1927
+ if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
1928
+ if (_.options.fade === false) {
1929
+ targetSlide = _.currentSlide;
1930
+ if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
1931
+ _.animateSlide(slideLeft, function () {
1932
+ _.postSlide(targetSlide);
1933
+ });
1934
+ } else {
1935
+ _.postSlide(targetSlide);
1936
+ }
1937
+ }
1938
+ return;
1939
+ } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
1940
+ if (_.options.fade === false) {
1941
+ targetSlide = _.currentSlide;
1942
+ if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
1943
+ _.animateSlide(slideLeft, function () {
1944
+ _.postSlide(targetSlide);
1945
+ });
1946
+ } else {
1947
+ _.postSlide(targetSlide);
1948
+ }
1949
+ }
1950
+ return;
1951
+ }
1952
+ if (_.options.autoplay) {
1953
+ clearInterval(_.autoPlayTimer);
1954
+ }
1955
+ if (targetSlide < 0) {
1956
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
1957
+ animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
1958
+ } else {
1959
+ animSlide = _.slideCount + targetSlide;
1960
+ }
1961
+ } else if (targetSlide >= _.slideCount) {
1962
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
1963
+ animSlide = 0;
1964
+ } else {
1965
+ animSlide = targetSlide - _.slideCount;
1966
+ }
1967
+ } else {
1968
+ animSlide = targetSlide;
1969
+ }
1970
+ _.animating = true;
1971
+ _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
1972
+ oldSlide = _.currentSlide;
1973
+ _.currentSlide = animSlide;
1974
+ _.setSlideClasses(_.currentSlide);
1975
+ if (_.options.asNavFor) {
1976
+ navTarget = _.getNavTarget();
1977
+ navTarget = navTarget.slick('getSlick');
1978
+ if (navTarget.slideCount <= navTarget.options.slidesToShow) {
1979
+ navTarget.setSlideClasses(_.currentSlide);
1980
+ }
1981
+ }
1982
+ _.updateDots();
1983
+ _.updateArrows();
1984
+ if (_.options.fade === true) {
1985
+ if (dontAnimate !== true) {
1986
+ _.fadeSlideOut(oldSlide);
1987
+ _.fadeSlide(animSlide, function () {
1988
+ _.postSlide(animSlide);
1989
+ });
1990
+ } else {
1991
+ _.postSlide(animSlide);
1992
+ }
1993
+ _.animateHeight();
1994
+ return;
1995
+ }
1996
+ if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
1997
+ _.animateSlide(targetLeft, function () {
1998
+ _.postSlide(animSlide);
1999
+ });
2000
+ } else {
2001
+ _.postSlide(animSlide);
2002
+ }
2003
+ };
2004
+
2005
+ Slick.prototype.startLoad = function () {
2006
+ var _ = this;
2007
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2008
+ _.$prevArrow.hide();
2009
+ _.$nextArrow.hide();
2010
+ }
2011
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2012
+ _.$dots.hide();
2013
+ }
2014
+ _.$slider.addClass('slick-loading');
2015
+ };
2016
+
2017
+ Slick.prototype.swipeDirection = function () {
2018
+ var xDist, yDist, r, swipeAngle, _ = this;
2019
+ xDist = _.touchObject.startX - _.touchObject.curX;
2020
+ yDist = _.touchObject.startY - _.touchObject.curY;
2021
+ r = Math.atan2(yDist, xDist);
2022
+ swipeAngle = Math.round(r * 180 / Math.PI);
2023
+ if (swipeAngle < 0) {
2024
+ swipeAngle = 360 - Math.abs(swipeAngle);
2025
+ }
2026
+ if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2027
+ return (_.options.rtl === false ? 'left' : 'right');
2028
+ }
2029
+ if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2030
+ return (_.options.rtl === false ? 'left' : 'right');
2031
+ }
2032
+ if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2033
+ return (_.options.rtl === false ? 'right' : 'left');
2034
+ }
2035
+ if (_.options.verticalSwiping === true) {
2036
+ if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2037
+ return 'down';
2038
+ } else {
2039
+ return 'up';
2040
+ }
2041
+ }
2042
+ return 'vertical';
2043
+ };
2044
+
2045
+ Slick.prototype.swipeEnd = function (event) {
2046
+ var _ = this,
2047
+ slideCount,
2048
+ direction;
2049
+ _.dragging = false;
2050
+ _.swiping = false;
2051
+ if (_.scrolling) {
2052
+ _.scrolling = false;
2053
+ return false;
2054
+ }
2055
+ _.interrupted = false;
2056
+ _.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;
2057
+ if (_.touchObject.curX === undefined) {
2058
+ return false;
2059
+ }
2060
+ if (_.touchObject.edgeHit === true) {
2061
+ _.$slider.trigger('edge', [_, _.swipeDirection()]);
2062
+ }
2063
+ if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
2064
+ direction = _.swipeDirection();
2065
+ switch (direction) {
2066
+ case 'left':
2067
+ case 'down':
2068
+ slideCount =
2069
+ _.options.swipeToSlide ?
2070
+ _.checkNavigable(_.currentSlide + _.getSlideCount()) :
2071
+ _.currentSlide + _.getSlideCount();
2072
+ _.currentDirection = 0;
2073
+ break;
2074
+ case 'right':
2075
+ case 'up':
2076
+ slideCount =
2077
+ _.options.swipeToSlide ?
2078
+ _.checkNavigable(_.currentSlide - _.getSlideCount()) :
2079
+ _.currentSlide - _.getSlideCount();
2080
+ _.currentDirection = 1;
2081
+ break;
2082
+ default:
2083
+ }
2084
+ if (direction != 'vertical') {
2085
+ _.slideHandler(slideCount);
2086
+ _.touchObject = {};
2087
+ _.$slider.trigger('swipe', [_, direction]);
2088
+ }
2089
+ } else {
2090
+ if (_.touchObject.startX !== _.touchObject.curX) {
2091
+ _.slideHandler(_.currentSlide);
2092
+ _.touchObject = {};
2093
+ }
2094
+ }
2095
+ };
2096
+
2097
+ Slick.prototype.swipeHandler = function (event) {
2098
+ var _ = this;
2099
+ if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2100
+ return;
2101
+ } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2102
+ return;
2103
+ }
2104
+ _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2105
+ event.originalEvent.touches.length : 1;
2106
+ _.touchObject.minSwipe = _.listWidth / _.options
2107
+ .touchThreshold;
2108
+ if (_.options.verticalSwiping === true) {
2109
+ _.touchObject.minSwipe = _.listHeight / _.options
2110
+ .touchThreshold;
2111
+ }
2112
+ switch (event.data.action) {
2113
+ case 'start':
2114
+ _.swipeStart(event);
2115
+ break;
2116
+ case 'move':
2117
+ _.swipeMove(event);
2118
+ break;
2119
+ case 'end':
2120
+ _.swipeEnd(event);
2121
+ break;
2122
+ }
2123
+ };
2124
+
2125
+ Slick.prototype.swipeMove = function (event) {
2126
+ var _ = this,
2127
+ edgeWasHit = false,
2128
+ curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
2129
+ touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2130
+ if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
2131
+ return false;
2132
+ }
2133
+ curLeft = _.getLeft(_.currentSlide);
2134
+ _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2135
+ _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2136
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
2137
+ Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2138
+ verticalSwipeLength = Math.round(Math.sqrt(
2139
+ Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2140
+ if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
2141
+ _.scrolling = true;
2142
+ return false;
2143
+ }
2144
+ if (_.options.verticalSwiping === true) {
2145
+ _.touchObject.swipeLength = verticalSwipeLength;
2146
+ }
2147
+ swipeDirection = _.swipeDirection();
2148
+ if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2149
+ _.swiping = true;
2150
+ event.preventDefault();
2151
+ }
2152
+ positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2153
+ if (_.options.verticalSwiping === true) {
2154
+ positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2155
+ }
2156
+ swipeLength = _.touchObject.swipeLength;
2157
+ _.touchObject.edgeHit = false;
2158
+ if (_.options.infinite === false) {
2159
+ if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2160
+ swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2161
+ _.touchObject.edgeHit = true;
2162
+ }
2163
+ }
2164
+ if (_.options.vertical === false) {
2165
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2166
+ } else {
2167
+ _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2168
+ }
2169
+ if (_.options.verticalSwiping === true) {
2170
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2171
+ }
2172
+ if (_.options.fade === true || _.options.touchMove === false) {
2173
+ return false;
2174
+ }
2175
+ if (_.animating === true) {
2176
+ _.swipeLeft = null;
2177
+ return false;
2178
+ }
2179
+ _.setCSS(_.swipeLeft);
2180
+ };
2181
+
2182
+ Slick.prototype.swipeStart = function (event) {
2183
+ var _ = this,
2184
+ touches;
2185
+ _.interrupted = true;
2186
+ if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2187
+ _.touchObject = {};
2188
+ return false;
2189
+ }
2190
+ if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2191
+ touches = event.originalEvent.touches[0];
2192
+ }
2193
+ _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2194
+ _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2195
+ _.dragging = true;
2196
+ };
2197
+
2198
+ Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {
2199
+ var _ = this;
2200
+ if (_.$slidesCache !== null) {
2201
+ _.unload();
2202
+ _.$slideTrack.children(this.options.slide).detach();
2203
+ _.$slidesCache.appendTo(_.$slideTrack);
2204
+ _.reinit();
2205
+ }
2206
+ };
2207
+
2208
+ Slick.prototype.unload = function () {
2209
+ var _ = this;
2210
+ $('.slick-cloned', _.$slider).remove();
2211
+ if (_.$dots) {
2212
+ _.$dots.remove();
2213
+ }
2214
+ if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2215
+ _.$prevArrow.remove();
2216
+ }
2217
+ if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2218
+ _.$nextArrow.remove();
2219
+ }
2220
+ _.$slides
2221
+ .removeClass('slick-slide slick-active slick-visible slick-current')
2222
+ .attr('aria-hidden', 'true')
2223
+ .css('width', '');
2224
+ };
2225
+
2226
+ Slick.prototype.unslick = function (fromBreakpoint) {
2227
+ var _ = this;
2228
+ _.$slider.trigger('unslick', [_, fromBreakpoint]);
2229
+ _.destroy();
2230
+ };
2231
+
2232
+ Slick.prototype.updateArrows = function () {
2233
+ var _ = this,
2234
+ centerOffset;
2235
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
2236
+ if (_.options.arrows === true &&
2237
+ _.slideCount > _.options.slidesToShow &&
2238
+ !_.options.infinite) {
2239
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2240
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2241
+ if (_.currentSlide === 0) {
2242
+ _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2243
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2244
+ } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2245
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2246
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2247
+ } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2248
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2249
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2250
+ }
2251
+ }
2252
+ };
2253
+
2254
+ Slick.prototype.updateDots = function () {
2255
+ var _ = this;
2256
+ if (_.$dots !== null) {
2257
+ _.$dots
2258
+ .find('li')
2259
+ .removeClass('slick-active')
2260
+ .end();
2261
+ _.$dots
2262
+ .find('li')
2263
+ .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2264
+ .addClass('slick-active');
2265
+ }
2266
+ };
2267
+
2268
+ Slick.prototype.visibility = function () {
2269
+ var _ = this;
2270
+ if (_.options.autoplay) {
2271
+ if (document[_.hidden]) {
2272
+ _.interrupted = true;
2273
+ } else {
2274
+ _.interrupted = false;
2275
+ }
2276
+ }
2277
+ };
2278
+ $.fn.slick = function () {
2279
+ var _ = this,
2280
+ opt = arguments[0],
2281
+ args = Array.prototype.slice.call(arguments, 1),
2282
+ l = _.length,
2283
+ i,
2284
+ ret;
2285
+ for (i = 0; i < l; i++) {
2286
+ if (typeof opt == 'object' || typeof opt == 'undefined')
2287
+ _[i].slick = new Slick(_[i], opt);
2288
+ else
2289
+ ret = _[i].slick[opt].apply(_[i].slick, args);
2290
+ if (typeof ret != 'undefined') return ret;
2291
+ }
2292
+ return _;
2293
+ };
2294
+
2295
+ }));