PageSourceSearch

https://littlebitessnacks.ca/sites/default/files/js/js_l0T8RzwvxnoIcSfpaS2q0OAA2rQMXJm1uqo8wdLzzZA.js

js littlebitessnacks.ca collected 2026-10-07 19:38:32 UTC 251,044 bytes, 5,933 lines download raw bytes

vendor: 3,920 bytes, lines 1-104
1/**
2 * @file
3 * Behaviors of Boostrap Layout Builder local video background.
4 */
5
6(function ($, _, Drupal, drupalSettings) {
7  "use strict";
8
9  Drupal.behaviors.scrollEffectsInit = {
10    attach: function (context, settings) {
11      AOS.init();
12    }
13  }
14
15})(window.jQuery, window._, window.Drupal, window.drupalSettings);
16;
17/******/ (function(modules) { // webpackBootstrap
18/******/ 	// The module cache
19/******/ 	var installedModules = {};
20/******/
21/******/ 	// The require function
22/******/ 	function __webpack_require__(moduleId) {
23/******/
24/******/ 		// Check if module is in cache
25/******/ 		if(installedModules[moduleId]) {
26/******/ 			return installedModules[moduleId].exports;
27/******/ 		}
28/******/ 		// Create a new module (and put it into the cache)
29/******/ 		var module = installedModules[moduleId] = {
30/******/ 			i: moduleId,
31/******/ 			l: false,
32/******/ 			exports: {}
33/******/ 		};
34/******/
35/******/ 		// Execute the module function
36/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
37/******/
38/******/ 		// Flag the module as loaded
39/******/ 		module.l = true;
40/******/
41/******/ 		// Return the exports of the module
42/******/ 		return module.exports;
43/******/ 	}
44/******/
45/******/
46/******/ 	// expose the modules object (__webpack_modules__)
47/******/ 	__webpack_require__.m = modules;
48/******/
49/******/ 	// expose the module cache
50/******/ 	__webpack_require__.c = installedModules;
51/******/
52/******/ 	// define getter function for harmony exports
53/******/ 	__webpack_require__.d = function(exports, name, getter) {
54/******/ 		if(!__webpack_require__.o(exports, name)) {
55/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
56/******/ 		}
57/******/ 	};
58/******/
59/******/ 	// define __esModule on exports
60/******/ 	__webpack_require__.r = function(exports) {
61/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
62/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
63/******/ 		}
64/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
65/******/ 	};
66/******/
67/******/ 	// create a fake namespace object
68/******/ 	// mode & 1: value is a module id, require it
69/******/ 	// mode & 2: merge all properties of value into the ns
70/******/ 	// mode & 4: return value when already ns object
71/******/ 	// mode & 8|1: behave like require
72/******/ 	__webpack_require__.t = function(value, mode) {
73/******/ 		if(mode & 1) value = __webpack_require__(value);
74/******/ 		if(mode & 8) return value;
75/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
76/******/ 		var ns = Object.create(null);
77/******/ 		__webpack_require__.r(ns);
78/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
79/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
80/******/ 		return ns;
81/******/ 	};
82/******/
83/******/ 	// getDefaultExport function for compatibility with non-harmony modules
84/******/ 	__webpack_require__.n = function(module) {
85/******/ 		var getter = module && module.__esModule ?
86/******/ 			function getDefault() { return module['default']; } :
87/******/ 			function getModuleExports() { return module; };
88/******/ 		__webpack_require__.d(getter, 'a', getter);
89/******/ 		return getter;
90/******/ 	};
91/******/
92/******/ 	// Object.prototype.hasOwnProperty.call
93/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
94/******/
95/******/ 	// __webpack_public_path__
96/******/ 	__webpack_require__.p = "/";
97/******/
98/******/
99/******/ 	// Load entry module and return exports
100/******/ 	return __webpack_require__(__webpack_require__.s = 17);
101/******/ })
102/************************************************************************/
103/******/ ({
104
vendor: 970 bytes, lines 105-127
105/***/ "./node_modules/tiny-slider/src/helpers/addCSSRule.js":
106/*!************************************************************!*\
107  !*** ./node_modules/tiny-slider/src/helpers/addCSSRule.js ***!
108  \************************************************************/
109/*! exports provided: addCSSRule */
110/***/ (function(module, __webpack_exports__, __webpack_require__) {
111
112"use strict";
113__webpack_require__.r(__webpack_exports__);
114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addCSSRule", function() { return addCSSRule; });
115/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
116// cross browsers addRule method
117
118function addCSSRule(sheet, selector, rules, index) {
119  // return raf(function() {
120    'insertRule' in sheet ?
121      sheet.insertRule(selector + '{' + rules + '}', index) :
122      sheet.addRule(selector, rules, index);
123  // });
124}
125
126/***/ }),
127
vendor: 1,082 bytes, lines 128-151
128/***/ "./node_modules/tiny-slider/src/helpers/addClass.js":
129/*!**********************************************************!*\
130  !*** ./node_modules/tiny-slider/src/helpers/addClass.js ***!
131  \**********************************************************/
132/*! exports provided: addClass */
133/***/ (function(module, __webpack_exports__, __webpack_require__) {
134
135"use strict";
136__webpack_require__.r(__webpack_exports__);
137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
138/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
139
140var addClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
141    function (el, str) {
142      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.add(str); }
143    } :
144    function (el, str) {
145      if (!Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.className += ' ' + str; }
146    };
147
148
149
150/***/ }),
151
vendor: 1,023 bytes, lines 152-173
152/***/ "./node_modules/tiny-slider/src/helpers/addEvents.js":
153/*!***********************************************************!*\
154  !*** ./node_modules/tiny-slider/src/helpers/addEvents.js ***!
155  \***********************************************************/
156/*! exports provided: addEvents */
157/***/ (function(module, __webpack_exports__, __webpack_require__) {
158
159"use strict";
160__webpack_require__.r(__webpack_exports__);
161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEvents", function() { return addEvents; });
162/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
163
164
165function addEvents(el, obj, preventScrolling) {
166  for (var prop in obj) {
167    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 && !preventScrolling ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
168    el.addEventListener(prop, obj[prop], option);
169  }
170}
171
172/***/ }),
173
vendor: 745 bytes, lines 174-193
174/***/ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js":
175/*!*******************************************************************!*\
176  !*** ./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js ***!
177  \*******************************************************************/
178/*! exports provided: arrayFromNodeList */
179/***/ (function(module, __webpack_exports__, __webpack_require__) {
180
181"use strict";
182__webpack_require__.r(__webpack_exports__);
183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayFromNodeList", function() { return arrayFromNodeList; });
184function arrayFromNodeList (nl) {
185  var arr = [];
186  for (var i = 0, l = nl.length; i < l; i++) {
187    arr.push(nl[i]);
188  }
189  return arr;
190}
191
192/***/ }),
193
vendor: 637 bytes, lines 194-212
194/***/ "./node_modules/tiny-slider/src/helpers/caf.js":
195/*!*****************************************************!*\
196  !*** ./node_modules/tiny-slider/src/helpers/caf.js ***!
197  \*****************************************************/
198/*! exports provided: caf */
199/***/ (function(module, __webpack_exports__, __webpack_require__) {
200
201"use strict";
202__webpack_require__.r(__webpack_exports__);
203/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "caf", function() { return caf; });
204var win = window;
205
206var caf = win.cancelAnimationFrame
207  || win.mozCancelAnimationFrame
208  || function(id){ clearTimeout(id); };
209
210
211/***/ }),
212
vendor: 1,914 bytes, lines 213-261
213/***/ "./node_modules/tiny-slider/src/helpers/calc.js":
214/*!******************************************************!*\
215  !*** ./node_modules/tiny-slider/src/helpers/calc.js ***!
216  \******************************************************/
217/*! exports provided: calc */
218/***/ (function(module, __webpack_exports__, __webpack_require__) {
219
220"use strict";
221__webpack_require__.r(__webpack_exports__);
222/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calc", function() { return calc; });
223/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
224/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
225/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
226// get css-calc 
227// @return - false | calc | -webkit-calc | -moz-calc
228// @usage - var calc = getCalc(); 
229
230
231
232
233function calc() {
234  var doc = document, 
235      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
236      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
237      div = doc.createElement('div'), 
238      result = false;
239
240  body.appendChild(div);
241  try {
242    var str = '(10px * 10)',
243        vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str],
244        val;
245    for (var i = 0; i < 3; i++) {
246      val = vals[i];
247      div.style.width = val;
248      if (div.offsetWidth === 100) { 
249        result = val.replace(str, ''); 
250        break;
251      }
252    }
253  } catch (e) {}
254  
255  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
256
257  return result;
258}
259
260/***/ }),
261
vendor: 722 bytes, lines 262-277
262/***/ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js":
263/*!*******************************************************************!*\
264  !*** ./node_modules/tiny-slider/src/helpers/checkStorageValue.js ***!
265  \*******************************************************************/
266/*! exports provided: checkStorageValue */
267/***/ (function(module, __webpack_exports__, __webpack_require__) {
268
269"use strict";
270__webpack_require__.r(__webpack_exports__);
271/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkStorageValue", function() { return checkStorageValue; });
272function checkStorageValue (value) {
273  return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value;
274}
275
276/***/ }),
277
vendor: 667 bytes, lines 278-291
278/***/ "./node_modules/tiny-slider/src/helpers/classListSupport.js":
279/*!******************************************************************!*\
280  !*** ./node_modules/tiny-slider/src/helpers/classListSupport.js ***!
281  \******************************************************************/
282/*! exports provided: classListSupport */
283/***/ (function(module, __webpack_exports__, __webpack_require__) {
284
285"use strict";
286__webpack_require__.r(__webpack_exports__);
287/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return classListSupport; });
288var classListSupport = 'classList' in document.createElement('_');
289
290/***/ }),
291
vendor: 1,359 bytes, lines 292-326
292/***/ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js":
293/*!******************************************************************!*\
294  !*** ./node_modules/tiny-slider/src/helpers/createStyleSheet.js ***!
295  \******************************************************************/
296/*! exports provided: createStyleSheet */
297/***/ (function(module, __webpack_exports__, __webpack_require__) {
298
299"use strict";
300__webpack_require__.r(__webpack_exports__);
301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStyleSheet", function() { return createStyleSheet; });
302// create and append style sheet
303function createStyleSheet (media, nonce) {
304  // Create the <style> tag
305  var style = document.createElement("style");
306  // style.setAttribute("type", "text/css");
307
308  // Add a media (and/or media query) here if you'd like!
309  // style.setAttribute("media", "screen")
310  // style.setAttribute("media", "only screen and (max-width : 1024px)")
311  if (media) { style.setAttribute("media", media); }
312
313  // Add nonce attribute for Content Security Policy
314  if (nonce) { style.setAttribute("nonce", nonce); }
315
316  // WebKit hack :(
317  // style.appendChild(document.createTextNode(""));
318
319  // Add the <style> element to the page
320  document.querySelector('head').appendChild(style);
321
322  return style.sheet ? style.sheet : style.styleSheet;
323};
324
325/***/ }),
326
vendor: 601 bytes, lines 327-340
327/***/ "./node_modules/tiny-slider/src/helpers/docElement.js":
328/*!************************************************************!*\
329  !*** ./node_modules/tiny-slider/src/helpers/docElement.js ***!
330  \************************************************************/
331/*! exports provided: docElement */
332/***/ (function(module, __webpack_exports__, __webpack_require__) {
333
334"use strict";
335__webpack_require__.r(__webpack_exports__);
336/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "docElement", function() { return docElement; });
337var docElement = document.documentElement;
338
339/***/ }),
340
vendor: 1,234 bytes, lines 341-380
341/***/ "./node_modules/tiny-slider/src/helpers/events.js":
342/*!********************************************************!*\
343  !*** ./node_modules/tiny-slider/src/helpers/events.js ***!
344  \********************************************************/
345/*! exports provided: Events */
346/***/ (function(module, __webpack_exports__, __webpack_require__) {
347
348"use strict";
349__webpack_require__.r(__webpack_exports__);
350/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Events", function() { return Events; });
351function Events() {
352  return {
353    topics: {},
354    on: function (eventName, fn) {
355      this.topics[eventName] = this.topics[eventName] || [];
356      this.topics[eventName].push(fn);
357    },
358    off: function(eventName, fn) {
359      if (this.topics[eventName]) {
360        for (var i = 0; i < this.topics[eventName].length; i++) {
361          if (this.topics[eventName][i] === fn) {
362            this.topics[eventName].splice(i, 1);
363            break;
364          }
365        }
366      }
367    },
368    emit: function (eventName, data) {
369      data.type = eventName;
370      if (this.topics[eventName]) {
371        this.topics[eventName].forEach(function(fn) {
372          fn(data, eventName);
373        });
374      }
375    }
376  };
377};
378
379/***/ }),
380
vendor: 947 bytes, lines 381-414
381/***/ "./node_modules/tiny-slider/src/helpers/extend.js":
382/*!********************************************************!*\
383  !*** ./node_modules/tiny-slider/src/helpers/extend.js ***!
384  \********************************************************/
385/*! exports provided: extend */
386/***/ (function(module, __webpack_exports__, __webpack_require__) {
387
388"use strict";
389__webpack_require__.r(__webpack_exports__);
390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
391function extend() {
392  var obj, name, copy,
393      target = arguments[0] || {},
394      i = 1,
395      length = arguments.length;
396
397  for (; i < length; i++) {
398    if ((obj = arguments[i]) !== null) {
399      for (name in obj) {
400        copy = obj[name];
401
402        if (target === copy) {
403          continue;
404        } else if (copy !== undefined) {
405          target[name] = copy;
406        }
407      }
408    }
409  }
410  return target;
411}
412
413/***/ }),
414
vendor: 739 bytes, lines 415-433
415/***/ "./node_modules/tiny-slider/src/helpers/forEach.js":
416/*!*********************************************************!*\
417  !*** ./node_modules/tiny-slider/src/helpers/forEach.js ***!
418  \*********************************************************/
419/*! exports provided: forEach */
420/***/ (function(module, __webpack_exports__, __webpack_require__) {
421
422"use strict";
423__webpack_require__.r(__webpack_exports__);
424/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; });
425// https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/
426function forEach (arr, callback, scope) {
427  for (var i = 0, l = arr.length; i < l; i++) {
428    callback.call(scope, arr[i], i);
429  }
430}
431
432/***/ }),
433
vendor: 600 bytes, lines 434-449
434/***/ "./node_modules/tiny-slider/src/helpers/getAttr.js":
435/*!*********************************************************!*\
436  !*** ./node_modules/tiny-slider/src/helpers/getAttr.js ***!
437  \*********************************************************/
438/*! exports provided: getAttr */
439/***/ (function(module, __webpack_exports__, __webpack_require__) {
440
441"use strict";
442__webpack_require__.r(__webpack_exports__);
443/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAttr", function() { return getAttr; });
444function getAttr(el, attr) {
445  return el.getAttribute(attr);
446}
447
448/***/ }),
449
vendor: 702 bytes, lines 450-473
450/***/ "./node_modules/tiny-slider/src/helpers/getBody.js":
451/*!*********************************************************!*\
452  !*** ./node_modules/tiny-slider/src/helpers/getBody.js ***!
453  \*********************************************************/
454/*! exports provided: getBody */
455/***/ (function(module, __webpack_exports__, __webpack_require__) {
456
457"use strict";
458__webpack_require__.r(__webpack_exports__);
459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBody", function() { return getBody; });
460function getBody () {
461  var doc = document,
462      body = doc.body;
463
464  if (!body) {
465    body = doc.createElement('body');
466    body.fake = true;
467  }
468
469  return body;
470}
471
472/***/ }),
473
vendor: 736 bytes, lines 474-490
474/***/ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js":
475/*!*******************************************************************!*\
476  !*** ./node_modules/tiny-slider/src/helpers/getCssRulesLength.js ***!
477  \*******************************************************************/
478/*! exports provided: getCssRulesLength */
479/***/ (function(module, __webpack_exports__, __webpack_require__) {
480
481"use strict";
482__webpack_require__.r(__webpack_exports__);
483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCssRulesLength", function() { return getCssRulesLength; });
484function getCssRulesLength(sheet) {
485  var rule = ('insertRule' in sheet) ? sheet.cssRules : sheet.rules;
486  return rule.length;
487}
488
489/***/ }),
490
vendor: 1,105 bytes, lines 491-518
491/***/ "./node_modules/tiny-slider/src/helpers/getEndProperty.js":
492/*!****************************************************************!*\
493  !*** ./node_modules/tiny-slider/src/helpers/getEndProperty.js ***!
494  \****************************************************************/
495/*! exports provided: getEndProperty */
496/***/ (function(module, __webpack_exports__, __webpack_require__) {
497
498"use strict";
499__webpack_require__.r(__webpack_exports__);
500/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEndProperty", function() { return getEndProperty; });
501// get transitionend, animationend based on transitionDuration
502// @propin: string
503// @propOut: string, first-letter uppercase
504// Usage: getEndProperty('WebkitTransitionDuration', 'Transition') => webkitTransitionEnd
505function getEndProperty(propIn, propOut) {
506  var endProp = false;
507  if (/^Webkit/.test(propIn)) {
508    endProp = 'webkit' + propOut + 'End';
509  } else if (/^O/.test(propIn)) {
510    endProp = 'o' + propOut + 'End';
511  } else if (propIn) {
512    endProp = propOut.toLowerCase() + 'end';
513  }
514  return endProp;
515}
516
517/***/ }),
518
vendor: 678 bytes, lines 519-537
519/***/ "./node_modules/tiny-slider/src/helpers/getSlideId.js":
520/*!************************************************************!*\
521  !*** ./node_modules/tiny-slider/src/helpers/getSlideId.js ***!
522  \************************************************************/
523/*! exports provided: getSlideId */
524/***/ (function(module, __webpack_exports__, __webpack_require__) {
525
526"use strict";
527__webpack_require__.r(__webpack_exports__);
528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSlideId", function() { return getSlideId; });
529function getSlideId() {
530  var id = window.tnsId;
531  window.tnsId = !id ? 1 : id + 1;
532  
533  return 'tns' + window.tnsId;
534}
535
536/***/ }),
537
vendor: 867 bytes, lines 538-562
538/***/ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js":
539/*!*******************************************************************!*\
540  !*** ./node_modules/tiny-slider/src/helpers/getTouchDirection.js ***!
541  \*******************************************************************/
542/*! exports provided: getTouchDirection */
543/***/ (function(module, __webpack_exports__, __webpack_require__) {
544
545"use strict";
546__webpack_require__.r(__webpack_exports__);
547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchDirection", function() { return getTouchDirection; });
548function getTouchDirection(angle, range) {
549  var direction = false,
550      gap = Math.abs(90 - Math.abs(angle));
551      
552  if (gap >= 90 - range) {
553    direction = 'horizontal';
554  } else if (gap <= range) {
555    direction = 'vertical';
556  }
557
558  return direction;
559}
560
561/***/ }),
562
vendor: 1,957 bytes, lines 563-606
563/***/ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js":
564/*!*****************************************************************!*\
565  !*** ./node_modules/tiny-slider/src/helpers/has3DTransforms.js ***!
566  \*****************************************************************/
567/*! exports provided: has3DTransforms */
568/***/ (function(module, __webpack_exports__, __webpack_require__) {
569
570"use strict";
571__webpack_require__.r(__webpack_exports__);
572/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "has3DTransforms", function() { return has3DTransforms; });
573/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
574/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
575/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
576
577
578
579
580function has3DTransforms(tf){
581  if (!tf) { return false; }
582  if (!window.getComputedStyle) { return false; }
583  
584  var doc = document,
585      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
586      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
587      el = doc.createElement('p'),
588      has3d,
589      cssTF = tf.length > 9 ? '-' + tf.slice(0, -9).toLowerCase() + '-' : '';
590
591  cssTF += 'transform';
592
593  // Add it to the body to get the computed style
594  body.insertBefore(el, null);
595
596  el.style[tf] = 'translate3d(1px,1px,1px)';
597  has3d = window.getComputedStyle(el).getPropertyValue(cssTF);
598
599  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : el.remove();
600
601  return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
602}
603
604
605/***/ }),
606
vendor: 600 bytes, lines 607-622
607/***/ "./node_modules/tiny-slider/src/helpers/hasAttr.js":
608/*!*********************************************************!*\
609  !*** ./node_modules/tiny-slider/src/helpers/hasAttr.js ***!
610  \*********************************************************/
611/*! exports provided: hasAttr */
612/***/ (function(module, __webpack_exports__, __webpack_require__) {
613
614"use strict";
615__webpack_require__.r(__webpack_exports__);
616/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasAttr", function() { return hasAttr; });
617function hasAttr(el, attr) {
618  return el.hasAttribute(attr);
619}
620
621/***/ }),
622
vendor: 1,162 bytes, lines 623-645
623/***/ "./node_modules/tiny-slider/src/helpers/hasClass.js":
624/*!**********************************************************!*\
625  !*** ./node_modules/tiny-slider/src/helpers/hasClass.js ***!
626  \**********************************************************/
627/*! exports provided: classListSupport, hasClass */
628/***/ (function(module, __webpack_exports__, __webpack_require__) {
629
630"use strict";
631__webpack_require__.r(__webpack_exports__);
632/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; });
633/* harmony import */ var _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classListSupport.js */ "./node_modules/tiny-slider/src/helpers/classListSupport.js");
634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "classListSupport", function() { return _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"]; });
635
636
637
638var hasClass = _classListSupport_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
639    function (el, str) { return el.classList.contains(str); } :
640    function (el, str) { return el.className.indexOf(str) >= 0; };
641
642
643
644/***/ }),
645
vendor: 671 bytes, lines 646-661
646/***/ "./node_modules/tiny-slider/src/helpers/hideElement.js":
647/*!*************************************************************!*\
648  !*** ./node_modules/tiny-slider/src/helpers/hideElement.js ***!
649  \*************************************************************/
650/*! exports provided: hideElement */
651/***/ (function(module, __webpack_exports__, __webpack_require__) {
652
653"use strict";
654__webpack_require__.r(__webpack_exports__);
655/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideElement", function() { return hideElement; });
656function hideElement(el, forceHide) {
657  if (el.style.display !== 'none') { el.style.display = 'none'; }
658}
659
660/***/ }),
661
vendor: 673 bytes, lines 662-678
662/***/ "./node_modules/tiny-slider/src/helpers/isNodeList.js":
663/*!************************************************************!*\
664  !*** ./node_modules/tiny-slider/src/helpers/isNodeList.js ***!
665  \************************************************************/
666/*! exports provided: isNodeList */
667/***/ (function(module, __webpack_exports__, __webpack_require__) {
668
669"use strict";
670__webpack_require__.r(__webpack_exports__);
671/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeList", function() { return isNodeList; });
672function isNodeList(el) {
673  // Only NodeList has the "item()" function
674  return typeof el.item !== "undefined"; 
675}
676
677/***/ }),
678
vendor: 635 bytes, lines 679-694
679/***/ "./node_modules/tiny-slider/src/helpers/isVisible.js":
680/*!***********************************************************!*\
681  !*** ./node_modules/tiny-slider/src/helpers/isVisible.js ***!
682  \***********************************************************/
683/*! exports provided: isVisible */
684/***/ (function(module, __webpack_exports__, __webpack_require__) {
685
686"use strict";
687__webpack_require__.r(__webpack_exports__);
688/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
689function isVisible(el) {
690  return window.getComputedStyle(el).display !== 'none';
691}
692
693/***/ }),
694
vendor: 1,205 bytes, lines 695-727
695/***/ "./node_modules/tiny-slider/src/helpers/jsTransform.js":
696/*!*************************************************************!*\
697  !*** ./node_modules/tiny-slider/src/helpers/jsTransform.js ***!
698  \*************************************************************/
699/*! exports provided: jsTransform */
700/***/ (function(module, __webpack_exports__, __webpack_require__) {
701
702"use strict";
703__webpack_require__.r(__webpack_exports__);
704/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsTransform", function() { return jsTransform; });
705function jsTransform(element, attr, prefix, postfix, to, duration, callback) {
706  var tick = Math.min(duration, 10),
707      unit = (to.indexOf('%') >= 0) ? '%' : 'px',
708      to = to.replace(unit, ''),
709      from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')),
710      positionTick = (to - from) / duration * tick,
711      running;
712
713  setTimeout(moveElement, tick);
714  function moveElement() {
715    duration -= tick;
716    from += positionTick;
717    element.style[attr] = prefix + from + unit + postfix;
718    if (duration > 0) { 
719      setTimeout(moveElement, tick); 
720    } else {
721      callback();
722    }
723  }
724}
725
726/***/ }),
727
vendor: 2,114 bytes, lines 728-779
728/***/ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js":
729/*!*******************************************************************!*\
730  !*** ./node_modules/tiny-slider/src/helpers/mediaquerySupport.js ***!
731  \*******************************************************************/
732/*! exports provided: mediaquerySupport */
733/***/ (function(module, __webpack_exports__, __webpack_require__) {
734
735"use strict";
736__webpack_require__.r(__webpack_exports__);
737/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mediaquerySupport", function() { return mediaquerySupport; });
738/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
739/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
740/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
741
742
743
744
745function mediaquerySupport () {
746  if (window.matchMedia || window.msMatchMedia) {
747    return true;
748  }
749  
750  var doc = document,
751      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
752      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
753      div = doc.createElement('div'),
754      style = doc.createElement('style'),
755      rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}',
756      position;
757
758  style.type = 'text/css';
759  div.className = 'tns-mq-test';
760
761  body.appendChild(style);
762  body.appendChild(div);
763
764  if (style.styleSheet) {
765    style.styleSheet.cssText = rule;
766  } else {
767    style.appendChild(doc.createTextNode(rule));
768  }
769
770  position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position'];
771
772  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : div.remove();
773
774  return position === "absolute";
775}
776
777
778/***/ }),
779
vendor: 943 bytes, lines 780-803
780/***/ "./node_modules/tiny-slider/src/helpers/passiveOption.js":
781/*!***************************************************************!*\
782  !*** ./node_modules/tiny-slider/src/helpers/passiveOption.js ***!
783  \***************************************************************/
784/*! exports provided: passiveOption */
785/***/ (function(module, __webpack_exports__, __webpack_require__) {
786
787"use strict";
788__webpack_require__.r(__webpack_exports__);
789/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "passiveOption", function() { return passiveOption; });
790// Test via a getter in the options object to see if the passive property is accessed
791var supportsPassive = false;
792try {
793  var opts = Object.defineProperty({}, 'passive', {
794    get: function() {
795      supportsPassive = true;
796    }
797  });
798  window.addEventListener("test", null, opts);
799} catch (e) {}
800var passiveOption = supportsPassive ? { passive: true } : false;
801
802/***/ }),
803
vendor: 2,093 bytes, lines 804-854
804/***/ "./node_modules/tiny-slider/src/helpers/percentageLayout.js":
805/*!******************************************************************!*\
806  !*** ./node_modules/tiny-slider/src/helpers/percentageLayout.js ***!
807  \******************************************************************/
808/*! exports provided: percentageLayout */
809/***/ (function(module, __webpack_exports__, __webpack_require__) {
810
811"use strict";
812__webpack_require__.r(__webpack_exports__);
813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "percentageLayout", function() { return percentageLayout; });
814/* harmony import */ var _getBody_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getBody.js */ "./node_modules/tiny-slider/src/helpers/getBody.js");
815/* harmony import */ var _setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setFakeBody.js */ "./node_modules/tiny-slider/src/helpers/setFakeBody.js");
816/* harmony import */ var _resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resetFakeBody.js */ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js");
817// get subpixel support value
818// @return - boolean
819
820
821
822
823function percentageLayout() {
824  // check subpixel layout supporting
825  var doc = document,
826      body = Object(_getBody_js__WEBPACK_IMPORTED_MODULE_0__["getBody"])(),
827      docOverflow = Object(_setFakeBody_js__WEBPACK_IMPORTED_MODULE_1__["setFakeBody"])(body),
828      wrapper = doc.createElement('div'),
829      outer = doc.createElement('div'),
830      str = '',
831      count = 70,
832      perPage = 3,
833      supported = false;
834
835  wrapper.className = "tns-t-subp2";
836  outer.className = "tns-t-ct";
837
838  for (var i = 0; i < count; i++) {
839    str += '<div></div>';
840  }
841
842  outer.innerHTML = str;
843  wrapper.appendChild(outer);
844  body.appendChild(wrapper);
845
846  supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2;
847
848  body.fake ? Object(_resetFakeBody_js__WEBPACK_IMPORTED_MODULE_2__["resetFakeBody"])(body, docOverflow) : wrapper.remove();
849
850  return supported;
851}
852
853/***/ }),
854
vendor: 719 bytes, lines 855-875
855/***/ "./node_modules/tiny-slider/src/helpers/raf.js":
856/*!*****************************************************!*\
857  !*** ./node_modules/tiny-slider/src/helpers/raf.js ***!
858  \*****************************************************/
859/*! exports provided: raf */
860/***/ (function(module, __webpack_exports__, __webpack_require__) {
861
862"use strict";
863__webpack_require__.r(__webpack_exports__);
864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "raf", function() { return raf; });
865var win = window;
866
867var raf = win.requestAnimationFrame
868  || win.webkitRequestAnimationFrame
869  || win.mozRequestAnimationFrame
870  || win.msRequestAnimationFrame
871  || function(cb) { return setTimeout(cb, 16); };
872
873
874/***/ }),
875
vendor: 1,105 bytes, lines 876-902
876/***/ "./node_modules/tiny-slider/src/helpers/removeAttrs.js":
877/*!*************************************************************!*\
878  !*** ./node_modules/tiny-slider/src/helpers/removeAttrs.js ***!
879  \*************************************************************/
880/*! exports provided: removeAttrs */
881/***/ (function(module, __webpack_exports__, __webpack_require__) {
882
883"use strict";
884__webpack_require__.r(__webpack_exports__);
885/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAttrs", function() { return removeAttrs; });
886/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
887
888
889function removeAttrs(els, attrs) {
890  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
891  attrs = (attrs instanceof Array) ? attrs : [attrs];
892
893  var attrLength = attrs.length;
894  for (var i = els.length; i--;) {
895    for (var j = attrLength; j--;) {
896      els[i].removeAttribute(attrs[j]);
897    }
898  }
899}
900
901/***/ }),
902
vendor: 933 bytes, lines 903-925
903/***/ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js":
904/*!***************************************************************!*\
905  !*** ./node_modules/tiny-slider/src/helpers/removeCSSRule.js ***!
906  \***************************************************************/
907/*! exports provided: removeCSSRule */
908/***/ (function(module, __webpack_exports__, __webpack_require__) {
909
910"use strict";
911__webpack_require__.r(__webpack_exports__);
912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCSSRule", function() { return removeCSSRule; });
913/* harmony import */ var _raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
914// cross browsers addRule method
915
916function removeCSSRule(sheet, index) {
917  // return raf(function() {
918    'deleteRule' in sheet ?
919      sheet.deleteRule(index) :
920      sheet.removeRule(index);
921  // });
922}
923
924/***/ }),
925
vendor: 1,125 bytes, lines 926-949
926/***/ "./node_modules/tiny-slider/src/helpers/removeClass.js":
927/*!*************************************************************!*\
928  !*** ./node_modules/tiny-slider/src/helpers/removeClass.js ***!
929  \*************************************************************/
930/*! exports provided: removeClass */
931/***/ (function(module, __webpack_exports__, __webpack_require__) {
932
933"use strict";
934__webpack_require__.r(__webpack_exports__);
935/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClass", function() { return removeClass; });
936/* harmony import */ var _hasClass_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
937
938var removeClass = _hasClass_js__WEBPACK_IMPORTED_MODULE_0__["classListSupport"] ?
939    function (el, str) {
940      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el,  str)) { el.classList.remove(str); }
941    } :
942    function (el, str) {
943      if (Object(_hasClass_js__WEBPACK_IMPORTED_MODULE_0__["hasClass"])(el, str)) { el.className = el.className.replace(str, ''); }
944    };
945
946
947
948/***/ }),
949
vendor: 1,011 bytes, lines 950-971
950/***/ "./node_modules/tiny-slider/src/helpers/removeEvents.js":
951/*!**************************************************************!*\
952  !*** ./node_modules/tiny-slider/src/helpers/removeEvents.js ***!
953  \**************************************************************/
954/*! exports provided: removeEvents */
955/***/ (function(module, __webpack_exports__, __webpack_require__) {
956
957"use strict";
958__webpack_require__.r(__webpack_exports__);
959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeEvents", function() { return removeEvents; });
960/* harmony import */ var _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./passiveOption.js */ "./node_modules/tiny-slider/src/helpers/passiveOption.js");
961
962
963function removeEvents(el, obj) {
964  for (var prop in obj) {
965    var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 ? _passiveOption_js__WEBPACK_IMPORTED_MODULE_0__["passiveOption"] : false;
966    el.removeEventListener(prop, obj[prop], option);
967  }
968}
969
970/***/ }),
971
vendor: 1,108 bytes, lines 972-996
972/***/ "./node_modules/tiny-slider/src/helpers/resetFakeBody.js":
973/*!***************************************************************!*\
974  !*** ./node_modules/tiny-slider/src/helpers/resetFakeBody.js ***!
975  \***************************************************************/
976/*! exports provided: resetFakeBody */
977/***/ (function(module, __webpack_exports__, __webpack_require__) {
978
979"use strict";
980__webpack_require__.r(__webpack_exports__);
981/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetFakeBody", function() { return resetFakeBody; });
982/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
983
984
985function resetFakeBody (body, docOverflow) {
986  if (body.fake) {
987    body.remove();
988    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = docOverflow;
989    // Trigger layout so kinetic scrolling isn't disabled in iOS6+
990    // eslint-disable-next-line
991    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].offsetHeight;
992  }
993}
994
995/***/ }),
996
vendor: 1,068 bytes, lines 997-1022
997/***/ "./node_modules/tiny-slider/src/helpers/setAttrs.js":
998/*!**********************************************************!*\
999  !*** ./node_modules/tiny-slider/src/helpers/setAttrs.js ***!
1000  \**********************************************************/
1001/*! exports provided: setAttrs */
1002/***/ (function(module, __webpack_exports__, __webpack_require__) {
1003
1004"use strict";
1005__webpack_require__.r(__webpack_exports__);
1006/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAttrs", function() { return setAttrs; });
1007/* harmony import */ var _isNodeList_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNodeList.js */ "./node_modules/tiny-slider/src/helpers/isNodeList.js");
1008
1009
1010function setAttrs(els, attrs) {
1011  els = (Object(_isNodeList_js__WEBPACK_IMPORTED_MODULE_0__["isNodeList"])(els) || els instanceof Array) ? els : [els];
1012  if (Object.prototype.toString.call(attrs) !== '[object Object]') { return; }
1013
1014  for (var i = els.length; i--;) {
1015    for(var key in attrs) {
1016      els[i].setAttribute(key, attrs[key]);
1017    }
1018  }
1019}
1020
1021/***/ }),
1022
vendor: 1,310 bytes, lines 1023-1051
1023/***/ "./node_modules/tiny-slider/src/helpers/setFakeBody.js":
1024/*!*************************************************************!*\
1025  !*** ./node_modules/tiny-slider/src/helpers/setFakeBody.js ***!
1026  \*************************************************************/
1027/*! exports provided: setFakeBody */
1028/***/ (function(module, __webpack_exports__, __webpack_require__) {
1029
1030"use strict";
1031__webpack_require__.r(__webpack_exports__);
1032/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFakeBody", function() { return setFakeBody; });
1033/* harmony import */ var _docElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./docElement.js */ "./node_modules/tiny-slider/src/helpers/docElement.js");
1034
1035
1036function setFakeBody (body) {
1037  var docOverflow = '';
1038  if (body.fake) {
1039    docOverflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow;
1040    //avoid crashing IE8, if background image is used
1041    body.style.background = '';
1042    //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
1043    body.style.overflow = _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].style.overflow = 'hidden';
1044    _docElement_js__WEBPACK_IMPORTED_MODULE_0__["docElement"].appendChild(body);
1045  }
1046
1047  return docOverflow;
1048}
1049
1050/***/ }),
1051
vendor: 741 bytes, lines 1052-1070
1052/***/ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js":
1053/*!*****************************************************************!*\
1054  !*** ./node_modules/tiny-slider/src/helpers/setLocalStorage.js ***!
1055  \*****************************************************************/
1056/*! exports provided: setLocalStorage */
1057/***/ (function(module, __webpack_exports__, __webpack_require__) {
1058
1059"use strict";
1060__webpack_require__.r(__webpack_exports__);
1061/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocalStorage", function() { return setLocalStorage; });
1062function setLocalStorage(storage, key, value, access) {
1063  if (access) {
1064    try { storage.setItem(key, value); } catch (e) {}
1065  }
1066  return value;
1067}
1068
1069/***/ }),
1070
vendor: 667 bytes, lines 1071-1086
1071/***/ "./node_modules/tiny-slider/src/helpers/showElement.js":
1072/*!*************************************************************!*\
1073  !*** ./node_modules/tiny-slider/src/helpers/showElement.js ***!
1074  \*************************************************************/
1075/*! exports provided: showElement */
1076/***/ (function(module, __webpack_exports__, __webpack_require__) {
1077
1078"use strict";
1079__webpack_require__.r(__webpack_exports__);
1080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showElement", function() { return showElement; });
1081function showElement(el, forceHide) {
1082  if (el.style.display === 'none') { el.style.display = ''; }
1083}
1084
1085/***/ }),
1086
vendor: 618 bytes, lines 1087-1102
1087/***/ "./node_modules/tiny-slider/src/helpers/toDegree.js":
1088/*!**********************************************************!*\
1089  !*** ./node_modules/tiny-slider/src/helpers/toDegree.js ***!
1090  \**********************************************************/
1091/*! exports provided: toDegree */
1092/***/ (function(module, __webpack_exports__, __webpack_require__) {
1093
1094"use strict";
1095__webpack_require__.r(__webpack_exports__);
1096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDegree", function() { return toDegree; });
1097function toDegree (y, x) {
1098  return Math.atan2(y, x) * (180 / Math.PI);
1099}
1100
1101/***/ }),
1102
vendor: 1,200 bytes, lines 1103-1140
1103/***/ "./node_modules/tiny-slider/src/helpers/whichProperty.js":
1104/*!***************************************************************!*\
1105  !*** ./node_modules/tiny-slider/src/helpers/whichProperty.js ***!
1106  \***************************************************************/
1107/*! exports provided: whichProperty */
1108/***/ (function(module, __webpack_exports__, __webpack_require__) {
1109
1110"use strict";
1111__webpack_require__.r(__webpack_exports__);
1112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whichProperty", function() { return whichProperty; });
1113function whichProperty(props){
1114  if (typeof props === 'string') {
1115    var arr = [props],
1116        Props = props.charAt(0).toUpperCase() + props.substr(1),
1117        prefixes = ['Webkit', 'Moz', 'ms', 'O'];
1118        
1119    prefixes.forEach(function(prefix) {
1120      if (prefix !== 'ms' || props === 'transform') {
1121        arr.push(prefix + Props);
1122      }
1123    });
1124
1125    props = arr;
1126  }
1127
1128  var el = document.createElement('fakeelement'),
1129      len = props.length;
1130  for(var i = 0; i < props.length; i++){
1131    var prop = props[i];
1132    if( el.style[prop] !== undefined ){ return prop; }
1133  }
1134
1135  return false; // explicit for ie9-
1136}
1137
1138
1139/***/ }),
1140
vendor: 109,421 bytes, lines 1141-3954
1141/***/ "./node_modules/tiny-slider/src/tiny-slider.js":
1142/*!*****************************************************!*\
1143  !*** ./node_modules/tiny-slider/src/tiny-slider.js ***!
1144  \*****************************************************/
1145/*! exports provided: tns */
1146/***/ (function(module, __webpack_exports__, __webpack_require__) {
1147
1148"use strict";
1149__webpack_require__.r(__webpack_exports__);
1150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return tns; });
1151/* harmony import */ var _helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/raf.js */ "./node_modules/tiny-slider/src/helpers/raf.js");
1152/* harmony import */ var _helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/caf.js */ "./node_modules/tiny-slider/src/helpers/caf.js");
1153/* harmony import */ var _helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers/extend.js */ "./node_modules/tiny-slider/src/helpers/extend.js");
1154/* harmony import */ var _helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers/checkStorageValue.js */ "./node_modules/tiny-slider/src/helpers/checkStorageValue.js");
1155/* harmony import */ var _helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers/setLocalStorage.js */ "./node_modules/tiny-slider/src/helpers/setLocalStorage.js");
1156/* harmony import */ var _helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers/getSlideId.js */ "./node_modules/tiny-slider/src/helpers/getSlideId.js");
1157/* harmony import */ var _helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers/calc.js */ "./node_modules/tiny-slider/src/helpers/calc.js");
1158/* harmony import */ var _helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./helpers/percentageLayout.js */ "./node_modules/tiny-slider/src/helpers/percentageLayout.js");
1159/* harmony import */ var _helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers/mediaquerySupport.js */ "./node_modules/tiny-slider/src/helpers/mediaquerySupport.js");
1160/* harmony import */ var _helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/createStyleSheet.js */ "./node_modules/tiny-slider/src/helpers/createStyleSheet.js");
1161/* harmony import */ var _helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helpers/addCSSRule.js */ "./node_modules/tiny-slider/src/helpers/addCSSRule.js");
1162/* harmony import */ var _helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/removeCSSRule.js */ "./node_modules/tiny-slider/src/helpers/removeCSSRule.js");
1163/* harmony import */ var _helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/getCssRulesLength.js */ "./node_modules/tiny-slider/src/helpers/getCssRulesLength.js");
1164/* harmony import */ var _helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./helpers/toDegree.js */ "./node_modules/tiny-slider/src/helpers/toDegree.js");
1165/* harmony import */ var _helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/getTouchDirection.js */ "./node_modules/tiny-slider/src/helpers/getTouchDirection.js");
1166/* harmony import */ var _helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/forEach.js */ "./node_modules/tiny-slider/src/helpers/forEach.js");
1167/* harmony import */ var _helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/hasClass.js */ "./node_modules/tiny-slider/src/helpers/hasClass.js");
1168/* harmony import */ var _helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./helpers/addClass.js */ "./node_modules/tiny-slider/src/helpers/addClass.js");
1169/* harmony import */ var _helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./helpers/removeClass.js */ "./node_modules/tiny-slider/src/helpers/removeClass.js");
1170/* harmony import */ var _helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./helpers/hasAttr.js */ "./node_modules/tiny-slider/src/helpers/hasAttr.js");
1171/* harmony import */ var _helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./helpers/getAttr.js */ "./node_modules/tiny-slider/src/helpers/getAttr.js");
1172/* harmony import */ var _helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./helpers/setAttrs.js */ "./node_modules/tiny-slider/src/helpers/setAttrs.js");
1173/* harmony import */ var _helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./helpers/removeAttrs.js */ "./node_modules/tiny-slider/src/helpers/removeAttrs.js");
1174/* harmony import */ var _helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./helpers/arrayFromNodeList.js */ "./node_modules/tiny-slider/src/helpers/arrayFromNodeList.js");
1175/* harmony import */ var _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./helpers/hideElement.js */ "./node_modules/tiny-slider/src/helpers/hideElement.js");
1176/* harmony import */ var _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./helpers/showElement.js */ "./node_modules/tiny-slider/src/helpers/showElement.js");
1177/* harmony import */ var _helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./helpers/isVisible.js */ "./node_modules/tiny-slider/src/helpers/isVisible.js");
1178/* harmony import */ var _helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./helpers/whichProperty.js */ "./node_modules/tiny-slider/src/helpers/whichProperty.js");
1179/* harmony import */ var _helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./helpers/has3DTransforms.js */ "./node_modules/tiny-slider/src/helpers/has3DTransforms.js");
1180/* harmony import */ var _helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./helpers/getEndProperty.js */ "./node_modules/tiny-slider/src/helpers/getEndProperty.js");
1181/* harmony import */ var _helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./helpers/addEvents.js */ "./node_modules/tiny-slider/src/helpers/addEvents.js");
1182/* harmony import */ var _helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./helpers/removeEvents.js */ "./node_modules/tiny-slider/src/helpers/removeEvents.js");
1183/* harmony import */ var _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./helpers/events.js */ "./node_modules/tiny-slider/src/helpers/events.js");
1184/* harmony import */ var _helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./helpers/jsTransform.js */ "./node_modules/tiny-slider/src/helpers/jsTransform.js");
1185// Object.keys
1186if (!Object.keys) {
1187  Object.keys = function(object) {
1188    var keys = [];
1189    for (var name in object) {
1190      if (Object.prototype.hasOwnProperty.call(object, name)) {
1191        keys.push(name);
1192      }
1193    }
1194    return keys;
1195  };
1196}
1197
1198// ChildNode.remove
1199if(!("remove" in Element.prototype)){
1200  Element.prototype.remove = function(){
1201    if(this.parentNode) {
1202      this.parentNode.removeChild(this);
1203    }
1204  };
1205}
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242var tns = function(options) {
1243  options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])({
1244    container: '.slider',
1245    mode: 'carousel',
1246    axis: 'horizontal',
1247    items: 1,
1248    gutter: 0,
1249    edgePadding: 0,
1250    fixedWidth: false,
1251    autoWidth: false,
1252    viewportMax: false,
1253    slideBy: 1,
1254    center: false,
1255    controls: true,
1256    controlsPosition: 'top',
1257    controlsText: ['prev', 'next'],
1258    controlsContainer: false,
1259    prevButton: false,
1260    nextButton: false,
1261    nav: true,
1262    navPosition: 'top',
1263    navContainer: false,
1264    navAsThumbnails: false,
1265    arrowKeys: false,
1266    speed: 300,
1267    autoplay: false,
1268    autoplayPosition: 'top',
1269    autoplayTimeout: 5000,
1270    autoplayDirection: 'forward',
1271    autoplayText: ['start', 'stop'],
1272    autoplayHoverPause: false,
1273    autoplayButton: false,
1274    autoplayButtonOutput: true,
1275    autoplayResetOnVisibility: true,
1276    animateIn: 'tns-fadeIn',
1277    animateOut: 'tns-fadeOut',
1278    animateNormal: 'tns-normal',
1279    animateDelay: false,
1280    loop: true,
1281    rewind: false,
1282    autoHeight: false,
1283    responsive: false,
1284    lazyload: false,
1285    lazyloadSelector: '.tns-lazy-img',
1286    touch: true,
1287    mouseDrag: false,
1288    swipeAngle: 15,
1289    nested: false,
1290    preventActionWhenRunning: false,
1291    preventScrollOnTouch: false,
1292    freezable: true,
1293    onInit: false,
1294    useLocalStorage: true,
1295    nonce: false
1296  }, options || {});
1297
1298  var doc = document,
1299      win = window,
1300      KEYS = {
1301        ENTER: 13,
1302        SPACE: 32,
1303        LEFT: 37,
1304        RIGHT: 39
1305      },
1306      tnsStorage = {},
1307      localStorageAccess = options.useLocalStorage;
1308
1309  if (localStorageAccess) {
1310    // check browser version and local storage access
1311    var browserInfo = navigator.userAgent;
1312    var uid = new Date;
1313
1314    try {
1315      tnsStorage = win.localStorage;
1316      if (tnsStorage) {
1317        tnsStorage.setItem(uid, uid);
1318        localStorageAccess = tnsStorage.getItem(uid) == uid;
1319        tnsStorage.removeItem(uid);
1320      } else {
1321        localStorageAccess = false;
1322      }
1323      if (!localStorageAccess) { tnsStorage = {}; }
1324    } catch(e) {
1325      localStorageAccess = false;
1326    }
1327
1328    if (localStorageAccess) {
1329      // remove storage when browser version changes
1330      if (tnsStorage['tnsApp'] && tnsStorage['tnsApp'] !== browserInfo) {
1331        ['tC', 'tPL', 'tMQ', 'tTf', 't3D', 'tTDu', 'tTDe', 'tADu', 'tADe', 'tTE', 'tAE'].forEach(function(item) { tnsStorage.removeItem(item); });
1332      }
1333      // update browserInfo
1334      localStorage['tnsApp'] = browserInfo;
1335    }
1336  }
1337
1338  var CALC = tnsStorage['tC'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tC']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tC', Object(_helpers_calc_js__WEBPACK_IMPORTED_MODULE_6__["calc"])(), localStorageAccess),
1339      PERCENTAGELAYOUT = tnsStorage['tPL'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tPL']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tPL', Object(_helpers_percentageLayout_js__WEBPACK_IMPORTED_MODULE_7__["percentageLayout"])(), localStorageAccess),
1340      CSSMQ = tnsStorage['tMQ'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tMQ']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tMQ', Object(_helpers_mediaquerySupport_js__WEBPACK_IMPORTED_MODULE_8__["mediaquerySupport"])(), localStorageAccess),
1341      TRANSFORM = tnsStorage['tTf'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTf']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTf', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transform'), localStorageAccess),
1342      HAS3DTRANSFORMS = tnsStorage['t3D'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['t3D']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 't3D', Object(_helpers_has3DTransforms_js__WEBPACK_IMPORTED_MODULE_28__["has3DTransforms"])(TRANSFORM), localStorageAccess),
1343      TRANSITIONDURATION = tnsStorage['tTDu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDuration'), localStorageAccess),
1344      TRANSITIONDELAY = tnsStorage['tTDe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTDe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTDe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('transitionDelay'), localStorageAccess),
1345      ANIMATIONDURATION = tnsStorage['tADu'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADu']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADu', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDuration'), localStorageAccess),
1346      ANIMATIONDELAY = tnsStorage['tADe'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tADe']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tADe', Object(_helpers_whichProperty_js__WEBPACK_IMPORTED_MODULE_27__["whichProperty"])('animationDelay'), localStorageAccess),
1347      TRANSITIONEND = tnsStorage['tTE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tTE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tTE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(TRANSITIONDURATION, 'Transition'), localStorageAccess),
1348      ANIMATIONEND = tnsStorage['tAE'] ? Object(_helpers_checkStorageValue_js__WEBPACK_IMPORTED_MODULE_3__["checkStorageValue"])(tnsStorage['tAE']) : Object(_helpers_setLocalStorage_js__WEBPACK_IMPORTED_MODULE_4__["setLocalStorage"])(tnsStorage, 'tAE', Object(_helpers_getEndProperty_js__WEBPACK_IMPORTED_MODULE_29__["getEndProperty"])(ANIMATIONDURATION, 'Animation'), localStorageAccess);
1349
1350  // get element nodes from selectors
1351  var supportConsoleWarn = win.console && typeof win.console.warn === "function",
1352      tnsList = ['container', 'controlsContainer', 'prevButton', 'nextButton', 'navContainer', 'autoplayButton'],
1353      optionsElements = {};
1354
1355  tnsList.forEach(function(item) {
1356    if (typeof options[item] === 'string') {
1357      var str = options[item],
1358          el = doc.querySelector(str);
1359      optionsElements[item] = str;
1360
1361      if (el && el.nodeName) {
1362        options[item] = el;
1363      } else {
1364        if (supportConsoleWarn) { console.warn('Can\'t find', options[item]); }
1365        return;
1366      }
1367    }
1368  });
1369
1370  // make sure at least 1 slide
1371  if (options.container.children.length < 1) {
1372    if (supportConsoleWarn) { console.warn('No slides found in', options.container); }
1373    return;
1374   }
1375
1376  // update options
1377  var responsive = options.responsive,
1378      nested = options.nested,
1379      carousel = options.mode === 'carousel' ? true : false;
1380
1381  if (responsive) {
1382    // apply responsive[0] to options and remove it
1383    if (0 in responsive) {
1384      options = Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, responsive[0]);
1385      delete responsive[0];
1386    }
1387
1388    var responsiveTem = {};
1389    for (var key in responsive) {
1390      var val = responsive[key];
1391      // update responsive
1392      // from: 300: 2
1393      // to:
1394      //   300: {
1395      //     items: 2
1396      //   }
1397      val = typeof val === 'number' ? {items: val} : val;
1398      responsiveTem[key] = val;
1399    }
1400    responsive = responsiveTem;
1401    responsiveTem = null;
1402  }
1403
1404  // update options
1405  function updateOptions (obj) {
1406    for (var key in obj) {
1407      if (!carousel) {
1408        if (key === 'slideBy') { obj[key] = 'page'; }
1409        if (key === 'edgePadding') { obj[key] = false; }
1410        if (key === 'autoHeight') { obj[key] = false; }
1411      }
1412
1413      // update responsive options
1414      if (key === 'responsive') { updateOptions(obj[key]); }
1415    }
1416  }
1417  if (!carousel) { updateOptions(options); }
1418
1419
1420  // === define and set variables ===
1421  if (!carousel) {
1422    options.axis = 'horizontal';
1423    options.slideBy = 'page';
1424    options.edgePadding = false;
1425
1426    var animateIn = options.animateIn,
1427        animateOut = options.animateOut,
1428        animateDelay = options.animateDelay,
1429        animateNormal = options.animateNormal;
1430  }
1431
1432  var horizontal = options.axis === 'horizontal' ? true : false,
1433      outerWrapper = doc.createElement('div'),
1434      innerWrapper = doc.createElement('div'),
1435      middleWrapper,
1436      container = options.container,
1437      containerParent = container.parentNode,
1438      containerHTML = container.outerHTML,
1439      slideItems = container.children,
1440      slideCount = slideItems.length,
1441      breakpointZone,
1442      windowWidth = getWindowWidth(),
1443      isOn = false;
1444  if (responsive) { setBreakpointZone(); }
1445  if (carousel) { container.className += ' tns-vpfix'; }
1446
1447  // fixedWidth: viewport > rightBoundary > indexMax
1448  var autoWidth = options.autoWidth,
1449      fixedWidth = getOption('fixedWidth'),
1450      edgePadding = getOption('edgePadding'),
1451      gutter = getOption('gutter'),
1452      viewport = getViewportWidth(),
1453      center = getOption('center'),
1454      items = !autoWidth ? Math.floor(getOption('items')) : 1,
1455      slideBy = getOption('slideBy'),
1456      viewportMax = options.viewportMax || options.fixedWidthViewportWidth,
1457      arrowKeys = getOption('arrowKeys'),
1458      speed = getOption('speed'),
1459      rewind = options.rewind,
1460      loop = rewind ? false : options.loop,
1461      autoHeight = getOption('autoHeight'),
1462      controls = getOption('controls'),
1463      controlsText = getOption('controlsText'),
1464      nav = getOption('nav'),
1465      touch = getOption('touch'),
1466      mouseDrag = getOption('mouseDrag'),
1467      autoplay = getOption('autoplay'),
1468      autoplayTimeout = getOption('autoplayTimeout'),
1469      autoplayText = getOption('autoplayText'),
1470      autoplayHoverPause = getOption('autoplayHoverPause'),
1471      autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'),
1472      sheet = Object(_helpers_createStyleSheet_js__WEBPACK_IMPORTED_MODULE_9__["createStyleSheet"])(null, getOption('nonce')),
1473      lazyload = options.lazyload,
1474      lazyloadSelector = options.lazyloadSelector,
1475      slidePositions, // collection of slide positions
1476      slideItemsOut = [],
1477      cloneCount = loop ? getCloneCountForLoop() : 0,
1478      slideCountNew = !carousel ? slideCount + cloneCount : slideCount + cloneCount * 2,
1479      hasRightDeadZone = (fixedWidth || autoWidth) && !loop ? true : false,
1480      rightBoundary = fixedWidth ? getRightBoundary() : null,
1481      updateIndexBeforeTransform = (!carousel || !loop) ? true : false,
1482      // transform
1483      transformAttr = horizontal ? 'left' : 'top',
1484      transformPrefix = '',
1485      transformPostfix = '',
1486      // index
1487      getIndexMax = (function () {
1488        if (fixedWidth) {
1489          return function() { return center && !loop ? slideCount - 1 : Math.ceil(- rightBoundary / (fixedWidth + gutter)); };
1490        } else if (autoWidth) {
1491          return function() {
1492            for (var i = 0; i < slideCountNew; i++) {
1493              if (slidePositions[i] >= - rightBoundary) { return i; }
1494            }
1495          };
1496        } else {
1497          return function() {
1498            if (center && carousel && !loop) {
1499              return slideCount - 1;
1500            } else {
1501              return loop || carousel ? Math.max(0, slideCountNew - Math.ceil(items)) : slideCountNew - 1;
1502            }
1503          };
1504        }
1505      })(),
1506      index = getStartIndex(getOption('startIndex')),
1507      indexCached = index,
1508      displayIndex = getCurrentSlide(),
1509      indexMin = 0,
1510      indexMax = !autoWidth ? getIndexMax() : null,
1511      // resize
1512      resizeTimer,
1513      preventActionWhenRunning = options.preventActionWhenRunning,
1514      swipeAngle = options.swipeAngle,
1515      moveDirectionExpected = swipeAngle ? '?' : true,
1516      running = false,
1517      onInit = options.onInit,
1518      events = new _helpers_events_js__WEBPACK_IMPORTED_MODULE_32__["Events"](),
1519      // id, class
1520      newContainerClasses = ' tns-slider tns-' + options.mode,
1521      slideId = container.id || Object(_helpers_getSlideId_js__WEBPACK_IMPORTED_MODULE_5__["getSlideId"])(),
1522      disable = getOption('disable'),
1523      disabled = false,
1524      freezable = options.freezable,
1525      freeze = freezable && !autoWidth ? getFreeze() : false,
1526      frozen = false,
1527      controlsEvents = {
1528        'click': onControlsClick,
1529        'keydown': onControlsKeydown
1530      },
1531      navEvents = {
1532        'click': onNavClick,
1533        'keydown': onNavKeydown
1534      },
1535      hoverEvents = {
1536        'mouseover': mouseoverPause,
1537        'mouseout': mouseoutRestart
1538      },
1539      visibilityEvent = {'visibilitychange': onVisibilityChange},
1540      docmentKeydownEvent = {'keydown': onDocumentKeydown},
1541      touchEvents = {
1542        'touchstart': onPanStart,
1543        'touchmove': onPanMove,
1544        'touchend': onPanEnd,
1545        'touchcancel': onPanEnd
1546      }, dragEvents = {
1547        'mousedown': onPanStart,
1548        'mousemove': onPanMove,
1549        'mouseup': onPanEnd,
1550        'mouseleave': onPanEnd
1551      },
1552      hasControls = hasOption('controls'),
1553      hasNav = hasOption('nav'),
1554      navAsThumbnails = autoWidth ? true : options.navAsThumbnails,
1555      hasAutoplay = hasOption('autoplay'),
1556      hasTouch = hasOption('touch'),
1557      hasMouseDrag = hasOption('mouseDrag'),
1558      slideActiveClass = 'tns-slide-active',
1559      slideClonedClass = 'tns-slide-cloned',
1560      imgCompleteClass = 'tns-complete',
1561      imgEvents = {
1562        'load': onImgLoaded,
1563        'error': onImgFailed
1564      },
1565      imgsComplete,
1566      liveregionCurrent,
1567      preventScroll = options.preventScrollOnTouch === 'force' ? true : false;
1568
1569  // controls
1570  if (hasControls) {
1571    var controlsContainer = options.controlsContainer,
1572        controlsContainerHTML = options.controlsContainer ? options.controlsContainer.outerHTML : '',
1573        prevButton = options.prevButton,
1574        nextButton = options.nextButton,
1575        prevButtonHTML = options.prevButton ? options.prevButton.outerHTML : '',
1576        nextButtonHTML = options.nextButton ? options.nextButton.outerHTML : '',
1577        prevIsButton,
1578        nextIsButton;
1579  }
1580
1581  // nav
1582  if (hasNav) {
1583    var navContainer = options.navContainer,
1584        navContainerHTML = options.navContainer ? options.navContainer.outerHTML : '',
1585        navItems,
1586        pages = autoWidth ? slideCount : getPages(),
1587        pagesCached = 0,
1588        navClicked = -1,
1589        navCurrentIndex = getCurrentNavIndex(),
1590        navCurrentIndexCached = navCurrentIndex,
1591        navActiveClass = 'tns-nav-active',
1592        navStr = 'Carousel Page ',
1593        navStrCurrent = ' (Current Slide)';
1594  }
1595
1596  // autoplay
1597  if (hasAutoplay) {
1598    var autoplayDirection = options.autoplayDirection === 'forward' ? 1 : -1,
1599        autoplayButton = options.autoplayButton,
1600        autoplayButtonHTML = options.autoplayButton ? options.autoplayButton.outerHTML : '',
1601        autoplayHtmlStrings = ['<span class=\'tns-visually-hidden\'>', ' animation</span>'],
1602        autoplayTimer,
1603        animating,
1604        autoplayHoverPaused,
1605        autoplayUserPaused,
1606        autoplayVisibilityPaused;
1607  }
1608
1609  if (hasTouch || hasMouseDrag) {
1610    var initPosition = {},
1611        lastPosition = {},
1612        translateInit,
1613        disX,
1614        disY,
1615        panStart = false,
1616        rafIndex,
1617        getDist = horizontal ?
1618          function(a, b) { return a.x - b.x; } :
1619          function(a, b) { return a.y - b.y; };
1620  }
1621
1622  // disable slider when slidecount <= items
1623  if (!autoWidth) { resetVariblesWhenDisable(disable || freeze); }
1624
1625  if (TRANSFORM) {
1626    transformAttr = TRANSFORM;
1627    transformPrefix = 'translate';
1628
1629    if (HAS3DTRANSFORMS) {
1630      transformPrefix += horizontal ? '3d(' : '3d(0px, ';
1631      transformPostfix = horizontal ? ', 0px, 0px)' : ', 0px)';
1632    } else {
1633      transformPrefix += horizontal ? 'X(' : 'Y(';
1634      transformPostfix = ')';
1635    }
1636
1637  }
1638
1639  if (carousel) { container.className = container.className.replace('tns-vpfix', ''); }
1640  initStructure();
1641  initSheet();
1642  initSliderTransform();
1643
1644  // === COMMON FUNCTIONS === //
1645  function resetVariblesWhenDisable (condition) {
1646    if (condition) {
1647      controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false;
1648    }
1649  }
1650
1651  function getCurrentSlide () {
1652    var tem = carousel ? index - cloneCount : index;
1653    while (tem < 0) { tem += slideCount; }
1654    return tem%slideCount + 1;
1655  }
1656
1657  function getStartIndex (ind) {
1658    ind = ind ? Math.max(0, Math.min(loop ? slideCount - 1 : slideCount - items, ind)) : 0;
1659    return carousel ? ind + cloneCount : ind;
1660  }
1661
1662  function getAbsIndex (i) {
1663    if (i == null) { i = index; }
1664
1665    if (carousel) { i -= cloneCount; }
1666    while (i < 0) { i += slideCount; }
1667
1668    return Math.floor(i%slideCount);
1669  }
1670
1671  function getCurrentNavIndex () {
1672    var absIndex = getAbsIndex(),
1673        result;
1674
1675    result = navAsThumbnails ? absIndex :
1676      fixedWidth || autoWidth ? Math.ceil((absIndex + 1) * pages / slideCount - 1) :
1677          Math.floor(absIndex / items);
1678
1679    // set active nav to the last one when reaches the right edge
1680    if (!loop && carousel && index === indexMax) { result = pages - 1; }
1681
1682    return result;
1683  }
1684
1685  function getItemsMax () {
1686    // fixedWidth or autoWidth while viewportMax is not available
1687    if (autoWidth || (fixedWidth && !viewportMax)) {
1688      return slideCount - 1;
1689    // most cases
1690    } else {
1691      var str = fixedWidth ? 'fixedWidth' : 'items',
1692          arr = [];
1693
1694      if (fixedWidth || options[str] < slideCount) { arr.push(options[str]); }
1695
1696      if (responsive) {
1697        for (var bp in responsive) {
1698          var tem = responsive[bp][str];
1699          if (tem && (fixedWidth || tem < slideCount)) { arr.push(tem); }
1700        }
1701      }
1702
1703      if (!arr.length) { arr.push(0); }
1704
1705      return Math.ceil(fixedWidth ? viewportMax / Math.min.apply(null, arr) : Math.max.apply(null, arr));
1706    }
1707  }
1708
1709  function getCloneCountForLoop () {
1710    var itemsMax = getItemsMax(),
1711        result = carousel ? Math.ceil((itemsMax * 5 - slideCount)/2) : (itemsMax * 4 - slideCount);
1712    result = Math.max(itemsMax, result);
1713
1714    return hasOption('edgePadding') ? result + 1 : result;
1715  }
1716
1717  function getWindowWidth () {
1718    return win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth;
1719  }
1720
1721  function getInsertPosition (pos) {
1722    return pos === 'top' ? 'afterbegin' : 'beforeend';
1723  }
1724
1725  function getClientWidth (el) {
1726    if (el == null) { return; }
1727    var div = doc.createElement('div'), rect, width;
1728    el.appendChild(div);
1729    rect = div.getBoundingClientRect();
1730    width = rect.right - rect.left;
1731    div.remove();
1732    return width || getClientWidth(el.parentNode);
1733  }
1734
1735  function getViewportWidth () {
1736    var gap = edgePadding ? edgePadding * 2 - gutter : 0;
1737    return getClientWidth(containerParent) - gap;
1738  }
1739
1740  function hasOption (item) {
1741    if (options[item]) {
1742      return true;
1743    } else {
1744      if (responsive) {
1745        for (var bp in responsive) {
1746          if (responsive[bp][item]) { return true; }
1747        }
1748      }
1749      return false;
1750    }
1751  }
1752
1753  // get option:
1754  // fixed width: viewport, fixedWidth, gutter => items
1755  // others: window width => all variables
1756  // all: items => slideBy
1757  function getOption (item, ww) {
1758    if (ww == null) { ww = windowWidth; }
1759
1760    if (item === 'items' && fixedWidth) {
1761      return Math.floor((viewport + gutter) / (fixedWidth + gutter)) || 1;
1762
1763    } else {
1764      var result = options[item];
1765
1766      if (responsive) {
1767        for (var bp in responsive) {
1768          // bp: convert string to number
1769          if (ww >= parseInt(bp)) {
1770            if (item in responsive[bp]) { result = responsive[bp][item]; }
1771          }
1772        }
1773      }
1774
1775      if (item === 'slideBy' && result === 'page') { result = getOption('items'); }
1776      if (!carousel && (item === 'slideBy' || item === 'items')) { result = Math.floor(result); }
1777
1778      return result;
1779    }
1780  }
1781
1782  function getSlideMarginLeft (i) {
1783    return CALC ?
1784      CALC + '(' + i * 100 + '% / ' + slideCountNew + ')' :
1785      i * 100 / slideCountNew + '%';
1786  }
1787
1788  function getInnerWrapperStyles (edgePaddingTem, gutterTem, fixedWidthTem, speedTem, autoHeightBP) {
1789    var str = '';
1790
1791    if (edgePaddingTem !== undefined) {
1792      var gap = edgePaddingTem;
1793      if (gutterTem) { gap -= gutterTem; }
1794      str = horizontal ?
1795        'margin: 0 ' + gap + 'px 0 ' + edgePaddingTem + 'px;' :
1796        'margin: ' + edgePaddingTem + 'px 0 ' + gap + 'px 0;';
1797    } else if (gutterTem && !fixedWidthTem) {
1798      var gutterTemUnit = '-' + gutterTem + 'px',
1799          dir = horizontal ? gutterTemUnit + ' 0 0' : '0 ' + gutterTemUnit + ' 0';
1800      str = 'margin: 0 ' + dir + ';'
1801    }
1802
1803    if (!carousel && autoHeightBP && TRANSITIONDURATION && speedTem) { str += getTransitionDurationStyle(speedTem); }
1804    return str;
1805  }
1806
1807  function getContainerWidth (fixedWidthTem, gutterTem, itemsTem) {
1808    if (fixedWidthTem) {
1809      return (fixedWidthTem + gutterTem) * slideCountNew + 'px';
1810    } else {
1811      return CALC ?
1812        CALC + '(' + slideCountNew * 100 + '% / ' + itemsTem + ')' :
1813        slideCountNew * 100 / itemsTem + '%';
1814    }
1815  }
1816
1817  function getSlideWidthStyle (fixedWidthTem, gutterTem, itemsTem) {
1818    var width;
1819
1820    if (fixedWidthTem) {
1821      width = (fixedWidthTem + gutterTem) + 'px';
1822    } else {
1823      if (!carousel) { itemsTem = Math.floor(itemsTem); }
1824      var dividend = carousel ? slideCountNew : itemsTem;
1825      width = CALC ?
1826        CALC + '(100% / ' + dividend + ')' :
1827        100 / dividend + '%';
1828    }
1829
1830    width = 'width:' + width;
1831
1832    // inner slider: overwrite outer slider styles
1833    return nested !== 'inner' ? width + ';' : width + ' !important;';
1834  }
1835
1836  function getSlideGutterStyle (gutterTem) {
1837    var str = '';
1838
1839    // gutter maybe interger || 0
1840    // so can't use 'if (gutter)'
1841    if (gutterTem !== false) {
1842      var prop = horizontal ? 'padding-' : 'margin-',
1843          dir = horizontal ? 'right' : 'bottom';
1844      str = prop +  dir + ': ' + gutterTem + 'px;';
1845    }
1846
1847    return str;
1848  }
1849
1850  function getCSSPrefix (name, num) {
1851    var prefix = name.substring(0, name.length - num).toLowerCase();
1852    if (prefix) { prefix = '-' + prefix + '-'; }
1853
1854    return prefix;
1855  }
1856
1857  function getTransitionDurationStyle (speed) {
1858    return getCSSPrefix(TRANSITIONDURATION, 18) + 'transition-duration:' + speed / 1000 + 's;';
1859  }
1860
1861  function getAnimationDurationStyle (speed) {
1862    return getCSSPrefix(ANIMATIONDURATION, 17) + 'animation-duration:' + speed / 1000 + 's;';
1863  }
1864
1865  function initStructure () {
1866    var classOuter = 'tns-outer',
1867        classInner = 'tns-inner',
1868        hasGutter = hasOption('gutter');
1869
1870    outerWrapper.className = classOuter;
1871    innerWrapper.className = classInner;
1872    outerWrapper.id = slideId + '-ow';
1873    innerWrapper.id = slideId + '-iw';
1874
1875    // set container properties
1876    if (container.id === '') { container.id = slideId; }
1877    newContainerClasses += PERCENTAGELAYOUT || autoWidth ? ' tns-subpixel' : ' tns-no-subpixel';
1878    newContainerClasses += CALC ? ' tns-calc' : ' tns-no-calc';
1879    if (autoWidth) { newContainerClasses += ' tns-autowidth'; }
1880    newContainerClasses += ' tns-' + options.axis;
1881    container.className += newContainerClasses;
1882
1883    // add constrain layer for carousel
1884    if (carousel) {
1885      middleWrapper = doc.createElement('div');
1886      middleWrapper.id = slideId + '-mw';
1887      middleWrapper.className = 'tns-ovh';
1888
1889      outerWrapper.appendChild(middleWrapper);
1890      middleWrapper.appendChild(innerWrapper);
1891    } else {
1892      outerWrapper.appendChild(innerWrapper);
1893    }
1894
1895    if (autoHeight) {
1896      var wp = middleWrapper ? middleWrapper : innerWrapper;
1897      wp.className += ' tns-ah';
1898    }
1899
1900    containerParent.insertBefore(outerWrapper, container);
1901    innerWrapper.appendChild(container);
1902
1903    // add id, class, aria attributes
1904    // before clone slides
1905    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
1906      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-item');
1907      if (!item.id) { item.id = slideId + '-item' + i; }
1908      if (!carousel && animateNormal) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal); }
1909      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
1910        'aria-hidden': 'true',
1911        'tabindex': '-1'
1912      });
1913    });
1914
1915    // ## clone slides
1916    // carousel: n + slides + n
1917    // gallery:      slides + n
1918    if (cloneCount) {
1919      var fragmentBefore = doc.createDocumentFragment(),
1920          fragmentAfter = doc.createDocumentFragment();
1921
1922      for (var j = cloneCount; j--;) {
1923        var num = j%slideCount,
1924            cloneFirst = slideItems[num].cloneNode(true);
1925        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneFirst, slideClonedClass);
1926        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneFirst, 'id');
1927        fragmentAfter.insertBefore(cloneFirst, fragmentAfter.firstChild);
1928
1929        if (carousel) {
1930          var cloneLast = slideItems[slideCount - 1 - num].cloneNode(true);
1931          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(cloneLast, slideClonedClass);
1932          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(cloneLast, 'id');
1933          fragmentBefore.appendChild(cloneLast);
1934        }
1935      }
1936
1937      container.insertBefore(fragmentBefore, container.firstChild);
1938      container.appendChild(fragmentAfter);
1939      slideItems = container.children;
1940    }
1941
1942  }
1943
1944  function initSliderTransform () {
1945    // ## images loaded/failed
1946    if (hasOption('autoHeight') || autoWidth || !horizontal) {
1947      var imgs = container.querySelectorAll('img');
1948
1949      // add img load event listener
1950      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(imgs, function(img) {
1951        var src = img.src;
1952
1953        if (!lazyload) {
1954          // not data img
1955          if (src && src.indexOf('data:image') < 0) {
1956            img.src = '';
1957            Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
1958            Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
1959
1960            img.src = src;
1961          // data img
1962          } else {
1963            imgLoaded(img);
1964          }
1965        }
1966      });
1967
1968      // set imgsComplete
1969      Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), function() { imgsComplete = true; }); });
1970
1971      // reset imgs for auto height: check visible imgs only
1972      if (hasOption('autoHeight')) { imgs = getImageArray(index, Math.min(index + items - 1, slideCountNew - 1)); }
1973
1974      lazyload ? initSliderTransformStyleCheck() : Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(Object(_helpers_arrayFromNodeList_js__WEBPACK_IMPORTED_MODULE_23__["arrayFromNodeList"])(imgs), initSliderTransformStyleCheck); });
1975
1976    } else {
1977      // set container transform property
1978      if (carousel) { doContainerTransformSilent(); }
1979
1980      // update slider tools and events
1981      initTools();
1982      initEvents();
1983    }
1984  }
1985
1986  function initSliderTransformStyleCheck () {
1987    if (autoWidth && slideCount > 1) {
1988      // check styles application
1989      var num = loop ? index : slideCount - 1;
1990
1991      (function stylesApplicationCheck() {
1992        var left = slideItems[num].getBoundingClientRect().left;
1993        var right = slideItems[num - 1].getBoundingClientRect().right;
1994
1995        (Math.abs(left - right) <= 1) ?
1996          initSliderTransformCore() :
1997          setTimeout(function(){ stylesApplicationCheck() }, 16);
1998      })();
1999
2000    } else {
2001      initSliderTransformCore();
2002    }
2003  }
2004
2005
2006  function initSliderTransformCore () {
2007    // run Fn()s which are rely on image loading
2008    if (!horizontal || autoWidth) {
2009      setSlidePositions();
2010
2011      if (autoWidth) {
2012        rightBoundary = getRightBoundary();
2013        if (freezable) { freeze = getFreeze(); }
2014        indexMax = getIndexMax(); // <= slidePositions, rightBoundary <=
2015        resetVariblesWhenDisable(disable || freeze);
2016      } else {
2017        updateContentWrapperHeight();
2018      }
2019    }
2020
2021    // set container transform property
2022    if (carousel) { doContainerTransformSilent(); }
2023
2024    // update slider tools and events
2025    initTools();
2026    initEvents();
2027  }
2028
2029  function initSheet () {
2030    // gallery:
2031    // set animation classes and left value for gallery slider
2032    if (!carousel) {
2033      for (var i = index, l = index + Math.min(slideCount, items); i < l; i++) {
2034        var item = slideItems[i];
2035        item.style.left = (i - index) * 100 / items + '%';
2036        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
2037        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
2038      }
2039    }
2040
2041    // #### LAYOUT
2042
2043    // ## INLINE-BLOCK VS FLOAT
2044
2045    // ## PercentageLayout:
2046    // slides: inline-block
2047    // remove blank space between slides by set font-size: 0
2048
2049    // ## Non PercentageLayout:
2050    // slides: float
2051    //         margin-right: -100%
2052    //         margin-left: ~
2053
2054    // Resource: https://docs.google.com/spreadsheets/d/147up245wwTXeQYve3BRSAD4oVcvQmuGsFteJOeA5xNQ/edit?usp=sharing
2055    if (horizontal) {
2056      if (PERCENTAGELAYOUT || autoWidth) {
2057        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', 'font-size:' + win.getComputedStyle(slideItems[0]).fontSize + ';', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2058        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, 'font-size:0;', Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2059      } else if (carousel) {
2060        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function (slide, i) {
2061          slide.style.marginLeft = getSlideMarginLeft(i);
2062        });
2063      }
2064    }
2065
2066
2067    // ## BASIC STYLES
2068    if (CSSMQ) {
2069      // middle wrapper style
2070      if (TRANSITIONDURATION) {
2071        var str = middleWrapper && options.autoHeight ? getTransitionDurationStyle(options.speed) : '';
2072        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-mw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2073      }
2074
2075      // inner wrapper styles
2076      str = getInnerWrapperStyles(options.edgePadding, options.gutter, options.fixedWidth, options.speed, options.autoHeight);
2077      Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + '-iw', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2078
2079      // container styles
2080      if (carousel) {
2081        str = horizontal && !autoWidth ? 'width:' + getContainerWidth(options.fixedWidth, options.gutter, options.items) + ';' : '';
2082        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
2083        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId, str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2084      }
2085
2086      // slide styles
2087      str = horizontal && !autoWidth ? getSlideWidthStyle(options.fixedWidth, options.gutter, options.items) : '';
2088      if (options.gutter) { str += getSlideGutterStyle(options.gutter); }
2089      // set gallery items transition-duration
2090      if (!carousel) {
2091        if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); }
2092        if (ANIMATIONDURATION) { str += getAnimationDurationStyle(speed); }
2093      }
2094      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
2095
2096    // non CSS mediaqueries: IE8
2097    // ## update inner wrapper, container, slides if needed
2098    // set inline styles for inner wrapper & container
2099    // insert stylesheet (one line) for slides only (since slides are many)
2100    } else {
2101      // middle wrapper styles
2102      update_carousel_transition_duration();
2103
2104      // inner wrapper styles
2105      innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, autoHeight);
2106
2107      // container styles
2108      if (carousel && horizontal && !autoWidth) {
2109        container.style.width = getContainerWidth(fixedWidth, gutter, items);
2110      }
2111
2112      // slide styles
2113      var str = horizontal && !autoWidth ? getSlideWidthStyle(fixedWidth, gutter, items) : '';
2114      if (gutter) { str += getSlideGutterStyle(gutter); }
2115
2116      // append to the last line
2117      if (str) { Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet)); }
2118    }
2119
2120    // ## MEDIAQUERIES
2121    if (responsive && CSSMQ) {
2122      for (var bp in responsive) {
2123        // bp: convert string to number
2124        bp = parseInt(bp);
2125
2126        var opts = responsive[bp],
2127            str = '',
2128            middleWrapperStr = '',
2129            innerWrapperStr = '',
2130            containerStr = '',
2131            slideStr = '',
2132            itemsBP = !autoWidth ? getOption('items', bp) : null,
2133            fixedWidthBP = getOption('fixedWidth', bp),
2134            speedBP = getOption('speed', bp),
2135            edgePaddingBP = getOption('edgePadding', bp),
2136            autoHeightBP = getOption('autoHeight', bp),
2137            gutterBP = getOption('gutter', bp);
2138
2139        // middle wrapper string
2140        if (TRANSITIONDURATION && middleWrapper && getOption('autoHeight', bp) && 'speed' in opts) {
2141          middleWrapperStr = '#' + slideId + '-mw{' + getTransitionDurationStyle(speedBP) + '}';
2142        }
2143
2144        // inner wrapper string
2145        if ('edgePadding' in opts || 'gutter' in opts) {
2146          innerWrapperStr = '#' + slideId + '-iw{' + getInnerWrapperStyles(edgePaddingBP, gutterBP, fixedWidthBP, speedBP, autoHeightBP) + '}';
2147        }
2148
2149        // container string
2150        if (carousel && horizontal && !autoWidth && ('fixedWidth' in opts || 'items' in opts || (fixedWidth && 'gutter' in opts))) {
2151          containerStr = 'width:' + getContainerWidth(fixedWidthBP, gutterBP, itemsBP) + ';';
2152        }
2153        if (TRANSITIONDURATION && 'speed' in opts) {
2154          containerStr += getTransitionDurationStyle(speedBP);
2155        }
2156        if (containerStr) {
2157          containerStr = '#' + slideId + '{' + containerStr + '}';
2158        }
2159
2160        // slide string
2161        if ('fixedWidth' in opts || (fixedWidth && 'gutter' in opts) || !carousel && 'items' in opts) {
2162          slideStr += getSlideWidthStyle(fixedWidthBP, gutterBP, itemsBP);
2163        }
2164        if ('gutter' in opts) {
2165          slideStr += getSlideGutterStyle(gutterBP);
2166        }
2167        // set gallery items transition-duration
2168        if (!carousel && 'speed' in opts) {
2169          if (TRANSITIONDURATION) { slideStr += getTransitionDurationStyle(speedBP); }
2170          if (ANIMATIONDURATION) { slideStr += getAnimationDurationStyle(speedBP); }
2171        }
2172        if (slideStr) { slideStr = '#' + slideId + ' > .tns-item{' + slideStr + '}'; }
2173
2174        // add up
2175        str = middleWrapperStr + innerWrapperStr + containerStr + slideStr;
2176
2177        if (str) {
2178          sheet.insertRule('@media (min-width: ' + bp / 16 + 'em) {' + str + '}', sheet.cssRules.length);
2179        }
2180      }
2181    }
2182  }
2183
2184  function initTools () {
2185    // == slides ==
2186    updateSlideStatus();
2187
2188    // == live region ==
2189    outerWrapper.insertAdjacentHTML('afterbegin', '<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">' + getLiveRegionStr() + '</span>  of ' + slideCount + '</div>');
2190    liveregionCurrent = outerWrapper.querySelector('.tns-liveregion .current');
2191
2192    // == autoplayInit ==
2193    if (hasAutoplay) {
2194      var txt = autoplay ? 'stop' : 'start';
2195      if (autoplayButton) {
2196        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': txt});
2197      } else if (options.autoplayButtonOutput) {
2198        outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition), '<button type="button" data-action="' + txt + '">' + autoplayHtmlStrings[0] + txt + autoplayHtmlStrings[1] + autoplayText[0] + '</button>');
2199        autoplayButton = outerWrapper.querySelector('[data-action]');
2200      }
2201
2202      // add event
2203      if (autoplayButton) {
2204        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(autoplayButton, {'click': toggleAutoplay});
2205      }
2206
2207      if (autoplay) {
2208        startAutoplay();
2209        if (autoplayHoverPause) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents); }
2210        if (autoplayResetOnVisibility) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, visibilityEvent); }
2211      }
2212    }
2213
2214    // == navInit ==
2215    if (hasNav) {
2216      var initIndex = !carousel ? 0 : cloneCount;
2217      // customized nav
2218      // will not hide the navs in case they're thumbnails
2219      if (navContainer) {
2220        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navContainer, {'aria-label': 'Carousel Pagination'});
2221        navItems = navContainer.children;
2222        Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(navItems, function(item, i) {
2223          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
2224            'data-nav': i,
2225            'tabindex': '-1',
2226            'aria-label': navStr + (i + 1),
2227            'aria-controls': slideId,
2228          });
2229        });
2230
2231      // generated nav
2232      } else {
2233        var navHtml = '',
2234            hiddenStr = navAsThumbnails ? '' : 'style="display:none"';
2235        for (var i = 0; i < slideCount; i++) {
2236          // hide nav items by default
2237          navHtml += '<button type="button" data-nav="' + i +'" tabindex="-1" aria-controls="' + slideId + '" ' + hiddenStr + ' aria-label="' + navStr + (i + 1) +'"></button>';
2238        }
2239        navHtml = '<div class="tns-nav" aria-label="Carousel Pagination">' + navHtml + '</div>';
2240        outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition), navHtml);
2241
2242        navContainer = outerWrapper.querySelector('.tns-nav');
2243        navItems = navContainer.children;
2244      }
2245
2246      updateNavVisibility();
2247
2248      // add transition
2249      if (TRANSITIONDURATION) {
2250        var prefix = TRANSITIONDURATION.substring(0, TRANSITIONDURATION.length - 18).toLowerCase(),
2251            str = 'transition: all ' + speed / 1000 + 's';
2252
2253        if (prefix) {
2254          str = '-' + prefix + '-' + str;
2255        }
2256
2257        Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '[aria-controls^=' + slideId + '-item]', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2258      }
2259
2260      Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navItems[navCurrentIndex], {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
2261      Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navItems[navCurrentIndex], 'tabindex');
2262      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navItems[navCurrentIndex], navActiveClass);
2263
2264      // add events
2265      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(navContainer, navEvents);
2266    }
2267
2268
2269
2270    // == controlsInit ==
2271    if (hasControls) {
2272      if (!controlsContainer && (!prevButton || !nextButton)) {
2273        outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition), '<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[0] + '</button><button type="button" data-controls="next" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[1] + '</button></div>');
2274
2275        controlsContainer = outerWrapper.querySelector('.tns-controls');
2276      }
2277
2278      if (!prevButton || !nextButton) {
2279        prevButton = controlsContainer.children[0];
2280        nextButton = controlsContainer.children[1];
2281      }
2282
2283      if (options.controlsContainer) {
2284        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(controlsContainer, {
2285          'aria-label': 'Carousel Navigation',
2286          'tabindex': '0'
2287        });
2288      }
2289
2290      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
2291        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])([prevButton, nextButton], {
2292          'aria-controls': slideId,
2293          'tabindex': '-1',
2294        });
2295      }
2296
2297      if (options.controlsContainer || (options.prevButton && options.nextButton)) {
2298        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(prevButton, {'data-controls' : 'prev'});
2299        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(nextButton, {'data-controls' : 'next'});
2300      }
2301
2302      prevIsButton = isButton(prevButton);
2303      nextIsButton = isButton(nextButton);
2304
2305      updateControlsStatus();
2306
2307      // add events
2308      if (controlsContainer) {
2309        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(controlsContainer, controlsEvents);
2310      } else {
2311        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(prevButton, controlsEvents);
2312        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(nextButton, controlsEvents);
2313      }
2314    }
2315
2316    // hide tools if needed
2317    disableUI();
2318  }
2319
2320  function initEvents () {
2321    // add events
2322    if (carousel && TRANSITIONEND) {
2323      var eve = {};
2324      eve[TRANSITIONEND] = onTransitionEnd;
2325      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, eve);
2326    }
2327
2328    if (touch) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch); }
2329    if (mouseDrag) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents); }
2330    if (arrowKeys) { Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent); }
2331
2332    if (nested === 'inner') {
2333      events.on('outerResized', function () {
2334        resizeTasks();
2335        events.emit('innerLoaded', info());
2336      });
2337    } else if (responsive || fixedWidth || autoWidth || autoHeight || !horizontal) {
2338      Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(win, {'resize': onResize});
2339    }
2340
2341    if (autoHeight) {
2342      if (nested === 'outer') {
2343        events.on('innerLoaded', doAutoHeight);
2344      } else if (!disable) { doAutoHeight(); }
2345    }
2346
2347    doLazyLoad();
2348    if (disable) { disableSlider(); } else if (freeze) { freezeSlider(); }
2349
2350    events.on('indexChanged', additionalUpdates);
2351    if (nested === 'inner') { events.emit('innerLoaded', info()); }
2352    if (typeof onInit === 'function') { onInit(info()); }
2353    isOn = true;
2354  }
2355
2356  function destroy () {
2357    // sheet
2358    sheet.disabled = true;
2359    if (sheet.ownerNode) { sheet.ownerNode.remove(); }
2360
2361    // remove win event listeners
2362    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(win, {'resize': onResize});
2363
2364    // arrowKeys, controls, nav
2365    if (arrowKeys) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent); }
2366    if (controlsContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(controlsContainer, controlsEvents); }
2367    if (navContainer) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(navContainer, navEvents); }
2368
2369    // autoplay
2370    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
2371    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, visibilityEvent);
2372    if (autoplayButton) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(autoplayButton, {'click': toggleAutoplay}); }
2373    if (autoplay) { clearInterval(autoplayTimer); }
2374
2375    // container
2376    if (carousel && TRANSITIONEND) {
2377      var eve = {};
2378      eve[TRANSITIONEND] = onTransitionEnd;
2379      Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, eve);
2380    }
2381    if (touch) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents); }
2382    if (mouseDrag) { Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents); }
2383
2384    // cache Object values in options && reset HTML
2385    var htmlList = [containerHTML, controlsContainerHTML, prevButtonHTML, nextButtonHTML, navContainerHTML, autoplayButtonHTML];
2386
2387    tnsList.forEach(function(item, i) {
2388      var el = item === 'container' ? outerWrapper : options[item];
2389
2390      if (typeof el === 'object' && el) {
2391        var prevEl = el.previousElementSibling ? el.previousElementSibling : false,
2392            parentEl = el.parentNode;
2393        el.outerHTML = htmlList[i];
2394        options[item] = prevEl ? prevEl.nextElementSibling : parentEl.firstElementChild;
2395      }
2396    });
2397
2398
2399    // reset variables
2400    tnsList = animateIn = animateOut = animateDelay = animateNormal = horizontal = outerWrapper = innerWrapper = container = containerParent = containerHTML = slideItems = slideCount = breakpointZone = windowWidth = autoWidth = fixedWidth = edgePadding = gutter = viewport = items = slideBy = viewportMax = arrowKeys = speed = rewind = loop = autoHeight = sheet = lazyload = slidePositions = slideItemsOut = cloneCount = slideCountNew = hasRightDeadZone = rightBoundary = updateIndexBeforeTransform = transformAttr = transformPrefix = transformPostfix = getIndexMax = index = indexCached = indexMin = indexMax = resizeTimer = swipeAngle = moveDirectionExpected = running = onInit = events = newContainerClasses = slideId = disable = disabled = freezable = freeze = frozen = controlsEvents = navEvents = hoverEvents = visibilityEvent = docmentKeydownEvent = touchEvents = dragEvents = hasControls = hasNav = navAsThumbnails = hasAutoplay = hasTouch = hasMouseDrag = slideActiveClass = imgCompleteClass = imgEvents = imgsComplete = controls = controlsText = controlsContainer = controlsContainerHTML = prevButton = nextButton = prevIsButton = nextIsButton = nav = navContainer = navContainerHTML = navItems = pages = pagesCached = navClicked = navCurrentIndex = navCurrentIndexCached = navActiveClass = navStr = navStrCurrent = autoplay = autoplayTimeout = autoplayDirection = autoplayText = autoplayHoverPause = autoplayButton = autoplayButtonHTML = autoplayResetOnVisibility = autoplayHtmlStrings = autoplayTimer = animating = autoplayHoverPaused = autoplayUserPaused = autoplayVisibilityPaused = initPosition = lastPosition = translateInit = disX = disY = panStart = rafIndex = getDist = touch = mouseDrag = null;
2401    // check variables
2402    // [animateIn, animateOut, animateDelay, animateNormal, horizontal, outerWrapper, innerWrapper, container, containerParent, containerHTML, slideItems, slideCount, breakpointZone, windowWidth, autoWidth, fixedWidth, edgePadding, gutter, viewport, items, slideBy, viewportMax, arrowKeys, speed, rewind, loop, autoHeight, sheet, lazyload, slidePositions, slideItemsOut, cloneCount, slideCountNew, hasRightDeadZone, rightBoundary, updateIndexBeforeTransform, transformAttr, transformPrefix, transformPostfix, getIndexMax, index, indexCached, indexMin, indexMax, resizeTimer, swipeAngle, moveDirectionExpected, running, onInit, events, newContainerClasses, slideId, disable, disabled, freezable, freeze, frozen, controlsEvents, navEvents, hoverEvents, visibilityEvent, docmentKeydownEvent, touchEvents, dragEvents, hasControls, hasNav, navAsThumbnails, hasAutoplay, hasTouch, hasMouseDrag, slideActiveClass, imgCompleteClass, imgEvents, imgsComplete, controls, controlsText, controlsContainer, controlsContainerHTML, prevButton, nextButton, prevIsButton, nextIsButton, nav, navContainer, navContainerHTML, navItems, pages, pagesCached, navClicked, navCurrentIndex, navCurrentIndexCached, navActiveClass, navStr, navStrCurrent, autoplay, autoplayTimeout, autoplayDirection, autoplayText, autoplayHoverPause, autoplayButton, autoplayButtonHTML, autoplayResetOnVisibility, autoplayHtmlStrings, autoplayTimer, animating, autoplayHoverPaused, autoplayUserPaused, autoplayVisibilityPaused, initPosition, lastPosition, translateInit, disX, disY, panStart, rafIndex, getDist, touch, mouseDrag ].forEach(function(item) { if (item !== null) { console.log(item); } });
2403
2404    for (var a in this) {
2405      if (a !== 'rebuild') { this[a] = null; }
2406    }
2407    isOn = false;
2408  }
2409
2410// === ON RESIZE ===
2411  // responsive || fixedWidth || autoWidth || !horizontal
2412  function onResize (e) {
2413    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ resizeTasks(getEvent(e)); });
2414  }
2415
2416  function resizeTasks (e) {
2417    if (!isOn) { return; }
2418    if (nested === 'outer') { events.emit('outerResized', info(e)); }
2419    windowWidth = getWindowWidth();
2420    var bpChanged,
2421        breakpointZoneTem = breakpointZone,
2422        needContainerTransform = false;
2423
2424    if (responsive) {
2425      setBreakpointZone();
2426      bpChanged = breakpointZoneTem !== breakpointZone;
2427      // if (hasRightDeadZone) { needContainerTransform = true; } // *?
2428      if (bpChanged) { events.emit('newBreakpointStart', info(e)); }
2429    }
2430
2431    var indChanged,
2432        itemsChanged,
2433        itemsTem = items,
2434        disableTem = disable,
2435        freezeTem = freeze,
2436        arrowKeysTem = arrowKeys,
2437        controlsTem = controls,
2438        navTem = nav,
2439        touchTem = touch,
2440        mouseDragTem = mouseDrag,
2441        autoplayTem = autoplay,
2442        autoplayHoverPauseTem = autoplayHoverPause,
2443        autoplayResetOnVisibilityTem = autoplayResetOnVisibility,
2444        indexTem = index;
2445
2446    if (bpChanged) {
2447      var fixedWidthTem = fixedWidth,
2448          autoHeightTem = autoHeight,
2449          controlsTextTem = controlsText,
2450          centerTem = center,
2451          autoplayTextTem = autoplayText;
2452
2453      if (!CSSMQ) {
2454        var gutterTem = gutter,
2455            edgePaddingTem = edgePadding;
2456      }
2457    }
2458
2459    // get option:
2460    // fixed width: viewport, fixedWidth, gutter => items
2461    // others: window width => all variables
2462    // all: items => slideBy
2463    arrowKeys = getOption('arrowKeys');
2464    controls = getOption('controls');
2465    nav = getOption('nav');
2466    touch = getOption('touch');
2467    center = getOption('center');
2468    mouseDrag = getOption('mouseDrag');
2469    autoplay = getOption('autoplay');
2470    autoplayHoverPause = getOption('autoplayHoverPause');
2471    autoplayResetOnVisibility = getOption('autoplayResetOnVisibility');
2472
2473    if (bpChanged) {
2474      disable = getOption('disable');
2475      fixedWidth = getOption('fixedWidth');
2476      speed = getOption('speed');
2477      autoHeight = getOption('autoHeight');
2478      controlsText = getOption('controlsText');
2479      autoplayText = getOption('autoplayText');
2480      autoplayTimeout = getOption('autoplayTimeout');
2481
2482      if (!CSSMQ) {
2483        edgePadding = getOption('edgePadding');
2484        gutter = getOption('gutter');
2485      }
2486    }
2487    // update options
2488    resetVariblesWhenDisable(disable);
2489
2490    viewport = getViewportWidth(); // <= edgePadding, gutter
2491    if ((!horizontal || autoWidth) && !disable) {
2492      setSlidePositions();
2493      if (!horizontal) {
2494        updateContentWrapperHeight(); // <= setSlidePositions
2495        needContainerTransform = true;
2496      }
2497    }
2498    if (fixedWidth || autoWidth) {
2499      rightBoundary = getRightBoundary(); // autoWidth: <= viewport, slidePositions, gutter
2500                                          // fixedWidth: <= viewport, fixedWidth, gutter
2501      indexMax = getIndexMax(); // autoWidth: <= rightBoundary, slidePositions
2502                                // fixedWidth: <= rightBoundary, fixedWidth, gutter
2503    }
2504
2505    if (bpChanged || fixedWidth) {
2506      items = getOption('items');
2507      slideBy = getOption('slideBy');
2508      itemsChanged = items !== itemsTem;
2509
2510      if (itemsChanged) {
2511        if (!fixedWidth && !autoWidth) { indexMax = getIndexMax(); } // <= items
2512        // check index before transform in case
2513        // slider reach the right edge then items become bigger
2514        updateIndex();
2515      }
2516    }
2517
2518    if (bpChanged) {
2519      if (disable !== disableTem) {
2520        if (disable) {
2521          disableSlider();
2522        } else {
2523          enableSlider(); // <= slidePositions, rightBoundary, indexMax
2524        }
2525      }
2526    }
2527
2528    if (freezable && (bpChanged || fixedWidth || autoWidth)) {
2529      freeze = getFreeze(); // <= autoWidth: slidePositions, gutter, viewport, rightBoundary
2530                            // <= fixedWidth: fixedWidth, gutter, rightBoundary
2531                            // <= others: items
2532
2533      if (freeze !== freezeTem) {
2534        if (freeze) {
2535          doContainerTransform(getContainerTransformValue(getStartIndex(0)));
2536          freezeSlider();
2537        } else {
2538          unfreezeSlider();
2539          needContainerTransform = true;
2540        }
2541      }
2542    }
2543
2544    resetVariblesWhenDisable(disable || freeze); // controls, nav, touch, mouseDrag, arrowKeys, autoplay, autoplayHoverPause, autoplayResetOnVisibility
2545    if (!autoplay) { autoplayHoverPause = autoplayResetOnVisibility = false; }
2546
2547    if (arrowKeys !== arrowKeysTem) {
2548      arrowKeys ?
2549        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, docmentKeydownEvent) :
2550        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, docmentKeydownEvent);
2551    }
2552    if (controls !== controlsTem) {
2553      if (controls) {
2554        if (controlsContainer) {
2555          Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
2556        } else {
2557          if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
2558          if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
2559        }
2560      } else {
2561        if (controlsContainer) {
2562          Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
2563        } else {
2564          if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
2565          if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
2566        }
2567      }
2568    }
2569    if (nav !== navTem) {
2570      if (nav) {
2571        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer);
2572        updateNavVisibility();
2573      } else {
2574        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer)
2575      }
2576    }
2577    if (touch !== touchTem) {
2578      touch ?
2579        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, touchEvents, options.preventScrollOnTouch) :
2580        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, touchEvents);
2581    }
2582    if (mouseDrag !== mouseDragTem) {
2583      mouseDrag ?
2584        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, dragEvents) :
2585        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, dragEvents);
2586    }
2587    if (autoplay !== autoplayTem) {
2588      if (autoplay) {
2589        if (autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
2590        if (!animating && !autoplayUserPaused) { startAutoplay(); }
2591      } else {
2592        if (autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
2593        if (animating) { stopAutoplay(); }
2594      }
2595    }
2596    if (autoplayHoverPause !== autoplayHoverPauseTem) {
2597      autoplayHoverPause ?
2598        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(container, hoverEvents) :
2599        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(container, hoverEvents);
2600    }
2601    if (autoplayResetOnVisibility !== autoplayResetOnVisibilityTem) {
2602      autoplayResetOnVisibility ?
2603        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(doc, visibilityEvent) :
2604        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(doc, visibilityEvent);
2605    }
2606
2607    if (bpChanged) {
2608      if (fixedWidth !== fixedWidthTem || center !== centerTem) { needContainerTransform = true; }
2609
2610      if (autoHeight !== autoHeightTem) {
2611        if (!autoHeight) { innerWrapper.style.height = ''; }
2612      }
2613
2614      if (controls && controlsText !== controlsTextTem) {
2615        prevButton.innerHTML = controlsText[0];
2616        nextButton.innerHTML = controlsText[1];
2617      }
2618
2619      if (autoplayButton && autoplayText !== autoplayTextTem) {
2620        var i = autoplay ? 1 : 0,
2621            html = autoplayButton.innerHTML,
2622            len = html.length - autoplayTextTem[i].length;
2623        if (html.substring(len) === autoplayTextTem[i]) {
2624          autoplayButton.innerHTML = html.substring(0, len) + autoplayText[i];
2625        }
2626      }
2627    } else {
2628      if (center && (fixedWidth || autoWidth)) { needContainerTransform = true; }
2629    }
2630
2631    if (itemsChanged || fixedWidth && !autoWidth) {
2632      pages = getPages();
2633      updateNavVisibility();
2634    }
2635
2636    indChanged = index !== indexTem;
2637    if (indChanged) {
2638      events.emit('indexChanged', info());
2639      needContainerTransform = true;
2640    } else if (itemsChanged) {
2641      if (!indChanged) { additionalUpdates(); }
2642    } else if (fixedWidth || autoWidth) {
2643      doLazyLoad();
2644      updateSlideStatus();
2645      updateLiveRegion();
2646    }
2647
2648    if (itemsChanged && !carousel) { updateGallerySlidePositions(); }
2649
2650    if (!disable && !freeze) {
2651      // non-mediaqueries: IE8
2652      if (bpChanged && !CSSMQ) {
2653        // middle wrapper styles
2654
2655        // inner wrapper styles
2656        if (edgePadding !== edgePaddingTem || gutter !== gutterTem) {
2657          innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, speed, autoHeight);
2658        }
2659
2660        if (horizontal) {
2661          // container styles
2662          if (carousel) {
2663            container.style.width = getContainerWidth(fixedWidth, gutter, items);
2664          }
2665
2666          // slide styles
2667          var str = getSlideWidthStyle(fixedWidth, gutter, items) +
2668                    getSlideGutterStyle(gutter);
2669
2670          // remove the last line and
2671          // add new styles
2672          Object(_helpers_removeCSSRule_js__WEBPACK_IMPORTED_MODULE_11__["removeCSSRule"])(sheet, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet) - 1);
2673          Object(_helpers_addCSSRule_js__WEBPACK_IMPORTED_MODULE_10__["addCSSRule"])(sheet, '#' + slideId + ' > .tns-item', str, Object(_helpers_getCssRulesLength_js__WEBPACK_IMPORTED_MODULE_12__["getCssRulesLength"])(sheet));
2674        }
2675      }
2676
2677      // auto height
2678      if (autoHeight) { doAutoHeight(); }
2679
2680      if (needContainerTransform) {
2681        doContainerTransformSilent();
2682        indexCached = index;
2683      }
2684    }
2685
2686    if (bpChanged) { events.emit('newBreakpointEnd', info(e)); }
2687  }
2688
2689
2690
2691
2692
2693  // === INITIALIZATION FUNCTIONS === //
2694  function getFreeze () {
2695    if (!fixedWidth && !autoWidth) {
2696      var a = center ? items - (items - 1) / 2 : items;
2697      return  slideCount <= a;
2698    }
2699
2700    var width = fixedWidth ? (fixedWidth + gutter) * slideCount : slidePositions[slideCount],
2701        vp = edgePadding ? viewport + edgePadding * 2 : viewport + gutter;
2702
2703    if (center) {
2704      vp -= fixedWidth ? (viewport - fixedWidth) / 2 : (viewport - (slidePositions[index + 1] - slidePositions[index] - gutter)) / 2;
2705    }
2706
2707    return width <= vp;
2708  }
2709
2710  function setBreakpointZone () {
2711    breakpointZone = 0;
2712    for (var bp in responsive) {
2713      bp = parseInt(bp); // convert string to number
2714      if (windowWidth >= bp) { breakpointZone = bp; }
2715    }
2716  }
2717
2718  // (slideBy, indexMin, indexMax) => index
2719  var updateIndex = (function () {
2720    return loop ?
2721      carousel ?
2722        // loop + carousel
2723        function () {
2724          var leftEdge = indexMin,
2725              rightEdge = indexMax;
2726
2727          leftEdge += slideBy;
2728          rightEdge -= slideBy;
2729
2730          // adjust edges when has edge paddings
2731          // or fixed-width slider with extra space on the right side
2732          if (edgePadding) {
2733            leftEdge += 1;
2734            rightEdge -= 1;
2735          } else if (fixedWidth) {
2736            if ((viewport + gutter)%(fixedWidth + gutter)) { rightEdge -= 1; }
2737          }
2738
2739          if (cloneCount) {
2740            if (index > rightEdge) {
2741              index -= slideCount;
2742            } else if (index < leftEdge) {
2743              index += slideCount;
2744            }
2745          }
2746        } :
2747        // loop + gallery
2748        function() {
2749          if (index > indexMax) {
2750            while (index >= indexMin + slideCount) { index -= slideCount; }
2751          } else if (index < indexMin) {
2752            while (index <= indexMax - slideCount) { index += slideCount; }
2753          }
2754        } :
2755      // non-loop
2756      function() {
2757        index = Math.max(indexMin, Math.min(indexMax, index));
2758      };
2759  })();
2760
2761  function disableUI () {
2762    if (!autoplay && autoplayButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(autoplayButton); }
2763    if (!nav && navContainer) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(navContainer); }
2764    if (!controls) {
2765      if (controlsContainer) {
2766        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(controlsContainer);
2767      } else {
2768        if (prevButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(prevButton); }
2769        if (nextButton) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(nextButton); }
2770      }
2771    }
2772  }
2773
2774  function enableUI () {
2775    if (autoplay && autoplayButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(autoplayButton); }
2776    if (nav && navContainer) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(navContainer); }
2777    if (controls) {
2778      if (controlsContainer) {
2779        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(controlsContainer);
2780      } else {
2781        if (prevButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(prevButton); }
2782        if (nextButton) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(nextButton); }
2783      }
2784    }
2785  }
2786
2787  function freezeSlider () {
2788    if (frozen) { return; }
2789
2790    // remove edge padding from inner wrapper
2791    if (edgePadding) { innerWrapper.style.margin = '0px'; }
2792
2793    // add class tns-transparent to cloned slides
2794    if (cloneCount) {
2795      var str = 'tns-transparent';
2796      for (var i = cloneCount; i--;) {
2797        if (carousel) { Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[i], str); }
2798        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(slideItems[slideCountNew - i - 1], str);
2799      }
2800    }
2801
2802    // update tools
2803    disableUI();
2804
2805    frozen = true;
2806  }
2807
2808  function unfreezeSlider () {
2809    if (!frozen) { return; }
2810
2811    // restore edge padding for inner wrapper
2812    // for mordern browsers
2813    if (edgePadding && CSSMQ) { innerWrapper.style.margin = ''; }
2814
2815    // remove class tns-transparent to cloned slides
2816    if (cloneCount) {
2817      var str = 'tns-transparent';
2818      for (var i = cloneCount; i--;) {
2819        if (carousel) { Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[i], str); }
2820        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(slideItems[slideCountNew - i - 1], str);
2821      }
2822    }
2823
2824    // update tools
2825    enableUI();
2826
2827    frozen = false;
2828  }
2829
2830  function disableSlider () {
2831    if (disabled) { return; }
2832
2833    sheet.disabled = true;
2834    container.className = container.className.replace(newContainerClasses.substring(1), '');
2835    Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(container, ['style']);
2836    if (loop) {
2837      for (var j = cloneCount; j--;) {
2838        if (carousel) { Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[j]); }
2839        Object(_helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"])(slideItems[slideCountNew - j - 1]);
2840      }
2841    }
2842
2843    // vertical slider
2844    if (!horizontal || !carousel) { Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(innerWrapper, ['style']); }
2845
2846    // gallery
2847    if (!carousel) {
2848      for (var i = index, l = index + slideCount; i < l; i++) {
2849        var item = slideItems[i];
2850        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['style']);
2851        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
2852        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
2853      }
2854    }
2855
2856    // update tools
2857    disableUI();
2858
2859    disabled = true;
2860  }
2861
2862  function enableSlider () {
2863    if (!disabled) { return; }
2864
2865    sheet.disabled = false;
2866    container.className += newContainerClasses;
2867    doContainerTransformSilent();
2868
2869    if (loop) {
2870      for (var j = cloneCount; j--;) {
2871        if (carousel) { Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[j]); }
2872        Object(_helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"])(slideItems[slideCountNew - j - 1]);
2873      }
2874    }
2875
2876    // gallery
2877    if (!carousel) {
2878      for (var i = index, l = index + slideCount; i < l; i++) {
2879        var item = slideItems[i],
2880            classN = i < index + items ? animateIn : animateNormal;
2881        item.style.left = (i - index) * 100 / items + '%';
2882        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classN);
2883      }
2884    }
2885
2886    // update tools
2887    enableUI();
2888
2889    disabled = false;
2890  }
2891
2892  function updateLiveRegion () {
2893    var str = getLiveRegionStr();
2894    if (liveregionCurrent.innerHTML !== str) { liveregionCurrent.innerHTML = str; }
2895  }
2896
2897  function getLiveRegionStr () {
2898    var arr = getVisibleSlideRange(),
2899        start = arr[0] + 1,
2900        end = arr[1] + 1;
2901    return start === end ? start + '' : start + ' to ' + end;
2902  }
2903
2904  function getVisibleSlideRange (val) {
2905    if (val == null) { val = getContainerTransformValue(); }
2906    var start = index, end, rangestart, rangeend;
2907
2908    // get range start, range end for autoWidth and fixedWidth
2909    if (center || edgePadding) {
2910      if (autoWidth || fixedWidth) {
2911        rangestart = - (parseFloat(val) + edgePadding);
2912        rangeend = rangestart + viewport + edgePadding * 2;
2913      }
2914    } else {
2915      if (autoWidth) {
2916        rangestart = slidePositions[index];
2917        rangeend = rangestart + viewport;
2918      }
2919    }
2920
2921    // get start, end
2922    // - check auto width
2923    if (autoWidth) {
2924      slidePositions.forEach(function(point, i) {
2925        if (i < slideCountNew) {
2926          if ((center || edgePadding) && point <= rangestart + 0.5) { start = i; }
2927          if (rangeend - point >= 0.5) { end = i; }
2928        }
2929      });
2930
2931    // - check percentage width, fixed width
2932    } else {
2933
2934      if (fixedWidth) {
2935        var cell = fixedWidth + gutter;
2936        if (center || edgePadding) {
2937          start = Math.floor(rangestart/cell);
2938          end = Math.ceil(rangeend/cell - 1);
2939        } else {
2940          end = start + Math.ceil(viewport/cell) - 1;
2941        }
2942
2943      } else {
2944        if (center || edgePadding) {
2945          var a = items - 1;
2946          if (center) {
2947            start -= a / 2;
2948            end = index + a / 2;
2949          } else {
2950            end = index + a;
2951          }
2952
2953          if (edgePadding) {
2954            var b = edgePadding * items / viewport;
2955            start -= b;
2956            end += b;
2957          }
2958
2959          start = Math.floor(start);
2960          end = Math.ceil(end);
2961        } else {
2962          end = start + items - 1;
2963        }
2964      }
2965
2966      start = Math.max(start, 0);
2967      end = Math.min(end, slideCountNew - 1);
2968    }
2969
2970    return [start, end];
2971  }
2972
2973  function doLazyLoad () {
2974    if (lazyload && !disable) {
2975      var arg = getVisibleSlideRange();
2976      arg.push(lazyloadSelector);
2977
2978      getImageArray.apply(null, arg).forEach(function (img) {
2979        if (!Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) {
2980          // stop propagation transitionend event to container
2981          var eve = {};
2982          eve[TRANSITIONEND] = function (e) { e.stopPropagation(); };
2983          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, eve);
2984
2985          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(img, imgEvents);
2986
2987          // update src
2988          img.src = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-src');
2989
2990          // update srcset
2991          var srcset = Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(img, 'data-srcset');
2992          if (srcset) { img.srcset = srcset; }
2993
2994          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loading');
2995        }
2996      });
2997    }
2998  }
2999
3000  function onImgLoaded (e) {
3001    imgLoaded(getTarget(e));
3002  }
3003
3004  function onImgFailed (e) {
3005    imgFailed(getTarget(e));
3006  }
3007
3008  function imgLoaded (img) {
3009    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'loaded');
3010    imgCompleted(img);
3011  }
3012
3013  function imgFailed (img) {
3014    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, 'failed');
3015    imgCompleted(img);
3016  }
3017
3018  function imgCompleted (img) {
3019    Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(img, imgCompleteClass);
3020    Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(img, 'loading');
3021    Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(img, imgEvents);
3022  }
3023
3024  function getImageArray (start, end, imgSelector) {
3025    var imgs = [];
3026    if (!imgSelector) { imgSelector = 'img'; }
3027
3028    while (start <= end) {
3029      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems[start].querySelectorAll(imgSelector), function (img) { imgs.push(img); });
3030      start++;
3031    }
3032
3033    return imgs;
3034  }
3035
3036  // check if all visible images are loaded
3037  // and update container height if it's done
3038  function doAutoHeight () {
3039    var imgs = getImageArray.apply(null, getVisibleSlideRange());
3040    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, updateInnerWrapperHeight); });
3041  }
3042
3043  function imgsLoadedCheck (imgs, cb) {
3044    // execute callback function if all images are complete
3045    if (imgsComplete) { return cb(); }
3046
3047    // check image classes
3048    imgs.forEach(function (img, index) {
3049      if (!lazyload && img.complete) { imgCompleted(img); } // Check image.complete
3050      if (Object(_helpers_hasClass_js__WEBPACK_IMPORTED_MODULE_16__["hasClass"])(img, imgCompleteClass)) { imgs.splice(index, 1); }
3051    });
3052
3053    // execute callback function if selected images are all complete
3054    if (!imgs.length) { return cb(); }
3055
3056    // otherwise execute this functiona again
3057    Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ imgsLoadedCheck(imgs, cb); });
3058  }
3059
3060  function additionalUpdates () {
3061    doLazyLoad();
3062    updateSlideStatus();
3063    updateLiveRegion();
3064    updateControlsStatus();
3065    updateNavStatus();
3066  }
3067
3068
3069  function update_carousel_transition_duration () {
3070    if (carousel && autoHeight) {
3071      middleWrapper.style[TRANSITIONDURATION] = speed / 1000 + 's';
3072    }
3073  }
3074
3075  function getMaxSlideHeight (slideStart, slideRange) {
3076    var heights = [];
3077    for (var i = slideStart, l = Math.min(slideStart + slideRange, slideCountNew); i < l; i++) {
3078      heights.push(slideItems[i].offsetHeight);
3079    }
3080
3081    return Math.max.apply(null, heights);
3082  }
3083
3084  // update inner wrapper height
3085  // 1. get the max-height of the visible slides
3086  // 2. set transitionDuration to speed
3087  // 3. update inner wrapper height to max-height
3088  // 4. set transitionDuration to 0s after transition done
3089  function updateInnerWrapperHeight () {
3090    var maxHeight = autoHeight ? getMaxSlideHeight(index, items) : getMaxSlideHeight(cloneCount, slideCount),
3091        wp = middleWrapper ? middleWrapper : innerWrapper;
3092
3093    if (wp.style.height !== maxHeight) { wp.style.height = maxHeight + 'px'; }
3094  }
3095
3096  // get the distance from the top edge of the first slide to each slide
3097  // (init) => slidePositions
3098  function setSlidePositions () {
3099    slidePositions = [0];
3100    var attr = horizontal ? 'left' : 'top',
3101        attr2 = horizontal ? 'right' : 'bottom',
3102        base = slideItems[0].getBoundingClientRect()[attr];
3103
3104    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
3105      // skip the first slide
3106      if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); }
3107      // add the end edge
3108      if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); }
3109    });
3110  }
3111
3112  // update slide
3113  function updateSlideStatus () {
3114    var range = getVisibleSlideRange(),
3115        start = range[0],
3116        end = range[1];
3117
3118    Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(item, i) {
3119      // show slides
3120      if (i >= start && i <= end) {
3121        if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
3122          Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(item, ['aria-hidden', 'tabindex']);
3123          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, slideActiveClass);
3124        }
3125      // hide slides
3126      } else {
3127        if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(item, 'aria-hidden')) {
3128          Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(item, {
3129            'aria-hidden': 'true',
3130            'tabindex': '-1'
3131          });
3132          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, slideActiveClass);
3133        }
3134      }
3135    });
3136  }
3137
3138  // gallery: update slide position
3139  function updateGallerySlidePositions () {
3140    var l = index + Math.min(slideCount, items);
3141    for (var i = slideCountNew; i--;) {
3142      var item = slideItems[i];
3143
3144      if (i >= index && i < l) {
3145        // add transitions to visible slides when adjusting their positions
3146        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, 'tns-moving');
3147
3148        item.style.left = (i - index) * 100 / items + '%';
3149        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateIn);
3150        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateNormal);
3151      } else if (item.style.left) {
3152        item.style.left = '';
3153        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
3154        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateIn);
3155      }
3156
3157      // remove outlet animation
3158      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
3159    }
3160
3161    // removing '.tns-moving'
3162    setTimeout(function() {
3163      Object(_helpers_forEach_js__WEBPACK_IMPORTED_MODULE_15__["forEach"])(slideItems, function(el) {
3164        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(el, 'tns-moving');
3165      });
3166    }, 300);
3167  }
3168
3169  // set tabindex on Nav
3170  function updateNavStatus () {
3171    // get current nav
3172    if (nav) {
3173      navCurrentIndex = navClicked >= 0 ? navClicked : getCurrentNavIndex();
3174      navClicked = -1;
3175
3176      if (navCurrentIndex !== navCurrentIndexCached) {
3177        var navPrev = navItems[navCurrentIndexCached],
3178            navCurrent = navItems[navCurrentIndex];
3179
3180        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navPrev, {
3181          'tabindex': '-1',
3182          'aria-label': navStr + (navCurrentIndexCached + 1)
3183        });
3184        Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(navPrev, navActiveClass);
3185
3186        Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(navCurrent, {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent});
3187        Object(_helpers_removeAttrs_js__WEBPACK_IMPORTED_MODULE_22__["removeAttrs"])(navCurrent, 'tabindex');
3188        Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(navCurrent, navActiveClass);
3189
3190        navCurrentIndexCached = navCurrentIndex;
3191      }
3192    }
3193  }
3194
3195  function getLowerCaseNodeName (el) {
3196    return el.nodeName.toLowerCase();
3197  }
3198
3199  function isButton (el) {
3200    return getLowerCaseNodeName(el) === 'button';
3201  }
3202
3203  function isAriaDisabled (el) {
3204    return el.getAttribute('aria-disabled') === 'true';
3205  }
3206
3207  function disEnableElement (isButton, el, val) {
3208    if (isButton) {
3209      el.disabled = val;
3210    } else {
3211      el.setAttribute('aria-disabled', val.toString());
3212    }
3213  }
3214
3215  // set 'disabled' to true on controls when reach the edges
3216  function updateControlsStatus () {
3217    if (!controls || rewind || loop) { return; }
3218
3219    var prevDisabled = (prevIsButton) ? prevButton.disabled : isAriaDisabled(prevButton),
3220        nextDisabled = (nextIsButton) ? nextButton.disabled : isAriaDisabled(nextButton),
3221        disablePrev = (index <= indexMin) ? true : false,
3222        disableNext = (!rewind && index >= indexMax) ? true : false;
3223
3224    if (disablePrev && !prevDisabled) {
3225      disEnableElement(prevIsButton, prevButton, true);
3226    }
3227    if (!disablePrev && prevDisabled) {
3228      disEnableElement(prevIsButton, prevButton, false);
3229    }
3230    if (disableNext && !nextDisabled) {
3231      disEnableElement(nextIsButton, nextButton, true);
3232    }
3233    if (!disableNext && nextDisabled) {
3234      disEnableElement(nextIsButton, nextButton, false);
3235    }
3236  }
3237
3238  // set duration
3239  function resetDuration (el, str) {
3240    if (TRANSITIONDURATION) { el.style[TRANSITIONDURATION] = str; }
3241  }
3242
3243  function getSliderWidth () {
3244    return fixedWidth ? (fixedWidth + gutter) * slideCountNew : slidePositions[slideCountNew];
3245  }
3246
3247  function getCenterGap (num) {
3248    if (num == null) { num = index; }
3249
3250    var gap = edgePadding ? gutter : 0;
3251    return autoWidth ? ((viewport - gap) - (slidePositions[num + 1] - slidePositions[num] - gutter))/2 :
3252      fixedWidth ? (viewport - fixedWidth) / 2 :
3253        (items - 1) / 2;
3254  }
3255
3256  function getRightBoundary () {
3257    var gap = edgePadding ? gutter : 0,
3258        result = (viewport + gap) - getSliderWidth();
3259
3260    if (center && !loop) {
3261      result = fixedWidth ? - (fixedWidth + gutter) * (slideCountNew - 1) - getCenterGap() :
3262        getCenterGap(slideCountNew - 1) - slidePositions[slideCountNew - 1];
3263    }
3264    if (result > 0) { result = 0; }
3265
3266    return result;
3267  }
3268
3269  function getContainerTransformValue (num) {
3270    if (num == null) { num = index; }
3271
3272    var val;
3273    if (horizontal && !autoWidth) {
3274      if (fixedWidth) {
3275        val = - (fixedWidth + gutter) * num;
3276        if (center) { val += getCenterGap(); }
3277      } else {
3278        var denominator = TRANSFORM ? slideCountNew : items;
3279        if (center) { num -= getCenterGap(); }
3280        val = - num * 100 / denominator;
3281      }
3282    } else {
3283      val = - slidePositions[num];
3284      if (center && autoWidth) {
3285        val += getCenterGap();
3286      }
3287    }
3288
3289    if (hasRightDeadZone) { val = Math.max(val, rightBoundary); }
3290
3291    val += (horizontal && !autoWidth && !fixedWidth) ? '%' : 'px';
3292
3293    return val;
3294  }
3295
3296  function doContainerTransformSilent (val) {
3297    resetDuration(container, '0s');
3298    doContainerTransform(val);
3299  }
3300
3301  function doContainerTransform (val) {
3302    if (val == null) { val = getContainerTransformValue(); }
3303    container.style[transformAttr] = transformPrefix + val + transformPostfix;
3304  }
3305
3306  function animateSlide (number, classOut, classIn, isOut) {
3307    var l = number + items;
3308    if (!loop) { l = Math.min(l, slideCountNew); }
3309
3310    for (var i = number; i < l; i++) {
3311        var item = slideItems[i];
3312
3313      // set item positions
3314      if (!isOut) { item.style.left = (i - index) * 100 / items + '%'; }
3315
3316      if (animateDelay && TRANSITIONDELAY) {
3317        item.style[TRANSITIONDELAY] = item.style[ANIMATIONDELAY] = animateDelay * (i - number) / 1000 + 's';
3318      }
3319      Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, classOut);
3320      Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, classIn);
3321
3322      if (isOut) { slideItemsOut.push(item); }
3323    }
3324  }
3325
3326  // make transfer after click/drag:
3327  // 1. change 'transform' property for mordern browsers
3328  // 2. change 'left' property for legacy browsers
3329  var transformCore = (function () {
3330    return carousel ?
3331      function () {
3332        resetDuration(container, '');
3333        if (TRANSITIONDURATION || !speed) {
3334          // for morden browsers with non-zero duration or
3335          // zero duration for all browsers
3336          doContainerTransform();
3337          // run fallback function manually
3338          // when duration is 0 / container is hidden
3339          if (!speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
3340
3341        } else {
3342          // for old browser with non-zero duration
3343          Object(_helpers_jsTransform_js__WEBPACK_IMPORTED_MODULE_33__["jsTransform"])(container, transformAttr, transformPrefix, transformPostfix, getContainerTransformValue(), speed, onTransitionEnd);
3344        }
3345
3346        if (!horizontal) { updateContentWrapperHeight(); }
3347      } :
3348      function () {
3349        slideItemsOut = [];
3350
3351        var eve = {};
3352        eve[TRANSITIONEND] = eve[ANIMATIONEND] = onTransitionEnd;
3353        Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(slideItems[indexCached], eve);
3354        Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(slideItems[index], eve);
3355
3356        animateSlide(indexCached, animateIn, animateOut, true);
3357        animateSlide(index, animateNormal, animateIn);
3358
3359        // run fallback function manually
3360        // when transition or animation not supported / duration is 0
3361        if (!TRANSITIONEND || !ANIMATIONEND || !speed || !Object(_helpers_isVisible_js__WEBPACK_IMPORTED_MODULE_26__["isVisible"])(container)) { onTransitionEnd(); }
3362      };
3363  })();
3364
3365  function render (e, sliderMoved) {
3366    if (updateIndexBeforeTransform) { updateIndex(); }
3367
3368    // render when slider was moved (touch or drag) even though index may not change
3369    if (index !== indexCached || sliderMoved) {
3370      // events
3371      events.emit('indexChanged', info());
3372      events.emit('transitionStart', info());
3373      if (autoHeight) { doAutoHeight(); }
3374
3375      // pause autoplay when click or keydown from user
3376      if (animating && e && ['click', 'keydown'].indexOf(e.type) >= 0) { stopAutoplay(); }
3377
3378      running = true;
3379      transformCore();
3380    }
3381  }
3382
3383  /*
3384   * Transfer prefixed properties to the same format
3385   * CSS: -Webkit-Transform => webkittransform
3386   * JS: WebkitTransform => webkittransform
3387   * @param {string} str - property
3388   *
3389   */
3390  function strTrans (str) {
3391    return str.toLowerCase().replace(/-/g, '');
3392  }
3393
3394  // AFTER TRANSFORM
3395  // Things need to be done after a transfer:
3396  // 1. check index
3397  // 2. add classes to visible slide
3398  // 3. disable controls buttons when reach the first/last slide in non-loop slider
3399  // 4. update nav status
3400  // 5. lazyload images
3401  // 6. update container height
3402  function onTransitionEnd (event) {
3403    // check running on gallery mode
3404    // make sure trantionend/animationend events run only once
3405    if (carousel || running) {
3406      events.emit('transitionEnd', info(event));
3407
3408      if (!carousel && slideItemsOut.length > 0) {
3409        for (var i = 0; i < slideItemsOut.length; i++) {
3410          var item = slideItemsOut[i];
3411          // set item positions
3412          item.style.left = '';
3413
3414          if (ANIMATIONDELAY && TRANSITIONDELAY) {
3415            item.style[ANIMATIONDELAY] = '';
3416            item.style[TRANSITIONDELAY] = '';
3417          }
3418          Object(_helpers_removeClass_js__WEBPACK_IMPORTED_MODULE_18__["removeClass"])(item, animateOut);
3419          Object(_helpers_addClass_js__WEBPACK_IMPORTED_MODULE_17__["addClass"])(item, animateNormal);
3420        }
3421      }
3422
3423      /* update slides, nav, controls after checking ...
3424       * => legacy browsers who don't support 'event'
3425       *    have to check event first, otherwise event.target will cause an error
3426       * => or 'gallery' mode:
3427       *   + event target is slide item
3428       * => or 'carousel' mode:
3429       *   + event target is container,
3430       *   + event.property is the same with transform attribute
3431       */
3432      if (!event ||
3433          !carousel && event.target.parentNode === container ||
3434          event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) {
3435
3436        if (!updateIndexBeforeTransform) {
3437          var indexTem = index;
3438          updateIndex();
3439          if (index !== indexTem) {
3440            events.emit('indexChanged', info());
3441
3442            doContainerTransformSilent();
3443          }
3444        }
3445
3446        if (nested === 'inner') { events.emit('innerLoaded', info()); }
3447        running = false;
3448        indexCached = index;
3449      }
3450    }
3451
3452  }
3453
3454  // # ACTIONS
3455  function goTo (targetIndex, e) {
3456    if (freeze) { return; }
3457
3458    // prev slideBy
3459    if (targetIndex === 'prev') {
3460      onControlsClick(e, -1);
3461
3462    // next slideBy
3463    } else if (targetIndex === 'next') {
3464      onControlsClick(e, 1);
3465
3466    // go to exact slide
3467    } else {
3468      if (running) {
3469        if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3470      }
3471
3472      var absIndex = getAbsIndex(),
3473          indexGap = 0;
3474
3475      if (targetIndex === 'first') {
3476        indexGap = - absIndex;
3477      } else if (targetIndex === 'last') {
3478        indexGap = carousel ? slideCount - items - absIndex : slideCount - 1 - absIndex;
3479      } else {
3480        if (typeof targetIndex !== 'number') { targetIndex = parseInt(targetIndex); }
3481
3482        if (!isNaN(targetIndex)) {
3483          // from directly called goTo function
3484          if (!e) { targetIndex = Math.max(0, Math.min(slideCount - 1, targetIndex)); }
3485
3486          indexGap = targetIndex - absIndex;
3487        }
3488      }
3489
3490      // gallery: make sure new page won't overlap with current page
3491      if (!carousel && indexGap && Math.abs(indexGap) < items) {
3492        var factor = indexGap > 0 ? 1 : -1;
3493        indexGap += (index + indexGap - slideCount) >= indexMin ? slideCount * factor : slideCount * 2 * factor * -1;
3494      }
3495
3496      index += indexGap;
3497
3498      // make sure index is in range
3499      if (carousel && loop) {
3500        if (index < indexMin) { index += slideCount; }
3501        if (index > indexMax) { index -= slideCount; }
3502      }
3503
3504      // if index is changed, start rendering
3505      if (getAbsIndex(index) !== getAbsIndex(indexCached)) {
3506        render(e);
3507      }
3508
3509    }
3510  }
3511
3512  // on controls click
3513  function onControlsClick (e, dir) {
3514    if (running) {
3515      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3516    }
3517    var passEventObject;
3518
3519    if (!dir) {
3520      e = getEvent(e);
3521      var target = getTarget(e);
3522
3523      while (target !== controlsContainer && [prevButton, nextButton].indexOf(target) < 0) { target = target.parentNode; }
3524
3525      var targetIn = [prevButton, nextButton].indexOf(target);
3526      if (targetIn >= 0) {
3527        passEventObject = true;
3528        dir = targetIn === 0 ? -1 : 1;
3529      }
3530    }
3531
3532    if (rewind) {
3533      if (index === indexMin && dir === -1) {
3534        goTo('last', e);
3535        return;
3536      } else if (index === indexMax && dir === 1) {
3537        goTo('first', e);
3538        return;
3539      }
3540    }
3541
3542    if (dir) {
3543      index += slideBy * dir;
3544      if (autoWidth) { index = Math.floor(index); }
3545      // pass e when click control buttons or keydown
3546      render((passEventObject || (e && e.type === 'keydown')) ? e : null);
3547    }
3548  }
3549
3550  // on nav click
3551  function onNavClick (e) {
3552    if (running) {
3553      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3554    }
3555
3556    e = getEvent(e);
3557    var target = getTarget(e), navIndex;
3558
3559    // find the clicked nav item
3560    while (target !== navContainer && !Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) { target = target.parentNode; }
3561    if (Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(target, 'data-nav')) {
3562      var navIndex = navClicked = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(target, 'data-nav')),
3563          targetIndexBase = fixedWidth || autoWidth ? navIndex * slideCount / pages : navIndex * items,
3564          targetIndex = navAsThumbnails ? navIndex : Math.min(Math.ceil(targetIndexBase), slideCount - 1);
3565      goTo(targetIndex, e);
3566
3567      if (navCurrentIndex === navIndex) {
3568        if (animating) { stopAutoplay(); }
3569        navClicked = -1; // reset navClicked
3570      }
3571    }
3572  }
3573
3574  // autoplay functions
3575  function setAutoplayTimer () {
3576    autoplayTimer = setInterval(function () {
3577      onControlsClick(null, autoplayDirection);
3578    }, autoplayTimeout);
3579
3580    animating = true;
3581  }
3582
3583  function stopAutoplayTimer () {
3584    clearInterval(autoplayTimer);
3585    animating = false;
3586  }
3587
3588  function updateAutoplayButton (action, txt) {
3589    Object(_helpers_setAttrs_js__WEBPACK_IMPORTED_MODULE_21__["setAttrs"])(autoplayButton, {'data-action': action});
3590    autoplayButton.innerHTML = autoplayHtmlStrings[0] + action + autoplayHtmlStrings[1] + txt;
3591  }
3592
3593  function startAutoplay () {
3594    setAutoplayTimer();
3595    if (autoplayButton) { updateAutoplayButton('stop', autoplayText[1]); }
3596  }
3597
3598  function stopAutoplay () {
3599    stopAutoplayTimer();
3600    if (autoplayButton) { updateAutoplayButton('start', autoplayText[0]); }
3601  }
3602
3603  // programaitcally play/pause the slider
3604  function play () {
3605    if (autoplay && !animating) {
3606      startAutoplay();
3607      autoplayUserPaused = false;
3608    }
3609  }
3610  function pause () {
3611    if (animating) {
3612      stopAutoplay();
3613      autoplayUserPaused = true;
3614    }
3615  }
3616
3617  function toggleAutoplay () {
3618    if (animating) {
3619      stopAutoplay();
3620      autoplayUserPaused = true;
3621    } else {
3622      startAutoplay();
3623      autoplayUserPaused = false;
3624    }
3625  }
3626
3627  function onVisibilityChange () {
3628    if (doc.hidden) {
3629      if (animating) {
3630        stopAutoplayTimer();
3631        autoplayVisibilityPaused = true;
3632      }
3633    } else if (autoplayVisibilityPaused) {
3634      setAutoplayTimer();
3635      autoplayVisibilityPaused = false;
3636    }
3637  }
3638
3639  function mouseoverPause () {
3640    if (animating) {
3641      stopAutoplayTimer();
3642      autoplayHoverPaused = true;
3643    }
3644  }
3645
3646  function mouseoutRestart () {
3647    if (autoplayHoverPaused) {
3648      setAutoplayTimer();
3649      autoplayHoverPaused = false;
3650    }
3651  }
3652
3653  // keydown events on document
3654  function onDocumentKeydown (e) {
3655    e = getEvent(e);
3656    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
3657
3658    if (keyIndex >= 0) {
3659      onControlsClick(e, keyIndex === 0 ? -1 : 1);
3660    }
3661  }
3662
3663  // on key control
3664  function onControlsKeydown (e) {
3665    e = getEvent(e);
3666    var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode);
3667
3668    if (keyIndex >= 0) {
3669      if (keyIndex === 0) {
3670        if (!prevButton.disabled) { onControlsClick(e, -1); }
3671      } else if (!nextButton.disabled) {
3672        onControlsClick(e, 1);
3673      }
3674    }
3675  }
3676
3677  // set focus
3678  function setFocus (el) {
3679    el.focus();
3680  }
3681
3682  // on key nav
3683  function onNavKeydown (e) {
3684    e = getEvent(e);
3685    var curElement = doc.activeElement;
3686    if (!Object(_helpers_hasAttr_js__WEBPACK_IMPORTED_MODULE_19__["hasAttr"])(curElement, 'data-nav')) { return; }
3687
3688    // var code = e.keyCode,
3689    var keyIndex = [KEYS.LEFT, KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE].indexOf(e.keyCode),
3690        navIndex = Number(Object(_helpers_getAttr_js__WEBPACK_IMPORTED_MODULE_20__["getAttr"])(curElement, 'data-nav'));
3691
3692    if (keyIndex >= 0) {
3693      if (keyIndex === 0) {
3694        if (navIndex > 0) { setFocus(navItems[navIndex - 1]); }
3695      } else if (keyIndex === 1) {
3696        if (navIndex < pages - 1) { setFocus(navItems[navIndex + 1]); }
3697      } else {
3698        navClicked = navIndex;
3699        goTo(navIndex, e);
3700      }
3701    }
3702  }
3703
3704  function getEvent (e) {
3705    e = e || win.event;
3706    return isTouchEvent(e) ? e.changedTouches[0] : e;
3707  }
3708  function getTarget (e) {
3709    return e.target || win.event.srcElement;
3710  }
3711
3712  function isTouchEvent (e) {
3713    return e.type.indexOf('touch') >= 0;
3714  }
3715
3716  function preventDefaultBehavior (e) {
3717    e.preventDefault ? e.preventDefault() : e.returnValue = false;
3718  }
3719
3720  function getMoveDirectionExpected () {
3721    return Object(_helpers_getTouchDirection_js__WEBPACK_IMPORTED_MODULE_14__["getTouchDirection"])(Object(_helpers_toDegree_js__WEBPACK_IMPORTED_MODULE_13__["toDegree"])(lastPosition.y - initPosition.y, lastPosition.x - initPosition.x), swipeAngle) === options.axis;
3722  }
3723
3724  function onPanStart (e) {
3725    if (running) {
3726      if (preventActionWhenRunning) { return; } else { onTransitionEnd(); }
3727    }
3728
3729    if (autoplay && animating) { stopAutoplayTimer(); }
3730
3731    panStart = true;
3732    if (rafIndex) {
3733      Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
3734      rafIndex = null;
3735    }
3736
3737    var $ = getEvent(e);
3738    events.emit(isTouchEvent(e) ? 'touchStart' : 'dragStart', info(e));
3739
3740    if (!isTouchEvent(e) && ['img', 'a'].indexOf(getLowerCaseNodeName(getTarget(e))) >= 0) {
3741      preventDefaultBehavior(e);
3742    }
3743
3744    lastPosition.x = initPosition.x = $.clientX;
3745    lastPosition.y = initPosition.y = $.clientY;
3746    if (carousel) {
3747      translateInit = parseFloat(container.style[transformAttr].replace(transformPrefix, ''));
3748      resetDuration(container, '0s');
3749    }
3750  }
3751
3752  function onPanMove (e) {
3753    if (panStart) {
3754      var $ = getEvent(e);
3755      lastPosition.x = $.clientX;
3756      lastPosition.y = $.clientY;
3757
3758      if (carousel) {
3759        if (!rafIndex) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
3760      } else {
3761        if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
3762        if (moveDirectionExpected) { preventScroll = true; }
3763      }
3764
3765      if ((typeof e.cancelable !== 'boolean' || e.cancelable) && preventScroll) {
3766        e.preventDefault();
3767      }
3768    }
3769  }
3770
3771  function panUpdate (e) {
3772    if (!moveDirectionExpected) {
3773      panStart = false;
3774      return;
3775    }
3776    Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
3777    if (panStart) { rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function(){ panUpdate(e); }); }
3778
3779    if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); }
3780    if (moveDirectionExpected) {
3781      if (!preventScroll && isTouchEvent(e)) { preventScroll = true; }
3782
3783      try {
3784        if (e.type) { events.emit(isTouchEvent(e) ? 'touchMove' : 'dragMove', info(e)); }
3785      } catch(err) {}
3786
3787      var x = translateInit,
3788          dist = getDist(lastPosition, initPosition);
3789      if (!horizontal || fixedWidth || autoWidth) {
3790        x += dist;
3791        x += 'px';
3792      } else {
3793        var percentageX = TRANSFORM ? dist * items * 100 / ((viewport + gutter) * slideCountNew): dist * 100 / (viewport + gutter);
3794        x += percentageX;
3795        x += '%';
3796      }
3797
3798      container.style[transformAttr] = transformPrefix + x + transformPostfix;
3799    }
3800  }
3801
3802  function onPanEnd (e) {
3803    if (panStart) {
3804      if (rafIndex) {
3805        Object(_helpers_caf_js__WEBPACK_IMPORTED_MODULE_1__["caf"])(rafIndex);
3806        rafIndex = null;
3807      }
3808      if (carousel) { resetDuration(container, ''); }
3809      panStart = false;
3810
3811      var $ = getEvent(e);
3812      lastPosition.x = $.clientX;
3813      lastPosition.y = $.clientY;
3814      var dist = getDist(lastPosition, initPosition);
3815
3816      if (Math.abs(dist)) {
3817        // drag vs click
3818        if (!isTouchEvent(e)) {
3819          // prevent "click"
3820          var target = getTarget(e);
3821          Object(_helpers_addEvents_js__WEBPACK_IMPORTED_MODULE_30__["addEvents"])(target, {'click': function preventClick (e) {
3822            preventDefaultBehavior(e);
3823            Object(_helpers_removeEvents_js__WEBPACK_IMPORTED_MODULE_31__["removeEvents"])(target, {'click': preventClick});
3824          }});
3825        }
3826
3827        if (carousel) {
3828          rafIndex = Object(_helpers_raf_js__WEBPACK_IMPORTED_MODULE_0__["raf"])(function() {
3829            if (horizontal && !autoWidth) {
3830              var indexMoved = - dist * items / (viewport + gutter);
3831              indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved);
3832              index += indexMoved;
3833            } else {
3834              var moved = - (translateInit + dist);
3835              if (moved <= 0) {
3836                index = indexMin;
3837              } else if (moved >= slidePositions[slideCountNew - 1]) {
3838                index = indexMax;
3839              } else {
3840                var i = 0;
3841                while (i < slideCountNew && moved >= slidePositions[i]) {
3842                  index = i;
3843                  if (moved > slidePositions[i] && dist < 0) { index += 1; }
3844                  i++;
3845                }
3846              }
3847            }
3848
3849            render(e, dist);
3850            events.emit(isTouchEvent(e) ? 'touchEnd' : 'dragEnd', info(e));
3851          });
3852        } else {
3853          if (moveDirectionExpected) {
3854            onControlsClick(e, dist > 0 ? -1 : 1);
3855          }
3856        }
3857      }
3858    }
3859
3860    // reset
3861    if (options.preventScrollOnTouch === 'auto') { preventScroll = false; }
3862    if (swipeAngle) { moveDirectionExpected = '?'; }
3863    if (autoplay && !animating) { setAutoplayTimer(); }
3864  }
3865
3866  // === RESIZE FUNCTIONS === //
3867  // (slidePositions, index, items) => vertical_conentWrapper.height
3868  function updateContentWrapperHeight () {
3869    var wp = middleWrapper ? middleWrapper : innerWrapper;
3870    wp.style.height = slidePositions[index + items] - slidePositions[index] + 'px';
3871  }
3872
3873  function getPages () {
3874    var rough = fixedWidth ? (fixedWidth + gutter) * slideCount / viewport : slideCount / items;
3875    return Math.min(Math.ceil(rough), slideCount);
3876  }
3877
3878  /*
3879   * 1. update visible nav items list
3880   * 2. add "hidden" attributes to previous visible nav items
3881   * 3. remove "hidden" attrubutes to new visible nav items
3882   */
3883  function updateNavVisibility () {
3884    if (!nav || navAsThumbnails) { return; }
3885
3886    if (pages !== pagesCached) {
3887      var min = pagesCached,
3888          max = pages,
3889          fn = _helpers_showElement_js__WEBPACK_IMPORTED_MODULE_25__["showElement"];
3890
3891      if (pagesCached > pages) {
3892        min = pages;
3893        max = pagesCached;
3894        fn = _helpers_hideElement_js__WEBPACK_IMPORTED_MODULE_24__["hideElement"];
3895      }
3896
3897      while (min < max) {
3898        fn(navItems[min]);
3899        min++;
3900      }
3901
3902      // cache pages
3903      pagesCached = pages;
3904    }
3905  }
3906
3907  function info (e) {
3908    return {
3909      container: container,
3910      slideItems: slideItems,
3911      navContainer: navContainer,
3912      navItems: navItems,
3913      controlsContainer: controlsContainer,
3914      hasControls: hasControls,
3915      prevButton: prevButton,
3916      nextButton: nextButton,
3917      items: items,
3918      slideBy: slideBy,
3919      cloneCount: cloneCount,
3920      slideCount: slideCount,
3921      slideCountNew: slideCountNew,
3922      index: index,
3923      indexCached: indexCached,
3924      displayIndex: getCurrentSlide(),
3925      navCurrentIndex: navCurrentIndex,
3926      navCurrentIndexCached: navCurrentIndexCached,
3927      pages: pages,
3928      pagesCached: pagesCached,
3929      sheet: sheet,
3930      isOn: isOn,
3931      event: e || {},
3932    };
3933  }
3934
3935  return {
3936    version: '2.9.3',
3937    getInfo: info,
3938    events: events,
3939    goTo: goTo,
3940    play: play,
3941    pause: pause,
3942    isOn: isOn,
3943    updateSliderHeight: updateInnerWrapperHeight,
3944    refresh: initSliderTransform,
3945    destroy: destroy,
3946    rebuild: function() {
3947      return tns(Object(_helpers_extend_js__WEBPACK_IMPORTED_MODULE_2__["extend"])(options, optionsElements));
3948    }
3949  };
3950};
3951
3952
3953/***/ }),
3954
3955/***/ "./src/components/product-categories/product-categories.js":
3956/*!*****************************************************************!*\
3957  !*** ./src/components/product-categories/product-categories.js ***!
3958  \*****************************************************************/
3959/*! no exports provided */
3960/***/ (function(module, __webpack_exports__, __webpack_require__) {
3961
3962"use strict";
3963__webpack_require__.r(__webpack_exports__);
3964/* harmony import */ var _js_main_script__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../js/main.script */ "./src/js/main.script.js");
3965
3966
3967
3968
3969(function ($, Drupal) {
3970  $(document).ready(function () {
3971    console.log('THIS IS RUNNING'); // Carousel 3 Items Max.
3972
3973    var slider = Object(_js_main_script__WEBPACK_IMPORTED_MODULE_0__["tns"])({
3974      "container": ".path-about-us .product-category__row, .path-a-propos .path-home .product-category__row, .product-category__row",
3975      "items": 1,
3976      "loop": false,
3977      "center": true,
3978      "swipeAngle": false,
3979      "speed": 400,
3980      "nav": true,
3981      "controlsContainer": ".product-category__controls",
3982      "prevButton": ".product-category__carousel-prev",
3983      "nextButton": ".product-category__carousel-next",
3984      "edgePadding": 0,
3985      "gutter": 0,
3986      // "controlsPosition": "bottom",
3987      "responsive": {
3988        // "500": {
3989        "576": {
3990          "items": 2,
3991          "center": false
3992        },
3993        "768": {
3994          "slideBy": "page",
3995          "items": 3,
3996          "center": false
3997        },
3998        "1200": {
3999          "slideBy": "page",
4000          "items": 4 // "gutter": 0,
4001
4002        }
4003      }
4004    });
4005    $('.product-category__col .product').each(function (index) {
4006      var bgImage = $(this).css('background-image');
4007      console.log('GETTING IMAGE');
4008
4009      if (bgImage && bgImage !== 'none') {
4010        $('.tns-nav button').eq(index).css({
4011          'background-image': bgImage,
4012          'background-size': 'cover',
4013          'background-position': 'center',
4014          'background-repeat': 'no-repeat'
4015        });
4016        console.log('IMAGE UPDATED');
4017      }
4018    });
4019  });
4020})(jQuery, Drupal);
4021
4022/***/ }),
4023
4024/***/ "./src/js/main.script.js":
4025/*!*******************************!*\
4026  !*** ./src/js/main.script.js ***!
4027  \*******************************/
4028/*! exports provided: tns */
4029/***/ (function(module, __webpack_exports__, __webpack_require__) {
4030
4031"use strict";
4032__webpack_require__.r(__webpack_exports__);
4033/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfill */ "./src/js/polyfill.js");
4034/* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_polyfill__WEBPACK_IMPORTED_MODULE_0__);
4035/* harmony import */ var _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/tiny-slider/src/tiny-slider */ "./node_modules/tiny-slider/src/tiny-slider.js");
4036/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tns", function() { return _node_modules_tiny_slider_src_tiny_slider__WEBPACK_IMPORTED_MODULE_1__["tns"]; });
4037
4038
4039
4040 // import 'bootstrap';
4041
4042
4043
4044
4045(function ($, Drupal, drupalSettings) {
4046  // Responsive check helper:
4047  // USAGE: if (Drupal.device.isMobile()) {}
4048  Drupal.device = {
4049    isDesktop: function isDesktop() {
4050      return $(window).innerWidth() > 980;
4051    },
4052    isTablet: function isTablet() {
4053      return $(window).innerWidth() <= 980 && $(window).innerWidth() > 728;
4054    },
4055    isMobile: function isMobile() {
4056      return $(window).innerWidth() <= 728;
4057    }
4058  };
4059  setTimeout(function () {
4060    $("#where-to-buy .wtb-title .more-link a").addClass("btn btn-primary");
4061  }, 1000); // Let the document know when the mouse is being used
4062
4063  document.body.addEventListener("mousedown", function () {
4064    document.body.classList.add("using-mouse");
4065  }); // Re-enable focus styling when Tab is pressed
4066
4067  document.body.addEventListener("keydown", function (event) {
4068    if (event.keyCode === 9) {
4069      document.body.classList.remove("using-mouse");
4070    }
4071  });
4072  $(".webform-email").attr("autocomplete", "email");
4073  $(".webform-email-confirm").attr("autocomplete", "email-confirm");
4074  $("#ajax-wrapper .js-form-item-image-upload small #edit-image-upload--description").append("<small> No file chosen.</small>");
4075  Drupal.behaviors.Bc_brandTheme = {
4076    attach: function attach(context, settings) {
4077      var host = window.location.host;
4078      $('a[href^="http"]:not([href*="' + host + '"])').each(function (index) {
4079        $(this).attr("rel", "noopener nofollow");
4080      });
4081      $('[data-toggle="popover"]').each(function (index) {
4082        var $this = $(this);
4083        var $container = $this.closest("div");
4084        $container.addClass("has-popover");
4085        $this.appendTo($container);
4086        $this.popover({
4087          template: '<div class="popover" role="tooltip"><div class="popover-body"></div></div>',
4088          container: $container
4089        });
4090      });
4091      $(".webform-submission-newsletter-form-form .form-item-postal-code input").inputmask({
4092        mask: ["99999", "99999-9999", "A9A 9A9"],
4093        placeholder: "",
4094        clearIncomplete: true
4095      }); // let optionsRegion = $('#region-select').html();
4096      // console.log("options",  optionsRegion);
4097      // $('#region-select-footer').append(optionsRegion);
4098      // tns carousel remove tabindex.
4099      // $('.tns-carousel > .tns-item').removeAttr('tabindex', 'aria-hidden');
4100
4101      /**
4102       * SHARE COMPONENT
4103       */
4104
4105      /**
4106       * Determine the mobile operating system.
4107       * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
4108       * Based on: https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system
4109       * @returns {String}
4110       */
4111
4112      function isAndroidIOS() {
4113        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
4114
4115        if (/android/i.test(userAgent)) {
4116          console.log("android detected");
4117          return true;
4118        } // iOS detection from: http://stackoverflow.com/a/9039885/177710
4119
4120
4121        if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
4122          console.log("ios detected");
4123          return true;
4124        } //not Android or iOS
4125
4126
4127        return false;
4128      }
4129
4130      function getMeta(metaName) {
4131        var metas = document.getElementsByTagName("meta");
4132
4133        for (var i = 0; i < metas.length; i++) {
4134          if (metas[i].getAttribute("name") === metaName) {
4135            return metas[i].getAttribute("content");
4136          }
4137        }
4138
4139        return "";
4140      }
4141
4142      $(".share-button", context).on("click", function () {
4143        var isMobile = isAndroidIOS();
4144        console.log(isMobile);
4145
4146        if (navigator.share && isMobile) {
4147          navigator.share({
4148            title: document.title,
4149            text: getMeta("description"),
4150            url: document.href
4151          }).then(function () {
4152            return console.log("Successful share");
4153          })["catch"](function (error) {
4154            return console.log("Error sharing", error);
4155          });
4156          return null;
4157        }
4158
4159        $(this).toggleClass("opened"); // $(this).find('.icon').toggleClass('icon-share-close icon-share');
4160
4161        $(".sharebox").toggleClass("opened");
4162
4163        if ($(this).hasClass("opened")) {
4164          $(this).attr("aria-expanded", "true");
4165        } else {
4166          $(this).attr("aria-expanded", "false");
4167        } // $('.sharebox .close').focus();
4168
4169      }); // $('.sharebox .close').on('click', function () {
4170      //   $(this).parents('.opened').removeClass('opened');
4171      // });
4172
4173      var $temp = $("<input>");
4174      var $url = $(location).attr("href");
4175      $(".sharebox .copybutton").on("click", function () {
4176        // $('.copyfield input')[0].select();
4177        // document.execCommand('copy');
4178        $("body").append($temp);
4179        $temp.val($url).select();
4180        document.execCommand("copy");
4181        $temp.remove();
4182        $(".copyfield .copymessage").addClass("shown");
4183        setTimeout(function () {
4184          $(".copyfield .copymessage").removeClass("shown");
4185        }, 10000);
4186      });
4187      $("#navbar .navbar-brand", context).attr("tabindex", "0"); //Change Element type
4188
4189      $.fn.changeElementType = function (newType) {
4190        this.each(function () {
4191          var attrs = {};
4192          $.each(this.attributes, function (idx, attr) {
4193            attrs[attr.nodeName] = attr.nodeValue;
4194          });
4195          $(this).replaceWith(function () {
4196            return $("<" + newType + "/>", attrs).append($(this).contents());
4197          });
4198        });
4199      }; // $(".juicer-feed .slick-list .slick-track").changeElementType("ul");
4200      // $(".juicer-feed").changeElementType("div");
4201      // Detect Valid Keyboard Clicks
4202      // https://karlgroves.com/2014/11/24/ridiculously-easy-trick-for-keyboard-accessibility
4203
4204
4205      function a11yClick(event) {
4206        if (event.type === "click") {
4207          return true;
4208        } else if (event.type === "keypress") {
4209          var code = event.charCode || event.keyCode;
4210
4211          if (code === 32 || code === 13) {
4212            return true;
4213          }
4214        } else {
4215          return false;
4216        }
4217      } // Juicer/Slick accessibility tweaks.
4218      // $("#block-juiceren .juicer-feed").changeElementType("div");
4219      // $(".j-overlay .j-close span").html('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
4220
4221
4222      $("#block-juiceren .juicer-feed").on("init", function (e, slick) {
4223        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active");
4224        $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
4225        setTimeout(function () {
4226          // Set slick's accessibility option to false as recommended here:
4227          // https://hub.accessible360.com/kb/articles/521#heading-tip-3-disable-accessibility-mode
4228          if ($("#block-juiceren .juicer-feed").hasClass("slick-initialized")) {
4229            $("#block-juiceren .juicer-feed.slick-initialized").slick("slickSetOption", {
4230              accessibility: false
4231            }, true);
4232          }
4233
4234          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
4235        }, 1000);
4236        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text a").removeAttr("tabindex").css("color", "white").changeElementType("span");
4237        $("#block-juiceren .juicer-feed .slick-list").find(".slick-track .feed-item").attr("role", "group");
4238        $("#block-juiceren .juicer-feed .slick-list .feed-item .j-text .j-meta nav").addClass("j-meta-nav").changeElementType("div");
4239        $("#block-juiceren .juicer-feed .slick-list .feed-item").on("click", function () {
4240          window.open($(this).find("a").attr("href")); // console.log('test');
4241
4242          return false;
4243        }); // Play icon.
4244
4245        var $imageVideo = $("#block-juiceren .juicer-feed .slick-list .feed-item.j-video .j-image");
4246        var playIcon = '<span class="j-video-icon" aria-hidden="true"></span>';
4247        $imageVideo.append(playIcon);
4248        $("#block-juiceren .juicer-feed .slick-list .feed-item", context).each(function (i, e) {
4249          var alt = $(e).find(".j-image img").attr("alt"),
4250              message = $(e).find(".j-message").text(),
4251              label = Number($(e).attr("data-slick-index")) + 1,
4252              totalSlide = $("#block-juiceren .juicer-feed .slick-list .feed-item").length;
4253          $(e).attr({
4254            "aria-label": "Slide " + label + " of " + totalSlide
4255          }); // if (alt) {
4256          // $(e).find(".j-image img").attr("alt", alt.replace('Photo from ', ''));
4257          // }
4258
4259          $(e).find(".j-image img").attr("alt", message); // Social icon screen reader text.
4260
4261          var $social = $(this).find(".j-social");
4262          var socialIcon = '<span class="j-social-icon" aria-hidden="true"></span> <span class="sr-only">' + $social.attr("aria-label") + "</span>";
4263          $social.append(socialIcon).removeAttr("aria-label");
4264        });
4265        $(".slick-next, .slick-prev").on("click keypress", function (event) {
4266          if (a11yClick(event) === true) {
4267            setTimeout(function () {
4268              $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active a").first().focus();
4269            }, 100);
4270          }
4271        }); //update all j-meta a tags to say comments or likes
4272
4273        $(".comments, .repins").each(function () {
4274          var numComments = $(this).text();
4275          $(this).html(numComments + ' <span class="sr-only">comments</div>');
4276        });
4277        $(".likes").each(function () {
4278          var numLikes = $(this).text();
4279          $(this).html(numLikes + ' <span class="sr-only">likes</div>');
4280        });
4281      });
4282      $("#block-juiceren .juicer-feed").on("beforeChange", function (e, slick, currentSlide, nextSlide) {
4283        $("#block-juiceren .juicer-feed .slick-list .feed-item").removeAttr("aria-hidden");
4284      });
4285      $("#block-juiceren .juicer-feed").on("afterChange", function (e, slick, currentSlide) {
4286        setTimeout(function () {
4287          $("#block-juiceren .juicer-feed .slick-list .feed-item.slick-active").removeAttr("aria-hidden");
4288        }, 500);
4289      });
4290
4291      if ($("#prodH1").length > 0) {
4292        var root = document.getElementById("prodH1");
4293        root.style.setProperty("--h1-height", root.clientHeight + "px");
4294        $(".products--full").addClass("loaded");
4295        console.log("root.clientHeight", root.clientHeight);
4296      }
4297    }
4298  };
4299  setTimeout(function () {
4300    $(".path-sitemap .field-title a, .path-plan-du-site .field-title a").each(function () {
4301      var $this = $(this),
4302          content = $this.text().replace(/&#174;/g, "®").replace(/&#174/g, "®").replace(/&#127338;/g, "🅪").replace(/&#127339;/g, "🅫").replace(/&#8482;/g, "™");
4303      $this.text(content);
4304    });
4305    $(".j-overlay .j-close").append('<img src="/themes/custom/bc_brand/assets/icons/close.svg" class="img-fluid" alt="">');
4306  }, 100); // if ($("img[alt]").text === "[mtools:empty]") {
4307  //   console.log("origAlt");
4308  // }
4309
4310  $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
4311
4312  Drupal.behaviors.gameSliderControls = {
4313    attach: function attach(context, settings) {
4314      if ($(".game-slider").length > 0) {
4315        $(".game-slider .tns-controls").removeAttr("aria-label");
4316        $(".game-slider .tns-controls").removeAttr("tabindex");
4317        $(".game-slider__next").attr("tabindex", "0");
4318      }
4319    }
4320  }; //on click of "esc" key it closes the modal popup
4321
4322  $(document).on("keydown", function (event) {
4323    if ($("body").hasClass("mm-ocd-opened")) {
4324      if (event.key === "Escape" || event.key == "Esc") {
4325        $("#main-menu-button-close").click();
4326      }
4327    }
4328  });
4329
4330  function modalTabLock() {
4331    //Prevent Shift + Tab to focus outside of the Modal
4332    $(".page__header input, .page__header .btn").on("keydown", function (e) {
4333      if (e.which === 9 && e.shiftKey) {
4334        setTimeout(function () {
4335          $(".navbar-actions .icon-search").focus();
4336        }, 10);
4337      }
4338    }); //Prevent Tab to focus outside of the Modal
4339
4340    $(".page__header .btn").on("keydown", function (e) {
4341      if (e.which === 9 && !e.shiftKey) {
4342        e.preventDefault();
4343        setTimeout(function () {
4344          $(".navbar-actions .icon-search").focus();
4345        }, 10);
4346      }
4347    });
4348  }
4349
4350  setTimeout(function () {
4351    modalTabLock();
4352  }, 100);
4353  Drupal.behaviors.imageAlt = {
4354    attach: function attach(context, settings) {
4355      $("img\\[alt\\*\\=\\'\\[mtools\\:empty\\]\\'").attr("alt", ""); // $("img[alt='[mtools:empty]'").attr("alt", "");
4356      // $("img[alt*='&lt;empty&gt;'").attr("alt", "");
4357      // var altText = $("img").getAttribute("alt");
4358      // if($("img").attr("alt") === "[mtools:empty]") {
4359      //   $(this).attr("alt", "");
4360      // }
4361
4362      $('img[alt="[mtools:empty]"]').each(function () {
4363        // `this` is the div
4364        $(this).attr("alt", "");
4365      });
4366    }
4367  };
4368})(jQuery, Drupal, drupalSettings);
4369
4370/***/ }),
4371
vendor: 4,438 bytes, lines 4372-4483
4372/***/ "./src/js/polyfill.js":
4373/*!****************************!*\
4374  !*** ./src/js/polyfill.js ***!
4375  \****************************/
4376/*! no static exports found */
4377/***/ (function(module, exports) {
4378
4379// Add your JS/node package pollyfills here
4380
4381/***/ }),
4382
4383/***/ 17:
4384/*!***********************************************************************!*\
4385  !*** multi ./src/components/product-categories/product-categories.js ***!
4386  \***********************************************************************/
4387/*! no static exports found */
4388/***/ (function(module, exports, __webpack_require__) {
4389
4390module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/product-categories/product-categories.js */"./src/components/product-categories/product-categories.js");
4391
4392
4393/***/ })
4394
4395/******/ });;
4396/******/ (function(modules) { // webpackBootstrap
4397/******/ 	// The module cache
4398/******/ 	var installedModules = {};
4399/******/
4400/******/ 	// The require function
4401/******/ 	function __webpack_require__(moduleId) {
4402/******/
4403/******/ 		// Check if module is in cache
4404/******/ 		if(installedModules[moduleId]) {
4405/******/ 			return installedModules[moduleId].exports;
4406/******/ 		}
4407/******/ 		// Create a new module (and put it into the cache)
4408/******/ 		var module = installedModules[moduleId] = {
4409/******/ 			i: moduleId,
4410/******/ 			l: false,
4411/******/ 			exports: {}
4412/******/ 		};
4413/******/
4414/******/ 		// Execute the module function
4415/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
4416/******/
4417/******/ 		// Flag the module as loaded
4418/******/ 		module.l = true;
4419/******/
4420/******/ 		// Return the exports of the module
4421/******/ 		return module.exports;
4422/******/ 	}
4423/******/
4424/******/
4425/******/ 	// expose the modules object (__webpack_modules__)
4426/******/ 	__webpack_require__.m = modules;
4427/******/
4428/******/ 	// expose the module cache
4429/******/ 	__webpack_require__.c = installedModules;
4430/******/
4431/******/ 	// define getter function for harmony exports
4432/******/ 	__webpack_require__.d = function(exports, name, getter) {
4433/******/ 		if(!__webpack_require__.o(exports, name)) {
4434/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
4435/******/ 		}
4436/******/ 	};
4437/******/
4438/******/ 	// define __esModule on exports
4439/******/ 	__webpack_require__.r = function(exports) {
4440/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
4441/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4442/******/ 		}
4443/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
4444/******/ 	};
4445/******/
4446/******/ 	// create a fake namespace object
4447/******/ 	// mode & 1: value is a module id, require it
4448/******/ 	// mode & 2: merge all properties of value into the ns
4449/******/ 	// mode & 4: return value when already ns object
4450/******/ 	// mode & 8|1: behave like require
4451/******/ 	__webpack_require__.t = function(value, mode) {
4452/******/ 		if(mode & 1) value = __webpack_require__(value);
4453/******/ 		if(mode & 8) return value;
4454/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
4455/******/ 		var ns = Object.create(null);
4456/******/ 		__webpack_require__.r(ns);
4457/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
4458/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
4459/******/ 		return ns;
4460/******/ 	};
4461/******/
4462/******/ 	// getDefaultExport function for compatibility with non-harmony modules
4463/******/ 	__webpack_require__.n = function(module) {
4464/******/ 		var getter = module && module.__esModule ?
4465/******/ 			function getDefault() { return module['default']; } :
4466/******/ 			function getModuleExports() { return module; };
4467/******/ 		__webpack_require__.d(getter, 'a', getter);
4468/******/ 		return getter;
4469/******/ 	};
4470/******/
4471/******/ 	// Object.prototype.hasOwnProperty.call
4472/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
4473/******/
4474/******/ 	// __webpack_public_path__
4475/******/ 	__webpack_require__.p = "/";
4476/******/
4477/******/
4478/******/ 	// Load entry module and return exports
4479/******/ 	return __webpack_require__(__webpack_require__.s = 10);
4480/******/ })
4481/************************************************************************/
4482/******/ ({
4483
4484/***/ "./src/components/header/header.js":
4485/*!*****************************************!*\
4486  !*** ./src/components/header/header.js ***!
4487  \*****************************************/
4488/*! no static exports found */
4489/***/ (function(module, exports, __webpack_require__) {
4490
4491"use strict";
4492
4493
4494(function ($, Drupal) {
4495  var valueTerm = $("#term");
4496  var searchToggle = false;
4497  var w = window.innerWidth;
4498  var $form = $(".search__header form"); //array of view names included in search
4499
4500  var searchViews = ["search_products", // "search_recipes",
4501  // "search_blog",
4502  "search_basic_pages"]; //focus trap
4503
4504  function focusTrap(trapSelector) {
4505    console.log('FOCUS TRAP RUNNING'); // Focus Trap: Causes the tab key to loop focus within the given selector.
4506
4507    var focusableElements = 'button:not(.hidden), [href]:not(.hidden), input:not(.hidden), select:not(.hidden), textarea:not(.hidden), [tabindex]:not([tabindex="-1"])'; // All focusable elements
4508
4509    document.addEventListener('keydown', function (e) {
4510      var trap = document.querySelector(trapSelector); // If the key pressed is not 'Tab' or the trap element is not present: do nothing
4511
4512      var isTabPressed = e.key === 'Tab' || e.keyCode === 9;
4513
4514      if (!isTabPressed || !trap) {
4515        return;
4516      }
4517
4518      var focusableContent = trap.querySelectorAll(focusableElements),
4519          firstFocusableElement = focusableContent[0],
4520          // first focusable element
4521      lastFocusableElement = focusableContent[focusableContent.length - 1]; // last focusable element
4522
4523      if (e.shiftKey) {
4524        // if shift + tab on first element, focus the last focusable element
4525        if (document.activeElement === firstFocusableElement) {
4526          lastFocusableElement.focus(); //
4527
4528          e.preventDefault();
4529        }
4530      } else {
4531        // if tab on last element, focus the first focusable element
4532        if (document.activeElement === lastFocusableElement) {
4533          firstFocusableElement.focus();
4534          e.preventDefault();
4535        }
4536      }
4537
4538      console.log('FOCASABLE ', lastFocusableElement);
4539    });
4540  } // focusTrap('#search-container');
4541  // =======================================================================================
4542  // Hide Background from Screen Readers
4543  // =======================================================================================
4544
4545
4546  function hideModalBG(e) {
4547    var focusableElements = 'button:not(.hidden), [href]:not(.hidden), input:not(.hidden), select:not(.hidden), textarea:not(.hidden), [tabindex]:not([tabindex="-1"])'; // All focusable elements
4548
4549    var modalElements = $(e).find(focusableElements); //on show  
4550
4551    $("body > *").not(e).each(function () {
4552      var ariaHidden = $(this).attr("aria-hidden");
4553
4554      if (typeof ariaHidden == "undefined") {
4555        ariaHidden = "false";
4556      }
4557
4558      ;
4559      $(this).attr("data-aria-hidden", ariaHidden);
4560    });
4561    $("body > *").not(e).attr("aria-hidden", true);
4562    $("body").find(focusableElements).not(e).each(function () {
4563      var eTabIndex = $(this).attr("tabindex");
4564      console.log('data-tabindex', eTabIndex);
4565
4566      if (typeof eTabIndex == "undefined") {
4567        eTabIndex = 0;
4568      }
4569
4570      ;
4571      $(this).attr("data-tabindex", eTabIndex);
4572    });
4573    $("body").find(focusableElements).not(modalElements).attr("tabindex", '-1');
4574    console.log('HIDE MODAL BG RUNS');
4575  }
4576
4577  ;
4578
4579  function showModalBG(e) {
4580    var focusableElements = 'button:not(.hidden), [href]:not(.hidden), input:not(.hidden), select:not(.hidden), textarea:not(.hidden)'; // All focusable elements
4581    //on hide    
4582
4583    $("body > *").each(function (index, el) {
4584      var ariaHidden = $(el).attr("data-aria-hidden");
4585
4586      if (ariaHidden == "false") {
4587        $(el).removeAttr("aria-hidden");
4588      } else {
4589        $(el).attr("aria-hidden", ariaHidden);
4590      }
4591    });
4592    $("body > *").removeAttr("data-aria-hidden");
4593    $("body").find(focusableElements).each(function (index, el) {
4594      var eTabIndex = $(el).attr("data-tabindex");
4595      console.log('TABINDEX', eTabIndex);
4596
4597      if (eTabIndex == 0) {
4598        $(el).removeAttr("tabindex");
4599      } else {
4600        $(el).attr("tabindex", eTabIndex);
4601      }
4602    });
4603    $("body").find(focusableElements).removeAttr("data-tabindex");
4604    console.log('SHOW MODAL BG RUNS');
4605  }
4606
4607  Drupal.behaviors.searchSubmit = {
4608    attach: function attach(context, settings) {
4609      if (context.nodeType) {
4610        once('searchSubmit', '.search__header form', context).forEach(function (element) {
4611          // search - submit
4612          $(".search__header form").on("submit", function (e) {
4613            //$(".search__header .submit", context).on("click", function (e) {
4614            e.preventDefault(); //console.log($form.get(0).reportValidity());
4615
4616            var $form = $(this);
4617
4618            if ($form.get(0).reportValidity()) {
4619              var url = new URL(window.location);
4620              var userSearchTerm = $("#term").val(); // console.log(userSearchTerm);
4621
4622              url.searchParams.set("term", userSearchTerm); // console.log("url", url);
4623
4624              window.history.replaceState({}, "", url);
4625            }
4626          });
4627        });
4628      } else {
4629        console.log("not a node", context);
4630      }
4631    }
4632  };
4633  Drupal.behaviors.header = {
4634    attach: function attach(context, settings) {
4635      //only attach once
4636      //https://www.lullabot.com/articles/understanding-javascript-behaviors-in-drupal
4637      //https://drupal.stackexchange.com/questions/244492/jquery-once-onload
4638      $("main .page__header").removeClass("page__header").addClass("page__header-outer"); // $("#search__container").attr("aria-hidden", "true");
4639      // $(
4640      //   ".search__header button, .search__header a, .search__header input"
4641      // ).attr("tabindex", "-1");
4642      // $('.page__header', context).once('search-controls').each(function () {
4643
4644      $(context).find(".navbar-actions").once("search-controls").each(function (context) {
4645        // console.log("attach search-controls");
4646        var clearButton = $(".clear", context); //open search
4647        // console.log($('.navbar-actions .icon', context));
4648
4649        $(this).find(".icon-search").on("click", function (e) {
4650          e.preventDefault();
4651          Drupal.behaviors.header.toggleSearch(context); // console.log('toggle search');
4652
4653          var $headerContainer = $("#search-container");
4654          var $headerInputs = $(".search__header button, .search__header a, .search__header input");
4655
4656          if ($headerContainer.attr("aria-hidden")) {
4657            $headerContainer.removeAttr("aria-hidden");
4658            $headerContainer.removeClass('d-none');
4659            $headerInputs.removeAttr("tabindex");
4660            $('.page__content').attr('inert', true); // $('#navbar').attr('inert', true);
4661
4662            $('#navbar-top').attr('inert', true);
4663            $('#block-bc-brand-sitebranding').attr('inert', true);
4664            $('#main-menu .main-menu').attr('inert', true);
4665            $('#main-content').attr('inert', true);
4666            $('.skip-link').attr('inert', true);
4667            $('.footer').attr('inert', true);
4668            $('#search-container #term').focus();
4669          } else {
4670            $headerContainer.attr("aria-hidden", "true");
4671            $headerContainer.addClass('d-none');
4672            $headerInputs.attr("tabindex", "-1");
4673            $('.page__content').removeAttr('inert'); // $('#navbar').removeAttr('inert');
4674
4675            $('#navbar-top').removeAttr('inert');
4676            $('#block-bc-brand-sitebranding').removeAttr('inert');
4677            $('#main-menu .main-menu').removeAttr('inert');
4678            $('.footer').removeAttr('inert');
4679            $('.skip-link').removeAttr('inert');
4680            $('.footer').removeAttr('inert');
4681            $('#main-menu .navbar-actions .icon-search').focus();
4682          }
4683        });
4684        $(".we-mega-menu-li", context).on("mousedown", function (e) {
4685          if (searchToggle) Drupal.behaviors.header.toggleSearch(context);
4686        });
4687        $(window).resize(function () {
4688          var btnCloseMenu = $(".btn-close");
4689
4690          if (w != window.innerWidth && window.innerWidth <= 991) {
4691            $("body").removeClass("page__header--active");
4692            $("body").removeClass("toggled");
4693            $(".navbar-we-mega-menu").removeClass("we-mobile-megamenu-active has-cl
4693icked");
4694            $(".we-mega-menu-submenu").removeAttr("style");
4695            btnCloseMenu.removeClass("d-none");
4696            searchToggle = false; // $('.navbar-actions .icon-search').attr('aria-expanded', 'false');
4697          }
4698        });
4699        $("#main-menu-button").click(function () {
4700          $("body").removeClass("page__header--active"); // console.log("menu open");
4701        });
4702        valueTerm.on("input", function () {
4703          // console.log($(this).val());
4704          if ($(this).val() == "") {
4705            clearButton.removeClass("d-inline-flex");
4706          } else {
4707            clearButton.addClass("d-inline-flex");
4708          }
4709        }); //search navigation
4710
4711        $(".search-results-filter button").click(function () {
4712          // console.log('test');
4713          $(".search-results-filter button").attr("aria-pressed", "false");
4714          $(this).attr("aria-pressed", "true");
4715          var selected = $(this).attr("data-filter");
4716
4717          if (selected) {
4718            $(".search-results .views-element-container").addClass("d-none");
4719            $(".search-results .views-element-container" + selected).removeClass("d-none");
4720          } else {
4721            //show all
4722            $(".search-results .views-element-container").removeClass("d-none");
4723            Drupal.behaviors.header.checkEmpty(context);
4724          }
4725        });
4726        $(".search__header .form-control").each(function () {
4727          Drupal.behaviors.header.checkForInput(this, context);
4728        });
4729        $(".search__header .form-control").on("change keyup", function () {
4730          Drupal.behaviors.header.checkForInput(this, context);
4731        });
4732        var replaceState = window.history.replaceState; //history state is loaded (run search)
4733
4734        window.history.replaceState = function (e) {
4735          replaceState.apply(window.history, arguments);
4736          var urlParams = new URLSearchParams(window.location.search);
4737          var term = urlParams.get("term"); //if search term found in query string
4738
4739          if (term) {
4740            // console.log(term);
4741            $(".search-wrapper").addClass("d-none"); // clearButton.addClass("d-inline-flex");
4742            // iterate through the various views instance names to find our views
4743
4744            console.log("Drupal", Drupal); //if (Drupal.views) {
4745
4746            var instances = Drupal.views.instances;
4747            var countViewsLeft = searchViews.length; //number of views specified
4748
4749            $.each(instances, function getInstance(index, element) {
4750              if (searchViews.includes(element.settings.view_name)) {
4751                //callback function for Refresh View
4752                //from: https://www.vhinandrich.com/blog/drupal-8-show-drupal-throbber-button-manually-calls-views-ajax-refreshview
4753                element.refreshViewAjax.success = function (response, status) {
4754                  // Call the original callback
4755                  Drupal.Ajax.prototype.success.call(this, response, status); //add custom callback functions below \/
4756
4757                  countViewsLeft -= 1; //remove one
4758
4759                  Drupal.behaviors.header.updateSearchMsg(context, countViewsLeft);
4760                };
4761
4762                $(".js-view-dom-id-" + element.settings.view_dom_id, context).trigger("RefreshView");
4763                setTimeout(function () {
4764                  $(".js-view-dom-id-" + element.settings.view_dom_id, context).trigger("RefreshView");
4765                }, 3000);
4766              }
4767            }); //}
4768          }
4769        };
4770      });
4771    },
4772    checkEmpty: function checkEmpty(context) {
4773      var $hasProducts = $(".view-search-products .views-row").length;
4774      var $hasRecipes = $(".view-search-recipes .views-row").length;
4775      var $hasArticles = $(".view-search-blog .views-row").length;
4776      var $hasBasicPages = $(".view-search-basic-pages .views-row").length;
4777
4778      if (!$hasProducts && !$hasRecipes && !$hasArticles && !$hasBasicPages) {
4779        // console.log('has no products or recipes or articles or basic pages');
4780        $(".block-views-blocksearch-recipes-block-1").addClass("d-none");
4781        $(".block-views-blocksearch-blog-block-1").addClass("d-none");
4782        $(".block-views-blocksearch-basic-pages-block-1").addClass("d-none");
4783      } else if (!$hasProducts) {
4784        // console.log('has no products');
4785        // console.log('removed text')
4786        $(".block-views-blocksearch-products-block-1").addClass("d-none");
4787      } else if (!$hasRecipes) {
4788        // console.log('has no recipes');
4789        $(".block-views-blocksearch-recipes-block-1").addClass("d-none");
4790      } else if (!$hasArticles) {
4791        // console.log('has no articles');
4792        $(".block-views-blocksearch-blog-block-1").addClass("d-none");
4793      } else if (!$hasBasicPages) {
4794        // console.log('has no basic pages');
4795        $(".block-views-blocksearch-basic-pages-block-1").addClass("d-none");
4796      }
4797    },
4798    updateSearchMsg: function updateSearchMsg(context, countViewsLeft) {
4799      // console.log(context);
4800      if (countViewsLeft == 0) {
4801        setTimeout(function () {
4802          Drupal.behaviors.header.checkEmpty(context); //no views left to review, remove the display none class
4803
4804          $(".search-wrapper").removeClass("d-none");
4805        }, 3000);
4806      }
4807    },
4808    toggleSearch: function toggleSearch(context) {
4809      // $("main").toggleClass("overlay_filter");
4810      // setTimeout(function() {
4811      var btnCloseMenu = $(".btn-close");
4812      searchToggle = !searchToggle;
4813
4814      if (searchToggle) {
4815        if (window.innerWidth >= 991) {
4816          $(".we-mega-menu-li.dropdown-menu").removeClass("modal");
4817        }
4818
4819        Drupal.behaviors.header.setFocusSearch(context);
4820        btnCloseMenu.addClass("d-none"); // console.log('open');
4821
4822        $(".navbar-actions .icon-search").attr("aria-expanded", "true");
4823      } else {
4824        btnCloseMenu.removeClass("d-none"); // console.log('closed');
4825
4826        $(".navbar-actions .icon-search").attr("aria-expanded", "false");
4827      }
4828
4829      $("body").toggleClass("page__header--active"); // }, 3000);
4830    },
4831    checkForInput: function checkForInput(element, context) {
4832      console.log('KEY UP TRIGGER');
4833      var $label = $(element).siblings("label");
4834
4835      if ($(element).val().length > 0) {
4836        $label.addClass("input-has-value");
4837        $(element).addClass("has-value");
4838      } else {
4839        $label.removeClass("input-has-value");
4840        $(element).removeClass("has-value");
4841      }
4842    },
4843    clearSearchTerm: function clearSearchTerm(context) {
4844      valueTerm.val("");
4845      $(".search-wrapper").addClass("d-none");
4846    },
4847    setFocusSearch: function setFocusSearch(context) {
4848      valueTerm.focus();
4849    }
4850  };
4851})(jQuery, Drupal, once);
4852
4853/***/ }),
4854
4855/***/ 10:
4856/*!***********************************************!*\
4857  !*** multi ./src/components/header/header.js ***!
4858  \***********************************************/
4859/*! no static exports found */
4860/***/ (function(module, exports, __webpack_require__) {
4861
4862module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/header/header.js */"./src/components/header/header.js");
4863
4864
4865/***/ })
4866
4867/******/ });;
4868/******/ (function(modules) { // webpackBootstrap
4869/******/ 	// The module cache
4870/******/ 	var installedModules = {};
4871/******/
4872/******/ 	// The require function
4873/******/ 	function __webpack_require__(moduleId) {
4874/******/
4875/******/ 		// Check if module is in cache
4876/******/ 		if(installedModules[moduleId]) {
4877/******/ 			return installedModules[moduleId].exports;
4878/******/ 		}
4879/******/ 		// Create a new module (and put it into the cache)
4880/******/ 		var module = installedModules[moduleId] = {
4881/******/ 			i: moduleId,
4882/******/ 			l: false,
4883/******/ 			exports: {}
4884/******/ 		};
4885/******/
4886/******/ 		// Execute the module function
4887/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
4888/******/
4889/******/ 		// Flag the module as loaded
vendor: 2,824 bytes, lines 4890-4955
4890/******/ 		module.l = true;
4891/******/
4892/******/ 		// Return the exports of the module
4893/******/ 		return module.exports;
4894/******/ 	}
4895/******/
4896/******/
4897/******/ 	// expose the modules object (__webpack_modules__)
4898/******/ 	__webpack_require__.m = modules;
4899/******/
4900/******/ 	// expose the module cache
4901/******/ 	__webpack_require__.c = installedModules;
4902/******/
4903/******/ 	// define getter function for harmony exports
4904/******/ 	__webpack_require__.d = function(exports, name, getter) {
4905/******/ 		if(!__webpack_require__.o(exports, name)) {
4906/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
4907/******/ 		}
4908/******/ 	};
4909/******/
4910/******/ 	// define __esModule on exports
4911/******/ 	__webpack_require__.r = function(exports) {
4912/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
4913/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4914/******/ 		}
4915/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
4916/******/ 	};
4917/******/
4918/******/ 	// create a fake namespace object
4919/******/ 	// mode & 1: value is a module id, require it
4920/******/ 	// mode & 2: merge all properties of value into the ns
4921/******/ 	// mode & 4: return value when already ns object
4922/******/ 	// mode & 8|1: behave like require
4923/******/ 	__webpack_require__.t = function(value, mode) {
4924/******/ 		if(mode & 1) value = __webpack_require__(value);
4925/******/ 		if(mode & 8) return value;
4926/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
4927/******/ 		var ns = Object.create(null);
4928/******/ 		__webpack_require__.r(ns);
4929/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
4930/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
4931/******/ 		return ns;
4932/******/ 	};
4933/******/
4934/******/ 	// getDefaultExport function for compatibility with non-harmony modules
4935/******/ 	__webpack_require__.n = function(module) {
4936/******/ 		var getter = module && module.__esModule ?
4937/******/ 			function getDefault() { return module['default']; } :
4938/******/ 			function getModuleExports() { return module; };
4939/******/ 		__webpack_require__.d(getter, 'a', getter);
4940/******/ 		return getter;
4941/******/ 	};
4942/******/
4943/******/ 	// Object.prototype.hasOwnProperty.call
4944/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
4945/******/
4946/******/ 	// __webpack_public_path__
4947/******/ 	__webpack_require__.p = "/";
4948/******/
4949/******/
4950/******/ 	// Load entry module and return exports
4951/******/ 	return __webpack_require__(__webpack_require__.s = 15);
4952/******/ })
4953/************************************************************************/
4954/******/ ({
4955
4956/***/ "./src/components/navbar/navbar.js":
4957/*!*****************************************!*\
4958  !*** ./src/components/navbar/navbar.js ***!
4959  \*****************************************/
4960/*! no static exports found */
4961/***/ (function(module, exports) {
4962
4963(function ($, Drupal) {
4964  Drupal.behaviors.navbar = {
4965    attach: function attach(context) {
4966      var $navbar = $('#navbar'),
4967          $body = $('body'),
4968          prevScroll = 0,
4969          alertHeight = 0,
4970          menuHeight = 0,
4971          scrollDir = 'up';
4972      var initialSt = $(window).scrollTop();
4973
4974      if (initialSt == 0) {
4975        $navbar.removeClass('scroll-dir-up');
4976        $body.removeClass('scrolled-up');
4977      } //get height of the alert bar
4978
4979
4980      if ($("#block-bc-brand-headernotification").length) {
4981        alertHeight = $("#block-bc-brand-headernotification").outerHeight();
4982      }
4983
4984      if ($("#navbar-inner-wrapper").length) {
4985        menuHeight = $("#navbar-inner-wrapper").outerHeight();
4986      }
4987
4988      $(document).off('scroll.navdir').on('scroll.navdir', function () {
4989        var st = $(window).scrollTop();
4990        var initialSt = st; // console.log(prevScroll,st);
4991        //initial scroll down, don't snap until out of view
4992
4993        if (initialSt < menuHeight + alertHeight && !$navbar.hasClass('scrolled')) {
4994          $navbar.removeClass('scroll-dir-up');
4995          $body.removeClass('scrolled-up');
4996          $navbar.removeClass('scroll-dir-down');
4997          $navbar.removeClass('scrolled');
4998        } //scrolling back up, don't snap until at the very top
4999        else if (st <= alertHeight && scrollDir === 'up') {
5000            $navbar.removeClass('scroll-dir-up');
5001            $body.removeClass('scrolled-up');
5002            $navbar.removeClass('scroll-dir-down');
5003            $navbar.removeClass('scrolled');
5004          } else if (st < prevScroll && scrollDir === 'down') {
5005            // console.log("up");
5006            scrollDir = 'up';
5007            $navbar.addClass('scrolled');
5008            $navbar.addClass('scroll-dir-up');
5009            $body.addClass('scrolled-up');
5010            $navbar.removeClass('scroll-dir-down');
5011          } else if (st > prevScroll && scrollDir === 'up') {
5012            // console.log("down");
5013            $navbar.addClass('scrolled');
5014            $navbar.removeClass('scroll-dir-up');
5015            $body.removeClass('scrolled-up');
5016            $navbar.addClass('scroll-dir-down');
5017            scrollDir = 'down';
5018          }
5019
5020        prevScroll = st;
5021        return;
5022      });
5023    }
5024  };
5025})(jQuery, Drupal);
5026
5027/***/ }),
5028
5029/***/ 15:
5030/*!***********************************************!*\
5031  !*** multi ./src/components/navbar/navbar.js ***!
5032  \***********************************************/
5033/*! no static exports found */
5034/***/ (function(module, exports, __webpack_require__) {
5035
5036module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/navbar/navbar.js */"./src/components/navbar/navbar.js");
5037
5038
5039/***/ })
5040
5041/******/ });;
5042/**
5043* DO NOT EDIT THIS FILE.
5044* See the following change record for more information,
5045* https://www.drupal.org/node/2815083
5046* @preserve
5047**/
5048function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5049function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5050function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEac
5050h(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5051function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5052function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
5053function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5054(function ($, Drupal, cookies) {
5055  var deprecatedMessageSuffix = "is deprecated in Drupal 9.0.0 and will be removed in Drupal 10.0.0. Use the core/js-cookie library instead. See https://www.drupal.org/node/3104677";
5056  var isFunction = function isFunction(obj) {
5057    return Object.prototype.toString.call(obj) === '[object Function]';
5058  };
5059  var parseCookieValue = function parseCookieValue(value, parseJson) {
5060    if (value.indexOf('"') === 0) {
5061      value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
5062    }
5063    try {
5064      value = decodeURIComponent(value.replace(/\+/g, ' '));
5065      return parseJson ? JSON.parse(value) : value;
5066    } catch (e) {}
5067  };
5068  var reader = function reader(cookieValue, cookieName, converter, readUnsanitized, parseJson) {
5069    var value = readUnsanitized ? cookieValue : parseCookieValue(cookieValue, parseJson);
5070    if (converter !== undefined && isFunction(converter)) {
5071      return converter(value, cookieName);
5072    }
5073    return value;
5074  };
5075  $.cookie = function (key) {
5076    var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
5077    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
5078    Drupal.deprecationError({
5079      message: "jQuery.cookie() ".concat(deprecatedMessageSuffix)
5080    });
5081    if (value !== undefined && !isFunction(value)) {
5082      var attributes = _objectSpread(_objectSpread({}, $.cookie.defaults), options);
5083      if (typeof attributes.expires === 'string' && attributes.expires !== '') {
5084        attributes.expires = new Date(attributes.expires);
5085      }
5086      var cookieSetter = cookies.withConverter({
5087        write: function write(cookieValue) {
5088          return encodeURIComponent(cookieValue);
5089        }
5090      });
5091      value = $.cookie.json && !$.cookie.raw ? JSON.stringify(value) : String(value);
5092      return cookieSetter.set(key, value, attributes);
5093    }
5094    var userProvidedConverter = value;
5095    var cookiesShim = cookies.withConverter({
5096      read: function read(cookieValue, cookieName) {
5097        return reader(cookieValue, cookieName, userProvidedConverter, $.cookie.raw, $.cookie.json);
5098      }
5099    });
5100    if (key !== undefined) {
5101      return cookiesShim.get(key);
5102    }
5103    var results = cookiesShim.get();
5104    Object.keys(results).forEach(function (resultKey) {
5105      if (results[resultKey] === undefined) {
5106        delete results[resultKey];
5107      }
5108    });
5109    return results;
5110  };
5111  $.cookie.defaults = _objectSpread({
5112    path: ''
5113  }, cookies.defaults);
5114  $.cookie.json = false;
5115  $.cookie.raw = false;
5116  $.removeCookie = function (key, options) {
5117    Drupal.deprecationError({
5118      message: "jQuery.removeCookie() ".concat(deprecatedMessageSuffix)
5119    });
5120    cookies.remove(key, _objectSpread(_objectSpread({}, $.cookie.defaults), options));
5121    return !cookies.get(key);
5122  };
5123})(jQuery, Drupal, window.Cookies);;
5124(function ($, Drupal) {
5125  Drupal.behaviors.provinceSelector = {
5126    attach: function (context, settings) {
5127      // When juicer.io block is enabled it breaks jQuery.once, The following
5128      // is a fix for this behavior.
5129      let queryString = window.location.search;
5130      let urlParams = new URLSearchParams(queryString);
5131      let regionFocus = urlParams.get('regionFocus');
5132      if (regionFocus != null) {
5133        $("#region-select").focus();
5134        var simpleLiveCurl=location.protocol + '//' + location.host + location.pathname;
5135        window.history.replaceState( {} , 'regionFocus', simpleLiveCurl);
5136      }
5137      let $selector = null;
5138      let $selector_mobile = null;
5139      let $selector_footer = null;
5140      if (typeof jQuery.fn.once !== "undefined") {
5141        $selector = $("#province-selector select").once("provinceSelector");
5142        $selector_mobile = $("#province-selector-mobile select").once(
5143          "provinceSelector"
5144        );
5145        $selector_footer = $("#region-select-footer").once("provinceSelector");
5146      } else {
5147        $selector = $("#province-selector select");
5148        $selector_mobile = $("#province-selector-mobile select");
5149        $selector_footer = $("#region-select-footer");
5150      }
5151      provinceSelector.setDefault();
5152      // Bypass megamenu caching issue
5153      const activeProvince = provinceSelector.getProvince();
5154
5155      $('option', $selector_mobile).removeAttr('selected')
5156      $selector_mobile.val(activeProvince);
5157
5158      $selector.on("change", () => {
5159        const region = $("option:selected", $selector).data("region");
5160        provinceSelector.setCookie($selector.val(), region);
5161      });
5162
5163      $selector_mobile.on("change", () => {
5164        // Fix issue with variable undefined
5165        let $sMobile =  $("#province-selector-mobile select");
5166        const region = $("option:selected", $sMobile).data("region");
5167        provinceSelector.setCookie($sMobile.val(), region);
5168      });
5169
5170      $selector_footer.on("change", () => {
5171        const region = $("option:selected", $selector_footer).data("region");
5172        provinceSelector.setCookie($selector_footer.val(), region);
5173      });
5174    },
5175  };
5176
5177  // Helper object.
5178  const provinceSelector = {
5179    provinceCookie: "currentProvince",
5180    regionCookie: "currentRegion",
5181    setDefault: () => {
5182      // Get default province from backend integration.
5183      $.cookie(
5184        provinceSelector.provinceCookie, drupalSettings.defaultProvince,
5185        { path: "/" }
5186      );
5187      $.cookie(
5188        provinceSelector.regionCookie, drupalSettings.defaultRegion,
5189        { path: "/" }
5190      );
5191    },
5192    setCookie: (province, region) => {
5193      $.cookie(provinceSelector.provinceCookie, province, { path: "/" });
5194      $.cookie(provinceSelector.regionCookie, region, { path: "/" });
5195      // document.location.reload(true);
5196      let queryString = window.location.search;
5197      let urlParams = new URLSearchParams(queryString);
5198      urlParams.delete('regionFocus');
5199      urlParams.set('regionFocus', '');
5200      document.location.href += '?' + urlParams;
5201    },
5202    getProvince: () => {
5203      return $.cookie(provinceSelector.provinceCookie)
5204    }
5205  };
5206})(jQuery, Drupal);
5207;
5208/*!
5209 * jQuery Form Plugin
5210 * version: 4.3.0
5211 * Requires jQuery v1.7.2 or later
5212 * Project repository: https://github.com/jquery-form/form
5213
5214 * Copyright 2017 Kevin Morris
5215 * Copyright 2006 M. Alsup
5216
5217 * Dual licensed under the LGPL-2.1+ or MIT licenses
5218 * https://github.com/jquery-form/form#license
5219
5220 * This library is free software; you can redistribute it and/or
5221 * modify it under the terms of the GNU Lesser General Public
vendor: 16,397 bytes, lines 5222-5229
5222 * License as published by the Free Software Foundation; either
5223 * version 2.1 of the License, or (at your option) any later version.
5224 * This library is distributed in the hope that it will be useful,
5225 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5226 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5227 * Lesser General Public License for more details.
5228 */
5229!function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t),t}:r(jQuery)}(function(q){"use strict";var m=/\r?\n/g,S={};S.fileapi=void 0!==q('<input type="file">').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: skipping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0<arguments.length?(M={url:M,data:e,dataType:t},"function"==typeof r&&(M.success=r)):void 0===M&&(M={}),O=M.method||M.type||this.attr2("method"),n=(n=(n="string"==typeof(a=M.url||this.attr2("action"))?q.trim(a):"")||window.location.href||"")&&(n.match(/^([^#]+)/)||[])[1],o=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",M=q.extend(!0,{url:n,success:q.ajaxSettings.success,type:O||q.ajaxSettings.type,iframeSrc:o},M);var i={};if(this.trigger("form-pre-serialize",[this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(M.beforeSerialize&&!1===M.beforeSerialize(this,M))return N("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var s=M.traditional;void 0===s&&(s=q.ajaxSettings.traditional);var u,c,C=[],l=this.formToArray(M.semantic,C,M.filtering);if(M.data&&(c=q.isFunction(M.data)?M.data(l):M.data,M.extraData=c,u=q.param(c,s)),M.beforeSubmit&&!1===M.beforeSubmit(l,this,M))return N("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[l,this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var f=q.param(l,s);u&&(f=f?f+"&"+u:u),"GET"===M.type.toUpperCase()?(M.url+=(0<=M.url.indexOf("?")?"&":"?")+f,M.data=null):M.data=f;var d,m,p,h=[];M.resetForm&&h.push(function(){X.resetForm()}),M.clearForm&&h.push(function(){X.clearForm(M.includeHidden)}),!M.dataType&&M.target?(d=M.success||function(){},h.push(function(e,t,r){var a=arguments,n=M.replaceTarget?"replaceWith":"html";q(M.target)[n](e).each(function(){d.apply(this,a)})})):M.success&&(q.isArray(M.success)?q.merge(h,M.success):h.push(M.success)),M.success=function(e,t,r){for(var a=M.context||this,n=0,o=h.length;n<o;n++)h[n].apply(a,[e,t,r||X,X])},M.error&&(m=M.error,M.error=function(e,t,r){var a=M.context||this;m.apply(a,[e,t,r,X])}),M.complete&&(p=M.complete,M.complete=function(e,t){var r=M.context||this;p.apply(r,[e,t,X])});var v=0<q("input[type=file]:enabled",this).filter(function(){return""!==q(this).val()}).length,g="multipart/form-data",x=X.attr("enctype")===g||X.attr("encoding")===g,y=S.fileapi&&S.formdata;N("fileAPI :"+y);var b,T=(v||x)&&!y;!1!==M.iframe&&(M.iframe||T)?M.closeKeepAlive?q.get(M.closeKeepAlive,function(){b=w(l)}):b=w(l):b=(v||x)&&y?function(e){for(var r=new FormData,t=0;t<e.length;t++)r.append(e[t].name,e[t].value);if(M.extraData){var a=function(e){var t,r,a=q.param(e,M.traditional).split("&"),n=a.length,o=[];for(t=0;t<n;t++)a[t]=a[t].replace(/\+/g," "),r=a[t].split("="),o.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return o}(M.extraData);for(t=0;t<a.length;t++)a[t]&&r.append(a[t][0],a[t][1])}M.data=null;var n=q.extend(!0,{},q.ajaxSettings,M,{contentType:!1,processData:!1,cache:!1,type:O||"POST"});M.uploadProgress&&(n.xhr=function(){var e=q.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,a=e.total;e.lengthComputable&&(t=Math.ceil(r/a*100)),M.uploadProgress(e,r,a,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){M.formData?t.data=M.formData:t.data=r,o&&o.call(this,e,t)},q.ajax(n)}(l):q.ajax(M),X.removeData("jqxhr").data("jqxhr",b);for(var j=0;j<C.length;j++)C[j]=null;return this.trigger("form-submit-notify",[this,M]),this;function w(e){var t,r,l,f,o,d,m,p,a,n,h,v,i=X[0],g=q.Deferred();if(g.abort=function(e){p.abort(e)},e)for(r=0;r<C.length;r++)t=q(C[r]),_?t.prop("disabled",!1):t.removeAttr("disabled");(l=q.extend(!0,{},q.ajaxSettings,M)).context=l.context||l,o="jqFormIO"+(new Date).getTime();var s=i.ownerDocument,u=X.closest("body");if(l.iframeTarget?(n=(d=q(l.iframeTarget,s)).attr2("name"))?o=n:d.attr2("name",o):(d=q('<iframe name="'+o+'" src="'+l.iframeSrc+'" />',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('<input type="hidden" name="'+l.extraData[n].name+'">',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('<input type="hidden" name="'+n+'">',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0<arguments.length)&&(e={url:e,data:t,dataType:r},"function"==typeof a&&(e.success=a)),(e=e||{}).delegation=e.delegation&&q.isFunction(q.fn.on),e.delegation||0!==this.length)return e.delegation?(q(document).off("submit.form-plugin",this.selector,o).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,o).on("click.form-plugin",this.selector,e,i),this):(e.beforeFormUnbind&&e.beforeFormUnbind(this,e),this.ajaxFormUnbind().on("submit.form-plugin",e,o).on("click.form-plugin",e,i));var n={s:this.selector,c:this.context};return!q.isReady&&n.s?(N("DOM not ready, queuing ajaxForm"),q(function(){q(n.s,n.c).ajaxForm(e)})):N("terminating; zero elements found by selector"+(q.isReady?"":" (DOM not ready)")),this},q.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},q.fn.formToArray=function(e,t,r){var a=[];if(0===this.length)return a;var n,o,i,s,u,c,l,f,d,m,p=this[0],h=this.attr("id"),v=(v=e||void 0===p.elements?p.getElementsByTagName("*"):p.elements)&&q.makeArray(v);if(h&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(n=q(':input[form="'+h+'"]').get()).length&&(v=(v||[]).concat(n)),!v||!v.length)return a;for(q.isFunction(r)&&(v=q.map(v,r)),o=0,c=v.length;o<c;o++)if((m=(u=v[o]).name)&&!u.disabled)if(e&&p.clk&&"image"===u.type)p.clk===u&&(a.push({name:m,value:q(u).val(),type:u.type}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y}));else if((s=q.fieldValue(u,!0))&&s.constructor===Array)for(t&&t.push(u),i=0,l=s.length;i<l;i++)a.push({name:m,value:s[i]});else if(S.fileapi&&"file"===u.type){t&&t.push(u);var g=u.files;if(g.length)for(i=0;i<g.length;i++)a.push({name:m,value:g[i],type:u.type});else a.push({name:m,value:"",type:u.type})}else null!=s&&(t&&t.push(u),a.push({name:m,value:s,type:u.type,required:u.required}));return e||!p.clk||(m=(d=(f=q(p.clk))[0]).name)&&!d.disabled&&"image"===d.type&&(a.push({name:m,value:f.val()}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y})),a},q.fn.formSerialize=function(e){return q.param(this.formToArray(e))},q.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=q.fieldValue(this,n);if(t&&t.constructor===Array)for(var r=0,a=t.length;r<a;r++)o.push({name:e,value:t[r]});else null!=t&&o.push({name:this.name,value:t})}}),q.param(o)},q.fn.fieldValue=function(e){for(var t=[],r=0,a=this.length;r<a;r++){var n=this[r],o=q.fieldValue(n,e);null==o||o.constructor===Array&&!o.length||(o.constructor===Array?q.merge(t,o):t.push(o))}return t},q.fieldValue=function(e,t){var r=e.name,a=e.type,n=e.tagName.toLowerCase();if(void 0===t&&(t=!0),t&&(!r||e.disabled||"reset"===a||"button"===a||("checkbox"===a||"radio"===a)&&!e.checked||("submit"===a||"image"===a)&&e.form&&e.form.clk!==e||"select"===n&&-1===e.selectedIndex))return null;if("select"!==n)return q(e).val().replace(m,"\r\n");var o=e.selectedIndex;if(o<0)return null;for(var i=[],s=e.options,u="select-one"===a,c=u?o+1:s.length,l=u?o:0;l<c;l++){var f=s[l];if(f.selected&&!f.disabled){var d=(d=f.value)||(f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value);if(u)return d;i.push(d)}}return i},q.fn.clearForm=function(e){return this.each(function(){q("input,select,textarea",this).clearFields(e)})},q.fn.clearFields=q.fn.clearInputs=function(r){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();a.test(e)||"textarea"===t?this.value="":"checkbox"===e||"radio"===e?this.checked=!1:"select"===t?this.selectedIndex=-1:"file"===e?/MSIE/.test(navigator.userAgent)?q(this).replaceWith(q(this).clone(!0)):q(this).val(""):r&&(!0===r&&/hidden/.test(e)||"string"==typeof r&&q(this).is(r))&&(this.value="")})},q.fn.resetForm=function(){return this.each(function(){var t=q(this),e=this.tagName.toLowerCase();switch(e){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var r=t.parents("select");return r.length&&r[0].multiple?"option"===e?this.selected=this.defaultSelected:t.find("option").resetForm():r.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var a=q(t.attr("for")),n=t.find("input,select,textarea");return a[0]&&n.unshift(a[0]),n.resetForm(),!0;case"form":return"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},q.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},q.fn.selected=function(r){return void 0===r&&(r=!0),this.each(function(){var e,t=this.t
5229ype;"checkbox"===t||"radio"===t?this.checked=r:"option"===this.tagName.toLowerCase()&&(e=q(this).parent("select"),r&&e[0]&&"select-one"===e[0].type&&e.find("option").selected(!1),this.selected=r)})},q.fn.ajaxSubmit.debug=!1});
5230
5231;
5232/**
5233* DO NOT EDIT THIS FILE.
5234* See the following change record for more information,
5235* https://www.drupal.org/node/2815083
5236* @preserve
5237**/
5238(function ($, Drupal, drupalSettings) {
5239  Drupal.Views = {};
5240  Drupal.Views.parseQueryString = function (query) {
5241    var args = {};
5242    var pos = query.indexOf('?');
5243    if (pos !== -1) {
5244      query = query.substring(pos + 1);
5245    }
5246    var pair;
5247    var pairs = query.split('&');
5248    for (var i = 0; i < pairs.length; i++) {
5249      pair = pairs[i].split('=');
5250      if (pair[0] !== 'q' && pair[1]) {
5251        args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
5252      }
5253    }
5254    return args;
5255  };
5256  Drupal.Views.parseViewArgs = function (href, viewPath) {
5257    var returnObj = {};
5258    var path = Drupal.Views.getPath(href);
5259    var viewHref = Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length);
5260    if (viewHref && path.substring(0, viewHref.length + 1) === "".concat(viewHref, "/")) {
5261      returnObj.view_args = decodeURIComponent(path.substring(viewHref.length + 1, path.length));
5262      returnObj.view_path = path;
5263    }
5264    return returnObj;
5265  };
5266  Drupal.Views.pathPortion = function (href) {
5267    var protocol = window.location.protocol;
5268    if (href.substring(0, protocol.length) === protocol) {
5269      href = href.substring(href.indexOf('/', protocol.length + 2));
5270    }
5271    return href;
5272  };
5273  Drupal.Views.getPath = function (href) {
5274    href = Drupal.Views.pathPortion(href);
5275    href = href.substring(drupalSettings.path.baseUrl.length, href.length);
5276    if (href.substring(0, 3) === '?q=') {
5277      href = href.substring(3, href.length);
5278    }
5279    var chars = ['#', '?', '&'];
5280    for (var i = 0; i < chars.length; i++) {
5281      if (href.indexOf(chars[i]) > -1) {
5282        href = href.substr(0, href.indexOf(chars[i]));
5283      }
5284    }
5285    return href;
5286  };
5287})(jQuery, Drupal, drupalSettings);;
5288/**
5289* DO NOT EDIT THIS FILE.
5290* See the following change record for more information,
5291* https://www.drupal.org/node/2815083
5292* @preserve
5293**/
5294(function ($, Drupal, drupalSettings) {
5295  Drupal.behaviors.ViewsAjaxView = {};
5296  Drupal.behaviors.ViewsAjaxView.attach = function (context, settings) {
5297    if (settings && settings.views && settings.views.ajaxViews) {
5298      var ajaxViews = settings.views.ajaxViews;
5299      Object.keys(ajaxViews || {}).forEach(function (i) {
5300        Drupal.views.instances[i] = new Drupal.views.ajaxView(ajaxViews[i]);
5301      });
5302    }
5303  };
5304  Drupal.behaviors.ViewsAjaxView.detach = function (context, settings, trigger) {
5305    if (trigger === 'unload') {
5306      if (settings && settings.views && settings.views.ajaxViews) {
5307        var ajaxViews = settings.views.ajaxViews;
5308        Object.keys(ajaxViews || {}).forEach(function (i) {
5309          var selector = ".js-view-dom-id-".concat(ajaxViews[i].view_dom_id);
5310          if ($(selector, context).length) {
5311            delete Drupal.views.instances[i];
5312            delete settings.views.ajaxViews[i];
5313          }
5314        });
5315      }
5316    }
5317  };
5318  Drupal.views = {};
5319  Drupal.views.instances = {};
5320  Drupal.views.ajaxView = function (settings) {
5321    var selector = ".js-view-dom-id-".concat(settings.view_dom_id);
5322    this.$view = $(selector);
5323    var ajaxPath = drupalSettings.views.ajax_path;
5324    if (ajaxPath.constructor.toString().indexOf('Array') !== -1) {
5325      ajaxPath = ajaxPath[0];
5326    }
5327    var queryString = window.location.search || '';
5328    if (queryString !== '') {
5329      queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
5330      if (queryString !== '') {
5331        queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString;
5332      }
5333    }
5334    this.element_settings = {
5335      url: ajaxPath + queryString,
5336      submit: settings,
5337      setClick: true,
5338      event: 'click',
5339      selector: selector,
5340      progress: {
5341        type: 'fullscreen'
5342      }
5343    };
5344    this.settings = settings;
5345    this.$exposed_form = $("form#views-exposed-form-".concat(settings.view_name.replace(/_/g, '-'), "-").concat(settings.view_display_id.replace(/_/g, '-')));
5346    once('exposed-form', this.$exposed_form).forEach($.proxy(this.attachExposedFormAjax, this));
5347    once('ajax-pager', this.$view.filter($.proxy(this.filterNestedViews, this))).forEach($.proxy(this.attachPagerAjax, this));
5348    var selfSettings = $.extend({}, this.element_settings, {
5349      event: 'RefreshView',
5350      base: this.selector,
5351      element: this.$view.get(0)
5352    });
5353    this.refreshViewAjax = Drupal.ajax(selfSettings);
5354  };
5355  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
5356    var that = this;
5357    this.exposedFormAjax = [];
5358    $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) {
5359      var selfSettings = $.extend({}, that.element_settings, {
5360        base: $(this).attr('id'),
5361        element: this
5362      });
5363      that.exposedFormAjax[index] = Drupal.ajax(selfSettings);
5364    });
5365  };
5366  Drupal.views.ajaxView.prototype.filterNestedViews = function () {
5367    return !this.$view.parents('.view').length;
5368  };
5369  Drupal.views.ajaxView.prototype.attachPagerAjax = function () {
5370    this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a').each($.proxy(this.attachPagerLinkAjax, this));
5371  };
5372  Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) {
5373    var $link = $(link);
5374    var viewData = {};
5375    var href = $link.attr('href');
5376    $.extend(viewData, this.settings, Drupal.Views.parseQueryString(href), Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
5377    var selfSettings = $.extend({}, this.element_settings, {
5378      submit: viewData,
5379      base: false,
5380      element: link
5381    });
5382    this.pagerAjax = Drupal.ajax(selfSettings);
5383  };
5384  Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) {
5385    var offset = $(response.selector).offset();
5386    var scrollTarget = response.selector;
5387    while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) {
5388      scrollTarget = $(scrollTarget).parent();
5389    }
5390    if (offset.top - 10 < $(scrollTarget).scrollTop()) {
5391      $(scrollTarget).animate({
5392        scrollTop: offset.top - 10
5393      }, 500);
5394    }
5395  };
5396})(jQuery, Drupal, drupalSettings);;
5397/******/ (function(modules) { // webpackBootstrap
5398/******/ 	// The module cache
5399/******/ 	var installedModules = {};
5400/******/
5401/******/ 	// The require function
5402/******/ 	function __webpack_require__(moduleId) {
5403/******/
5404/******/ 		// Check if module is in cache
5405/******/ 		if(installedModules[moduleId]) {
5406/******/ 			return installedModules[moduleId].exports;
5407/******/ 		}
5408/******/ 		// Create a new module (and put it into the cache)
5409/******/ 		var module = installedModules[moduleId] = {
5410/******/ 			i: moduleId,
5411/******/ 			l: false,
5412/******/ 			exports: {}
5413/******/ 		};
5414/******/
5415/******/ 		// Execute the module function
5416/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
5417/******/
5418/******/ 		// Flag the module as loaded
5419/******/ 		module.l = true;
5420/******/
5421/******/ 		// Return the exports of the module
5422/******/ 		return module.exports;
5423/******/ 	}
5424/******/
5425/******/
5426/******/ 	// expose the modules object (__webpack_modules__)
5427/******/ 	__webpack_require__.m = modules;
5428/******/
5429/******/ 	// expose the module cache
5430/******/ 	__webpack_require__.c = installedModules;
5431/******/
5432/******/ 	// define getter function for harmony exports
5433/******/ 	__webpack_require__.d = function(exports, name, getter) {
5434/******/ 		if(!__webpack_require__.o(exports, name)) {
5435/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
5436/******/ 		}
5437/******/ 	};
5438/******/
5439/******/ 	// define __esModule on exports
5440/******/ 	__webpack_require__.r = function(exports) {
5441/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
5442/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5443/******/ 		}
5444/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
5445/******/ 	};
5446/******/
5447/******/ 	// create a fake namespace object
5448/******/ 	// mode & 1: value is a module id, require it
5449/******/ 	// mode & 2: merge all properties of value into the ns
5450/******/ 	// mode & 4: return value when already ns object
5451/******/ 	// mode & 8|1: behave like require
5452/******/ 	__webpack_require__.t = function(value, mode) {
5453/******/ 		if(mode & 1) value = __webpack_require__(value);
5454/******/ 		if(mode & 8) return value;
5455/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
5456/******/ 		var ns = Object.create(null);
5457/******/ 		__webpack_require__.r(ns);
5458/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
5459/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
5460/******/ 		return ns;
5461/******/ 	};
5462/******/
5463/******/ 	// getDefaultExport function for compatibility with non-harmony modules
5464/******/ 	__webpack_require__.n = function(module) {
5465/******/ 		var getter = module && module.__esModule ?
5466/******/ 			function getDefault() { return module['default']; } :
5467/******/ 			function getModuleExports() { return module; };
5468/******/ 		__webpack_require__.d(getter, 'a', getter);
5469/******/ 		return getter;
5470/******/ 	};
5471/******/
5472/******/ 	// Object.prototype.hasOwnProperty.call
5473/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
5474/******/
5475/******/ 	// __webpack_public_path__
5476/******/ 	__webpack_require__.p = "/";
5477/******/
5478/******/
5479/******/ 	// Load entry module and return exports
5480/******/ 	return __webpack_require__(__webpack_require__.s = 25);
5481/******/ })
5482/************************************************************************/
5483/******/ ({
5484
5485/***/ "./src/components/search/search.js":
5486/*!*****************************************!*\
5487  !*** ./src/components/search/search.js ***!
5488  \*****************************************/
5489/*! no static exports found */
5490/***/ (function(module, exports, __webpack_require__) {
5491
5492"use strict";
5493
5494
5495(function ($, Drupal) {
5496  Drupal.behaviors.search = {
5497    attach: function attach(context) {
5498      var filterItem = $(".path-search-results .page__header .search__filters li a, .path-resultats-de-recherche .page__header .search__filters li a", context);
5499      var clearButton = $(".clear");
5500      var submitButton = $(".submit");
5501      filterItem.on("click", function () {
5502        filterItem.removeClass("is-active");
5503        $(this).addClass("is-active");
5504        var itemValue = $(this).attr("href");
5505
5506        if (itemValue === "#all") {
5507          $(".view-search-products", context).show();
5508          $(".view-search-recipes", context).show();
5509          $(".view-search-basic-pages", context).show();
5510        } else if (itemValue === "#products") {
5511          $(".view-search-products", context).show();
5512          $(".view-search-recipes", context).hide();
5513          $(".view-search-basic-pages", context).hide();
5514        } else if (itemValue === "#recipes") {
5515          $(".view-search-products", context).hide();
5516          $(".view-search-recipes", context).show();
5517          $(".view-search-basic-pages", context).hide();
5518        } else {
5519          $(".view-search-products", context).hide();
5520          $(".view-search-recipes", context).hide();
5521          $(".view-search-basic-pages", context).show();
5522        }
5523      });
5524      clearButton.on("click", function (context) {
5525        $(this).removeClass("d-inline-flex");
5526        submitButton.removeClass("d-none");
5527        Drupal.behaviors.header.clearSearchTerm(context);
5528        Drupal.behaviors.header.setFocusSearch(context);
5529      });
5530      var params = new URLSearchParams(window.location.search);
5531
5532      if (params.has("term")) {
5533        if (context === document) {
5534          var $hasProducts = $(".view-search-products .views-row").length;
5535          var $hasRecipes = $(".view-search-recipes .views-row").length;
5536          var $hasPages = $(".view-search-basic-pages .views-row").length;
5537          clearButton.addClass("d-inline-flex");
5538          submitButton.addClass("d-none");
5539
5540          if (!$hasProducts && !$hasRecipes && !$hasPages) {
5541            $(".layout-builder__layout .col-12").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results.</span><span class='fr'>Désolé, Il n'y a aucun résultat.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
5542          }
5543
5544          if (!$hasProducts && $hasRecipes && $hasPages) {
5545            $(".view-search-products").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results for products.</span><span class='fr'>Désolé, Il n'y a aucun résultat pour produits.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
5546          }
5547
5548          if (!$hasRecipes && $hasProducts && $hasPages) {
5549            $(".view-search-recipes").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results for recipes.</span><span class='fr'>Désolé, Il n'y a aucun résultat pour recettes.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
5550          }
5551
5552          if (!$hasPages && $hasProducts && $hasRecipes) {
5553            $(".view-search-basic-pages").append("<div class='not-found-message text-center'><div class='not-found-message--description'><span class='en'>Sorry, There are no results for pages.</span><span class='fr'>Désolé, Il n'y a aucun résultat pour pages.</span></div><span class='reset-filters'><a href='/search-results'><span class='link-text en'>Reset my filters</span><span class='link-text fr'>Rétablir mon filtre</span><img src='/themes/custom/dempsters/assets/icons/arrow-reload.svg' alt='arrow reload' /></a></span></div>");
5554          }
5555
5556          if (window.innerWidth >= 991) {
5557            Drupal.behaviors.header.toggleSearch(context);
5558          }
5559
5560          $("#term").val(params.get("term"));
5561        }
5562      }
5563    }
5564  };
5565})(jQuery, Drupal);
5566
5567/***/ }),
5568
5569/***/ 25:
5570/*!***********************************************!*\
5571  !*** multi ./src/components/search/search.js ***!
5572  \***********************************************/
5573/*! no static exports found */
5574/***/ (function(module, exports, __webpack_require__) {
5575
5576module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/search/search.js */"./src/components/search/search.js");
5577
5578
5579/***/ })
5580
5581/******/ });;
5582/**
5583 * @file
5584 * Infinite Scroll JS.
5585 */
5586
5587(function ($, Drupal, debounce) {
5588  "use strict";
5589
5590  // Cached reference to $(window).
5591  var $window = $(window);
5592
5593  // The threshold for how far to the bottom you should reach before reloading.
5594  var scrollThreshold = 200;
5595
5596  // The selector for the automatic pager.
5597  var automaticPagerSelector = '[data-drupal-views-infinite-scroll-pager
5597="automatic"]';
5598
5599  // The selector for both manual load and automatic pager.
5600  var pagerSelector = '[data-drupal-views-infinite-scroll-pager]';
5601
5602  // The selector for the automatic pager.
5603  var contentWrapperSelector = '[data-drupal-views-infinite-scroll-content-wrapper]';
5604
5605  // The event and namespace that is bound to window for automatic scrolling.
5606  var scrollEvent = 'scroll.views_infinite_scroll';
5607
5608  /**
5609   * Insert a views infinite scroll view into the document.
5610   *
5611   * @param {jQuery} $newView
5612   *   New content detached from the DOM.
5613   */
5614  $.fn.infiniteScrollInsertView = function ($newView) {
5615    // Extract the view DOM ID from the view classes.
5616    var matches = /(js-view-dom-id-\w+)/.exec(this.attr('class'));
5617
5618    if (!matches) {
5619      return;
5620    }
5621
5622    var currentViewId = matches[1].replace('js-view-dom-id-', 'views_dom_id:');
5623
5624    // Get the existing ajaxViews object.
5625    var view = Drupal.views.instances[currentViewId];
5626    // Remove once so that the exposed form and pager are processed on
5627    // behavior attach.
5628    view.$view.removeOnce('ajax-pager');
5629    view.$exposed_form.removeOnce('exposed-form');
5630    // Make sure infinite scroll can be reinitialized.
5631    var $existingPager = view.$view.find(pagerSelector);
5632    $existingPager.removeOnce('infinite-scroll');
5633
5634    var $newRows = $newView.find(contentWrapperSelector).children();
5635    var $newPager = $newView.find(pagerSelector);
5636
5637    view.$view.find(contentWrapperSelector)
5638      // Trigger a jQuery event on the wrapper to inform that new content was
5639      // loaded and allow other scripts to respond to the event.
5640      .trigger('views_infinite_scroll.new_content', $newRows.clone())
5641      // Add the new rows to existing view.
5642      .append($newRows);
5643
5644    // Replace the pager link with the new link and ajaxPageState values.
5645    $existingPager.replaceWith($newPager);
5646
5647    // Run views and VIS behaviors.
5648    Drupal.attachBehaviors(view.$view[0]);
5649  };
5650
5651  /**
5652   * Handle the automatic paging based on the scroll amount.
5653   *
5654   * @type {Drupal~behavior}
5655   *
5656   * @prop {Drupal~behaviorAttach} attach
5657   *   Initialize infinite scroll pagers and bind the scroll event.
5658   * @prop {Drupal~behaviorDetach} detach
5659   *   During `unload` remove the scroll event binding.
5660   */
5661  Drupal.behaviors.views_infinite_scroll_automatic = {
5662    attach : function (context, settings) {
5663      $(context).find(automaticPagerSelector).once('infinite-scroll').each(function () {
5664        var $pager = $(this);
5665        $pager.addClass('visually-hidden');
5666        var isLoadNeeded = function () {
5667          return window.innerHeight + window.pageYOffset > $pager.offset().top - scrollThreshold;
5668        };
5669        $window.on(scrollEvent, debounce(function () {
5670          if (isLoadNeeded()) {
5671            $pager.find('[rel=next]').click();
5672            $window.off(scrollEvent);
5673          }
5674        }, 200));
5675        if (isLoadNeeded()) {
5676          $window.trigger(scrollEvent);
5677        }
5678      });
5679    },
5680    detach: function (context, settings, trigger) {
5681      // In the case where the view is removed from the document, remove it's
5682      // events. This is important in the case a view being refreshed for a reason
5683      // other than a scroll. AJAX filters are a good example of the event needing
5684      // to be destroyed earlier than above.
5685      if (trigger === 'unload') {
5686        if ($(context).find(automaticPagerSelector).removeOnce('infinite-scroll').length) {
5687          $window.off(scrollEvent);
5688        }
5689      }
5690    }
5691  };
5692
5693  /**
5694   * Views AJAX pagination filter.
5695   *
5696   * In case the Entity View Attachment is rendered in a view context,
5697   * the default filter function prevents the required 'Use AJAX' setting
5698   * to work.
5699   *
5700   * @return {Boolean}
5701   *   Whether to apply the Views AJAX paginator. VIS requires this setting
5702   *   for pagination.
5703   */
5704  Drupal.views.ajaxView.prototype.filterNestedViews = function () {
5705    return this.$view.hasClass('view-eva') || !this.$view.parents('.view').length;
5706  };
5707
5708})(jQuery, Drupal, Drupal.debounce);
5709;
5710/******/ (function(modules) { // webpackBootstrap
5711/******/ 	// The module cache
5712/******/ 	var installedModules = {};
5713/******/
5714/******/ 	// The require function
5715/******/ 	function __webpack_require__(moduleId) {
5716/******/
5717/******/ 		// Check if module is in cache
5718/******/ 		if(installedModules[moduleId]) {
5719/******/ 			return installedModules[moduleId].exports;
5720/******/ 		}
5721/******/ 		// Create a new module (and put it into the cache)
5722/******/ 		var module = installedModules[moduleId] = {
5723/******/ 			i: moduleId,
5724/******/ 			l: false,
5725/******/ 			exports: {}
5726/******/ 		};
5727/******/
5728/******/ 		// Execute the module function
5729/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
5730/******/
5731/******/ 		// Flag the module as loaded
vendor: 2,823 bytes, lines 5732-5797
5732/******/ 		module.l = true;
5733/******/
5734/******/ 		// Return the exports of the module
5735/******/ 		return module.exports;
5736/******/ 	}
5737/******/
5738/******/
5739/******/ 	// expose the modules object (__webpack_modules__)
5740/******/ 	__webpack_require__.m = modules;
5741/******/
5742/******/ 	// expose the module cache
5743/******/ 	__webpack_require__.c = installedModules;
5744/******/
5745/******/ 	// define getter function for harmony exports
5746/******/ 	__webpack_require__.d = function(exports, name, getter) {
5747/******/ 		if(!__webpack_require__.o(exports, name)) {
5748/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
5749/******/ 		}
5750/******/ 	};
5751/******/
5752/******/ 	// define __esModule on exports
5753/******/ 	__webpack_require__.r = function(exports) {
5754/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
5755/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5756/******/ 		}
5757/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
5758/******/ 	};
5759/******/
5760/******/ 	// create a fake namespace object
5761/******/ 	// mode & 1: value is a module id, require it
5762/******/ 	// mode & 2: merge all properties of value into the ns
5763/******/ 	// mode & 4: return value when already ns object
5764/******/ 	// mode & 8|1: behave like require
5765/******/ 	__webpack_require__.t = function(value, mode) {
5766/******/ 		if(mode & 1) value = __webpack_require__(value);
5767/******/ 		if(mode & 8) return value;
5768/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
5769/******/ 		var ns = Object.create(null);
5770/******/ 		__webpack_require__.r(ns);
5771/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
5772/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
5773/******/ 		return ns;
5774/******/ 	};
5775/******/
5776/******/ 	// getDefaultExport function for compatibility with non-harmony modules
5777/******/ 	__webpack_require__.n = function(module) {
5778/******/ 		var getter = module && module.__esModule ?
5779/******/ 			function getDefault() { return module['default']; } :
5780/******/ 			function getModuleExports() { return module; };
5781/******/ 		__webpack_require__.d(getter, 'a', getter);
5782/******/ 		return getter;
5783/******/ 	};
5784/******/
5785/******/ 	// Object.prototype.hasOwnProperty.call
5786/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
5787/******/
5788/******/ 	// __webpack_public_path__
5789/******/ 	__webpack_require__.p = "/";
5790/******/
5791/******/
5792/******/ 	// Load entry module and return exports
5793/******/ 	return __webpack_require__(__webpack_require__.s = 8);
5794/******/ })
5795/************************************************************************/
5796/******/ ({
5797
5798/***/ "./src/components/form/form.js":
5799/*!*************************************!*\
5800  !*** ./src/components/form/form.js ***!
5801  \*************************************/
5802/*! no static exports found */
5803/***/ (function(module, exports, __webpack_require__) {
5804
5805"use strict";
5806
5807
5808(function ($, Drupal) {
5809  Drupal.behaviors.form = {
5810    attach: function attach(context) {
5811      if ($('.path-contact-us').length) {
5812        var path = $('.webform-confirmation', context).length;
5813
5814        if (path) {
5815          $('html, body').animate({
5816            scrollTop: $('.hero-intro').first().offset().top + 300
5817          }, 800);
5818        } //focus on fields with errors when form's submitted.
5819
5820
5821        $(".webform-button--submit").on("click", function () {
5822          var errorSubmission = $('.error:visible', context).not('strong.error'); // var countryConfirmation = $('#edit-country.has-value', context).length;
5823          // //Canada fields not filled
5824          // var provinceCANotFilled = $('#edit-province-state-canada', context).not('has-value').length;
5825          // var postaCANotFilled = $('#edit-postal-code-canada', context).not('has-value').length;
5826          // //USA fields not filled
5827          // var provinceUSANotFilled = $('#edit-province-state-usa', context).not('has-value').length;
5828          // var postaUSANotFilled = $('#edit-postal-code-usa', context).not('has-value').length;
5829
5830          if (errorSubmission.first().offset()) {
5831            //For the others fields with .error class
5832            $('html, body').animate({
5833              scrollTop: errorSubmission.first().offset().top - 250
5834            }, 800, function () {
5835              // Callback after animation
5836              // Must change focus!
5837              errorSubmission.first().focus();
5838            });
5839          } // else if (countryConfirmation && provinceCANotFilled) {
5840          //   //if country field are filled, but the .error class not appear on province and postal code fields, put a focus on them:
5841          //   $('html, body').animate({
5842          //     scrollTop: ($('#edit-province-state-canada', context).not('has-value').first().offset().top - 250)
5843          //   },800);
5844          // } else if (countryConfirmation && postaCANotFilled) {
5845          //   $('html, body').animate({
5846          //     scrollTop: ($('#edit-postal-code-canada', context).not('has-value').first().offset().top - 250)
5847          //   },800);
5848          // } else if (countryConfirmation && provinceUSANotFilled) {
5849          //     $('html, body').animate({
5850          //       scrollTop: ($('#edit-province-state-usa', context).not('has-value').first().offset().top - 250)
5851          //     },800);
5852          // } else if (countryConfirmation && postaUSANotFilled) {
5853          //   $('html, body').animate({
5854          //     scrollTop: ($('#edit-postal-code-usa', context).not('has-value').first().offset().top - 250)
5855          //   },800);
5856          // } else if ($('.path-frontpage')) {
5857          //   var path = $('.webform-confirmation', context).length;
5858          //   if(path) {
5859          //     $('html, body').animate({
5860          //       scrollTop: ($('.newsletter-form').first().offset().top - 100)
5861          //     },800);
5862          //   }
5863          // }
5864
5865        });
5866      }
5867
5868      if (!$('.path-user').length) {
5869        $(".form-control").each(function () {
5870          Drupal.behaviors.form.checkForInput(this, context);
5871        });
5872        $(".form-control").on("change keyup", function () {
5873          Drupal.behaviors.form.checkForInput(this, context);
5874        });
5875      }
5876
5877      $('.js-form-type-managed-file .form-check-input', context).change(function () {
5878        $(this).parent().siblings('[name="image_upload_remove_button"]').trigger("mousedown");
5879      }); // popovers
5880
5881      $('.popover-button').popover({
5882        html: true,
5883        trigger: 'manual'
5884      }).click(function (e) {
5885        $('.popover-button').not(this).popover('hide').css('z-index', '7999');
5886        $(this).popover('toggle').css('z-index', '8001');
5887      });
5888      $(document).click(function (e) {
5889        if (!$(e.target).is('.popover-button, .popover-title, .popover-content')) {
5890          $('.popover-button').popover('hide');
5891        }
5892      });
5893      $('.webform-submission-form select option', context).each(function () {
5894        if ($(this).val() == '') {
5895          $(this).text('');
5896        }
5897      });
5898      $('.webform-submission-form select option').each(function () {
5899        if ($(this).val() == '') {
5900          $(this).text('');
5901        }
5902      });
5903      $('#edit-email-confirmation-mail-2').removeAttr('autocomplete');
5904    },
5905    checkForInput: function checkForInput(element, context) {
5906      var $label = $(element).siblings("label");
5907
5908      if ($(element).val().length > 0) {
5909        $label.addClass("input-has-value");
5910        $(element).addClass("has-value");
5911      } else {
5912        $label.removeClass("input-has-value");
5913        $(element).removeClass("has-value");
5914      }
5915    }
5916  };
5917})(jQuery, Drupal);
5918
5919/***/ })
5919,
5920
5921/***/ 8:
5922/*!*******************************************!*\
5923  !*** multi ./src/components/form/form.js ***!
5924  \*******************************************/
5925/*! no static exports found */
5926/***/ (function(module, exports, __webpack_require__) {
5927
5928module.exports = __webpack_require__(/*! /var/www/html/dev_bc_littlebitessnacksca/html/web/themes/custom/bc_brand/src/components/form/form.js */"./src/components/form/form.js");
5929
5930
5931/***/ })
5932
5933/******/ });;

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.