vendor: 6,362 bytes, lines 1-157
1/******/ (function(modules) { // webpackBootstrap 2/******/ // install a JSONP callback for chunk loading 3/******/ function webpackJsonpCallback(data) { 4/******/ var chunkIds = data[0]; 5/******/ var moreModules = data[1]; 6/******/ var executeModules = data[2]; 7/******/ 8/******/ // add "moreModules" to the modules object, 9/******/ // then flag all "chunkIds" as loaded and fire callback 10/******/ var moduleId, chunkId, i = 0, resolves = []; 11/******/ for(;i < chunkIds.length; i++) { 12/******/ chunkId = chunkIds[i]; 13/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { 14/******/ resolves.push(installedChunks[chunkId][0]); 15/******/ } 16/******/ installedChunks[chunkId] = 0; 17/******/ } 18/******/ for(moduleId in moreModules) { 19/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { 20/******/ modules[moduleId] = moreModules[moduleId]; 21/******/ } 22/******/ } 23/******/ if(parentJsonpFunction) parentJsonpFunction(data); 24/******/ 25/******/ while(resolves.length) { 26/******/ resolves.shift()(); 27/******/ } 28/******/ 29/******/ // add entry modules from loaded chunk to deferred list 30/******/ deferredModules.push.apply(deferredModules, executeModules || []); 31/******/ 32/******/ // run deferred modules when all chunks ready 33/******/ return checkDeferredModules(); 34/******/ }; 35/******/ function checkDeferredModules() { 36/******/ var result; 37/******/ for(var i = 0; i < deferredModules.length; i++) { 38/******/ var deferredModule = deferredModules[i]; 39/******/ var fulfilled = true; 40/******/ for(var j = 1; j < deferredModule.length; j++) { 41/******/ var depId = deferredModule[j]; 42/******/ if(installedChunks[depId] !== 0) fulfilled = false; 43/******/ } 44/******/ if(fulfilled) { 45/******/ deferredModules.splice(i--, 1); 46/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); 47/******/ } 48/******/ } 49/******/ 50/******/ return result; 51/******/ } 52/******/ 53/******/ // The module cache 54/******/ var installedModules = {}; 55/******/ 56/******/ // object to store loaded and loading chunks 57/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 58/******/ // Promise = chunk loading, 0 = chunk loaded 59/******/ var installedChunks = { 60/******/ "bundle": 0 61/******/ }; 62/******/ 63/******/ var deferredModules = []; 64/******/ 65/******/ // The require function 66/******/ function __webpack_require__(moduleId) { 67/******/ 68/******/ // Check if module is in cache 69/******/ if(installedModules[moduleId]) { 70/******/ return installedModules[moduleId].exports; 71/******/ } 72/******/ // Create a new module (and put it into the cache) 73/******/ var module = installedModules[moduleId] = { 74/******/ i: moduleId, 75/******/ l: false, 76/******/ exports: {} 77/******/ }; 78/******/ 79/******/ // Execute the module function 80/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 81/******/ 82/******/ // Flag the module as loaded 83/******/ module.l = true; 84/******/ 85/******/ // Return the exports of the module 86/******/ return module.exports; 87/******/ } 88/******/ 89/******/ 90/******/ // expose the modules object (__webpack_modules__) 91/******/ __webpack_require__.m = modules; 92/******/ 93/******/ // expose the module cache 94/******/ __webpack_require__.c = installedModules; 95/******/ 96/******/ // define getter function for harmony exports 97/******/ __webpack_require__.d = function(exports, name, getter) { 98/******/ if(!__webpack_require__.o(exports, name)) { 99/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 100/******/ } 101/******/ }; 102/******/ 103/******/ // define __esModule on exports 104/******/ __webpack_require__.r = function(exports) { 105/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 106/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 107/******/ } 108/******/ Object.defineProperty(exports, '__esModule', { value: true }); 109/******/ }; 110/******/ 111/******/ // create a fake namespace object 112/******/ // mode & 1: value is a module id, require it 113/******/ // mode & 2: merge all properties of value into the ns 114/******/ // mode & 4: return value when already ns object 115/******/ // mode & 8|1: behave like require 116/******/ __webpack_require__.t = function(value, mode) { 117/******/ if(mode & 1) value = __webpack_require__(value); 118/******/ if(mode & 8) return value; 119/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 120/******/ var ns = Object.create(null); 121/******/ __webpack_require__.r(ns); 122/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 123/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 124/******/ return ns; 125/******/ }; 126/******/ 127/******/ // getDefaultExport function for compatibility with non-harmony modules 128/******/ __webpack_require__.n = function(module) { 129/******/ var getter = module && module.__esModule ? 130/******/ function getDefault() { return module['default']; } : 131/******/ function getModuleExports() { return module; }; 132/******/ __webpack_require__.d(getter, 'a', getter); 133/******/ return getter; 134/******/ }; 135/******/ 136/******/ // Object.prototype.hasOwnProperty.call 137/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 138/******/ 139/******/ // __webpack_public_path__ 140/******/ __webpack_require__.p = ""; 141/******/ 142/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; 143/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); 144/******/ jsonpArray.push = webpackJsonpCallback; 145/******/ jsonpArray = jsonpArray.slice(); 146/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); 147/******/ var parentJsonpFunction = oldJsonpFunction; 148/******/ 149/******/ 150/******/ // add entry module to deferred list 151/******/ deferredModules.push([0,"vendors~bundle"]); 152/******/ // run deferred modules when ready 153/******/ return checkDeferredModules(); 154/******/ }) 155/************************************************************************/ 156/******/ ({ 157
158/***/ "./src/js/_util.js": 159/*!*************************!*\ 160 !*** ./src/js/_util.js ***! 161 \*************************/ 162/*! exports provided: Util */ 163/***/ (function(module, __webpack_exports__, __webpack_require__) { 164 165"use strict"; 166__webpack_require__.r(__webpack_exports__); 167/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Util", function() { return Util; }); 168/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 169 // global.$ = window.jQuery = jQuery; 170 171var Util = { 172 $body: $('body'), 173 wWidth: $(window).innerWidth(), 174 wHeight: $(window).innerHeight(), 175 $window: $(window), 176 dataTrans: '', 177 //name of transition 178 previousDataTrans: '', 179 //name of previous transition 180 dataPage: '', 181 //after using barba name of page 182 pageType: '', 183 //either primary or secondary page - not always checked atm 3 march 184 primaryPage: false, 185 $curtain: $('.curtain-call'), 186 $chatContainer: $('.chat-widget-container'), 187 isMobile: function isMobile() { 188 if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i250|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
188substr(0, 4))) { 189 return true; 190 } else { 191 return false; 192 } 193 }, 194 getURLPath: function getURLPath() { 195 // !!Important that permalink in settings does not have trailing '/' 196 this.parsedUrl = new URL(window.location.href); // const regex = /\//ig; 197 // let justThePath = this.parsedUrl.pathname.replace(regex,'') 198 199 return this.parsedUrl.pathname; //.split("/")[1] 200 }, 201 getRootURLPath: function getRootURLPath() { 202 // !!Important that permalink in settings does not have trailing '/' 203 this.parsedUrl = new URL(window.location.href); 204 return this.parsedUrl.pathname.split('/')[1]; 205 }, 206 getExtendedURLPath: function getExtendedURLPath() { 207 this.parsedUrl = new URL(window.location.href); 208 return this.parsedUrl.pathname; 209 }, 210 searchPageUrl: function searchPageUrl(findPage) { 211 this.parsedUrl = new URL(window.location.href); 212 var urlArray = this.parsedUrl.pathname.split('/'); 213 var findPath = urlArray.includes(findPage, 1) ? true : false; 214 return findPath; 215 }, 216 searchPathNameArray: function searchPathNameArray(match) { 217 //used to find say 'product' in /store/product/2019... 218 var pathArray = window.location.pathname.split('/'); 219 var found; 220 pathArray.find(function (el, idx) { 221 return el === match ? found = true : found = false; 222 }); 223 return found; 224 }, 225 keys: { 226 37: 1, 227 38: 1, 228 39: 1, 229 40: 1 230 }, 231 // left: 37, up: 38, right: 39, down: 40, // spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 232 preventDefault: function preventDefault(e) { 233 e = e || window.event; 234 235 if (e.preventDefault) { 236 e.preventDefault(); 237 e.returnValue = false; 238 } 239 }, 240 preventDefaultForScrollKeys: function preventDefaultForScrollKeys(e) { 241 if (Util.keys[e.keyCode]) { 242 e.preventDefault(); 243 return false; 244 } 245 }, 246 disableScroll: function disableScroll(yPixel) { 247 if (window.addEventListener) { 248 // older FF 249 window.addEventListener('DOMMouseScroll', this.preventDefault, { 250 passive: false 251 }); 252 document.addEventListener('wheel', this.preventDefault, { 253 passive: false 254 }); // Disable scrolling in Chrome 255 256 document.addEventListener('touchmove', this.preventDefault, { 257 passive: false 258 }); // mobile 259 260 window.onwheel = this.preventDefault; // modern standard 261 262 window.onmousewheel = document.onmousewheel = this.preventDefault; // older browsers, IE 263 264 window.ontouchmove = this.preventDefault; // mobile 265 266 document.onkeydown = this.preventDefaultForScrollKeys; 267 } 268 }, 269 enableScroll: function enableScroll(yPixel) { 270 if (window.removeEventListener) { 271 window.removeEventListener('DOMMouseScroll', this.preventDefault, { 272 passive: false 273 }); 274 document.removeEventListener('wheel', this.preventDefault, { 275 passive: false 276 }); // Enable scrolling in Chrome 277 278 document.removeEventListener('touchmove', this.preventDefault, { 279 passive: false 280 }); // mobile 281 282 window.onmousewheel = document.onmousewheel = null; 283 window.onwheel = null; 284 window.ontouchmove = null; 285 document.onkeydown = null; 286 } 287 }, 288 setCookie: function setCookie(name, value, days) { 289 var expires = ''; 290 291 if (days) { 292 var date = new Date(); 293 date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); 294 expires = '; expires=' + date.toUTCString(); 295 } 296 297 document.cookie = name + '=' + (value || '') + expires + '; path=/'; 298 }, 299 getCookie: function getCookie(name) { 300 var nameEQ = name + '='; 301 var ca = document.cookie.split(';'); 302 303 for (var i = 0; i < ca.length; i++) { 304 var c = ca[i]; 305 306 while (' ' == c.charAt(0)) { 307 c = c.substring(1, c.length); 308 } 309 310 if (0 == c.indexOf(nameEQ)) return c.substring(nameEQ.length, c.length); 311 } 312 313 return null; 314 }, 315 eraseCookie: function eraseCookie(name) { 316 document.cookie = name + '=; Max-Age=-99999999;'; 317 }, 318 parseQuery: function parseQuery(queryString) { 319 var query = {}; 320 var pairs = ('?' === queryString[0] ? queryString.substr(1) : queryString).split('&'); 321 322 for (var i = 0; i < pairs.length; i++) { 323 var pair = pairs[i].split('='); 324 query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || ''); 325 } 326 327 return query; 328 }, 329 pad: function pad(num, size) { 330 return ('000000000' + num).substr(-size); 331 }, 332 setCSSvariable: function setCSSvariable() { 333 document.documentElement.style.setProperty('--vh', "".concat(window.innerHeight / 100, "px")); 334 }, 335 unFocus: function unFocus() { 336 if (!document || !window) { 337 return; 338 } 339 340 var styleText = '::-moz-focus-inner{border:0 !important;}:focus{outline: none !important;'; 341 var unfocus_style = document.createElement('STYLE'); 342 343 window.unfocus = function () {
344 document.getElementsByTagName('HEAD')[0].appendChild(unfocus_style); 345 document.addEventListener('mousedown', function () { 346 unfocus_style.innerHTML = styleText + '}'; 347 }); 348 document.addEventListener('keydown', function () { 349 unfocus_style.innerHTML = ''; 350 }); 351 }; 352 353 unfocus.style = function (style) { 354 styleText += style; 355 }; 356 357 unfocus(); 358 }, 359 init: function init() {} 360}; //app 361 362 //window.Util = Util; 363/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 364 365/***/ }), 366
367/***/ "./src/js/app.js": 368/*!***********************!*\ 369 !*** ./src/js/app.js ***! 370 \***********************/ 371/*! exports provided: default */ 372/***/ (function(module, __webpack_exports__, __webpack_require__) { 373 374"use strict"; 375__webpack_require__.r(__webpack_exports__); 376/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_util.js */ "./src/js/_util.js"); 377/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 378/* harmony import */ var _views_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./views/index.js */ "./src/js/views/index.js"); 379/* harmony import */ var _sliders_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sliders.js */ "./src/js/sliders.js"); 380/* harmony import */ var _transitions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./transitions.js */ "./src/js/transitions.js"); 381 382 383 384 385 386var App = { 387 sayHelloTest: function sayHelloTest(fName) { 388 console.log("Hello, ".concat(fName)); 389 }, 390 init: function init() { 391 $('#tribe-events-pg-template').attr('data-barba', 'container'); 392 $('#tribe-events-pg-template').attr('data-barba-namespace', 'singleEvent'); 393 var templateDirectory = $('#template-directory').text();
394 window.vin65remote.cart.init('https://shop.baileyana.com', 0); 395 window.vin65remote.product.addToCartForm('https://shop.baileyana.com'); 396 window.vin65remote.usertools.loginWidget('https://shop.baileyana.com'); 397 gsap_all__WEBPACK_IMPORTED_MODULE_1__["gsap"].registerPlugin(gsap_all__WEBPACK_IMPORTED_MODULE_1__["ScrollTrigger"]); 398 /* $('.nav-item').on('click', function() { 399 $('.nav-item').removeClass('active'); 400 $(this).addClass('active'); 401 }); */ 402 403 this.mobileMenuStyles(); 404 this.headerStyles(); 405 this.getPageJS(); //TODO: break them out for each specific page 406 407 _sliders_js__WEBPACK_IMPORTED_MODULE_3__["default"].init(); 408 _transitions_js__WEBPACK_IMPORTED_MODULE_4__["default"].common(); 409 this.shopAllBaileyana(); // $('#gform_1').on('submit', function(e){ 410 // e.preventDefault(); 411 // }) 412 }, 413 mobileMenuStyles: function mobileMenuStyles() { 414 $('#mobile-menu-toggle').on('click', function () { 415 var wasOpen = $(this).hasClass('open'); 416 417 if (wasOpen) { 418 $('.mobile-navigation').removeClass('open'); 419 $('.header').removeClass('open'); 420 $(this).removeClass('open'); 421 $('body').removeClass('navigation-open'); 422 } else { 423 $('.mobile-navigation').addClass('open'); 424 $(this).addClass('open'); 425 $('body').addClass('navigation-open'); 426 $('header').addClass('open'); 427 } 428 }); 429 }, 430 headerStyles: function headerStyles() { 431 window.addEventListener('scroll', function () { 432 var height = $(window).scrollTop(); 433 434 if (height > 330) { 435 $('.hero-navigation').addClass('affix'); 436 $('.nav-dropdowns-wrapper').addClass('affix'); 437 $('.homepage-navigation').addClass('affix-mobile'); 438 } else { 439 $('.hero-navigation').removeClass('affix'); 440 $('.nav-dropdowns-wrapper').removeClass('affix'); 441 $('.homepage-navigation').removeClass('affix-mobile'); 442 } 443 444 if (height > 400) { 445 $('.nav-dropdowns-wrapper').addClass('affix-2'); 446 } else { 447 $('.nav-dropdowns-wrapper').removeClass('affix-2'); 448 } 449 450 if (height > 800) { 451 $('.homepage-navigation').addClass('affix'); 452 } else { 453 $('.homepage-navigation').removeClass('affix'); 454 } 455 }); 456 }, 457 getPageJS: function getPageJS() { 458 var page = $('body').find('main').data('barba-namespace') || 'default'; 459 var activePage = _views_index_js__WEBPACK_IMPORTED_MODULE_2__["default"][page]; 460 activePage.init(); 461 }, 462 shopAllBaileyana: function shopAllBaileyana() { 463 if (!document.contains(document.querySelector('.footer.shop-baileyana'))) return false; 464 var $pdp = $('#wine-pdp article'); 465 $pdp.removeClass('tangent truemyth true-myth zocker brand-tangent brand-truemyth brand-zocker'); 466 $pdp.addClass('baileyana brand-baileyana'); 467 468 if (document.contains(document.querySelector('.hero-navigation'))) { 469 $('.hero-navigation').addClass('negate-large'); 470 } 471 } 472}; 473/* harmony default export */ __webpack_exports__["default"] = (App); 474/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 475 476/***/ }), 477
478/***/ "./src/js/index.js": 479/*!*************************!*\ 480 !*** ./src/js/index.js ***! 481 \*************************/ 482/*! no exports provided */ 483/***/ (function(module, __webpack_exports__, __webpack_require__) { 484 485"use strict"; 486__webpack_require__.r(__webpack_exports__); 487/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 488/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 489/* harmony import */ var _vendor_slick__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vendor/slick */ "./src/js/vendor/slick.js"); 490/* harmony import */ var _vendor_slick__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vendor_slick__WEBPACK_IMPORTED_MODULE_1__); 491/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app */ "./src/js/app.js"); 492/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./menu */ "./src/js/menu.js"); 493//import './sass/style.scss'; //using node sass not webpack to compile sass - check package.json 494//if global/window jquery needs to be exposed 495//global.$ = $; 496 //vendor files if NPM package isn't available 497 498 //our files 499 500 501 502jquery__WEBPACK_IMPORTED_MODULE_0___default()(function () { 503 // Initialize global modules 504 _app__WEBPACK_IMPORTED_MODULE_2__["default"].init(); 505 _menu__WEBPACK_IMPORTED_MODULE_3__["default"].init(); 506}); 507 508/***/ }), 509
510/***/ "./src/js/menu.js": 511/*!************************!*\ 512 !*** ./src/js/menu.js ***! 513 \************************/ 514/*! exports provided: default */ 515/***/ (function(module, __webpack_exports__, __webpack_require__) { 516 517"use strict"; 518__webpack_require__.r(__webpack_exports__); 519/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var headroom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! headroom.js */ "./node_modules/headroom.js/dist/headroom.js"); 520/* harmony import */ var headroom_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(headroom_js__WEBPACK_IMPORTED_MODULE_0__); 521function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 522 523 524var Menu = { 525 headroom: function headroom() { 526 var _options, _optionsShop; 527 528 var headroom; 529 var options = (_options = { 530 // vertical offset in px before element is first unpinned 531 offset: 0, 532 // scroll tolerance in px before state changes 533 tolerance: 0 534 }, _defineProperty(_options, "tolerance", { 535 up: 5, 536 down: 0 537 }), _defineProperty(_options, "classes", { 538 // when element is initialised 539 initial: 'headroom--not-top', 540 // when scrolling up 541 pinned: 'headroom--pinned', 542 // when scrolling down 543 unpinned: 'headroom--unpinned', 544 // when above offset 545 top: 'headroom--not-top', 546 // when below offset 547 notTop: 'headroom--not-top', 548 // when at bottom of scoll area 549 bottom: 'headroom--bottom', 550 // when not at bottom of scroll area 551 notBottom: 'headroom--not-bottom', 552 // when frozen method has been called 553 frozen: 'headroom--frozen' 554 }), _defineProperty(_options, "onPin", function onPin() { 555 $('.hero-navigation').addClass('large'); 556 $('.homepage-navigation').addClass('large'); 557 $('.nav-dropdowns-wrapper ').addClass('large'); 558 }), _defineProperty(_options, "onUnpin", function onUnpin() { 559 $('.hero-navigation').addClass('fixed'); 560 $('.hero-navigation').removeClass('large'); 561 $('.homepage-navigation').addClass('fixed'); 562 $('.homepage-navigation').removeClass('large'); 563 $('.nav-dropdowns-wrapper ').removeClass('large'); 564 }), _defineProperty(_options, "onTop", function onTop() { 565 $('.hero-navigation').removeClass('fixed'); 566 $('.homepage-navigation').removeClass('fixed'); 567 }), _defineProperty(_options, "onNotTop", function onNotTop() {}), _defineProperty(_options, "onBottom", function onBottom() {}), _defineProperty(_options, "onNotBottom", function onNotBottom() {}), _options); 568 var optionsShop = (_optionsShop = { 569 // vertical offset in px before element is first unpinned 570 offset: 0, 571 // scroll tolerance in px before state changes 572 tolerance: 0 573 }, _defineProperty(_optionsShop, "tolerance", { 574 up: 5, 575 down: 0 576 }), _defineProperty(_optionsShop, "classes", { 577 // when element is initialised 578 initial: 'headroom', 579 // when scrolling up 580 pinned: 'headroom--pinned', 581 // when scrolling down 582 unpinned: 'headroom--unpinned', 583 // when above offset 584 top: 'headroom--top', 585 // when below offset 586 notTop: 'headroom--not-top', 587 // when at bottom of scoll area 588 bottom: 'headroom--bottom', 589 // when not at bottom of scroll area 590 notBottom: 'headroom--not-bottom', 591 // when frozen method has been called 592 frozen: 'headroom--frozen' 593 }), _defineProperty(_optionsShop, "onPin", function onPin() { 594 $('.hero-navigation').addClass('large'); 595 $('.nav-dropdowns-wrapper ').addClass('large'); 596 }), _defineProperty(_optionsShop, "onUnpin", function onUnpin() { 597 $('.hero-navigation').addClass('fixed'); 598 $('.hero-navigation').removeClass('large'); 599 $('.nav-dropdowns-wrapper ').removeClass('large'); 600 }), _defineProperty(_optionsShop, "onTop", function onTop() { 601 $('.hero-navigation').removeClass('fixed'); 602 }), _defineProperty(_optionsShop, "onNotTop", function onNotTop() {}), _defineProperty(_optionsShop, "onBottom", function onBottom() {}), _defineProperty(_optionsShop, "onNotBottom", function onNotBottom() {}), _optionsShop); // construct an instance of Headroom, passing the element 603 604 if (document.contains(document.querySelector('.footer.shop-baileyana'))) { 605 //for ShopAll site disable pinned header 606 var myElement; 607 608 if (document.contains(document.querySelector('.hero-navigation'))) { 609 myElement = document.querySelector('.hero-navigation'); 610 } else { 611 myElement = document.querySelector('.header'); 612 } 613 614 headroom = new headroom_js__WEBPACK_IMPORTED_MODULE_0___default.a(myElement, optionsShop); 615 document.querySelector('.header').classList.add('shopAll'); 616 617 if (document.contains(document.querySelector('.hero-image'))) { 618 //override and make light when hero image 619 $('.header-button a .button img.light').css('display', 'none'); 620 $('.header-button a .button img.dark').css('display', 'block'); 621 $('.header .header-nav .header-section:nth-child(3) .header-button a .button').css('border', '0.5px solid rgba(255, 255, 255, 0.3)'); 622 } 623 } else { 624 var _myElement = document.querySelector('.header'); 625 626 headroom = new headroom_js__WEBPACK_IMPORTED_MODULE_0___default.a(_myElement, options); 627 } // initialise 628 629 630 headroom.init(); 631 },
632 init: function init() { 633 this.headroom(); 634 } 635}; 636/* harmony default export */ __webpack_exports__["default"] = (Menu); 637/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 638 639/***/ }), 640
641/***/ "./src/js/mixitup-multifilter.min.js": 642/*!*******************************************!*\ 643 !*** ./src/js/mixitup-multifilter.min.js ***! 644 \*******************************************/ 645/*! no static exports found */ 646/***/ (function(module, exports, __webpack_require__) { 647 648/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 649 650/**! 651 * MixItUp MultiFilter v3.3.6 652 * A UI-builder for powerful multidimensional filtering 653 * Build 293e0dda-087e-4a76-aadf-e3e8b311b81f 654 * 655 * Requires mixitup.js >= v^3.1.2 656 * 657 * @copyright Copyright 2014-2020 KunkaLabs Limited. 658 * @author KunkaLabs Limited. 659 * @link https://www.kunkalabs.com/mixitup-multifilter/ 660 * 661 * @license Commercial use requires a commercial license. 662 * https://www.kunkalabs.com/mixitup-multifilter/licenses/ 663 * 664 * Non-commercial use permitted under same terms as license. 665 * http://creativecommons.org/licenses/by-nc/3.0/ 666 */ 667!function (u) { 668 "use strict"; 669 670 var e = function e(u) { 671 var t, 672 i = u.h; 673 if (t = [["A", /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g], ["AA", /[\uA732]/g], ["AE", /[\u00C6\u01FC\u01E2]/g], ["AO", /[\uA734]/g], ["AU", /[\uA736]/g], ["AV", /[\uA738\uA73A]/g], ["AY", /[\uA73C]/g], ["B", /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g], ["C", /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g], ["D", /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g], ["DZ", /[\u01F1\u01C4]/g], ["Dz", /[\u01F2\u01C5]/g], ["E", /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g], ["F", /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g], ["G", /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g], ["H", /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g], ["I", /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g], ["J", /[\u004A\u24BF\uFF2A\u0134\u0248]/g], ["K", /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g], ["L", /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g], ["LJ", /[\u01C7]/g], ["Lj", /[\u01C8]/g], ["M", /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g], ["N", /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g], ["NJ", /[\u01CA]/g], ["Nj", /[\u01CB]/g], ["O", /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g], ["OI", /[\u01A2]/g], ["OO", /[\uA74E]/g], ["OU", /[\u0222]/g], ["P", /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g], ["Q", /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g], ["R", /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g], ["S", /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g], ["T", /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g], ["TZ", /[\uA728]/g], ["U", /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g], ["V", /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g], ["VY", /[\uA760]/g], ["W", /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g], ["X", /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g], ["Y", /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g], ["Z", /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g], ["a", /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g], ["aa", /[\uA733]/g], ["ae", /[\u00E6\u01FD\u01E3]/g], ["ao", /[\uA735]/g], ["au", /[\uA737]/g], ["av", /[\uA739\uA73B]/g], ["ay", /[\uA73D]/g], ["b", /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g], ["c", /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g], ["d", /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g], ["dz", /[\u01F3\u01C6]/g], ["e", /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g], ["f", /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g], ["g", /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g], ["h", /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g], ["hv", /[\u0195]/g], ["i", /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g], ["j", /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g], ["k", /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g], ["l", /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g], ["lj", /[\u01C9]/g], ["m", /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g], ["n", /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g], ["nj", /[\u01CC]/g], ["o", /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u
6731ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g], ["oi", /[\u01A3]/g], ["ou", /[\u0223]/g], ["oo", /[\uA74F]/g], ["p", /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g], ["q", /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g], ["r", /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g], ["s", /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g], ["t", /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g], ["tz", /[\uA729]/g], ["u", /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g], ["v", /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g], ["vy", /[\uA761]/g], ["w", /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g], ["x", /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g], ["y", /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g], ["z", /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g]], !u.CORE_VERSION || !i.compareVersions(e.REQUIRE_CORE_VERSION, u.CORE_VERSION)) throw new Error("[MixItUp Multifilter] MixItUp Multifilter v" + e.EXTENSION_VERSION + " requires at least MixItUp v" + e.REQUIRE_CORE_VERSION); 674 u.ConfigCallbacks.registerAction("afterConstruct", "multifilter", function () { 675 this.onParseFilterGroups = null; 676 }), u.ConfigMultifilter = function () { 677 this.enable = !1, this.logicWithinGroup = "or", this.logicBetweenGroups = "and", this.minSearchLength = 3, this.parseOn = "change", this.keyupThrottleDuration = 350, i.seal(this); 678 }, u.Config.registerAction("beforeConstruct", "multifilter", function () { 679 this.multifilter = new u.ConfigMultifilter(); 680 }), u.MultifilterFormEventTracker = function () { 681 this.form = null, this.totalBound = 0, this.totalHandled = 0, i.seal(this); 682 }, u.FilterGroupDom = function () { 683 this.el = null, this.form = null, i.seal(this); 684 }, u.FilterGroup = function () { 685 this.name = "", this.dom = new u.FilterGroupDom(), this.activeSelectors = [], this.activeFilters = [], this.activeToggles = [], this.handler = null, this.mixer = null, this.logic = "or", this.parseOn = "change", this.keyupTimeout = -1, i.seal(this); 686 }, i.extend(u.FilterGroup.prototype, { 687 init: function init(u, e) { 688 var t = this, 689 i = u.getAttribute("data-logic"); 690 t.dom.el = u, this.name = t.dom.el.getAttribute("data-filter-group") || "", t.cacheDom(), t.dom.form && t.enableButtons(), t.mixer = e, (i && "and" === i.toLowerCase() || "and" === e.config.multifilter.logicWithinGroup) && (t.logic = "and"), t.bindEvents(); 691 }, 692 cacheDom: function cacheDom() { 693 var u = this; 694 u.dom.form = i.closestParent(u.dom.el, "form", !0); 695 }, 696 enableButtons: function enableButtons() { 697 var u = this, 698 e = u.dom.form.querySelectorAll('button[type="submit"]:disabled'), 699 t = null, 700 i = -1; 701 702 for (i = 0; t = e[i]; i++) { 703 t.disabled && (t.disabled = !1); 704 } 705 }, 706 bindEvents: function bindEvents() { 707 var u = this; 708 u.handler = function (e) { 709 switch (e.type) { 710 case "reset": 711 case "submit": 712 u.handleFormEvent(e); 713 break; 714 715 default: 716 u["handle" + i.pascalCase(e.type)](e); 717 } 718 }, i.on(u.dom.el, "click", u.handler), i.on(u.dom.el, "change", u.handler), i.on(u.dom.el, "keyup", u.handler), u.dom.form && (i.on(u.dom.form, "reset", u.handler), i.on(u.dom.form, "submit", u.handler)); 719 }, 720 unbindEvents: function unbindEvents() { 721 var u = this; 722 i.off(u.dom.el, "click", u.handler), i.off(u.dom.el, "change", u.handler), i.off(u.dom.el, "keyup", u.handler), u.dom.form && (i.off(u.dom.form, "reset", u.handler), i.off(u.dom.form, "submit", u.handler)), u.handler = null; 723 }, 724 handleClick: function handleClick(u) { 725 var e = this, 726 t = e.mixer, 727 r = null, 728 l = i.closestParent(u.target, "[data-filter], [data-toggle]", !0), 729 o = "", 730 n = -1, 731 E = ""; 732 l && ((o = e.mixer.config.selectors.control) && !l.matches(o) || (u.stopPropagation(), t.lastClicked || (t.lastClicked = l), "function" == typeof t.config.callbacks.onMixClick && (r = t.config.callbacks.onMixClick.call(t.lastClicked, t.state, u, e), r === !1) || (l.matches("[data-filter]") ? (E = l.getAttribute("data-filter"), e.activeToggles = [], e.activeSelectors = e.activeFilters = [E]) : l.matches("[data-toggle]") && (E = l.getAttribute("data-toggle"), e.activeFilters = [], (n = e.activeToggles.indexOf(E)) > -1 ? e.activeToggles.splice(n, 1) : e.activeToggles.push(E), "and" === e.logic ? e.activeSelectors = [e.activeToggles] : e.activeSelectors = e.activeToggles), e.updateControls(), "change" === e.mixer.config.multifilter.parseOn && e.mixer.parseFilterGroups()))); 733 }, 734 handleChange: function handleChange(u) { 735 var e = this, 736 t = u.target; 737 738 switch (u.stopPropagation(), t.type) { 739 case "text": 740 case "search": 741 case "email": 742 case "select-one": 743 case "radio": 744 e.getSingleValue(t); 745 break; 746 747 case "checkbox": 748 case "select-multiple": 749 e.getMultipleValues(t); 750 } 751 752 "change" === e.mixer.config.multifilter.parseOn && e.mixer.parseFilterGroups(); 753 }, 754 handleKeyup: function handleKeyup(u) { 755 var e = this, 756 t = u.target; 757 758 if (!(["text", "search", "email"].indexOf(t.type) < 0)) { 759 if ("change" !== e.mixer.config.multifilter.parseOn) return void e.mixer.getSingleValue(t); 760 clearTimeout(e.keyupTimeout), e.keyupTimeout = setTimeout(function () { 761 e.getSingleValue(t), e.mixer.parseFilterGroups(); 762 }, e.mixer.config.multifilter.keyupThrottleDuration); 763 } 764 }, 765 handleFormEvent: function handleFormEvent(e) { 766 var t = this, 767 i = null, 768 r = null, 769 l = -1; 770 if ("submit" === e.type && e.preventDefault(), "reset" === e.type && (t.activeFilters = t.activeToggles = t.activeSelectors = [], t.updateControls()), t.mixer.multifilterFormEventTracker) i = t.mixer.multifilterFormEventTracker;else for (i = t.mixer.multifilterFormEventTracker = new u.MultifilterFormEventTracker(), i.form = e.target, l = 0; r = t.mixer.filterGroups[l]; l++) { 771 r.dom.form === e.target && i.totalBound++; 772 } 773 e.target === i.form && (i.totalHandled++, i.totalHandled === i.totalBound && (t.mixer.multifilterFormEventTracker = null, "submit" !== e.type && "change" !== t.mixer.config.multifilter.parseOn || t.mixer.parseFilterGroups())); 774 }, 775 getSingleValue: function getSingleValue(u) { 776 var e = this, 777 i = null, 778 r = "", 779 l = "", 780 o = "", 781 n = -1; 782 783 if (u.type.match(/text|search|email/g)) { 784 if (r = u.getAttribute("data-search-attribute"), !r) throw new Error("[MixItUp MultiFilter] A valid `data-search-attribute` must be present on text inputs"); 785 if (u.value.length < e.mixer.config.multifilter.minSearchLength) return void (e.activeSelectors = e.activeFilters = e.activeToggles = [""]); 786 787 for (o = u.value.toLowerCase().trim(), n = 0; i = t[n]; n++) { 788 o = o.replace(i[1], i[0]); 789 } 790 791 o = o.replace(/\W+/g, " "), l = "[" + r + '*="' + o + '"]'; 792 } else l = u.value; 793 794 "string" == typeof u.value && (e.activeSelectors = e.activeToggles = e.activeFilters = l ? [l] : []); 795 }, 796 getMultipleValues: function getMultipleValues(u) { 797 var e = this, 798 t = [], 799 i = "", 800 r = null, 801 l = null, 802 o = -1; 803 804 switch (u.type) { 805 case "checkbox": 806 i = 'input[type="checkbox"]'; 807 break; 808 809 case "select-multiple": 810 i = "option"; 811 } 812 813 for (l = e.dom.el.querySelectorAll(i), o = 0; r = l[o]; o++) { 814 (r.checked || r.selected) && r.value && t.push(r.value); 815 } 816 817 e.activeFilters = [], e.activeToggles = t, "and" === e.logic ? e.activeSelectors = [t] : e.activeSelectors = t; 818 }, 819 updateControls: function updateControls(u) { 820 var e = this, 821 t = null, 822 i = "", 823 r = "", 824 l = "", 825 o = -1; 826 827 for (i = e.mixer.config.selectors.control.trim(), r = ["[data-filter]" + i, "[data-toggle]" + i].join(", "), u = u || e.dom.el.querySelectorAll(r), o = 0; t = u[o]; o++) { 828 l = Boolean(t.getAttribute("data-toggle")) ? "toggle" : "filter", e.updateControl(t, l); 829 } 830 }, 831 updateControl: function updateControl(u, e) { 832 var t = this, 833 r = u.getAttribute("data-" + e), 834 l = t.activeToggles.concat(t.activeFilters), 835 o = ""; 836 o = i.getClassname(t.mixer.config.classNames, e, t.mixer.config.classNames.modifierActive), l.indexOf(r) > -1 ? i.addClass(u, o) : i.removeClass(u, o); 837 }, 838 updateUi: function updateUi() { 839 var u = this, 840 e = u.dom.el.querySelectorAll("[data-filter], [data-toggle]"), 841 t = u.dom.el.querySelectorAll('input[type="radio"], input[type="checkbox"], option'), 842 i = u.activeToggles.concat(u.activeFilters), 843 r = !1, 844 l = null, 845 o = -1; 846 847 for (e.length && u.updateControls(e, !0), o = 0; l = t[o]; o++) { 848 switch (r = i.indexOf(l.value) > -1, l.tagName.toLowerCase()) { 849 case "option": 850 l.selected = r; 851 break; 852 853 case "input": 854 l.checked = r; 855 } 856 } 857 } 858 }), u.MixerDom.registerAction("afterConstruct", "multifilter", function () { 859 this.filterGroups = []; 860 }), u.Mixer.registerAction("afterConstruct", "multifilter", function () { 861 this.filterGroups = [], this.filterGroupsHash = {}, this.multifilterFormEventTracker = null; 862 }), u.Mixer.registerAction("afterCacheDom", "multifilter", function () { 863 var e = this, 864 t = null; 865 866 if (e.config.multifilter.enable) { 867 switch (e.config.controls.scope) { 868 case "local": 869 t = e.dom.container; 870 break; 871 872 case "global": 873 t = e.dom.document; 874 break; 875 876 default: 877 throw new Error(u.messages.ERROR_CONFIG_INVALID_CONTROLS_SCOPE); 878 } 879 880 e.dom.filterGroups = t.querySelectorAll("[data-filter-group]"); 881 } 882 }), u.Mixer.registerAction("beforeInitControls", "multifilter", function () { 883 var u = this; 884 u.config.multifilter.enable && (u.config.controls.live = !0); 885 }), u.Mixer.registerAction("afterSanitizeConfig", "multifilter", function () { 886 var u = this; 887 u.config.multifilter.logicBetweenGroups = u.config.multifilter.logicBetweenGroups.toLowerCase().trim(), u.config.multifilter.logicWithinGroup = u.config.multifilter.logicWithinGroup.toLowerCase().trim(); 888 }), u.Mixer.registerAction("afterAttach", "multifilter", function () { 889 var u = this; 890 u.dom.filterGroups.length && u.indexFilterGroups(); 891 }), u.Mixer.registerAction("afterUpdateControls", "multifilter", function () { 892 var u = this, 893 e = null, 894 t = -1; 895 896 for (t = 0; e = u.filterGroups[t]; t++) { 897 e.updateControls(); 898 } 899 }), u.Mixer.registerAction("beforeDestroy", "multifilter", function () { 900 var u = this, 901 e = null, 902 t = -1; 903 904 for (t = 0; e = u.filterGroups[t]; t++) { 905 e.unbindEvents(); 906 } 907 }), u.Mixer.extend({ 908 indexFilterGroups: function indexFilterGroups() { 909 var e = this, 910 t = null, 911 i = null, 912 r = -1; 913 914 for (r = 0; i = e.dom.filterGroups[r]; r++) { 915 if (t = new u.FilterGroup(), t.init(i, e), e.filterGroups.push(t), t.name) { 916 if ("undefined" != typeof e.filterGroupsHash[t.name]) throw new Error('[MixItUp MultiFilter] A filter group with name "' + t.name + '" already exists'); 917 e.filterGroupsHash[t.name] = t; 918 } 919 } 920 }, 921 parseParseFilterGroupsArgs: function parseParseFilterGroupsArgs(e) { 922 var t = this, 923 r = new u.UserInstruction(), 924 l = null, 925 o = -1; 926 927 for (r.animate = t.config.animation.enable, r.command = new u.CommandFilter(), o = 0; o < e.length; o++) { 928 l = e[o], "boolean" == typeof l ? r.animate = l : "function" == typeof l && (r.callback = l); 929 } 930 931 return i.freeze(r), r; 932 }, 933 getFilterGroupPaths: function getFilterGroupPaths() { 934 var u = this, 935 e = null, 936 _t = null, 937 r = null, 938 l = [], 939 o = [], 940 n = [], 941 E = -1; 942 943 for (E = 0; E < u.filterGroups.length; E++) { 944 (r = u.filterGroups[E].activeSelectors).length && (l.push(r), n.push(0)); 945 } 946 947 return e = function e() { 948 var u = null, 949 e = [], 950 t = -1; 951 952 for (t = 0; t < l.length; t++) { 953 u = l[t][n[t]], Array.isArray(u) && (u = u.join("")), e.push(u); 954 } 955 956 e = i.clean(e), o.push(e); 957 }, _t = function t(u) { 958 u = u || 0; 959 960 for (var i = l[u]; n[u] < i.length;) { 961 u < l.length - 1 ? _t(u + 1) : e(), n[u]++; 962 } 963 964 n[u] = 0; 965 }, l.length ? (_t(), o) : ""; 966 }, 967 buildSelectorFromPaths: function buildSelectorFromPaths(u) { 968 var e = this, 969 t = null, 970 i = [], 971 r = "", 972 l = "", 973 o = -1; 974 if (!u.length) return ""; 975 976 if ("or" === e.config.multifilter.logicBetweenGroups && (l = ", "), u.length > 1) { 977 for (o = 0; o < u.length; o++) { 978 t = u[o], r = t.join(l), i.indexOf(r) < 0 && i.push(r); 979 } 980 981 return i.join(", "); 982 } 983 984 return u[0].join(l); 985 }, 986 parseFilterGroups: function parseFilterGroups() { 987 var u = this, 988 e = u.parseFilterArgs(arguments), 989 t = u.getFilterGroupPaths(), 990 i = u.buildSelectorFromPaths(t), 991 r = null, 992 l = {}; 993 return "" === i && (i = u.config.controls.toggleDefault), e.command.selector = i, l.filter = e.command, "function" == typeof (r = u.config.callbacks.onParseFilterGroups) && (l = r(l)), u.multimix(l, e.animate, e.callback); 994 }, 995 setFilterGroupSelectors: function setFilterGroupSelectors(u, e) { 996 var t = this, 997 i = null; 998 if (e = Array.isArray(e) ? e : [e], "undefined" == typeof (i = t.filterGroupsHash[u])) throw new Error('[MixItUp MultiFilter] No filter group could be found with the name "' + u + '"'); 999 i.activeToggles = e.slice(), "and" === i.logic ? i.activeSelectors = [i.activeToggles] : i.activeSelectors = i.activeToggles, i.updateUi(i.activeToggles); 1000 }, 1001 getFilterGroupSelectors: function getFilterGroupSelectors(u) { 1002 var e = this, 1003 t = null; 1004 if ("undefined" == typeof (t = e.filterGroupsHash[u])) throw new Error('[MixItUp MultiFilter] No filter group could be found with the name "' + u + '"'); 1005 return t.activeSelectors.slice(); 1006 } 1007 }), u.Facade.registerAction("afterConstruct", "multifilter", function (u) { 1008 this.parseFilterGroups = u.parseFilterGroups.bind(u), this.setFilterGroupSelectors = u.setFilterGroupSelectors.bind(u), this.getFilterGroupSelectors = u.getFilterGroupSelectors.bind(u); 1009 }); 1010 }; 1011 1012 if (e.TYPE = "mixitup-extension", e.NAME = "mixitup-multifilter", e.EXTENSION_VERSION = "3.3.6", e.REQUIRE_CORE_VERSION = "^3.1.2", "object" == ( false ? undefined : _typeof(exports)) && "ob
1012ject" == ( false ? undefined : _typeof(module))) module.exports = e;else if (true) !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { 1013 return e; 1014 }).call(exports, __webpack_require__, exports, module), 1015 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {} 1016}(window); 1017/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) 1018 1019/***/ }), 1020
1021/***/ "./src/js/sliders.js": 1022/*!***************************!*\ 1023 !*** ./src/js/sliders.js ***! 1024 \***************************/ 1025/*! exports provided: default */ 1026/***/ (function(module, __webpack_exports__, __webpack_require__) { 1027 1028"use strict"; 1029__webpack_require__.r(__webpack_exports__); 1030/* WEBPACK VAR INJECTION */(function($) {var Sliders = { 1031 init: function init() { 1032 $('.wine-awards-container').slick({ 1033 rows: 0, 1034 dots: false, 1035 autoplay: true, 1036 autoplaySpeed: 3000, 1037 easing: 'ease-out', 1038 pauseOnHover: false, 1039 speed: 600, 1040 prevArrow: '.arrow-full-prev-2', 1041 nextArrow: '.arrow-full-next-2', 1042 mobileFirst: true, 1043 responsive: [{ 1044 breakpoint: 768, 1045 settings: "unslick" 1046 }] 1047 }); 1048 $('.in-single-wine').slick({ 1049 rows: 0, 1050 dots: false, 1051 autoplay: true, 1052 autoplaySpeed: 3000, 1053 easing: 'ease-out', 1054 pauseOnHover: false, 1055 speed: 600, 1056 prevArrow: '.arrow-full-prev-3', 1057 nextArrow: '.arrow-full-next-3', 1058 mobileFirst: true, 1059 responsive: [{ 1060 breakpoint: 768, 1061 settings: "unslick" 1062 }] 1063 }); 1064 $('.wc-testimonials').on('init', function () { 1065 $(this).find('button').addClass('bg-color-f'); 1066 }); 1067 $('.wc-testimonials').slick({ 1068 rows: 0, 1069 dots: true, 1070 infinite: true, 1071 speed: 600, 1072 slidesToShow: 1, 1073 pauseOnHover: false, 1074 prevArrow: '.arrow-full-prev', 1075 nextArrow: '.arrow-full-next', 1076 autoplay: true, 1077 autoplaySpeed: 3000 // customPaging : function(slider, i) { 1078 // return `<a><img src="${templateDirectory}/public/images/icons/dot.png" /><img src="${templateDirectory}/public/images/icons/dot.png" /></a>`; 1079 // }, 1080 1081 }); 1082 $('.vu-events-grid').slick({ 1083 rows: 0, 1084 dots: false, 1085 // autoplay: true, 1086 // autoplaySpeed: 5000, 1087 easing: 'ease-out', 1088 pauseOnHover: false, 1089 speed: 600, 1090 prevArrow: '.arrow-full-prev-2', 1091 nextArrow: '.arrow-full-next-2', 1092 mobileFirst: true, 1093 responsive: [{ 1094 breakpoint: 768, 1095 settings: "unslick" 1096 }] 1097 }); 1098 $('.home-stories-grid').slick({ 1099 rows: 0, 1100 dots: false, 1101 // autoplay: true, 1102 // autoplaySpeed: 5000, 1103 easing: 'ease-out', 1104 pauseOnHover: false, 1105 speed: 600, 1106 prevArrow: '.arrow-full-prev-2', 1107 nextArrow: '.arrow-full-next-2', 1108 mobileFirst: true, 1109 responsive: [{ 1110 breakpoint: 768, 1111 settings: "unslick" 1112 }] 1113 }); 1114 $('.vu-slider-container').slick({ 1115 rows: 0, 1116 dots: true, 1117 infinite: true, 1118 speed: 600, 1119 slidesToShow: 1, 1120 pauseOnHover: false, 1121 prevArrow: '.arrow-full-prev-1', 1122 nextArrow: '.arrow-full-next-1', 1123 autoplay: false // autoplaySpeed: 3000, 1124 // customPaging : function(slider, i) { 1125 // return `<a><img src="${templateDirectory}/public/images/icons/dot.png" /><img src="${templateDirectory}/public/images/icons/dot.png" /></a>`; 1126 // }, 1127 1128 }); 1129 1130 if (window.innerWidth < 769) { 1131 /* the viewport is less than 768 pixels wide */ 1132 $('.slider').slick(); 1133 } 1134 } 1135}; 1136/* harmony default export */ __webpack_exports__["default"] = (Sliders); 1137/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 1138 1139/***/ }), 1140
1141/***/ "./src/js/transitions.js": 1142/*!*******************************!*\ 1143 !*** ./src/js/transitions.js ***! 1144 \*******************************/ 1145/*! exports provided: default */ 1146/***/ (function(module, __webpack_exports__, __webpack_require__) { 1147 1148"use strict"; 1149__webpack_require__.r(__webpack_exports__); 1150/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 1151function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); } 1152 1153function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 1154 1155function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 1156 1157function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 1158 1159function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } 1160 1161function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 1162 1163 1164var Transitions = { 1165 common: function common() { 1166 $('.fade-in').each(function () { 1167 var target = $(this); 1168 var startPos = target.data('start') || 'top 80%'; 1169 var delay = target.data('delay') || 0; 1170 var duration = target.data('duration') || 0.6; 1171 var ease = target.data('ease') || 'power4.easeOut'; 1172 var dist = target.data('dist'); 1173 dist = typeof dist === 'undefined' ? 12 : dist; 1174 var direction = target.data('horiz') ? { 1175 x: dist 1176 } : { 1177 y: dist 1178 }; 1179 var tl = gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].timeline({ 1180 scrollTrigger: { 1181 trigger: this, 1182 start: startPos 1183 } 1184 }); 1185 var props = { 1186 duration: duration, 1187 opacity: 0, 1188 ease: ease, 1189 direction: direction 1190 }; 1191 tl.from(target, props, delay); 1192 }); 1193 $('.stagger-wrap').each(function () { 1194 var target = $(this); 1195 var stagger = target.data('stagger-delay') || 0.24; 1196 var startPos = target.data('start') || 'top 80%'; 1197 var delay = target.data('delay') || 0; 1198 var duration = target.data('duration') || 0.6; 1199 var ease = target.data('ease') || 'power4.easeOut'; 1200 var y = target.data('y'); 1201 y = typeof y === 'undefined' ? 12 : y; 1202 var children = target.hasClass('all') ? target.find('> *') : target.find('.stagger-el'); 1203 1204 var _children = _toArray(children), 1205 head = _children[0], 1206 tail = _children.slice(1); 1207 1208 var tl = gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].timeline({ 1209 scrollTrigger: { 1210 trigger: this, 1211 start: startPos 1212 } 1213 }); 1214 1215 if ($(children[0]).hasClass('ic-subheader')) { 1216 tl.from(head, { 1217 duration: duration, 1218 opacity: 0, 1219 x: -y, 1220 stagger: stagger, 1221 ease: ease 1222 }, delay); 1223 tl.from(tail, { 1224 duration: duration, 1225 opacity: 0, 1226 y: y, 1227 stagger: stagger, 1228 ease: ease 1229 }, delay + 0.4); 1230 } else { 1231 tl.from(children, { 1232 duration: duration, 1233 opacity: 0, 1234 y: y, 1235 stagger: stagger, 1236 ease: ease 1237 }, delay); 1238 } 1239 }); 1240 $('.double-image-wrap').each(function () { 1241 var target = $(this); 1242 var stagger = target.data('stagger-delay') || 0.24; 1243 var startPos = target.data('start') || 'top 50%'; 1244 var delay = target.data('delay') || 0; 1245 var duration = target.data('duration') || 1.2; 1246 var ease = target.data('ease') || 'power4.easeOut'; 1247 var origin = target.data('origin') || '50% 50%'; 1248 var children = target.find('.double-image'); 1249 var tl = gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].timeline({ 1250 scrollTrigger: { 1251 trigger: this, 1252 start: startPos 1253 } 1254 }); 1255 tl.from(children, { 1256 duration: duration, 1257 opacity: 0, 1258 stagger: stagger, 1259 ease: ease 1260 }, delay); 1261 tl.from(children.find('img'), { 1262 duration: duration, 1263 opacity: 0, 1264 scale: 1.06, 1265 // y: 12, 1266 transformOrigin: origin, 1267 stagger: stagger, 1268 ease: ease 1269 }, delay); 1270 }); 1271 } 1272}; 1273/* harmony default export */ __webpack_exports__["default"] = (Transitions); 1274/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 1275 1276/***/ }), 1277
1278/***/ "./src/js/vendor/slick.js": 1279/*!********************************!*\ 1280 !*** ./src/js/vendor/slick.js ***! 1281 \********************************/ 1282/*! no static exports found */ 1283/***/ (function(module, exports, __webpack_require__) { 1284 1285var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 1286 1287/* 1288 _ _ _ _ 1289 ___| (_) ___| | __ (_)___ 1290/ __| | |/ __| |/ / | / __| 1291\__ \ | | (__| < _ | \__ \ 1292|___/_|_|\___|_|\_(_)/ |___/ 1293 |__/ 1294 1295 Version: 1.8.1 1296 Author: Ken Wheeler 1297 Website: http://kenwheeler.github.io 1298 Docs: http://kenwheeler.github.io/slick 1299 Repo: http://github.com/kenwheeler/slick 1300 Issues: http://github.com/kenwheeler/slick/issues 1301 1302 */ 1303 1304/* global window, document, define, jQuery, setInterval, clearInterval */ 1305; 1306 1307(function (factory) { 1308 'use strict'; 1309 1310 if (true) { 1311 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 1312 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 1313 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 1314 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 1315 } else {} 1316})(function ($) { 1317 'use strict'; 1318 1319 var Slick = window.Slick || {}; 1320 1321 Slick = function () { 1322 var instanceUid = 0; 1323 1324 function Slick(element, settings) { 1325 var _ = this, 1326 dataSettings; 1327 1328 _.defaults = { 1329 accessibility: true, 1330 adaptiveHeight: false, 1331 appendArrows: $(element), 1332 appendDots: $(element), 1333 arrows: true, 1334 asNavFor: null, 1335 prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', 1336 nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', 1337 autoplay: false, 1338 autoplaySpeed: 3000, 1339 centerMode: false, 1340 centerPadding: '50px', 1341 cssEase: 'ease', 1342 customPaging: function customPaging(slider, i) { 1343 return $('<button type="button" />').text(i + 1); 1344 }, 1345 dots: false, 1346 dotsClass: 'slick-dots', 1347 draggable: true, 1348 easing: 'linear', 1349 edgeFriction: 0.35, 1350 fade: false, 1351 focusOnSelect: false, 1352 focusOnChange: false, 1353 infinite: true, 1354 initialSlide: 0, 1355 lazyLoad: 'ondemand', 1356 mobileFirst: false, 1357 pauseOnHover: true, 1358 pauseOnFocus: true, 1359 pauseOnDotsHover: false, 1360 respondTo: 'window', 1361 responsive: null, 1362 rows: 1, 1363 rtl: false, 1364 slide: '', 1365 slidesPerRow: 1, 1366 slidesToShow: 1, 1367 slidesToScroll: 1, 1368 speed: 500, 1369 swipe: true, 1370 swipeToSlide: false, 1371 touchMove: true, 1372 touchThreshold: 5, 1373 useCSS: true, 1374 useTransform: true, 1375 variableWidth: false, 1376 vertical: false, 1377 verticalSwiping: false, 1378 waitForAnimate: true, 1379 zIndex: 1000 1380 }; 1381 _.initials = { 1382 animating: false, 1383 dragging: false, 1384 autoPlayTimer: null, 1385 currentDirection: 0, 1386 currentLeft: null, 1387 currentSlide: 0, 1388 direction: 1, 1389 $dots: null, 1390 listWidth: null, 1391 listHeight: null, 1392 loadIndex: 0, 1393 $nextArrow: null, 1394 $prevArrow: null, 1395 scrolling: false, 1396 slideCount: null, 1397 slideWidth: null, 1398 $slideTrack: null, 1399 $slides: null, 1400 sliding: false, 1401 slideOffset: 0, 1402 swipeLeft: null, 1403 swiping: false, 1404 $list: null, 1405 touchObject: {}, 1406 transformsEnabled: false,
vendor: 24,991 bytes, lines 1407-2307
1407 unslicked: false 1408 }; 1409 $.extend(_, _.initials); 1410 _.activeBreakpoint = null; 1411 _.animType = null; 1412 _.animProp = null; 1413 _.breakpoints = []; 1414 _.breakpointSettings = []; 1415 _.cssTransitions = false; 1416 _.focussed = false; 1417 _.interrupted = false; 1418 _.hidden = 'hidden'; 1419 _.paused = true; 1420 _.positionProp = null; 1421 _.respondTo = null; 1422 _.rowCount = 1; 1423 _.shouldClick = true; 1424 _.$slider = $(element); 1425 _.$slidesCache = null; 1426 _.transformType = null; 1427 _.transitionType = null; 1428 _.visibilityChange = 'visibilitychange'; 1429 _.windowWidth = 0; 1430 _.windowTimer = null; 1431 dataSettings = $(element).data('slick') || {}; 1432 _.options = $.extend({}, _.defaults, settings, dataSettings); 1433 _.currentSlide = _.options.initialSlide; 1434 _.originalSettings = _.options; 1435 1436 if (typeof document.mozHidden !== 'undefined') { 1437 _.hidden = 'mozHidden'; 1438 _.visibilityChange = 'mozvisibilitychange'; 1439 } else if (typeof document.webkitHidden !== 'undefined') { 1440 _.hidden = 'webkitHidden'; 1441 _.visibilityChange = 'webkitvisibilitychange'; 1442 } 1443 1444 _.autoPlay = $.proxy(_.autoPlay, _); 1445 _.autoPlayClear = $.proxy(_.autoPlayClear, _); 1446 _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); 1447 _.changeSlide = $.proxy(_.changeSlide, _); 1448 _.clickHandler = $.proxy(_.clickHandler, _); 1449 _.selectHandler = $.proxy(_.selectHandler, _); 1450 _.setPosition = $.proxy(_.setPosition, _); 1451 _.swipeHandler = $.proxy(_.swipeHandler, _); 1452 _.dragHandler = $.proxy(_.dragHandler, _); 1453 _.keyHandler = $.proxy(_.keyHandler, _); 1454 _.instanceUid = instanceUid++; // A simple way to check for HTML strings 1455 // Strict HTML recognition (must start with <) 1456 // Extracted from jQuery v1.11 source 1457 1458 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 1459 1460 _.registerBreakpoints(); 1461 1462 _.init(true); 1463 } 1464 1465 return Slick; 1466 }(); 1467 1468 Slick.prototype.activateADA = function () { 1469 var _ = this; 1470 1471 _.$slideTrack.find('.slick-active').attr({ 1472 'aria-hidden': 'false' 1473 }).find('a, input, button, select').attr({ 1474 'tabindex': '0' 1475 }); 1476 }; 1477 1478 Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) { 1479 var _ = this; 1480 1481 if (typeof index === 'boolean') { 1482 addBefore = index; 1483 index = null; 1484 } else if (index < 0 || index >= _.slideCount) { 1485 return false; 1486 } 1487 1488 _.unload(); 1489 1490 if (typeof index === 'number') { 1491 if (index === 0 && _.$slides.length === 0) { 1492 $(markup).appendTo(_.$slideTrack); 1493 } else if (addBefore) { 1494 $(markup).insertBefore(_.$slides.eq(index)); 1495 } else { 1496 $(markup).insertAfter(_.$slides.eq(index)); 1497 } 1498 } else { 1499 if (addBefore === true) { 1500 $(markup).prependTo(_.$slideTrack); 1501 } else { 1502 $(markup).appendTo(_.$slideTrack); 1503 } 1504 } 1505 1506 _.$slides = _.$slideTrack.children(this.options.slide); 1507 1508 _.$slideTrack.children(this.options.slide).detach(); 1509 1510 _.$slideTrack.append(_.$slides); 1511 1512 _.$slides.each(function (index, element) { 1513 $(element).attr('data-slick-index', index); 1514 }); 1515 1516 _.$slidesCache = _.$slides; 1517 1518 _.reinit(); 1519 }; 1520 1521 Slick.prototype.animateHeight = function () { 1522 var _ = this; 1523 1524 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 1525 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 1526 1527 _.$list.animate({ 1528 height: targetHeight 1529 }, _.options.speed); 1530 } 1531 }; 1532 1533 Slick.prototype.animateSlide = function (targetLeft, callback) { 1534 var animProps = {}, 1535 _ = this; 1536 1537 _.animateHeight(); 1538 1539 if (_.options.rtl === true && _.options.vertical === false) { 1540 targetLeft = -targetLeft; 1541 } 1542 1543 if (_.transformsEnabled === false) { 1544 if (_.options.vertical === false) { 1545 _.$slideTrack.animate({ 1546 left: targetLeft 1547 }, _.options.speed, _.options.easing, callback); 1548 } else { 1549 _.$slideTrack.animate({ 1550 top: targetLeft 1551 }, _.options.speed, _.options.easing, callback); 1552 } 1553 } else { 1554 if (_.cssTransitions === false) { 1555 if (_.options.rtl === true) { 1556 _.currentLeft = -_.currentLeft; 1557 } 1558 1559 $({ 1560 animStart: _.currentLeft 1561 }).animate({ 1562 animStart: targetLeft 1563 }, { 1564 duration: _.options.speed, 1565 easing: _.options.easing, 1566 step: function step(now) { 1567 now = Math.ceil(now); 1568 1569 if (_.options.vertical === false) { 1570 animProps[_.animType] = 'translate(' + now + 'px, 0px)'; 1571 1572 _.$slideTrack.css(animProps); 1573 } else { 1574 animProps[_.animType] = 'translate(0px,' + now + 'px)'; 1575 1576 _.$slideTrack.css(animProps); 1577 } 1578 }, 1579 complete: function complete() { 1580 if (callback) { 1581 callback.call(); 1582 } 1583 } 1584 }); 1585 } else { 1586 _.applyTransition(); 1587 1588 targetLeft = Math.ceil(targetLeft); 1589 1590 if (_.options.vertical === false) { 1591 animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)'; 1592 } else { 1593 animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)'; 1594 } 1595 1596 _.$slideTrack.css(animProps); 1597 1598 if (callback) { 1599 setTimeout(function () { 1600 _.disableTransition(); 1601 1602 callback.call(); 1603 }, _.options.speed); 1604 } 1605 } 1606 } 1607 }; 1608 1609 Slick.prototype.getNavTarget = function () { 1610 var _ = this, 1611 asNavFor = _.options.asNavFor; 1612 1613 if (asNavFor && asNavFor !== null) { 1614 asNavFor = $(asNavFor).not(_.$slider); 1615 } 1616 1617 return asNavFor; 1618 }; 1619 1620 Slick.prototype.asNavFor = function (index) { 1621 var _ = this, 1622 asNavFor = _.getNavTarget(); 1623 1624 if (asNavFor !== null && _typeof(asNavFor) === 'object') { 1625 asNavFor.each(function () { 1626 var target = $(this).slick('getSlick'); 1627 1628 if (!target.unslicked) { 1629 target.slideHandler(index, true); 1630 } 1631 }); 1632 } 1633 }; 1634 1635 Slick.prototype.applyTransition = function (slide) { 1636 var _ = this, 1637 transition = {}; 1638 1639 if (_.options.fade === false) { 1640 transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; 1641 } else { 1642 transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase; 1643 } 1644 1645 if (_.options.fade === false) { 1646 _.$slideTrack.css(transition); 1647 } else { 1648 _.$slides.eq(slide).css(transition); 1649 } 1650 }; 1651 1652 Slick.prototype.autoPlay = function () { 1653 var _ = this; 1654 1655 _.autoPlayClear(); 1656 1657 if (_.slideCount > _.options.slidesToShow) { 1658 _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed); 1659 } 1660 }; 1661 1662 Slick.prototype.autoPlayClear = function () { 1663 var _ = this; 1664 1665 if (_.autoPlayTimer) { 1666 clearInterval(_.autoPlayTimer); 1667 } 1668 }; 1669 1670 Slick.prototype.autoPlayIterator = function () { 1671 var _ = this, 1672 slideTo = _.currentSlide + _.options.slidesToScroll; 1673 1674 if (!_.paused && !_.interrupted && !_.focussed) { 1675 if (_.options.infinite === false) { 1676 if (_.direction === 1 && _.currentSlide + 1 === _.slideCount - 1) { 1677 _.direction = 0; 1678 } else if (_.direction === 0) { 1679 slideTo = _.currentSlide - _.options.slidesToScroll; 1680 1681 if (_.currentSlide - 1 === 0) { 1682 _.direction = 1; 1683 } 1684 } 1685 } 1686 1687 _.slideHandler(slideTo); 1688 } 1689 }; 1690 1691 Slick.prototype.buildArrows = function () { 1692 var _ = this; 1693 1694 if (_.options.arrows === true) { 1695 _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); 1696 _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); 1697 1698 if (_.slideCount > _.options.slidesToShow) { 1699 _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 1700 1701 _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 1702 1703 if (_.htmlExpr.test(_.options.prevArrow)) { 1704 _.$prevArrow.prependTo(_.options.appendArrows); 1705 } 1706 1707 if (_.htmlExpr.test(_.options.nextArrow)) { 1708 _.$nextArrow.appendTo(_.options.appendArrows); 1709 } 1710 1711 if (_.options.infinite !== true) { 1712 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 1713 } 1714 } else { 1715 _.$prevArrow.add(_.$nextArrow).addClass('slick-hidden').attr({ 1716 'aria-disabled': 'true', 1717 'tabindex': '-1' 1718 }); 1719 } 1720 } 1721 }; 1722 1723 Slick.prototype.buildDots = function () { 1724 var _ = this, 1725 i, 1726 dot; 1727 1728 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 1729 _.$slider.addClass('slick-dotted'); 1730 1731 dot = $('<ul />').addClass(_.options.dotsClass); 1732 1733 for (i = 0; i <= _.getDotCount(); i += 1) { 1734 dot.append($('<li />').append(_.options.customPaging.call(this, _, i))); 1735 } 1736 1737 _.$dots = dot.appendTo(_.options.appendDots); 1738 1739 _.$dots.find('li').first().addClass('slick-active'); 1740 } 1741 }; 1742 1743 Slick.prototype.buildOut = function () { 1744 var _ = this; 1745 1746 _.$slides = _.$slider.children(_.options.slide + ':not(.slick-cloned)').addClass('slick-slide'); 1747 _.slideCount = _.$slides.length; 1748 1749 _.$slides.each(function (index, element) { 1750 $(element).attr('data-slick-index', index).data('originalStyling', $(element).attr('style') || ''); 1751 }); 1752 1753 _.$slider.addClass('slick-slider'); 1754 1755 _.$slideTrack = _.slideCount === 0 ? $('<div class="slick-track"/>').appendTo(_.$slider) : _.$slides.wrapAll('<div class="slick-track"/>').parent(); 1756 _.$list = _.$slideTrack.wrap('<div class="slick-list"/>').parent(); 1757 1758 _.$slideTrack.css('opacity', 0); 1759 1760 if (_.options.centerMode === true || _.options.swipeToSlide === true) { 1761 _.options.slidesToScroll = 1; 1762 } 1763 1764 $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); 1765 1766 _.setupInfinite(); 1767 1768 _.buildArrows(); 1769 1770 _.buildDots(); 1771 1772 _.updateDots(); 1773 1774 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 1775 1776 if (_.options.draggable === true) { 1777 _.$list.addClass('draggable'); 1778 } 1779 }; 1780 1781 Slick.prototype.buildRows = function () { 1782 var _ = this, 1783 a, 1784 b, 1785 c, 1786 newSlides, 1787 numOfSlides, 1788 originalSlides, 1789 slidesPerSection; 1790 1791 newSlides = document.createDocumentFragment(); 1792 originalSlides = _.$slider.children(); 1793 1794 if (_.options.rows > 0) { 1795 slidesPerSection = _.options.slidesPerRow * _.options.rows; 1796 numOfSlides = Math.ceil(originalSlides.length / slidesPerSection); 1797 1798 for (a = 0; a < numOfSlides; a++) { 1799 var slide = document.createElement('div'); 1800 1801 for (b = 0; b < _.options.rows; b++) { 1802 var row = document.createElement('div'); 1803 1804 for (c = 0; c < _.options.slidesPerRow; c++) { 1805 var target = a * slidesPerSection + (b * _.options.slidesPerRow + c); 1806 1807 if (originalSlides.get(target)) { 1808 row.appendChild(originalSlides.get(target)); 1809 } 1810 } 1811 1812 slide.appendChild(row); 1813 } 1814 1815 newSlides.appendChild(slide); 1816 } 1817 1818 _.$slider.empty().append(newSlides); 1819 1820 _.$slider.children().children().children().css({ 1821 'width': 100 / _.options.slidesPerRow + '%', 1822 'display': 'inline-block' 1823 }); 1824 } 1825 }; 1826 1827 Slick.prototype.checkResponsive = function (initial, forceUpdate) { 1828 var _ = this, 1829 breakpoint, 1830 targetBreakpoint, 1831 respondToWidth, 1832 triggerBreakpoint = false; 1833 1834 var sliderWidth = _.$slider.width(); 1835 1836 var windowWidth = window.innerWidth || $(window).width(); 1837 1838 if (_.respondTo === 'window') { 1839 respondToWidth = windowWidth; 1840 } else if (_.respondTo === 'slider') { 1841 respondToWidth = sliderWidth; 1842 } else if (_.respondTo === 'min') { 1843 respondToWidth = Math.min(windowWidth, sliderWidth); 1844 } 1845 1846 if (_.options.responsive && _.options.responsive.length && _.options.responsive !== null) { 1847 targetBreakpoint = null; 1848 1849 for (breakpoint in _.breakpoints) { 1850 if (_.breakpoints.hasOwnProperty(breakpoint)) { 1851 if (_.originalSettings.mobileFirst === false) { 1852 if (respondToWidth < _.breakpoints[breakpoint]) { 1853 targetBreakpoint = _.breakpoints[breakpoint]; 1854 } 1855 } else { 1856 if (respondToWidth > _.breakpoints[breakpoint]) { 1857 targetBreakpoint = _.breakpoints[breakpoint]; 1858 } 1859 } 1860 } 1861 } 1862 1863 if (targetBreakpoint !== null) { 1864 if (_.activeBreakpoint !== null) { 1865 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 1866 _.activeBreakpoint = targetBreakpoint; 1867 1868 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 1869 _.unslick(targetBreakpoint); 1870 } else { 1871 _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]); 1872 1873 if (initial === true) { 1874 _.currentSlide = _.options.initialSlide; 1875 } 1876 1877 _.refresh(initial); 1878 } 1879 1880 triggerBreakpoint = targetBreakpoint; 1881 } 1882 } else { 1883 _.activeBreakpoint = targetBreakpoint; 1884 1885 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 1886 _.unslick(targetBreakpoint); 1887 } else { 1888 _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]); 1889 1890 if (initial === true) { 1891 _.currentSlide = _.options.initialSlide; 1892 } 1893 1894 _.refresh(initial); 1895 } 1896 1897 triggerBreakpoint = targetBreakpoint; 1898 } 1899 } else { 1900 if (_.activeBreakpoint !== null) { 1901 _.activeBreakpoint = null; 1902 _.options = _.originalSettings; 1903 1904 if (initial === true) { 1905 _.currentSlide = _.options.initialSlide; 1906 } 1907 1908 _.refresh(initial); 1909 1910 triggerBreakpoint = targetBreakpoint; 1911 } 1912 } // only trigger breakpoints during an actual break. not on initialize. 1913 1914 1915 if (!initial && triggerBreakpoint !== false) { 1916 _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); 1917 } 1918 } 1919 }; 1920 1921 Slick.prototype.changeSlide = function (event, dontAnimate) { 1922 var _ = this, 1923 $target = $(event.currentTarget), 1924 indexOffset, 1925 slideOffset, 1926 unevenOffset; // If target is a link, prevent default action. 1927 1928 1929 if ($target.is('a')) { 1930 event.preventDefault(); 1931 } // If target is not the <li> element (ie: a child), find the <li>. 1932 1933 1934 if (!$target.is('li')) { 1935 $target = $target.closest('li'); 1936 } 1937 1938 unevenOffset = _.slideCount % _.options.slidesToScroll !== 0; 1939 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 1940 1941 switch (event.data.message) { 1942 case 'previous': 1943 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 1944 1945 if (_.slideCount > _.options.slidesToShow) { 1946 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 1947 } 1948 1949 break; 1950 1951 case 'next': 1952 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 1953 1954 if (_.slideCount > _.options.slidesToShow) { 1955 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 1956 } 1957 1958 break; 1959 1960 case 'index': 1961 var index = event.data.index === 0 ? 0 : event.data.index || $target.index() * _.options.slidesToScroll; 1962 1963 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 1964 1965 $target.children().trigger('focus'); 1966 break; 1967 1968 default: 1969 return; 1970 } 1971 }; 1972 1973 Slick.prototype.checkNavigable = function (index) { 1974 var _ = this, 1975 navigables, 1976 prevNavigable; 1977 1978 navigables = _.getNavigableIndexes(); 1979 prevNavigable = 0; 1980 1981 if (index > navigables[navigables.length - 1]) { 1982 index = navigables[navigables.length - 1]; 1983 } else { 1984 for (var n in navigables) { 1985 if (index < navigables[n]) { 1986 index = prevNavigable; 1987 break; 1988 } 1989 1990 prevNavigable = navigables[n]; 1991 } 1992 } 1993 1994 return index; 1995 }; 1996 1997 Slick.prototype.cleanUpEvents = function () { 1998 var _ = this; 1999 2000 if (_.options.dots && _.$dots !== null) { 2001 $('li', _.$dots).off('click.slick', _.changeSlide).off('mouseenter.slick', $.proxy(_.interrupt, _, true)).off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 2002 2003 if (_.options.accessibility === true) { 2004 _.$dots.off('keydown.slick', _.keyHandler); 2005 } 2006 } 2007 2008 _.$slider.off('focus.slick blur.slick'); 2009 2010 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 2011 _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); 2012 _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); 2013 2014 if (_.options.accessibility === true) { 2015 _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler); 2016 _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler); 2017 } 2018 } 2019 2020 _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); 2021 2022 _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); 2023 2024 _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); 2025 2026 _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); 2027 2028 _.$list.off('click.slick', _.clickHandler); 2029 2030 $(document).off(_.visibilityChange, _.visibility); 2031 2032 _.cleanUpSlideEvents(); 2033 2034 if (_.options.accessibility === true) { 2035 _.$list.off('keydown.slick', _.keyHandler); 2036 } 2037 2038 if (_.options.focusOnSelect === true) { 2039 $(_.$slideTrack).children().off('click.slick', _.selectHandler); 2040 } 2041 2042 $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); 2043 $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); 2044 $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); 2045 $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); 2046 }; 2047 2048 Slick.prototype.cleanUpSlideEvents = function () { 2049 var _ = this; 2050 2051 _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); 2052 2053 _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 2054 }; 2055 2056 Slick.prototype.cleanUpRows = function () { 2057 var _ = this, 2058 originalSlides; 2059 2060 if (_.options.rows > 0) { 2061 originalSlides = _.$slides.children().children(); 2062 originalSlides.removeAttr('style'); 2063 2064 _.$slider.empty().append(originalSlides); 2065 } 2066 }; 2067 2068 Slick.prototype.clickHandler = function (event) { 2069 var _ = this; 2070 2071 if (_.shouldClick === false) { 2072 event.stopImmediatePropagation(); 2073 event.stopPropagation(); 2074 event.preventDefault(); 2075 } 2076 }; 2077 2078 Slick.prototype.destroy = function (refresh) { 2079 var _ = this; 2080 2081 _.autoPlayClear(); 2082 2083 _.touchObject = {}; 2084 2085 _.cleanUpEvents(); 2086 2087 $('.slick-cloned', _.$slider).detach(); 2088 2089 if (_.$dots) { 2090 _.$dots.remove(); 2091 } 2092 2093 if (_.$prevArrow && _.$prevArrow.length) { 2094 _.$prevArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', ''); 2095 2096 if (_.htmlExpr.test(_.options.prevArrow)) { 2097 _.$prevArrow.remove(); 2098 } 2099 } 2100 2101 if (_.$nextArrow && _.$nextArrow.length) { 2102 _.$nextArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', ''); 2103 2104 if (_.htmlExpr.test(_.options.nextArrow)) { 2105 _.$nextArrow.remove(); 2106 } 2107 } 2108 2109 if (_.$slides) { 2110 _.$slides.removeClass('slick-slide slick-active slick-center slick-visible slick-current').removeAttr('aria-hidden').removeAttr('data-slick-index').each(function () { 2111 $(this).attr('style', $(this).data('originalStyling')); 2112 }); 2113 2114 _.$slideTrack.children(this.options.slide).detach(); 2115 2116 _.$slideTrack.detach(); 2117 2118 _.$list.detach(); 2119 2120 _.$slider.append(_.$slides); 2121 } 2122 2123 _.cleanUpRows(); 2124 2125 _.$slider.removeClass('slick-slider'); 2126 2127 _.$slider.removeClass('slick-initialized'); 2128 2129 _.$slider.removeClass('slick-dotted'); 2130 2131 _.unslicked = true; 2132 2133 if (!refresh) { 2134 _.$slider.trigger('destroy', [_]); 2135 } 2136 }; 2137 2138 Slick.prototype.disableTransition = function (slide) { 2139 var _ = this, 2140 transition = {}; 2141 2142 transition[_.transitionType] = ''; 2143 2144 if (_.options.fade === false) { 2145 _.$slideTrack.css(transition); 2146 } else { 2147 _.$slides.eq(slide).css(transition); 2148 } 2149 }; 2150 2151 Slick.prototype.fadeSlide = function (slideIndex, callback) { 2152 var _ = this; 2153 2154 if (_.cssTransitions === false) { 2155 _.$slides.eq(slideIndex).css({ 2156 zIndex: _.options.zIndex 2157 }); 2158 2159 _.$slides.eq(slideIndex).animate({ 2160 opacity: 1 2161 }, _.options.speed, _.options.easing, callback); 2162 } else { 2163 _.applyTransition(slideIndex); 2164 2165 _.$slides.eq(slideIndex).css({ 2166 opacity: 1, 2167 zIndex: _.options.zIndex 2168 }); 2169 2170 if (callback) { 2171 setTimeout(function () { 2172 _.disableTransition(slideIndex); 2173 2174 callback.call(); 2175 }, _.options.speed); 2176 } 2177 } 2178 }; 2179 2180 Slick.prototype.fadeSlideOut = function (slideIndex) { 2181 var _ = this; 2182 2183 if (_.cssTransitions === false) { 2184 _.$slides.eq(slideIndex).animate({ 2185 opacity: 0, 2186 zIndex: _.options.zIndex - 2 2187 }, _.options.speed, _.options.easing); 2188 } else { 2189 _.applyTransition(slideIndex); 2190 2191 _.$slides.eq(slideIndex).css({ 2192 opacity: 0, 2193 zIndex: _.options.zIndex - 2 2194 }); 2195 } 2196 }; 2197 2198 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) { 2199 var _ = this; 2200 2201 if (filter !== null) { 2202 _.$slidesCache = _.$slides; 2203 2204 _.unload(); 2205 2206 _.$slideTrack.children(this.options.slide).detach(); 2207 2208 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 2209 2210 _.reinit(); 2211 } 2212 }; 2213 2214 Slick.prototype.focusHandler = function () { 2215 var _ = this; // If any child element receives focus within the slider we need to pause the autoplay 2216 2217 2218 _.$slider.off('focus.slick blur.slick').on('focus.slick', '*', function (event) { 2219 var $sf = $(this); 2220 setTimeout(function () { 2221 if (_.options.pauseOnFocus) { 2222 if ($sf.is(':focus')) { 2223 _.focussed = true; 2224 2225 _.autoPlay(); 2226 } 2227 } 2228 }, 0); 2229 }).on('blur.slick', '*', function (event) { 2230 var $sf = $(this); // When a blur occurs on any elements within the slider we become unfocused 2231 2232 if (_.options.pauseOnFocus) { 2233 _.focussed = false; 2234 2235 _.autoPlay(); 2236 } 2237 }); 2238 }; 2239 2240 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () { 2241 var _ = this; 2242 2243 return _.currentSlide; 2244 }; 2245 2246 Slick.prototype.getDotCount = function () { 2247 var _ = this; 2248 2249 var breakPoint = 0; 2250 var counter = 0; 2251 var pagerQty = 0; 2252 2253 if (_.options.infinite === true) { 2254 if (_.slideCount <= _.options.slidesToShow) { 2255 ++pagerQty; 2256 } else { 2257 while (breakPoint < _.slideCount) { 2258 ++pagerQty; 2259 breakPoint = counter + _.options.slidesToScroll; 2260 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 2261 } 2262 } 2263 } else if (_.options.centerMode === true) { 2264 pagerQty = _.slideCount; 2265 } else if (!_.options.asNavFor) { 2266 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 2267 } else { 2268 while (breakPoint < _.slideCount) { 2269 ++pagerQty; 2270 breakPoint = counter + _.options.slidesToScroll; 2271 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 2272 } 2273 } 2274 2275 return pagerQty - 1; 2276 }; 2277 2278 Slick.prototype.getLeft = function (slideIndex) { 2279 var _ = this, 2280 targetLeft, 2281 verticalHeight, 2282 verticalOffset = 0, 2283 targetSlide, 2284 coef; 2285 2286 _.slideOffset = 0; 2287 verticalHeight = _.$slides.first().outerHeight(true); 2288 2289 if (_.options.infinite === true) { 2290 if (_.slideCount > _.options.slidesToShow) { 2291 _.slideOffset = _.slideWidth * _.options.slidesToShow * -1; 2292 coef = -1; 2293 2294 if (_.options.vertical === true && _.options.centerMode === true) { 2295 if (_.options.slidesToShow === 2) { 2296 coef = -1.5; 2297 } else if (_.options.slidesToShow === 1) { 2298 coef = -2; 2299 } 2300 } 2301 2302 verticalOffset = verticalHeight * _.options.slidesToShow * coef; 2303 } 2304 2305 if (_.slideCount % _.options.slidesToScroll !== 0) { 2306 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 2307 if (slideIndex > _.slideCount) {
2308 _.slideOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth * -1; 2309 verticalOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight * -1; 2310 } else { 2311 _.slideOffset = _.slideCount % _.options.slidesToScroll * _.slideWidth * -1; 2312 verticalOffset = _.slideCount % _.options.slidesToScroll * verticalHeight * -1; 2313 } 2314 } 2315 } 2316 } else { 2317 if (slideIndex + _.options.slidesToShow > _.slideCount) { 2318 _.slideOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * _.slideWidth; 2319 verticalOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * verticalHeight; 2320 } 2321 } 2322 2323 if (_.slideCount <= _.options.slidesToShow) { 2324 _.slideOffset = 0; 2325 verticalOffset = 0; 2326 } 2327 2328 if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) { 2329 _.slideOffset = _.slideWidth * Math.floor(_.options.slidesToShow) / 2 - _.slideWidth * _.slideCount / 2; 2330 } else if (_.options.centerMode === true && _.options.infinite === true) { 2331 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 2332 } else if (_.options.centerMode === true) { 2333 _.slideOffset = 0; 2334 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 2335 } 2336 2337 if (_.options.vertical === false) { 2338 targetLeft = slideIndex * _.slideWidth * -1 + _.slideOffset; 2339 } else { 2340 targetLeft = slideIndex * verticalHeight * -1 + verticalOffset; 2341 } 2342 2343 if (_.options.variableWidth === true) {
vendor: 34,107 bytes, lines 2344-3574
2344 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 2345 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 2346 } else { 2347 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); 2348 } 2349 2350 if (_.options.rtl === true) { 2351 if (targetSlide[0]) { 2352 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 2353 } else { 2354 targetLeft = 0; 2355 } 2356 } else { 2357 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 2358 } 2359 2360 if (_.options.centerMode === true) { 2361 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 2362 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 2363 } else { 2364 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); 2365 } 2366 2367 if (_.options.rtl === true) { 2368 if (targetSlide[0]) { 2369 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 2370 } else { 2371 targetLeft = 0; 2372 } 2373 } else { 2374 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 2375 } 2376 2377 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 2378 } 2379 } 2380 2381 return targetLeft; 2382 }; 2383 2384 Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) { 2385 var _ = this; 2386 2387 return _.options[option]; 2388 }; 2389 2390 Slick.prototype.getNavigableIndexes = function () { 2391 var _ = this, 2392 breakPoint = 0, 2393 counter = 0, 2394 indexes = [], 2395 max; 2396 2397 if (_.options.infinite === false) { 2398 max = _.slideCount; 2399 } else { 2400 breakPoint = _.options.slidesToScroll * -1; 2401 counter = _.options.slidesToScroll * -1; 2402 max = _.slideCount * 2; 2403 } 2404 2405 while (breakPoint < max) { 2406 indexes.push(breakPoint); 2407 breakPoint = counter + _.options.slidesToScroll; 2408 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 2409 } 2410 2411 return indexes; 2412 }; 2413 2414 Slick.prototype.getSlick = function () { 2415 return this; 2416 }; 2417 2418 Slick.prototype.getSlideCount = function () { 2419 var _ = this, 2420 slidesTraversed, 2421 swipedSlide, 2422 swipeTarget, 2423 centerOffset; 2424 2425 centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0; 2426 swipeTarget = _.swipeLeft * -1 + centerOffset; 2427 2428 if (_.options.swipeToSlide === true) { 2429 _.$slideTrack.find('.slick-slide').each(function (index, slide) { 2430 var slideOuterWidth, slideOffset, slideRightBoundary; 2431 slideOuterWidth = $(slide).outerWidth(); 2432 slideOffset = slide.offsetLeft; 2433 2434 if (_.options.centerMode !== true) { 2435 slideOffset += slideOuterWidth / 2; 2436 } 2437 2438 slideRightBoundary = slideOffset + slideOuterWidth; 2439 2440 if (swipeTarget < slideRightBoundary) { 2441 swipedSlide = slide; 2442 return false; 2443 } 2444 }); 2445 2446 slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1; 2447 return slidesTraversed; 2448 } else { 2449 return _.options.slidesToScroll; 2450 } 2451 }; 2452 2453 Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) { 2454 var _ = this; 2455 2456 _.changeSlide({ 2457 data: { 2458 message: 'index', 2459 index: parseInt(slide) 2460 } 2461 }, dontAnimate); 2462 }; 2463 2464 Slick.prototype.init = function (creation) { 2465 var _ = this; 2466 2467 if (!$(_.$slider).hasClass('slick-initialized')) { 2468 $(_.$slider).addClass('slick-initialized'); 2469 2470 _.buildRows(); 2471 2472 _.buildOut(); 2473 2474 _.setProps(); 2475 2476 _.startLoad(); 2477 2478 _.loadSlider(); 2479 2480 _.initializeEvents(); 2481 2482 _.updateArrows(); 2483 2484 _.updateDots(); 2485 2486 _.checkResponsive(true); 2487 2488 _.focusHandler(); 2489 } 2490 2491 if (creation) { 2492 _.$slider.trigger('init', [_]); 2493 } 2494 2495 if (_.options.accessibility === true) { 2496 _.initADA(); 2497 } 2498 2499 if (_.options.autoplay) { 2500 _.paused = false; 2501 2502 _.autoPlay(); 2503 } 2504 }; 2505 2506 Slick.prototype.initADA = function () { 2507 var _ = this, 2508 numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow), 2509 tabControlIndexes = _.getNavigableIndexes().filter(function (val) { 2510 return val >= 0 && val < _.slideCount; 2511 }); 2512 2513 _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ 2514 'aria-hidden': 'true', 2515 'tabindex': '-1' 2516 }).find('a, input, button, select').attr({ 2517 'tabindex': '-1' 2518 }); 2519 2520 if (_.$dots !== null) { 2521 _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) { 2522 var slideControlIndex = tabControlIndexes.indexOf(i); 2523 $(this).attr({ 2524 'role': 'tabpanel', 2525 'id': 'slick-slide' + _.instanceUid + i, 2526 'tabindex': -1 2527 }); 2528 2529 if (slideControlIndex !== -1) { 2530 var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex; 2531 2532 if ($('#' + ariaButtonControl).length) { 2533 $(this).attr({ 2534 'aria-describedby': ariaButtonControl 2535 }); 2536 } 2537 } 2538 }); 2539 2540 _.$dots.attr('role', 'tablist').find('li').each(function (i) { 2541 var mappedSlideIndex = tabControlIndexes[i]; 2542 $(this).attr({ 2543 'role': 'presentation' 2544 }); 2545 $(this).find('button').first().attr({ 2546 'role': 'tab', 2547 'id': 'slick-slide-control' + _.instanceUid + i, 2548 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex, 2549 'aria-label': i + 1 + ' of ' + numDotGroups, 2550 'aria-selected': null, 2551 'tabindex': '-1' 2552 }); 2553 }).eq(_.currentSlide).find('button').attr({ 2554 'aria-selected': 'true', 2555 'tabindex': '0' 2556 }).end(); 2557 } 2558 2559 for (var i = _.currentSlide, max = i + _.options.slidesToShow; i < max; i++) { 2560 if (_.options.focusOnChange) { 2561 _.$slides.eq(i).attr({ 2562 'tabindex': '0' 2563 }); 2564 } else { 2565 _.$slides.eq(i).removeAttr('tabindex'); 2566 } 2567 } 2568 2569 _.activateADA(); 2570 }; 2571 2572 Slick.prototype.initArrowEvents = function () { 2573 var _ = this; 2574 2575 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 2576 _.$prevArrow.off('click.slick').on('click.slick', { 2577 message: 'previous' 2578 }, _.changeSlide); 2579 2580 _.$nextArrow.off('click.slick').on('click.slick', { 2581 message: 'next' 2582 }, _.changeSlide); 2583 2584 if (_.options.accessibility === true) { 2585 _.$prevArrow.on('keydown.slick', _.keyHandler); 2586 2587 _.$nextArrow.on('keydown.slick', _.keyHandler); 2588 } 2589 } 2590 }; 2591 2592 Slick.prototype.initDotEvents = function () { 2593 var _ = this; 2594 2595 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 2596 $('li', _.$dots).on('click.slick', { 2597 message: 'index' 2598 }, _.changeSlide); 2599 2600 if (_.options.accessibility === true) { 2601 _.$dots.on('keydown.slick', _.keyHandler); 2602 } 2603 } 2604 2605 if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) { 2606 $('li', _.$dots).on('mouseenter.slick', $.proxy(_.interrupt, _, true)).on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 2607 } 2608 }; 2609 2610 Slick.prototype.initSlideEvents = function () { 2611 var _ = this; 2612 2613 if (_.options.pauseOnHover) { 2614 _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true)); 2615 2616 _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 2617 } 2618 }; 2619 2620 Slick.prototype.initializeEvents = function () { 2621 var _ = this; 2622 2623 _.initArrowEvents(); 2624 2625 _.initDotEvents(); 2626 2627 _.initSlideEvents(); 2628 2629 _.$list.on('touchstart.slick mousedown.slick', { 2630 action: 'start' 2631 }, _.swipeHandler); 2632 2633 _.$list.on('touchmove.slick mousemove.slick', { 2634 action: 'move' 2635 }, _.swipeHandler); 2636 2637 _.$list.on('touchend.slick mouseup.slick', { 2638 action: 'end' 2639 }, _.swipeHandler); 2640 2641 _.$list.on('touchcancel.slick mouseleave.slick', { 2642 action: 'end' 2643 }, _.swipeHandler); 2644 2645 _.$list.on('click.slick', _.clickHandler); 2646 2647 $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); 2648 2649 if (_.options.accessibility === true) { 2650 _.$list.on('keydown.slick', _.keyHandler); 2651 } 2652 2653 if (_.options.focusOnSelect === true) { 2654 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 2655 } 2656 2657 $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); 2658 $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); 2659 $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); 2660 $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); 2661 $(_.setPosition); 2662 }; 2663 2664 Slick.prototype.initUI = function () { 2665 var _ = this; 2666 2667 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 2668 _.$prevArrow.show(); 2669 2670 _.$nextArrow.show(); 2671 } 2672 2673 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 2674 _.$dots.show(); 2675 } 2676 }; 2677 2678 Slick.prototype.keyHandler = function (event) { 2679 var _ = this; //Dont slide if the cursor is inside the form fields and arrow keys are pressed 2680 2681 2682 if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) { 2683 if (event.keyCode === 37 && _.options.accessibility === true) { 2684 _.changeSlide({ 2685 data: { 2686 message: _.options.rtl === true ? 'next' : 'previous' 2687 } 2688 }); 2689 } else if (event.keyCode === 39 && _.options.accessibility === true) { 2690 _.changeSlide({ 2691 data: { 2692 message: _.options.rtl === true ? 'previous' : 'next' 2693 } 2694 }); 2695 } 2696 } 2697 }; 2698 2699 Slick.prototype.lazyLoad = function () { 2700 var _ = this, 2701 loadRange, 2702 cloneRange, 2703 rangeStart, 2704 rangeEnd; 2705 2706 function loadImages(imagesScope) { 2707 $('img[data-lazy]', imagesScope).each(function () { 2708 var image = $(this), 2709 imageSource = $(this).attr('data-lazy'), 2710 imageSrcSet = $(this).attr('data-srcset'), 2711 imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'), 2712 imageToLoad = document.createElement('img'); 2713 2714 imageToLoad.onload = function () { 2715 image.animate({ 2716 opacity: 0 2717 }, 100, function () { 2718 if (imageSrcSet) { 2719 image.attr('srcset', imageSrcSet); 2720 2721 if (imageSizes) { 2722 image.attr('sizes', imageSizes); 2723 } 2724 } 2725 2726 image.attr('src', imageSource).animate({ 2727 opacity: 1 2728 }, 200, function () { 2729 image.removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading'); 2730 }); 2731 2732 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 2733 }); 2734 }; 2735 2736 imageToLoad.onerror = function () { 2737 image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error'); 2738 2739 _.$slider.trigger('lazyLoadError', [_, image, imageSource]); 2740 }; 2741 2742 imageToLoad.src = imageSource; 2743 }); 2744 } 2745 2746 if (_.options.centerMode === true) { 2747 if (_.options.infinite === true) { 2748 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 2749 rangeEnd = rangeStart + _.options.slidesToShow + 2; 2750 } else { 2751 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 2752 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 2753 } 2754 } else { 2755 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 2756 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 2757 2758 if (_.options.fade === true) { 2759 if (rangeStart > 0) rangeStart--; 2760 if (rangeEnd <= _.slideCount) rangeEnd++; 2761 } 2762 } 2763 2764 loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); 2765 2766 if (_.options.lazyLoad === 'anticipated') { 2767 var prevSlide = rangeStart - 1, 2768 nextSlide = rangeEnd, 2769 $slides = _.$slider.find('.slick-slide'); 2770 2771 for (var i = 0; i < _.options.slidesToScroll; i++) { 2772 if (prevSlide < 0) prevSlide = _.slideCount - 1; 2773 loadRange = loadRange.add($slides.eq(prevSlide)); 2774 loadRange = loadRange.add($slides.eq(nextSlide)); 2775 prevSlide--; 2776 nextSlide++; 2777 } 2778 } 2779 2780 loadImages(loadRange); 2781 2782 if (_.slideCount <= _.options.slidesToShow) { 2783 cloneRange = _.$slider.find('.slick-slide'); 2784 loadImages(cloneRange); 2785 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 2786 cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); 2787 loadImages(cloneRange); 2788 } else if (_.currentSlide === 0) { 2789 cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); 2790 loadImages(cloneRange); 2791 } 2792 }; 2793 2794 Slick.prototype.loadSlider = function () { 2795 var _ = this; 2796 2797 _.setPosition(); 2798 2799 _.$slideTrack.css({ 2800 opacity: 1 2801 }); 2802 2803 _.$slider.removeClass('slick-loading'); 2804 2805 _.initUI(); 2806 2807 if (_.options.lazyLoad === 'progressive') { 2808 _.progressiveLazyLoad(); 2809 } 2810 }; 2811 2812 Slick.prototype.next = Slick.prototype.slickNext = function () { 2813 var _ = this; 2814 2815 _.changeSlide({ 2816 data: { 2817 message: 'next' 2818 } 2819 }); 2820 }; 2821 2822 Slick.prototype.orientationChange = function () { 2823 var _ = this; 2824 2825 _.checkResponsive(); 2826 2827 _.setPosition(); 2828 }; 2829 2830 Slick.prototype.pause = Slick.prototype.slickPause = function () { 2831 var _ = this; 2832 2833 _.autoPlayClear(); 2834 2835 _.paused = true; 2836 }; 2837 2838 Slick.prototype.play = Slick.prototype.slickPlay = function () { 2839 var _ = this; 2840 2841 _.autoPlay(); 2842 2843 _.options.autoplay = true; 2844 _.paused = false; 2845 _.focussed = false; 2846 _.interrupted = false; 2847 }; 2848 2849 Slick.prototype.postSlide = function (index) { 2850 var _ = this; 2851 2852 if (!_.unslicked) { 2853 _.$slider.trigger('afterChange', [_, index]); 2854 2855 _.animating = false; 2856 2857 if (_.slideCount > _.options.slidesToShow) { 2858 _.setPosition(); 2859 } 2860 2861 _.swipeLeft = null; 2862 2863 if (_.options.autoplay) { 2864 _.autoPlay(); 2865 } 2866 2867 if (_.options.accessibility === true) { 2868 _.initADA(); 2869 2870 if (_.options.focusOnChange) { 2871 var $currentSlide = $(_.$slides.get(_.currentSlide)); 2872 $currentSlide.attr('tabindex', 0).focus(); 2873 } 2874 } 2875 } 2876 }; 2877 2878 Slick.prototype.prev = Slick.prototype.slickPrev = function () { 2879 var _ = this; 2880 2881 _.changeSlide({ 2882 data: { 2883 message: 'previous' 2884 } 2885 }); 2886 }; 2887 2888 Slick.prototype.preventDefault = function (event) { 2889 event.preventDefault(); 2890 }; 2891 2892 Slick.prototype.progressiveLazyLoad = function (tryCount) { 2893 tryCount = tryCount || 1; 2894 2895 var _ = this, 2896 $imgsToLoad = $('img[data-lazy]', _.$slider), 2897 image, 2898 imageSource, 2899 imageSrcSet, 2900 imageSizes, 2901 imageToLoad; 2902 2903 if ($imgsToLoad.length) { 2904 image = $imgsToLoad.first(); 2905 imageSource = image.attr('data-lazy'); 2906 imageSrcSet = image.attr('data-srcset'); 2907 imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes'); 2908 imageToLoad = document.createElement('img'); 2909 2910 imageToLoad.onload = function () { 2911 if (imageSrcSet) { 2912 image.attr('srcset', imageSrcSet); 2913 2914 if (imageSizes) { 2915 image.attr('sizes', imageSizes); 2916 } 2917 } 2918 2919 image.attr('src', imageSource).removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading'); 2920 2921 if (_.options.adaptiveHeight === true) { 2922 _.setPosition(); 2923 } 2924 2925 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 2926 2927 _.progressiveLazyLoad(); 2928 }; 2929 2930 imageToLoad.onerror = function () { 2931 if (tryCount < 3) { 2932 /** 2933 * try to load the image 3 times, 2934 * leave a slight delay so we don't get 2935 * servers blocking the request. 2936 */ 2937 setTimeout(function () { 2938 _.progressiveLazyLoad(tryCount + 1); 2939 }, 500); 2940 } else { 2941 image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error'); 2942 2943 _.$slider.trigger('lazyLoadError', [_, image, imageSource]); 2944 2945 _.progressiveLazyLoad(); 2946 } 2947 }; 2948 2949 imageToLoad.src = imageSource; 2950 } else { 2951 _.$slider.trigger('allImagesLoaded', [_]); 2952 } 2953 }; 2954 2955 Slick.prototype.refresh = function (initializing) { 2956 var _ = this, 2957 currentSlide, 2958 lastVisibleIndex; 2959 2960 lastVisibleIndex = _.slideCount - _.options.slidesToShow; // in non-infinite sliders, we don't want to go past the 2961 // last visible index. 2962 2963 if (!_.options.infinite && _.currentSlide > lastVisibleIndex) { 2964 _.currentSlide = lastVisibleIndex; 2965 } // if less slides than to show, go to start. 2966 2967 2968 if (_.slideCount <= _.options.slidesToShow) { 2969 _.currentSlide = 0; 2970 } 2971 2972 currentSlide = _.currentSlide; 2973 2974 _.destroy(true); 2975 2976 $.extend(_, _.initials, { 2977 currentSlide: currentSlide 2978 }); 2979 2980 _.init(); 2981 2982 if (!initializing) { 2983 _.changeSlide({ 2984 data: { 2985 message: 'index', 2986 index: currentSlide 2987 } 2988 }, false); 2989 } 2990 }; 2991 2992 Slick.prototype.registerBreakpoints = function () { 2993 var _ = this, 2994 breakpoint, 2995 currentBreakpoint, 2996 l, 2997 responsiveSettings = _.options.responsive || null; 2998 2999 if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) { 3000 _.respondTo = _.options.respondTo || 'window'; 3001 3002 for (breakpoint in responsiveSettings) { 3003 l = _.breakpoints.length - 1; 3004 3005 if (responsiveSettings.hasOwnProperty(breakpoint)) { 3006 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; // loop through the breakpoints and cut out any existing 3007 // ones with the same breakpoint number, we don't want dupes. 3008 3009 while (l >= 0) { 3010 if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) { 3011 _.breakpoints.splice(l, 1); 3012 } 3013 3014 l--; 3015 } 3016 3017 _.breakpoints.push(currentBreakpoint); 3018 3019 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 3020 } 3021 } 3022 3023 _.breakpoints.sort(function (a, b) { 3024 return _.options.mobileFirst ? a - b : b - a; 3025 }); 3026 } 3027 }; 3028 3029 Slick.prototype.reinit = function () { 3030 var _ = this; 3031 3032 _.$slides = _.$slideTrack.children(_.options.slide).addClass('slick-slide'); 3033 _.slideCount = _.$slides.length; 3034 3035 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 3036 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 3037 } 3038 3039 if (_.slideCount <= _.options.slidesToShow) { 3040 _.currentSlide = 0; 3041 } 3042 3043 _.registerBreakpoints(); 3044 3045 _.setProps(); 3046 3047 _.setupInfinite(); 3048 3049 _.buildArrows(); 3050 3051 _.updateArrows(); 3052 3053 _.initArrowEvents(); 3054 3055 _.buildDots(); 3056 3057 _.updateDots(); 3058 3059 _.initDotEvents(); 3060 3061 _.cleanUpSlideEvents(); 3062 3063 _.initSlideEvents(); 3064 3065 _.checkResponsive(false, true); 3066 3067 if (_.options.focusOnSelect === true) { 3068 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 3069 } 3070 3071 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 3072 3073 _.setPosition(); 3074 3075 _.focusHandler(); 3076 3077 _.paused = !_.options.autoplay; 3078 3079 _.autoPlay(); 3080 3081 _.$slider.trigger('reInit', [_]); 3082 }; 3083 3084 Slick.prototype.resize = function () { 3085 var _ = this; 3086 3087 if ($(window).width() !== _.windowWidth) { 3088 clearTimeout(_.windowDelay); 3089 _.windowDelay = window.setTimeout(function () { 3090 _.windowWidth = $(window).width(); 3091 3092 _.checkResponsive(); 3093 3094 if (!_.unslicked) { 3095 _.setPosition(); 3096 } 3097 }, 50); 3098 } 3099 }; 3100 3101 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) { 3102 var _ = this; 3103 3104 if (typeof index === 'boolean') { 3105 removeBefore = index; 3106 index = removeBefore === true ? 0 : _.slideCount - 1; 3107 } else { 3108 index = removeBefore === true ? --index : index; 3109 } 3110 3111 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 3112 return false; 3113 } 3114 3115 _.unload(); 3116 3117 if (removeAll === true) { 3118 _.$slideTrack.children().remove(); 3119 } else { 3120 _.$slideTrack.children(this.options.slide).eq(index).remove(); 3121 } 3122 3123 _.$slides = _.$slideTrack.children(this.options.slide); 3124 3125 _.$slideTrack.children(this.options.slide).detach(); 3126 3127 _.$slideTrack.append(_.$slides); 3128 3129 _.$slidesCache = _.$slides; 3130 3131 _.reinit(); 3132 }; 3133 3134 Slick.prototype.setCSS = function (position) { 3135 var _ = this, 3136 positionProps = {}, 3137 x, 3138 y; 3139 3140 if (_.options.rtl === true) { 3141 position = -position; 3142 } 3143 3144 x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px'; 3145 y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px'; 3146 positionProps[_.positionProp] = position; 3147 3148 if (_.transformsEnabled === false) { 3149 _.$slideTrack.css(positionProps); 3150 } else { 3151 positionProps = {}; 3152 3153 if (_.cssTransitions === false) { 3154 positionProps[_.animType] = 'translate(' + x + ', ' + y + ')'; 3155 3156 _.$slideTrack.css(positionProps); 3157 } else { 3158 positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)'; 3159 3160 _.$slideTrack.css(positionProps); 3161 } 3162 } 3163 }; 3164 3165 Slick.prototype.setDimensions = function () { 3166 var _ = this; 3167 3168 if (_.options.vertical === false) { 3169 if (_.options.centerMode === true) { 3170 _.$list.css({ 3171 padding: '0px ' + _.options.centerPadding 3172 }); 3173 } 3174 } else { 3175 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 3176 3177 if (_.options.centerMode === true) { 3178 _.$list.css({ 3179 padding: _.options.centerPadding + ' 0px' 3180 }); 3181 } 3182 } 3183 3184 _.listWidth = _.$list.width(); 3185 _.listHeight = _.$list.height(); 3186 3187 if (_.options.vertical === false && _.options.variableWidth === false) { 3188 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 3189 3190 _.$slideTrack.width(Math.ceil(_.slideWidth * _.$slideTrack.children('.slick-slide').length)); 3191 } else if (_.options.variableWidth === true) { 3192 _.$slideTrack.width(5000 * _.slideCount); 3193 } else { 3194 _.slideWidth = Math.ceil(_.listWidth); 3195 3196 _.$slideTrack.height(Math.ceil(_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)); 3197 } 3198 3199 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 3200 3201 if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); 3202 }; 3203 3204 Slick.prototype.setFade = function () { 3205 var _ = this, 3206 targetLeft; 3207 3208 _.$slides.each(function (index, element) { 3209 targetLeft = _.slideWidth * index * -1; 3210 3211 if (_.options.rtl === true) { 3212 $(element).css({ 3213 position: 'relative', 3214 right: targetLeft, 3215 top: 0, 3216 zIndex: _.options.zIndex - 2, 3217 opacity: 0 3218 }); 3219 } else { 3220 $(element).css({ 3221 position: 'relative', 3222 left: targetLeft, 3223 top: 0, 3224 zIndex: _.options.zIndex - 2, 3225 opacity: 0 3226 }); 3227 } 3228 }); 3229 3230 _.$slides.eq(_.currentSlide).css({ 3231 zIndex: _.options.zIndex - 1, 3232 opacity: 1 3233 }); 3234 }; 3235 3236 Slick.prototype.setHeight = function () { 3237 var _ = this; 3238 3239 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 3240 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 3241 3242 _.$list.css('height', targetHeight); 3243 } 3244 }; 3245 3246 Slick.prototype.setOption = Slick.prototype.slickSetOption = function () { 3247 /** 3248 * accepts arguments in format of: 3249 * 3250 * - for changing a single option's value: 3251 * .slick("setOption", option, value, refresh ) 3252 * 3253 * - for changing a set of responsive options: 3254 * .slick("setOption", 'responsive', [{}, ...], refresh ) 3255 * 3256 * - for updating multiple values at once (not responsive) 3257 * .slick("setOption", { 'option': value, ... }, refresh ) 3258 */ 3259 var _ = this, 3260 l, 3261 item, 3262 option, 3263 value, 3264 refresh = false, 3265 type; 3266 3267 if ($.type(arguments[0]) === 'object') { 3268 option = arguments[0]; 3269 refresh = arguments[1]; 3270 type = 'multiple'; 3271 } else if ($.type(arguments[0]) === 'string') { 3272 option = arguments[0]; 3273 value = arguments[1]; 3274 refresh = arguments[2]; 3275 3276 if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') { 3277 type = 'responsive'; 3278 } else if (typeof arguments[1] !== 'undefined') { 3279 type = 'single'; 3280 } 3281 } 3282 3283 if (type === 'single') { 3284 _.options[option] = value; 3285 } else if (type === 'multiple') { 3286 $.each(option, function (opt, val) { 3287 _.options[opt] = val; 3288 }); 3289 } else if (type === 'responsive') { 3290 for (item in value) { 3291 if ($.type(_.options.responsive) !== 'array') { 3292 _.options.responsive = [value[item]]; 3293 } else { 3294 l = _.options.responsive.length - 1; // loop through the responsive object and splice out duplicates. 3295 3296 while (l >= 0) { 3297 if (_.options.responsive[l].breakpoint === value[item].breakpoint) { 3298 _.options.responsive.splice(l, 1); 3299 } 3300 3301 l--; 3302 } 3303 3304 _.options.responsive.push(value[item]); 3305 } 3306 } 3307 } 3308 3309 if (refresh) { 3310 _.unload(); 3311 3312 _.reinit(); 3313 } 3314 }; 3315 3316 Slick.prototype.setPosition = function () { 3317 var _ = this; 3318 3319 _.setDimensions(); 3320 3321 _.setHeight(); 3322 3323 if (_.options.fade === false) { 3324 _.setCSS(_.getLeft(_.currentSlide)); 3325 } else { 3326 _.setFade(); 3327 } 3328 3329 _.$slider.trigger('setPosition', [_]); 3330 }; 3331 3332 Slick.prototype.setProps = function () { 3333 var _ = this, 3334 bodyStyle = document.body.style; 3335 3336 _.positionProp = _.options.vertical === true ? 'top' : 'left'; 3337 3338 if (_.positionProp === 'top') { 3339 _.$slider.addClass('slick-vertical'); 3340 } else { 3341 _.$slider.removeClass('slick-vertical'); 3342 } 3343 3344 if (bodyStyle.WebkitTransition !== undefined || bodyStyle.MozTransition !== undefined || bodyStyle.msTransition !== undefined) { 3345 if (_.options.useCSS === true) { 3346 _.cssTransitions = true; 3347 } 3348 } 3349 3350 if (_.options.fade) { 3351 if (typeof _.options.zIndex === 'number') { 3352 if (_.options.zIndex < 3) { 3353 _.options.zIndex = 3; 3354 } 3355 } else { 3356 _.options.zIndex = _.defaults.zIndex; 3357 } 3358 } 3359 3360 if (bodyStyle.OTransform !== undefined) { 3361 _.animType = 'OTransform'; 3362 _.transformType = '-o-transform'; 3363 _.transitionType = 'OTransition'; 3364 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 3365 } 3366 3367 if (bodyStyle.MozTransform !== undefined) { 3368 _.animType = 'MozTransform'; 3369 _.transformType = '-moz-transform'; 3370 _.transitionType = 'MozTransition'; 3371 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; 3372 } 3373 3374 if (bodyStyle.webkitTransform !== undefined) { 3375 _.animType = 'webkitTransform'; 3376 _.transformType = '-webkit-transform'; 3377 _.transitionType = 'webkitTransition'; 3378 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 3379 } 3380 3381 if (bodyStyle.msTransform !== undefined) { 3382 _.animType = 'msTransform'; 3383 _.transformType = '-ms-transform'; 3384 _.transitionType = 'msTransition'; 3385 if (bodyStyle.msTransform === undefined) _.animType = false; 3386 } 3387 3388 if (bodyStyle.transform !== undefined && _.animType !== false) { 3389 _.animType = 'transform'; 3390 _.transformType = 'transform'; 3391 _.transitionType = 'transition'; 3392 } 3393 3394 _.transformsEnabled = _.options.useTransform && _.animType !== null && _.animType !== false; 3395 }; 3396 3397 Slick.prototype.setSlideClasses = function (index) { 3398 var _ = this, 3399 centerOffset, 3400 allSlides, 3401 indexOffset, 3402 remainder; 3403 3404 allSlides = _.$slider.find('.slick-slide').removeClass('slick-active slick-center slick-current').attr('aria-hidden', 'true'); 3405 3406 _.$slides.eq(index).addClass('slick-current'); 3407 3408 if (_.options.centerMode === true) { 3409 var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0; 3410 centerOffset = Math.floor(_.options.slidesToShow / 2); 3411 3412 if (_.options.infinite === true) { 3413 if (index >= centerOffset && index <= _.slideCount - 1 - centerOffset) { 3414 _.$slides.slice(index - centerOffset + evenCoef, index + centerOffset + 1).addClass('slick-active').attr('aria-hidden', 'false'); 3415 } else { 3416 indexOffset = _.options.slidesToShow + index; 3417 allSlides.slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2).addClass('slick-active').attr('aria-hidden', 'false'); 3418 } 3419 3420 if (index === 0) { 3421 allSlides.eq(_.options.slidesToShow + _.slideCount + 1).addClass('slick-center'); 3422 } else if (index === _.slideCount - 1) { 3423 allSlides.eq(_.options.slidesToShow).addClass('slick-center'); 3424 } 3425 } 3426 3427 _.$slides.eq(index).addClass('slick-center'); 3428 } else { 3429 if (index >= 0 && index <= _.slideCount - _.options.slidesToShow) { 3430 _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false'); 3431 } else if (allSlides.length <= _.options.slidesToShow) { 3432 allSlides.addClass('slick-active').attr('aria-hidden', 'false'); 3433 } else { 3434 remainder = _.slideCount % _.options.slidesToShow; 3435 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 3436 3437 if (_.options.slidesToShow == _.options.slidesToScroll && _.slideCount - index < _.options.slidesToShow) { 3438 allSlides.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder).addClass('slick-active').attr('aria-hidden', 'false'); 3439 } else { 3440 allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false'); 3441 } 3442 } 3443 } 3444 3445 if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') { 3446 _.lazyLoad(); 3447 } 3448 }; 3449 3450 Slick.prototype.setupInfinite = function () { 3451 var _ = this, 3452 i, 3453 slideIndex, 3454 infiniteCount; 3455 3456 if (_.options.fade === true) { 3457 _.options.centerMode = false; 3458 } 3459 3460 if (_.options.infinite === true && _.options.fade === false) { 3461 slideIndex = null; 3462 3463 if (_.slideCount > _.options.slidesToShow) { 3464 if (_.options.centerMode === true) { 3465 infiniteCount = _.options.slidesToShow + 1; 3466 } else { 3467 infiniteCount = _.options.slidesToShow; 3468 } 3469 3470 for (i = _.slideCount; i > _.slideCount - infiniteCount; i -= 1) { 3471 slideIndex = i - 1; 3472 $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex - _.slideCount).prependTo(_.$slideTrack).addClass('slick-cloned'); 3473 } 3474 3475 for (i = 0; i < infiniteCount + _.slideCount; i += 1) { 3476 slideIndex = i; 3477 $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex + _.slideCount).appendTo(_.$slideTrack).addClass('slick-cloned'); 3478 } 3479 3480 _.$slideTrack.find('.slick-cloned').find('[id]').each(function () { 3481 $(this).attr('id', ''); 3482 }); 3483 } 3484 } 3485 }; 3486 3487 Slick.prototype.interrupt = function (toggle) { 3488 var _ = this; 3489 3490 if (!toggle) { 3491 _.autoPlay(); 3492 } 3493 3494 _.interrupted = toggle; 3495 }; 3496 3497 Slick.prototype.selectHandler = function (event) { 3498 var _ = this; 3499 3500 var targetElement = $(event.target).is('.slick-slide') ? $(event.target) : $(event.target).parents('.slick-slide'); 3501 var index = parseInt(targetElement.attr('data-slick-index')); 3502 if (!index) index = 0; 3503 3504 if (_.slideCount <= _.options.slidesToShow) { 3505 _.slideHandler(index, false, true); 3506 3507 return; 3508 } 3509 3510 _.slideHandler(index); 3511 }; 3512 3513 Slick.prototype.slideHandler = function (index, sync, dontAnimate) { 3514 var targetSlide, 3515 animSlide, 3516 oldSlide, 3517 slideLeft, 3518 targetLeft = null, 3519 _ = this, 3520 navTarget; 3521 3522 sync = sync || false; 3523 3524 if (_.animating === true && _.options.waitForAnimate === true) { 3525 return; 3526 } 3527 3528 if (_.options.fade === true && _.currentSlide === index) { 3529 return; 3530 } 3531 3532 if (sync === false) { 3533 _.asNavFor(index); 3534 } 3535 3536 targetSlide = index; 3537 targetLeft = _.getLeft(targetSlide); 3538 slideLeft = _.getLeft(_.currentSlide); 3539 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 3540 3541 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 3542 if (_.options.fade === false) { 3543 targetSlide = _.currentSlide; 3544 3545 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 3546 _.animateSlide(slideLeft, function () { 3547 _.postSlide(targetSlide); 3548 }); 3549 } else { 3550 _.postSlide(targetSlide); 3551 } 3552 } 3553 3554 return; 3555 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > _.slideCount - _.options.slidesToScroll)) { 3556 if (_.options.fade === false) { 3557 targetSlide = _.currentSlide; 3558 3559 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 3560 _.animateSlide(slideLeft, function () { 3561 _.postSlide(targetSlide); 3562 }); 3563 } else { 3564 _.postSlide(targetSlide); 3565 } 3566 } 3567 3568 return; 3569 } 3570 3571 if (_.options.autoplay) { 3572 clearInterval(_.autoPlayTimer); 3573 } 3574
3575 if (targetSlide < 0) { 3576 if (_.slideCount % _.options.slidesToScroll !== 0) { 3577 animSlide = _.slideCount - _.slideCount % _.options.slidesToScroll; 3578 } else { 3579 animSlide = _.slideCount + targetSlide; 3580 } 3581 } else if (targetSlide >= _.slideCount) { 3582 if (_.slideCount % _.options.slidesToScroll !== 0) { 3583 animSlide = 0; 3584 } else { 3585 animSlide = targetSlide - _.slideCount; 3586 } 3587 } else { 3588 animSlide = targetSlide; 3589 } 3590 3591 _.animating = true; 3592 3593 _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); 3594 3595 oldSlide = _.currentSlide; 3596 _.currentSlide = animSlide; 3597 3598 _.setSlideClasses(_.currentSlide); 3599 3600 if (_.options.asNavFor) { 3601 navTarget = _.getNavTarget(); 3602 navTarget = navTarget.slick('getSlick'); 3603 3604 if (navTarget.slideCount <= navTarget.options.slidesToShow) { 3605 navTarget.setSlideClasses(_.currentSlide); 3606 } 3607 } 3608 3609 _.updateDots(); 3610 3611 _.updateArrows(); 3612 3613 if (_.options.fade === true) { 3614 if (dontAnimate !== true) { 3615 _.fadeSlideOut(oldSlide); 3616 3617 _.fadeSlide(animSlide, function () { 3618 _.postSlide(animSlide); 3619 }); 3620 } else { 3621 _.postSlide(animSlide); 3622 } 3623 3624 _.animateHeight(); 3625 3626 return; 3627 } 3628 3629 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 3630 _.animateSlide(targetLeft, function () { 3631 _.postSlide(animSlide); 3632 }); 3633 } else { 3634 _.postSlide(animSlide); 3635 } 3636 }; 3637 3638 Slick.prototype.startLoad = function () { 3639 var _ = this; 3640 3641 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 3642 _.$prevArrow.hide(); 3643 3644 _.$nextArrow.hide(); 3645 } 3646 3647 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 3648 _.$dots.hide(); 3649 } 3650 3651 _.$slider.addClass('slick-loading'); 3652 }; 3653 3654 Slick.prototype.swipeDirection = function () { 3655 var xDist, 3656 yDist, 3657 r, 3658 swipeAngle, 3659 _ = this; 3660 3661 xDist = _.touchObject.startX - _.touchObject.curX; 3662 yDist = _.touchObject.startY - _.touchObject.curY; 3663 r = Math.atan2(yDist, xDist); 3664 swipeAngle = Math.round(r * 180 / Math.PI); 3665 3666 if (swipeAngle < 0) { 3667 swipeAngle = 360 - Math.abs(swipeAngle); 3668 } 3669 3670 if (swipeAngle <= 45 && swipeAngle >= 0) { 3671 return _.options.rtl === false ? 'left' : 'right'; 3672 } 3673 3674 if (swipeAngle <= 360 && swipeAngle >= 315) { 3675 return _.options.rtl === false ? 'left' : 'right'; 3676 } 3677 3678 if (swipeAngle >= 135 && swipeAngle <= 225) { 3679 return _.options.rtl === false ? 'right' : 'left'; 3680 } 3681 3682 if (_.options.verticalSwiping === true) { 3683 if (swipeAngle >= 35 && swipeAngle <= 135) { 3684 return 'down'; 3685 } else { 3686 return 'up'; 3687 } 3688 } 3689 3690 return 'vertical'; 3691 }; 3692 3693 Slick.prototype.swipeEnd = function (event) { 3694 var _ = this, 3695 slideCount, 3696 direction; 3697 3698 _.dragging = false; 3699 _.swiping = false; 3700 3701 if (_.scrolling) { 3702 _.scrolling = false; 3703 return false; 3704 } 3705 3706 _.interrupted = false; 3707 _.shouldClick = _.touchObject.swipeLength > 10 ? false : true; 3708 3709 if (_.touchObject.curX === undefined) { 3710 return false; 3711 } 3712 3713 if (_.touchObject.edgeHit === true) { 3714 _.$slider.trigger('edge', [_, _.swipeDirection()]); 3715 } 3716 3717 if (_.touchObject.swipeLength >= _.touchObject.minSwipe) { 3718 direction = _.swipeDirection(); 3719 3720 switch (direction) { 3721 case 'left': 3722 case 'down': 3723 slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount(); 3724 _.currentDirection = 0; 3725 break; 3726 3727 case 'right': 3728 case 'up': 3729 slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount(); 3730 _.currentDirection = 1; 3731 break; 3732 3733 default: 3734 } 3735 3736 if (direction != 'vertical') { 3737 _.slideHandler(slideCount); 3738 3739 _.touchObject = {}; 3740 3741 _.$slider.trigger('swipe', [_, direction]); 3742 } 3743 } else { 3744 if (_.touchObject.startX !== _.touchObject.curX) { 3745 _.slideHandler(_.currentSlide); 3746 3747 _.touchObject = {}; 3748 } 3749 } 3750 }; 3751 3752 Slick.prototype.swipeHandler = function (event) { 3753 var _ = this; 3754 3755 if (_.options.swipe === false || 'ontouchend' in document && _.options.swipe === false) { 3756 return; 3757 } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { 3758 return; 3759 } 3760 3761 _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? event.originalEvent.touches.length : 1; 3762 _.touchObject.minSwipe = _.listWidth / _.options.touchThreshold; 3763 3764 if (_.options.verticalSwiping === true) { 3765 _.touchObject.minSwipe = _.listHeight / _.options.touchThreshold; 3766 } 3767 3768 switch (event.data.action) { 3769 case 'start': 3770 _.swipeStart(event); 3771 3772 break; 3773 3774 case 'move': 3775 _.swipeMove(event); 3776 3777 break; 3778 3779 case 'end': 3780 _.swipeEnd(event); 3781 3782 break; 3783 } 3784 }; 3785 3786 Slick.prototype.swipeMove = function (event) { 3787 var _ = this, 3788 edgeWasHit = false, 3789 curLeft, 3790 swipeDirection, 3791 swipeLength, 3792 positionOffset, 3793 touches, 3794 verticalSwipeLength; 3795 3796 touches = event.originalEvent !== undefined ? event.originalEvent.touches : null; 3797 3798 if (!_.dragging || _.scrolling || touches && touches.length !== 1) { 3799 return false;
vendor: 5,678 bytes, lines 3800-3991
3800 } 3801 3802 curLeft = _.getLeft(_.currentSlide); 3803 _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX; 3804 _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY; 3805 _.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); 3806 verticalSwipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); 3807 3808 if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) { 3809 _.scrolling = true; 3810 return false; 3811 } 3812 3813 if (_.options.verticalSwiping === true) { 3814 _.touchObject.swipeLength = verticalSwipeLength; 3815 } 3816 3817 swipeDirection = _.swipeDirection(); 3818 3819 if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) { 3820 _.swiping = true; 3821 event.preventDefault(); 3822 } 3823 3824 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 3825 3826 if (_.options.verticalSwiping === true) { 3827 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 3828 } 3829 3830 swipeLength = _.touchObject.swipeLength; 3831 _.touchObject.edgeHit = false; 3832 3833 if (_.options.infinite === false) { 3834 if (_.currentSlide === 0 && swipeDirection === 'right' || _.currentSlide >= _.getDotCount() && swipeDirection === 'left') { 3835 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 3836 _.touchObject.edgeHit = true; 3837 } 3838 } 3839 3840 if (_.options.vertical === false) { 3841 _.swipeLeft = curLeft + swipeLength * positionOffset; 3842 } else { 3843 _.swipeLeft = curLeft + swipeLength * (_.$list.height() / _.listWidth) * positionOffset; 3844 } 3845 3846 if (_.options.verticalSwiping === true) { 3847 _.swipeLeft = curLeft + swipeLength * positionOffset; 3848 } 3849 3850 if (_.options.fade === true || _.options.touchMove === false) { 3851 return false; 3852 } 3853 3854 if (_.animating === true) { 3855 _.swipeLeft = null; 3856 return false; 3857 } 3858 3859 _.setCSS(_.swipeLeft); 3860 }; 3861 3862 Slick.prototype.swipeStart = function (event) { 3863 var _ = this, 3864 touches; 3865 3866 _.interrupted = true; 3867 3868 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 3869 _.touchObject = {}; 3870 return false; 3871 } 3872 3873 if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) { 3874 touches = event.originalEvent.touches[0]; 3875 } 3876 3877 _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX; 3878 _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY; 3879 _.dragging = true; 3880 }; 3881 3882 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () { 3883 var _ = this; 3884 3885 if (_.$slidesCache !== null) { 3886 _.unload(); 3887 3888 _.$slideTrack.children(this.options.slide).detach(); 3889 3890 _.$slidesCache.appendTo(_.$slideTrack); 3891 3892 _.reinit(); 3893 } 3894 }; 3895 3896 Slick.prototype.unload = function () { 3897 var _ = this; 3898 3899 $('.slick-cloned', _.$slider).remove(); 3900 3901 if (_.$dots) { 3902 _.$dots.remove(); 3903 } 3904 3905 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 3906 _.$prevArrow.remove(); 3907 } 3908 3909 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 3910 _.$nextArrow.remove(); 3911 } 3912 3913 _.$slides.removeClass('slick-slide slick-active slick-visible slick-current').attr('aria-hidden', 'true').css('width', ''); 3914 }; 3915 3916 Slick.prototype.unslick = function (fromBreakpoint) { 3917 var _ = this; 3918 3919 _.$slider.trigger('unslick', [_, fromBreakpoint]); 3920 3921 _.destroy(); 3922 }; 3923 3924 Slick.prototype.updateArrows = function () { 3925 var _ = this, 3926 centerOffset; 3927 3928 centerOffset = Math.floor(_.options.slidesToShow / 2); 3929 3930 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow && !_.options.infinite) { 3931 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 3932 3933 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 3934 3935 if (_.currentSlide === 0) { 3936 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 3937 3938 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 3939 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 3940 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 3941 3942 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 3943 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 3944 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 3945 3946 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 3947 } 3948 } 3949 }; 3950 3951 Slick.prototype.updateDots = function () { 3952 var _ = this; 3953 3954 if (_.$dots !== null) { 3955 _.$dots.find('li').removeClass('slick-active').end(); 3956 3957 _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active'); 3958 } 3959 }; 3960 3961 Slick.prototype.visibility = function () { 3962 var _ = this; 3963 3964 if (_.options.autoplay) { 3965 if (document[_.hidden]) { 3966 _.interrupted = true; 3967 } else { 3968 _.interrupted = false; 3969 } 3970 } 3971 }; 3972 3973 $.fn.slick = function () { 3974 var _ = this, 3975 opt = arguments[0], 3976 args = Array.prototype.slice.call(arguments, 1), 3977 l = _.length, 3978 i, 3979 ret; 3980 3981 for (i = 0; i < l; i++) { 3982 if (_typeof(opt) == 'object' || typeof opt == 'undefined') _[i].slick = new Slick(_[i], opt);else ret = _[i].slick[opt].apply(_[i].slick, args); 3983 if (typeof ret != 'undefined') return ret; 3984 } 3985 3986 return _; 3987 }; 3988}); 3989 3990/***/ }), 3991
3992/***/ "./src/js/views/all-wines.js": 3993/*!***********************************!*\ 3994 !*** ./src/js/views/all-wines.js ***! 3995 \***********************************/ 3996/*! exports provided: default */ 3997/***/ (function(module, __webpack_exports__, __webpack_require__) { 3998 3999"use strict"; 4000__webpack_require__.r(__webpack_exports__); 4001/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var mixitup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mixitup */ "./node_modules/mixitup/dist/mixitup.js"); 4002/* harmony import */ var mixitup__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(mixitup__WEBPACK_IMPORTED_MODULE_0__); 4003/* harmony import */ var _mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixitup-multifilter.min.js */ "./src/js/mixitup-multifilter.min.js"); 4004/* harmony import */ var _mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1__); 4005 4006 4007var AllWines = { 4008 init: function init() { 4009 // console.log('AllWines specific code'); 4010 mixitup__WEBPACK_IMPORTED_MODULE_0___default.a.use(_mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1___default.a, { 4011 multifilter: { 4012 enable: true 4013 } 4014 }); // Get the search value from the URL 4015 4016 var hashedValue = window.location.search; 4017 4018 if (hashedValue.replace('?', '') == '') { 4019 hashedValue = 'all'; // Use the default filter if there's no hash value 4020 // hashedValue = hashedValue.replace('#', ''); 4021 } else { 4022 $('.wine-collections .wine-list').removeClass('stagger-wrap'); //wine gift 4023 4024 if (hashedValue.includes("f-3-bottles", "f-4-bottles", "f-6-bottles")) { 4025 hashedValue = hashedValue.replace(/[_]/g, '.'); 4026 hashedValue = hashedValue.replace('.f-4-bottles.f-6-bottles', ', .f-4-bottles, .f-6-bottles'); 4027 hashedValue = hashedValue.replace('?', ''); 4028 var beforeGift = hashedValue.substr(0, hashedValue.indexOf('.f-3-bottles')); 4029 var addBeforeToGifts = ', ' + beforeGift + '.f-4-bottles, ' + beforeGift + '.f-6-bottles'; 4030 hashedValue = hashedValue.replace(', .f-4-bottles, .f-6-bottles', addBeforeToGifts); 4031 } else { 4032 hashedValue = hashedValue.replace(/[_]/g, '.'); 4033 hashedValue = hashedValue.replace('?', ''); 4034 } 4035 } 4036 4037 var mixer = mixitup__WEBPACK_IMPORTED_MODULE_0___default()('.wine-list', { 4038 multifilter: { 4039 enable: true 4040 }, 4041 callbacks: { 4042 onMixEnd: function onMixEnd(state) { 4043 if (state.hasFailed) { 4044 $('.wine-list-empty').css('display', 'flex'); 4045 } else { 4046 $('.wine-list-empty').css('display', 'none'); 4047 } 4048 } // onMixClick: function(state, originalEvent) { 4049 // console.log(state.activeFilter.selector); // 'all' 4050 // } 4051 4052 }, 4053 load: { 4054 filter: hashedValue //filter: '.f-2021, .f-6-bottles' 4055 4056 } 4057 }); //console.log('hashed: ' + hashedValue) 4058 4059 $('#filters-reset').on('click', function () { 4060 mixer.filter('all'); 4061 $('.nav-item').each(function () { 4062 var title = $(this).find('h2'); 4063 var defaultText = title.data('default'); 4064 title.html(defaultText); 4065 title.removeClass('active'); 4066 }); 4067 $('fieldset li button').removeClass('mixitup-control-active'); 4068 var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + ''; 4069 window.history.pushState({ 4070 path: newurl 4071 }, '', newurl); 4072 }); 4073 $('.nav-dropdowns-wrapper fieldset li button').on('click', function () { 4074 $('.nav-item').removeClass('active'); 4075 $('.nav-dropdown').removeClass('active'); 4076 }); 4077 $('.nav-item').on('click', function () { 4078 $('.nav-dropdown').removeClass('active'); 4079 var identifier = $(this).data('identifier'); 4080 var position = $(this).position(); 4081 var minWidth = $(this).width(); 4082 var isActive = $(this).hasClass('active'); 4083 $('.nav-item').removeClass('active'); 4084 4085 if (isActive) { 4086 $('.nav-dropdown').removeClass('active'); 4087 return; 4088 } else { 4089 $(this).addClass('active'); 4090 } 4091 4092 var selectedDropdown = $(".nav-dropdown-".concat(identifier)); 4093 selectedDropdown.addClass('active'); 4094 selectedDropdown.css('left', position.left); 4095 selectedDropdown.css('min-width', minWidth + 20); 4096 }); 4097 $('.nav-dropdowns-wrapper fieldset li button').on('click', function () { 4098 $('.wine-collections .wine-list').removeClass('stagger-wrap'); 4099 var fieldset = $(this).closest('fieldset'); 4100 var identifier = fieldset.data('identifier'); 4101 var navItem = $(".nav-item[data-identifier='".concat(identifier, "']")); 4102 var title = navItem.find('h2'); 4103 var text = $(this).text(); 4104 4105 if (text == 'All' && !navItem.hasClass('gift-filter')) { 4106 var defaultText = title.data('default'); 4107 title.html(defaultText); 4108 title.removeClass('active'); 4109 } else { 4110 title.html(text); 4111 title.addClass('active'); 4112 } 4113 4114 setTimeout(changeURL, 1000); 4115 }); 4116 4117 function changeURL() { 4118 var filter = []; 4119 var active = document.querySelectorAll('.mixitup-control-active'); 4120 document.querySelectorAll('.mixitup-control-active').forEach(function (elem) { 4121 return filter.push(elem.getAttribute('data-filter')); 4122 }); 4123 var filterString = filter.toString().replace(/[,]/g, ''); 4124 var noSpace = filterString.replace(/[ ]/g, ''); //console.log(noSpace) 4125 4126 if (history.pushState) { 4127 var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?' + noSpace.replace(/[.]/g, '_'); 4128 window.history.pushState({ 4129 path: newurl 4130 }, '', newurl); 4131 } 4132 } 4133 4134 var wineList = $('.wine-list'); 4135 $('.nav-dropdown').each(function () { 4136 var target = $(this); 4137 if (target.hasClass('sort')) return; 4138 target.find('button').each(function () { 4139 var btn = $(this); 4140 if (btn.hasClass('all')) return; 4141 var filterClass = btn.data('filter'); 4142 4143 if (wineList.find(filterClass).length === 0) { 4144 btn.parent('li').remove(); 4145 } 4146 }); 4147 }); 4148 } 4149}; 4150/* harmony default export */ __webpack_exports__["default"] = (AllWines); 4151/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4152 4153/***/ }), 4154
4155/***/ "./src/js/views/blog.js": 4156/*!******************************!*\ 4157 !*** ./src/js/views/blog.js ***! 4158 \******************************/ 4159/*! exports provided: default */ 4160/***/ (function(module, __webpack_exports__, __webpack_require__) { 4161 4162"use strict"; 4163__webpack_require__.r(__webpack_exports__); 4164/* harmony import */ var mixitup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mixitup */ "./node_modules/mixitup/dist/mixitup.js"); 4165/* harmony import */ var mixitup__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(mixitup__WEBPACK_IMPORTED_MODULE_0__); 4166/* harmony import */ var _mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixitup-multifilter.min.js */ "./src/js/mixitup-multifilter.min.js"); 4167/* harmony import */ var _mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1__); 4168 4169 4170var Blog = { 4171 init: function init() { 4172 mixitup__WEBPACK_IMPORTED_MODULE_0___default.a.use(_mixitup_multifilter_min_js__WEBPACK_IMPORTED_MODULE_1___default.a, { 4173 multifilter: { 4174 enable: true 4175 } 4176 }); 4177 mixitup__WEBPACK_IMPORTED_MODULE_0___default()('.blog-grid', { 4178 multifilter: { 4179 enable: true 4180 } 4181 }); 4182 } 4183}; 4184/* harmony default export */ __webpack_exports__["default"] = (Blog); 4185 4186/***/ }), 4187
4188/***/ "./src/js/views/default-post.js": 4189/*!**************************************!*\ 4190 !*** ./src/js/views/default-post.js ***! 4191 \**************************************/ 4192/*! exports provided: default */ 4193/***/ (function(module, __webpack_exports__, __webpack_require__) { 4194 4195"use strict"; 4196__webpack_require__.r(__webpack_exports__); 4197var DefaultPost = { 4198 init: function init() {} 4199}; 4200/* harmony default export */ __webpack_exports__["default"] = (DefaultPost); 4201 4202/***/ }), 4203
4204/***/ "./src/js/views/default.js": 4205/*!*********************************!*\ 4206 !*** ./src/js/views/default.js ***! 4207 \*********************************/ 4208/*! exports provided: default */ 4209/***/ (function(module, __webpack_exports__, __webpack_require__) { 4210 4211"use strict"; 4212__webpack_require__.r(__webpack_exports__); 4213/* WEBPACK VAR INJECTION */(function($) {var Default = { 4214 init: function init() { 4215 //hack to prevent tribe event calendar from doing their broken js page redirects 4216 $('.tribe-events-l-container').find('a').on('click', function (e) { 4217 window.location.href = $(this).attr('href'); 4218 e.preventDefault(); 4219 }); 4220 } 4221}; 4222/* harmony default export */ __webpack_exports__["default"] = (Default); 4223/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4224 4225/***/ }), 4226
4227/***/ "./src/js/views/home.js": 4228/*!******************************!*\ 4229 !*** ./src/js/views/home.js ***! 4230 \******************************/ 4231/*! exports provided: default */ 4232/***/ (function(module, __webpack_exports__, __webpack_require__) { 4233 4234"use strict"; 4235__webpack_require__.r(__webpack_exports__); 4236/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 4237 4238var Home = { 4239 init: function init() { 4240 console.log('home specific code'); 4241 $('.anchor-el').each(function () { 4242 var id = $(this).attr('id'); 4243 var tl = gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].timeline({ 4244 scrollTrigger: { 4245 trigger: $('.' + id + "-wrap"), 4246 start: 'top 25%', 4247 end: 'bottom 25%', 4248 toggleClass: { 4249 className: "active", 4250 targets: ".nav-item." + id 4251 } 4252 } 4253 }); 4254 }); 4255 } 4256}; 4257/* harmony default export */ __webpack_exports__["default"] = (Home); 4258/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4259 4260/***/ }), 4261
4262/***/ "./src/js/views/index.js": 4263/*!*******************************!*\ 4264 !*** ./src/js/views/index.js ***! 4265 \*******************************/ 4266/*! exports provided: default */ 4267/***/ (function(module, __webpack_exports__, __webpack_require__) { 4268 4269"use strict"; 4270__webpack_require__.r(__webpack_exports__); 4271/* harmony import */ var _home_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./home.js */ "./src/js/views/home.js"); 4272/* harmony import */ var _visit_us_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visit-us.js */ "./src/js/views/visit-us.js"); 4273/* harmony import */ var _our_wines_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./our-wines.js */ "./src/js/views/our-wines.js"); 4274/* harmony import */ var _all_wines_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./all-wines.js */ "./src/js/views/all-wines.js"); 4275/* harmony import */ var _wine_club_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./wine-club.js */ "./src/js/views/wine-club.js"); 4276/* harmony import */ var _wine_pdp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./wine-pdp.js */ "./src/js/views/wine-pdp.js"); 4277/* harmony import */ var _wine_locator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./wine-locator.js */ "./src/js/views/wine-locator.js"); 4278/* harmony import */ var _default_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./default.js */ "./src/js/views/default.js"); 4279/* harmony import */ var _single_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./single-event.js */ "./src/js/views/single-event.js"); 4280/* harmony import */ var _default_post_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./default-post.js */ "./src/js/views/default-post.js"); 4281/* harmony import */ var _blog_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./blog.js */ "./src/js/views/blog.js"); 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293var Views = { 4294 home: _home_js__WEBPACK_IMPORTED_MODULE_0__["default"], 4295 visitUs: _visit_us_js__WEBPACK_IMPORTED_MODULE_1__["default"], 4296 ourWines: _our_wines_js__WEBPACK_IMPORTED_MODULE_2__["default"], 4297 allWines: _all_wines_js__WEBPACK_IMPORTED_MODULE_3__["default"], 4298 wineClub: _wine_club_js__WEBPACK_IMPORTED_MODULE_4__["default"], 4299 winePdp: _wine_pdp_js__WEBPACK_IMPORTED_MODULE_5__["default"], 4300 wineLocator: _wine_locator_js__WEBPACK_IMPORTED_MODULE_6__["default"], 4301 default: _default_js__WEBPACK_IMPORTED_MODULE_7__["default"], 4302 singleEvent: _single_event_js__WEBPACK_IMPORTED_MODULE_8__["default"], 4303 defaultPost: _default_post_js__WEBPACK_IMPORTED_MODULE_9__["default"], 4304 blog: _blog_js__WEBPACK_IMPORTED_MODULE_10__["default"] 4305}; 4306/* harmony default export */ __webpack_exports__["default"] = (Views); 4307 4308/***/ }), 4309
4310/***/ "./src/js/views/our-wines.js": 4311/*!***********************************!*\ 4312 !*** ./src/js/views/our-wines.js ***! 4313 \***********************************/ 4314/*! exports provided: default */ 4315/***/ (function(module, __webpack_exports__, __webpack_require__) { 4316 4317"use strict"; 4318__webpack_require__.r(__webpack_exports__); 4319/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 4320 4321var OurWines = { 4322 init: function init() { 4323 // console.log('OurWines specific code'); 4324 $('.wine-collections-container-target').each(function () { 4325 var id = $(this).attr('id'); 4326 var tl = gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].timeline({ 4327 scrollTrigger: { 4328 trigger: $('.' + id + "-wrap"), 4329 start: 'top 25%', 4330 end: 'bottom 25%', 4331 toggleClass: { 4332 className: "active", 4333 targets: ".nav-item." + id 4334 } 4335 } 4336 }); 4337 }); 4338 } 4339}; 4340/* harmony default export */ __webpack_exports__["default"] = (OurWines); 4341/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4342 4343/***/ }), 4344
4345/***/ "./src/js/views/single-event.js": 4346/*!**************************************!*\ 4347 !*** ./src/js/views/single-event.js ***! 4348 \**************************************/ 4349/*! exports provided: default */ 4350/***/ (function(module, __webpack_exports__, __webpack_require__) { 4351 4352"use strict"; 4353__webpack_require__.r(__webpack_exports__); 4354var SingleEvent = { 4355 init: function init() {} 4356}; 4357/* harmony default export */ __webpack_exports__["default"] = (SingleEvent); 4358 4359/***/ }), 4360
4361/***/ "./src/js/views/visit-us.js": 4362/*!**********************************!*\ 4363 !*** ./src/js/views/visit-us.js ***! 4364 \**********************************/ 4365/*! exports provided: default */ 4366/***/ (function(module, __webpack_exports__, __webpack_require__) { 4367 4368"use strict"; 4369__webpack_require__.r(__webpack_exports__); 4370/* WEBPACK VAR INJECTION */(function($) {var VisitUs = { 4371 init: function init() { 4372 // console.log('VisitUs specific code'); 4373 $('.acf-map').each(function () { 4374 var map = initMap($(this)); 4375 }); 4376 $('.vu-events-item').on('click', function () { 4377 $('.vu-events-grid-wrapper').addClass('detail-view'); 4378 $('.vu-events-detail-item:eq(' + $(this).index() + ')').addClass('active'); 4379 }); 4380 $('.detail-close').on('click', function () { 4381 $('.vu-events-grid-wrapper').removeClass('detail-view'); 4382 $('.vu-events-detail-item').removeClass('active'); 4383 }); 4384 $('.vu-events-detail-item').each(function () { 4385 var content = $(this).find('.vu-events-detail-item-content'); 4386 4387 if (content.find('hr').length > 0) { 4388 var wrap = '<div class="content-wrap">'; 4389 var wrapEnd = '</div>'; 4390 var html = wrap; 4391 content.children().each(function (i, e) { 4392 var isLastElement = i == content.children().length - 1; // console.log(isLastElement) 4393 4394 if ($(this).is('hr')) { 4395 html += wrapEnd; 4396 } 4397 4398 html += this.outerHTML; 4399 4400 if ($(this).is('hr')) { 4401 html += wrap; 4402 } 4403 4404 if (isLastElement) { 4405 html += wrapEnd; 4406 } 4407 }); 4408 content.empty(); 4409 content.append(html); 4410 } else { 4411 content.addClass('no-flex'); 4412 } 4413 }); 4414 } 4415}; 4416/* harmony default export */ __webpack_exports__["default"] = (VisitUs); 4417/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4418 4419/***/ }), 4420
4421/***/ "./src/js/views/wine-club.js": 4422/*!***********************************!*\ 4423 !*** ./src/js/views/wine-club.js ***! 4424 \***********************************/ 4425/*! exports provided: default */ 4426/***/ (function(module, __webpack_exports__, __webpack_require__) { 4427 4428"use strict"; 4429__webpack_require__.r(__webpack_exports__); 4430/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 4431 4432 4433var WineClub = { 4434 init: function init() { 4435 // console.log('WineClub specific code'); 4436 gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(gsap_all__WEBPACK_IMPORTED_MODULE_0__["ScrollToPlugin"]); 4437 $('a').on('click', function (e) { 4438 var target = $(this); 4439 4440 if (target.attr('href') == '#join') { 4441 e.preventDefault(); // let pos = $('#join').offset().top; 4442 4443 var tl = gsap_all__WEBPACK_IMPORTED_MODULE_0__["gsap"].timeline({ 4444 duration: 0.8, 4445 ease: 'none', 4446 delay: 0 4447 }); 4448 tl.to(window, { 4449 scrollTo: '#join' 4450 }, 0); 4451 console.log(tl); 4452 } 4453 }); 4454 } 4455}; 4456/* harmony default export */ __webpack_exports__["default"] = (WineClub); 4457/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4458 4459/***/ }), 4460
4461/***/ "./src/js/views/wine-locator.js": 4462/*!**************************************!*\ 4463 !*** ./src/js/views/wine-locator.js ***! 4464 \**************************************/ 4465/*! exports provided: default */ 4466/***/ (function(module, __webpack_exports__, __webpack_require__) { 4467 4468"use strict"; 4469__webpack_require__.r(__webpack_exports__); 4470var WineLocator = { 4471 init: function init() {// console.log('WineLocator specific code'); 4472 } 4473}; 4474/* harmony default export */ __webpack_exports__["default"] = (WineLocator); 4475 4476/***/ }), 4477
4478/***/ "./src/js/views/wine-pdp.js": 4479/*!**********************************!*\ 4480 !*** ./src/js/views/wine-pdp.js ***! 4481 \**********************************/ 4482/*! exports provided: default */ 4483/***/ (function(module, __webpack_exports__, __webpack_require__) { 4484 4485"use strict"; 4486__webpack_require__.r(__webpack_exports__); 4487/* WEBPACK VAR INJECTION */(function($) {var WinePDP = { 4488 init: function init() { 4489 // console.log('WinePDP specific code'); 4490 $('#tab-tn').on('click', function () { 4491 $('.product-tab').removeClass('active'); 4492 $(this).addClass('active'); 4493 $('.entry-tab-content').removeClass('active'); 4494 $('.entry-tasting-notes').addClass('active'); 4495 }); 4496 $('#tab-s').on('click', function () { 4497 $('.product-tab').removeClass('active'); 4498 $(this).addClass('active'); 4499 $('.entry-tab-content').removeClass('active'); 4500 $('.entry-specs').addClass('active'); 4501 }); 4502 $('#tab-vo').on('click', function () { 4503 $('.product-tab').removeClass('active'); 4504 $(this).addClass('active'); 4505 $('.entry-tab-content').removeClass('active'); 4506 $('.entry-vintage-outlook').addClass('active'); 4507 }); 4508 $('.entry-tab-content.gift-description').each(function () { 4509 var target = $(this); 4510 var visHeight = target.height(); 4511 var fullHeight = target.find('.wrap').height(); 4512 4513 if (fullHeight > visHeight) { 4514 target.parent().addClass('abridged'); 4515 } 4516 }); 4517 $('.readmore').on('click', function () { 4518 var cont = $('.entry-content'); 4519 cont.toggleClass('show-full'); // console.log(cont.length); 4520 }); 4521 } 4522}; 4523/* harmony default export */ __webpack_exports__["default"] = (WinePDP); 4524/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"))) 4525 4526/***/ })
4526, 4527 4528/***/ 0: 4529/*!*******************************!*\ 4530 !*** multi ./src/js/index.js ***! 4531 \*******************************/ 4532/*! no static exports found */ 4533/***/ (function(module, exports, __webpack_require__) { 4534 4535module.exports = __webpack_require__(/*! ./src/js/index.js */"./src/js/index.js"); 4536 4537 4538/***/ }) 4539 4540/******/ }); 4541//# sourceMappingURL=bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.